ControlSystem
MRSystem
ControlSystem ⇐ This system supports interaction event information including mouse and controller interfacing.
Kind: global class
Extends: MRSystem
- ControlSystem ⇐
MRSystem
- .ControlSystem
- .update(deltaTime, frame)
- .onContactStart(handle1, handle2)
- .onContactEnd(handle1, handle2)
- .touchStart(collider1, collider2, entity)
- .touchEnd(entity)
- .hoverStart(collider1, collider2, entity)
- .hoverEnd(entity)
- .mouseOver(event)
- .onMouseDown(event)
- .onMouseUp(event)
- .pixelRayCast(event) ⇒
object
controlSystem.ControlSystem
Kind: instance class of ControlSystem
new exports.ControlSystem()
ControlSystem’s Default constructor that sets up the app’s mouse information along with any relevant physics and cursor information.
controlSystem.update(deltaTime, frame)
The generic system update call. Updates the meshes and states for both the left and right hand visuals.
Kind: instance method of ControlSystem
Param | Type | Description |
---|---|---|
deltaTime | number |
given timestep to be used for any feature changes |
frame | object |
given frame information to be used for any feature changes |
controlSystem.onContactStart(handle1, handle2)
Handles the start of collisions between two different colliders.
Kind: instance method of ControlSystem
Param | Type | Description |
---|---|---|
handle1 | number |
the first collider |
handle2 | number |
the second collider |
controlSystem.onContactEnd(handle1, handle2)
Handles the end of collisions between two different colliders.
Kind: instance method of ControlSystem
Param | Type | Description |
---|---|---|
handle1 | number |
the first collider |
handle2 | number |
the second collider |
controlSystem.touchStart(collider1, collider2, entity)
Handles the start of touch between two different colliders and the current entity.
Kind: instance method of ControlSystem
Param | Type | Description |
---|---|---|
collider1 | number |
the first collider |
collider2 | number |
the second collider |
entity | MREntity |
the current entity |
controlSystem.touchEnd(entity)
Handles the end of touch for the current entity
Kind: instance method of ControlSystem
Param | Type | Description |
---|---|---|
entity | MREntity |
the current entity |
controlSystem.hoverStart(collider1, collider2, entity)
Handles the start of hovering over/around a specific entity.
Kind: instance method of ControlSystem
Param | Type | Description |
---|---|---|
collider1 | number |
the first collider |
collider2 | number |
the second collider |
entity | MREntity |
the current entity |
controlSystem.hoverEnd(entity)
Handles the end of hovering over/around a specific entity.
Kind: instance method of ControlSystem
Param | Type | Description |
---|---|---|
entity | MREntity |
the current entity |
controlSystem.mouseOver(event)
Handles the mouse over event
Kind: instance method of ControlSystem
Param | Type | Description |
---|---|---|
event | event |
the mouse over event |
controlSystem.onMouseDown(event)
Handles the mouse down event
Kind: instance method of ControlSystem
Param | Type | Description |
---|---|---|
event | event |
the mouse down event |
controlSystem.onMouseUp(event)
Handles the mouse up event
Kind: instance method of ControlSystem
Param | Type | Description |
---|---|---|
event | event |
the mouse up event |
object
controlSystem.pixelRayCast(event) ⇒ Raycast into the scene using the information from the event that called it.
Kind: instance method of ControlSystem
Returns: object
- - collision item for what the ray hit in the 3d scene.
Param | Type | Description |
---|---|---|
event | object |
the event being handled |