Skip to main content
Version: Next

Function: getNormalizedPixelCoordinatesBySize()

getNormalizedPixelCoordinatesBySize(pixelX, pixelY, width, height): Vector2

Defined in: packages/utilities/src/worldToViewport.ts:73

Converts a pixel coordinate to normalized device coordinate (in range [-1, 1])

Parameters

pixelX

number

pixelY

number

width

number

height

number

Returns

Vector2