@pixi/3d
    Preparing search index...

    Interface PointData4D

    Minimal { x, y, z, w } shape that 4D math methods accept

    Any plain object with these four numbers can be passed in place of a full Vector4.

    const p: PointData4D = { x: 1, y: 2, z: 3, w: 1 };

    const v4 = new Vector4();
    v4.copyFrom(p);
    interface PointData4D {
        w: number;
        x: number;
        y: number;
        z: number;
    }

    Hierarchy (View Summary)

    Index
    w x y z
    w: number

    Fourth component, by convention 1 for a position and 0 for a direction

    const behindCamera = clip.w <= 0;
    
    x: number

    The x component

    const clip = new Vector4(point.x, point.y, point.z, 1).applyMatrix4(camera.viewProjection);
    const screenX = clip.x / clip.w;
    y: number

    The y component

    const screenY = clip.y / clip.w;
    
    z: number

    The z component

    const depth = clip.z / clip.w;