gpu-curtains
    Preparing search index...

    Defines the DOMObject3D bounding boxes in both document and world spaces.

    interface DOMObject3DSize {
        shouldUpdate: boolean;
        normalizedWorld: { size: Vec2; position: Vec2 };
        cameraWorld: { size: Vec2 };
        scaledWorld: { size: Vec3; position: Vec3 };
    }
    Index

    Properties

    shouldUpdate: boolean

    Whether we should update the computed sizes before updating the matrices.

    normalizedWorld: { size: Vec2; position: Vec2 }

    Normalized world size represent the size ratio of the DOM element compared to its container (the renderer DOM element).

    Type Declaration

    • size: Vec2

      2D size of the DOMObject3D relative to the document, in the [0, 1] range.

    • position: Vec2

      2D position of the DOMObject3D relative to the document, in the [-1, 1] range, [0, 0] being at the container center.

    cameraWorld: { size: Vec2 }

    Camera world size and position are the normalizedWorld size and positions accounting for camera screen ratio (visible height / width in world unit)

    Type Declaration

    • size: Vec2

      2D size of the DOMObject3D relative to the camera field of view and size.

    scaledWorld: { size: Vec3; position: Vec3 }

    Scaled world size and position are the cameraWorld size and position scaled by the geometry bounding box, because the geometry vertices are not always in the [-1, 1] range.

    Type Declaration

    • size: Vec3

      3D size of the DOMObject3D relative to the camera field of view and size and the geometry bounding box.

    • position: Vec3

      3D position of the DOMObject3D relative to the camera field of view and size and the normalized coordinates.