marble3 / LaserPointer
Class: LaserPointer
Defined in: src/cursor/laser-pointer.ts:10
A line from the camera to the first body it looks at, or 1000 units out when there is none. The line is a child of the camera; add the entity to the FPS so that it is updated every frame.
Extends
Constructors
Constructor
new LaserPointer(
camera,color?):LaserPointer
Defined in: src/cursor/laser-pointer.ts:14
Parameters
camera
Camera
color?
number = 0x00ff00
Returns
LaserPointer
Overrides
Properties
camera
camera:
Camera
Defined in: src/cursor/laser-pointer.ts:12
disposed
protecteddisposed:boolean=false
Defined in: src/entity/graphic.ts:19
Inherited from
id
id:
string
Defined in: src/entity/graphic.ts:16
Unique per entity. Keys FPS.entities, and is stamped on collision shapes so a ray or contact hit resolves back to its entity.
Inherited from
line
line:
Line
Defined in: src/cursor/laser-pointer.ts:11
three
three:
Group
Defined in: src/entity/graphic.ts:18
The entity's node in the scene; FPS.add() puts it there. Add your meshes under it.
Inherited from
Methods
dispose()
dispose():
void
Defined in: src/entity/graphic.ts:30
Frees the geometry and instance buffers under three and takes it out of the scene. Idempotent. Materials and textures are not freed, since they are often shared: dispose your own. A subclass frees what else it owns, then calls super.dispose().
Returns
void
Inherited from
update()
update(
_delta,engine?):null
Defined in: src/cursor/laser-pointer.ts:26
Called every frame the world is not paused, with the seconds since the last frame and the FPS the entity lives in (for its world and entities).
Parameters
_delta
number
engine?
Returns
null