Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
Hubs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ar-noc
Hubs
Commits
3ba7696c
Commit
3ba7696c
authored
6 years ago
by
netpro2k
Committed by
johnshaughnessy
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused code in resolve-action-sets
parent
3ee2f099
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/systems/userinput/resolve-action-sets.js
+0
-136
0 additions, 136 deletions
src/systems/userinput/resolve-action-sets.js
with
0 additions
and
136 deletions
src/systems/userinput/resolve-action-sets.js
+
0
−
136
View file @
3ba7696c
import
{
sets
}
from
"
./sets
"
;
import
{
paths
}
from
"
./paths
"
;
export
class
SomeSystem
{
constructor
(
leftHand
,
leftTeleporter
,
rightHand
,
rightTeleporter
,
cursorHand
,
cursorController
)
{
this
.
leftHand
=
leftHand
;
this
.
leftTeleporter
=
leftTeleporter
;
this
.
rightHand
=
rightHand
;
this
.
rightTeleporter
=
rightTeleporter
;
this
.
cursorHand
=
cursorHand
;
this
.
cursorController
=
cursorController
;
this
.
leftHandHoveredObj
=
undefined
;
this
.
leftHandGrabbedObj
=
undefined
;
this
.
rightHandHoveredObj
=
undefined
;
this
.
rightHandGrabbedObj
=
undefined
;
this
.
cursorHoveredObj
=
undefined
;
this
.
cursorGrabbedObj
=
undefined
;
this
.
leftHandHoveringOnInteractable
=
undefined
;
this
.
leftHandHoveringOnPen
=
undefined
;
this
.
leftHandHoveringOnNothing
=
undefined
;
this
.
leftHandHoldingPen
=
undefined
;
this
.
leftHandHoldingInteractable
=
undefined
;
this
.
rightHandHoveringOnInteractable
=
undefined
;
this
.
rightHandHoveringOnPen
=
undefined
;
this
.
rightHandHoveringOnNothing
=
undefined
;
this
.
rightHandHoldingPen
=
undefined
;
this
.
rightHandHoldingInteractable
=
undefined
;
this
.
cursorHoveringOnInteractable
=
undefined
;
this
.
cursorHoveringOnPen
=
undefined
;
this
.
cursorHoveringOnNothing
=
undefined
;
this
.
cursorHoldingPen
=
undefined
;
this
.
cursorHoldingInteractable
=
undefined
;
}
tick
()
{
const
{
rightHand
,
leftHand
,
cursorHand
,
leftTeleporter
,
rightTeleporter
,
cursorController
}
=
this
;
const
leftHandHoveringOnInteractable
=
!
leftTeleporter
.
active
&&
leftHand
.
has
(
"
hover-start
"
)
&&
leftHand
.
get
(
"
hover-start
"
).
matches
(
"
.interactable, .interactable *
"
);
const
leftHandHoveringOnPen
=
!
leftTeleporter
.
active
&&
leftHand
.
has
(
"
hover-start
"
)
&&
leftHand
.
get
(
"
hover-start
"
).
matches
(
"
.pen, .pen *
"
);
const
leftHandHoldingInteractable
=
!
leftTeleporter
.
active
&&
leftHand
.
has
(
"
grab-start
"
)
&&
leftHand
.
get
(
"
grab-start
"
).
matches
(
"
.interactable, .interactable *
"
);
const
leftHandHoldingPen
=
!
leftTeleporter
.
active
&&
leftHand
.
has
(
"
grab-start
"
)
&&
leftHand
.
get
(
"
grab-start
"
).
matches
(
"
.pen, .pen *
"
);
const
leftHandHovering
=
!
leftTeleporter
.
active
&&
leftHand
.
has
(
"
hover-start
"
);
const
leftHandHoveringOnNothing
=
!
leftHandHovering
&&
!
leftHand
.
has
(
"
grab-start
"
);
const
cursorGrabbing
=
cursorHand
.
has
(
"
grab-start
"
);
const
rightHandHoveringOnInteractable
=
!
rightTeleporter
.
active
&&
!
cursorGrabbing
&&
rightHand
.
has
(
"
hover-start
"
)
&&
rightHand
.
get
(
"
hover-start
"
).
matches
(
"
.interactable, .interactable *
"
);
const
rightHandHoveringOnPen
=
!
rightTeleporter
.
active
&&
!
cursorGrabbing
&&
rightHand
.
has
(
"
hover-start
"
)
&&
rightHand
.
get
(
"
hover-start
"
).
matches
(
"
.pen, .pen *
"
);
const
rightHandHoldingInteractable
=
!
rightTeleporter
.
active
&&
!
cursorGrabbing
&&
rightHand
.
has
(
"
grab-start
"
)
&&
rightHand
.
get
(
"
grab-start
"
).
matches
(
"
.interactable, .interactable *
"
);
const
rightHandHoldingPen
=
!
rightTeleporter
.
active
&&
!
cursorGrabbing
&&
rightHand
.
has
(
"
grab-start
"
)
&&
rightHand
.
get
(
"
grab-start
"
).
matches
(
"
.pen, .pen *
"
);
const
rightHandHovering
=
!
rightTeleporter
.
active
&&
!
cursorGrabbing
&&
rightHand
.
has
(
"
hover-start
"
);
const
rightHandGrabbing
=
!
rightTeleporter
.
active
&&
!
cursorGrabbing
&&
rightHand
.
has
(
"
grab-start
"
);
const
rightHandHoveringOnNothing
=
!
rightTeleporter
.
active
&&
!
rightHandHovering
&&
!
cursorHand
.
has
(
"
hover-start
"
)
&&
!
cursorGrabbing
&&
!
rightHand
.
has
(
"
grab-start
"
);
const
cursorHoveringOnInteractable
=
!
rightTeleporter
.
active
&&
!
rightHandHovering
&&
!
rightHandGrabbing
&&
cursorHand
.
has
(
"
hover-start
"
)
&&
cursorHand
.
get
(
"
hover-start
"
).
matches
(
"
.interactable, .interactable *
"
);
const
cursorHoveringOnPen
=
!
rightTeleporter
.
active
&&
!
rightHandHovering
&&
!
rightHandGrabbing
&&
cursorHand
.
has
(
"
hover-start
"
)
&&
cursorHand
.
get
(
"
hover-start
"
).
matches
(
"
.pen, .pen *
"
);
const
cursorHoldingInteractable
=
!
rightTeleporter
.
active
&&
cursorHand
.
has
(
"
grab-start
"
)
&&
cursorHand
.
get
(
"
grab-start
"
).
matches
(
"
.interactable, .interactable *
"
);
const
cursorHoldingPen
=
!
rightTeleporter
.
active
&&
cursorHand
.
has
(
"
grab-start
"
)
&&
cursorHand
.
get
(
"
grab-start
"
).
matches
(
"
.pen, .pen *
"
);
const
cursorHoveringOnNothing
=
!
rightTeleporter
.
active
&&
!
rightHandHovering
&&
!
rightHandGrabbing
&&
!
cursorHand
.
has
(
"
hover-start
"
)
&&
!
cursorHand
.
has
(
"
grab-start
"
);
if
(
rightTeleporter
.
active
||
rightHandHovering
||
rightHandGrabbing
)
{
cursorController
.
disable
();
}
else
{
cursorController
.
enable
();
}
const
userinput
=
AFRAME
.
scenes
[
0
].
systems
.
userinput
;
userinput
.
activate
(
sets
.
leftHandHoveringOnInteractable
,
leftHandHoveringOnInteractable
);
userinput
.
activate
(
sets
.
leftHandHoveringOnPen
,
leftHandHoveringOnPen
);
userinput
.
activate
(
sets
.
leftHandHoveringOnNothing
,
leftHandHoveringOnNothing
);
userinput
.
activate
(
sets
.
leftHandHoldingPen
,
leftHandHoldingPen
);
userinput
.
activate
(
sets
.
leftHandHoldingInteractable
,
leftHandHoldingInteractable
);
userinput
.
activate
(
sets
.
rightHandHoveringOnInteractable
,
rightHandHoveringOnInteractable
);
userinput
.
activate
(
sets
.
rightHandHoveringOnPen
,
rightHandHoveringOnPen
);
userinput
.
activate
(
sets
.
rightHandHoveringOnNothing
,
rightHandHoveringOnNothing
);
userinput
.
activate
(
sets
.
rightHandHoldingPen
,
rightHandHoldingPen
);
userinput
.
activate
(
sets
.
rightHandHoldingInteractable
,
rightHandHoldingInteractable
);
userinput
.
activate
(
sets
.
cursorHoveringOnPen
,
cursorHoveringOnPen
);
userinput
.
activate
(
sets
.
cursorHoveringOnInteractable
,
cursorHoveringOnInteractable
);
userinput
.
activate
(
sets
.
cursorHoveringOnNothing
,
cursorHoveringOnNothing
);
userinput
.
activate
(
sets
.
cursorHoldingPen
,
cursorHoldingPen
);
userinput
.
activate
(
sets
.
cursorHoldingInteractable
,
cursorHoldingInteractable
);
}
}
export
function
updateActionSetsBasedOnSuperhands
()
{
const
rightHand
=
document
.
querySelector
(
"
#player-right-controller
"
).
components
[
"
super-hands
"
].
state
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment