Skip to content

point2ToUv

point2ToUv(p, rect): Vec2

Defined in: coordinate-spaces.ts:40

Converts a point in pixel coordinates to UV coordinates relative to a given rectangle.

Point2

The point in pixel coordinates.

Rect2

The rectangle defining the UV space.

Vec2

The point in UV coordinates, where x and y are in the range [0, 1].