BaseBillboardHandler

Source: BaseBillboardHandler.ts:30


Constructor

new BaseBillboardHandler(entityCollection): BaseBillboardHandler

Instance Methods

_setChangedBuffer(index: number)

Marks a buffer to be updated in the next frame and requests the frame to be rendered.

Parameters

  • index (number) — Buffer index.

_setChangedPositionRange(from: number, to: number)

Marks a half open range of the position arrays as changed, so that the next update uploads only that range instead of the whole buffer.

Parameters

  • from (number) — First changed float index.
  • to (number) — Index past the last changed float.

getRTCPosition( pos: Vec3, rtcPositionHigh: Vec3, rtcPositionLow: Vec3, )

Splits the position relative to the center into two 32-bit floats.

Parameters

  • pos (Vec3) — Cartesian position.
  • rtcPositionHigh (Vec3) — Out high part.
  • rtcPositionLow (Vec3) — Out low part.

setRelativeCenter(c: Vec3)

Sets the center the positions are relative to, near the camera they keep the precision.

Parameters

  • c (Vec3) — Center.