shamansir / elm-aframe / AFrame.Components.Raycaster

Raycaster

Setup

origin : Basics.Float -> Basics.Float -> Basics.Float -> AFrame.Properties.Property

Vector3 coordinate of where the ray should originate from relative to the entity’s origin.

Default : 0 0 0

direction : Basics.Float -> Basics.Float -> Basics.Float -> AFrame.Properties.Property

Vector3 coordinate of which direction the ray should point from relative to the entity’s origin.

Default : 0 0 -1

objects : String -> AFrame.Properties.Property

Query selector to pick which objects to test for intersection. If not specified, all entities will be tested. Note that only objects attached via .setObject3D and their recursive children will be tested.

Default : None

interval : Basics.Int -> AFrame.Properties.Property

Number of milliseconds to wait in between each intersection test. Lower number is better for faster updates. Higher number is better for performance. Intersection tests are performed at most once per frame.

Default : 0

Continuation

near : Basics.Float -> AFrame.Properties.Property

Minimum distance over which resuilting entities are returned. Cannot be lower than 0.

Default : 0

far : Basics.Float -> AFrame.Properties.Property

Maximum distance under which resulting entities are returned. Cannot be lower than near.

Default : Infinity

inifitelyFar : AFrame.Properties.Property

Other

showLine : Basics.Bool -> AFrame.Properties.Property

Whether or not to display the raycaster visually with the line component.

Default : false

autoRefresh : Basics.Bool -> AFrame.Properties.Property

Whether to automatically refresh raycaster’s list of objects to test for intersection using mutation observers to detect added or removed entities and components.

Default : true

enabled : Basics.Bool -> AFrame.Properties.Property

Whether raycaster is actively checking for intersections.

Default : true

useWorldCoordinates : Basics.Bool -> AFrame.Properties.Property

Whether the raycaster origin and direction properties are specified in world coordinates.

Default : false