ControlSystem

ControlSystem ⇐ MRSystem

This system supports interaction event information including mouse and controller interfacing.

Kind: global class
Extends: MRSystem

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.checkCollisions(hand)

Check for any collisions with this MRHand and the rapier physics world.

Kind: instance method of ControlSystem

Param Type Description
hand object the MRHand object whose collisions we are checking with this function.

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 object the current entity

controlSystem.touchEnd(entity)

Handles the end of touch for the current entity

Kind: instance method of ControlSystem

Param Type Description
entity object 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 object 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 object the current entity

controlSystem.pointerRay()

Fills in the this.origin,direction,ray, and hit values based on the rapier world

Kind: instance method of ControlSystem

controlSystem.clearPointer()

clears the gaze/pinch pointer from the scene

Kind: instance method of ControlSystem

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

controlSystem.interact(entity)

Checks what kind of interactions should happen based on the current entity and any events that have happened so far.

Kind: instance method of ControlSystem

Param Type Description
entity object checking if there is any interaction required based on current events and this entity.

controlSystem.pixelRayCast(event) ⇒ object

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