five-on-it / apps/client/src/renderer/tracers / Streaks
Class: Streaks
Defined in: apps/client/src/renderer/tracers.ts:72
The streaks of the scene.
Constructors
Constructor
new Streaks(
capacity):Streaks
Defined in: apps/client/src/renderer/tracers.ts:89
Room for capacity streaks.
Parameters
capacity
number
Returns
Streaks
Properties
colors
readonlycolors:Float32Array
Defined in: apps/client/src/renderer/tracers.ts:76
Corner colours with their opacity, 16 floats a streak.
indices
readonlyindices:Uint32Array
Defined in: apps/client/src/renderer/tracers.ts:78
Triangle indices, fixed: two a streak.
live
live:
number=0
Defined in: apps/client/src/renderer/tracers.ts:80
Streaks in flight now.
positions
readonlypositions:Float32Array
Defined in: apps/client/src/renderer/tracers.ts:74
Corner positions, 12 floats a streak.
Methods
add()
add(
from,to,style,now):void
Defined in: apps/client/src/renderer/tracers.ts:105
A streak from from to to in style, fired at now (s); past the cap the oldest gives way.
Parameters
from
to
style
now
number
Returns
void
headOf()
headOf(
q):Vec|undefined
Defined in: apps/client/src/renderer/tracers.ts:131
Where the head of the streak in slot q is drawn now, for the tests; undefined for a free slot.
Parameters
q
number
Returns
Vec | undefined
update()
update(
now,eye?):number
Defined in: apps/client/src/renderer/tracers.ts:120
Flies every streak on to now (s), each turned to face eye (the camera; straight up without one), and clears the ones gone into their impact (each drawn once at least); returns how many are left.
Parameters
now
number
eye?
Returns
number