Skip to content

five-on-it / apps/client/src/renderer/drone-view / DroneView

Interface: DroneView ​

Defined in: apps/client/src/renderer/drone-view.ts:57

The drones' view.

Methods ​

dispose() ​

dispose(): void

Defined in: apps/client/src/renderer/drone-view.ts:67

Takes every drone and the meshes they share out of the scene.

Returns ​

void


nearest() ​

nearest(at): number

Defined in: apps/client/src/renderer/drone-view.ts:65

How far the nearest drone in the air is from a point on the ground (m, horizontal), Infinity with none.

Parameters ​

at ​
x ​

number

z ​

number

Returns ​

number


render() ​

render(now): void

Defined in: apps/client/src/renderer/drone-view.ts:61

One frame: each drone moved to where it is now (its last pose carried on by its velocity for the time since, at most 0.25 s, eased toward so it never jumps), its rotors spinning while it flies, its light blinking, its shadow on what is under it.

Parameters ​

now ​

number

Returns ​

void


shown() ​

shown(): DroneShown[]

Defined in: apps/client/src/renderer/drone-view.ts:63

The flyers drawn now (for the tests' window.__poc()).

Returns ​

DroneShown[]


update() ​

update(entities, now): void

Defined in: apps/client/src/renderer/drone-view.ts:59

A snapshot's entities: the flyers in it (but the helicopters) are drawn, those it no longer lists go. now is performance.now() in ms.

Parameters ​

entities ​

readonly EntitySnapshot[]

now ​

number

Returns ​

void