VirtualMouseModule

modules/app/ VirtualMouseModule

.new VirtualMouseModule(globalMovementopt)

Source:
Parameters:
Name Type Attributes Default Description
globalMovement Boolean <optional>
false

Extends Events

Members

.ray :THREE.Ray

Mouse ray

Source:

.x :Number

Mouse x [-1; 1]

Source:

.y :Number

Mouse y [-1; 1]

Source:

Methods

(static) .hovers(component, nested) → {Boolean}

Returns a boolean based on intersection data (Whether mouse hovers the component)

Source:
Parameters:
Name Type Description
component Component

A component that intersects with mouse ray (or doesn't)

nested Boolean

Whether component's children should be affected or not

(static) .intersection(component, nested) → {Array}

Returns an intersection data

Source:
Parameters:
Name Type Description
component Component

A component that intersects with mouse ray (or doesn't)

nested Boolean

Whether component's children should be affected or not

(static) .project(planeopt, targetopt) → {Vector3}

Returns a boolean based on intersection data (Whether mouse hovers the component)

Source:
Parameters:
Name Type Attributes Default Description
plane THREE.Plane <optional>
this.projectionPlane

Math plane that is used

target Vector3 <optional>

Optional target

(static) .track(component, nested)

Starts tracking events on a component

Source:
Parameters:
Name Type Description
component Component

A component, that should be tracked by the mouse

nested Boolean

Whether component's children should be affected or not