@vaguevoid/fiasco / math/coordinates / worldToClip
Function: worldToClip()
worldToClip(
position
,camera
):Vec3
Defined in: src/math/coordinates.ts:40
Convert the given world-space position
into homogenous clip space of the given camera
.
ts
import { Coords, Camera, Query } from '@vaguevoid/fiasco'
function system(cameras: Query<[Camera]>) {
for (const [camera] of cameras) {
const result = Coords.worldToClip({ x: 0, y: 0, z: 0}, camera)
}
}