Skip to content

five-on-it / apps/client/src/gui/labels / Projector

Class: Projector ​

Defined in: apps/client/src/gui/labels.ts:37

Projects world points to the page with the view the scene is drawing now.

Constructors ​

Constructor ​

new Projector(scene, engine, camera): Projector

Defined in: apps/client/src/gui/labels.ts:45

Parameters ​

scene ​

Scene

engine ​

Engine

camera ​

() => Camera | null

Returns ​

Projector

Methods ​

project() ​

project(p): { x: number; y: number; } | undefined

Defined in: apps/client/src/gui/labels.ts:52

Where a world point lands on the canvas (CSS px), or undefined behind the camera.

Parameters ​

p ​

WorldPoint

Returns ​

{ x: number; y: number; } | undefined