Function: worldToScreenSpace()
worldToScreenSpace(
worldPosition,cameraPosition,cameraZoom,canvasCenter,pixelsPerUnit?):Vector2
Defined in: rendering/transforms/world-to-screen-space.ts:14
Converts a position from world space to screen space.
Parameters
worldPosition
The position in world space.
cameraPosition
The position of the camera in world space.
cameraZoom
number
The zoom level of the camera.
canvasCenter
The center of the canvas.
pixelsPerUnit?
number = 1
The number of pixels one world unit occupies (see
calculatePixelsPerUnit). Defaults to 1.
Returns
The position in screen space.