Skip to main content
Version: 4.x

Function: getNormalizedPixelCoordinatesBySize()

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

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

Parameters

pixelX: number

pixelY: number

width: number

height: number

Returns

THREE.Vector2

Defined in

packages/utilities/src/worldToViewport.ts:73