@lakuna/uscene
    Preparing search index...

    Interface ReadonlyCamera

    A camera that views a scene. Read-only.

    interface ReadonlyCamera {
        children: readonly ReadonlyNode[];
        enabled: boolean;
        getWorldViewProjMat: (
            worldMat: Readonly<Matrix4Like>,
        ) => Readonly<Matrix4Like> & Readonly<
            Omit<
                Float32Array<ArrayBufferLike>,
                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
            >,
        > & {
            buffer: Readonly<
                Pick<
                    Float32Array["buffer"],
                    "byteLength"
                    | "maxByteLength"
                    | "slice"
                    | typeof Symbol.toStringTag,
                >,
            >;
        };
        matrix: Readonly<Matrix4Like>;
        parent: ReadonlyNode | undefined;
        projMat: Readonly<Matrix4Like>;
        rotation: Readonly<QuaternionLike> & Readonly<
            Omit<
                Float32Array<ArrayBufferLike>,
                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
            >,
        > & {
            buffer: Readonly<
                Pick<
                    Float32Array["buffer"],
                    "byteLength"
                    | "maxByteLength"
                    | "slice"
                    | typeof Symbol.toStringTag,
                >,
            >;
        };
        scaling: Readonly<Vector3Like> & Readonly<
            Omit<
                Float32Array<ArrayBufferLike>,
                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
            >,
        > & {
            buffer: Readonly<
                Pick<
                    Float32Array["buffer"],
                    "byteLength"
                    | "maxByteLength"
                    | "slice"
                    | typeof Symbol.toStringTag,
                >,
            >;
        };
        scene: ReadonlyNode;
        translation: Readonly<Vector3Like> & Readonly<
            Omit<
                Float32Array<ArrayBufferLike>,
                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
            >,
        > & {
            buffer: Readonly<
                Pick<
                    Float32Array["buffer"],
                    "byteLength"
                    | "maxByteLength"
                    | "slice"
                    | typeof Symbol.toStringTag,
                >,
            >;
        };
        traverse: (
            f:
                | (
                    (
                        self: ReadonlyNode,
                        worldMat: Readonly<Matrix4Like> & Readonly<
                            Omit<
                                Float32Array<ArrayBufferLike>,
                                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
                            >,
                        > & {
                            buffer: Readonly<
                                Pick<
                                    Float32Array["buffer"],
                                    "byteLength"
                                    | "maxByteLength"
                                    | "slice"
                                    | typeof Symbol.toStringTag,
                                >,
                            >;
                        },
                    ) => boolean
                )
                | (
                    (
                        self: ReadonlyNode,
                        worldMat: Readonly<Matrix4Like> & Readonly<
                            Omit<
                                Float32Array<ArrayBufferLike>,
                                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
                            >,
                        > & {
                            buffer: Readonly<
                                Pick<
                                    Float32Array["buffer"],
                                    "byteLength"
                                    | "maxByteLength"
                                    | "slice"
                                    | typeof Symbol.toStringTag,
                                >,
                            >;
                        },
                    ) => void
                ),
        ) => void;
        viewMat: Readonly<Matrix4Like> & Readonly<
            Omit<
                Float32Array<ArrayBufferLike>,
                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
            >,
        > & {
            buffer: Readonly<
                Pick<
                    Float32Array["buffer"],
                    "byteLength"
                    | "maxByteLength"
                    | "slice"
                    | typeof Symbol.toStringTag,
                >,
            >;
        };
        viewProjMat: Readonly<Matrix4Like> & Readonly<
            Omit<
                Float32Array<ArrayBufferLike>,
                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
            >,
        > & {
            buffer: Readonly<
                Pick<
                    Float32Array["buffer"],
                    "byteLength"
                    | "maxByteLength"
                    | "slice"
                    | typeof Symbol.toStringTag,
                >,
            >;
        };
        worldMat: Readonly<Matrix4Like> & Readonly<
            Omit<
                Float32Array<ArrayBufferLike>,
                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
            >,
        > & {
            buffer: Readonly<
                Pick<
                    Float32Array["buffer"],
                    "byteLength"
                    | "maxByteLength"
                    | "slice"
                    | typeof Symbol.toStringTag,
                >,
            >;
        };
        worldTranslation: Readonly<Vector3Like> & Readonly<
            Omit<
                Float32Array<ArrayBufferLike>,
                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
            >,
        > & {
            buffer: Readonly<
                Pick<
                    Float32Array["buffer"],
                    "byteLength"
                    | "maxByteLength"
                    | "slice"
                    | typeof Symbol.toStringTag,
                >,
            >;
        };
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    children: readonly ReadonlyNode[]

    The children of this node. Do not modify this value directly (use Node.addChild and Node.removeChild instead).

    enabled: boolean

    Whether or not this node is enabled. Disabled nodes and their descendents are not included in traversals.

    getWorldViewProjMat: (
        worldMat: Readonly<Matrix4Like>,
    ) => Readonly<Matrix4Like> & Readonly<
        Omit<
            Float32Array<ArrayBufferLike>,
            "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
        >,
    > & {
        buffer: Readonly<
            Pick<
                Float32Array["buffer"],
                "byteLength"
                | "maxByteLength"
                | "slice"
                | typeof Symbol.toStringTag,
            >,
        >;
    }

    Get the world view projection matrix created by multiplying this camera's view projection matrix by the given world matrix. This can be used to render a node as it would appear from the perspective of this camera.

    Type Declaration

      • (
            worldMat: Readonly<Matrix4Like>,
        ): Readonly<Matrix4Like> & Readonly<
            Omit<
                Float32Array<ArrayBufferLike>,
                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
            >,
        > & {
            buffer: Readonly<
                Pick<
                    Float32Array["buffer"],
                    "byteLength"
                    | "maxByteLength"
                    | "slice"
                    | typeof Symbol.toStringTag,
                >,
            >;
        }
      • Parameters

        • worldMat: Readonly<Matrix4Like>

          The world matrix.

        Returns Readonly<Matrix4Like> & Readonly<
            Omit<
                Float32Array<ArrayBufferLike>,
                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
            >,
        > & {
            buffer: Readonly<
                Pick<
                    Float32Array["buffer"],
                    "byteLength"
                    | "maxByteLength"
                    | "slice"
                    | typeof Symbol.toStringTag,
                >,
            >;
        }

        The world view projection matrix.

        • Readonlybuffer: Readonly<
              Pick<
                  Float32Array["buffer"],
                  "byteLength"
                  | "maxByteLength"
                  | "slice"
                  | typeof Symbol.toStringTag,
              >,
          >

          The ArrayBuffer instance referenced by the array.

    matrix: Readonly<Matrix4Like>

    The transformation matrix of this node relative to its parent.

    parent: ReadonlyNode | undefined

    The parent of this node.

    projMat: Readonly<Matrix4Like>

    The projection matrix of this camera.

    rotation: Readonly<QuaternionLike> & Readonly<
        Omit<
            Float32Array<ArrayBufferLike>,
            "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
        >,
    > & {
        buffer: Readonly<
            Pick<
                Float32Array["buffer"],
                "byteLength"
                | "maxByteLength"
                | "slice"
                | typeof Symbol.toStringTag,
            >,
        >;
    }

    The rotation of this node relative to its parent.

    Type Declaration

    • Readonlybuffer: Readonly<
          Pick<
              Float32Array["buffer"],
              "byteLength"
              | "maxByteLength"
              | "slice"
              | typeof Symbol.toStringTag,
          >,
      >

      The ArrayBuffer instance referenced by the array.

    scaling: Readonly<Vector3Like> & Readonly<
        Omit<
            Float32Array<ArrayBufferLike>,
            "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
        >,
    > & {
        buffer: Readonly<
            Pick<
                Float32Array["buffer"],
                "byteLength"
                | "maxByteLength"
                | "slice"
                | typeof Symbol.toStringTag,
            >,
        >;
    }

    The scaling of this node relative to its parent.

    Type Declaration

    • Readonlybuffer: Readonly<
          Pick<
              Float32Array["buffer"],
              "byteLength"
              | "maxByteLength"
              | "slice"
              | typeof Symbol.toStringTag,
          >,
      >

      The ArrayBuffer instance referenced by the array.

    The root node of this node's scene.

    translation: Readonly<Vector3Like> & Readonly<
        Omit<
            Float32Array<ArrayBufferLike>,
            "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
        >,
    > & {
        buffer: Readonly<
            Pick<
                Float32Array["buffer"],
                "byteLength"
                | "maxByteLength"
                | "slice"
                | typeof Symbol.toStringTag,
            >,
        >;
    }

    The translation of this node relative to its parent.

    Type Declaration

    • Readonlybuffer: Readonly<
          Pick<
              Float32Array["buffer"],
              "byteLength"
              | "maxByteLength"
              | "slice"
              | typeof Symbol.toStringTag,
          >,
      >

      The ArrayBuffer instance referenced by the array.

    traverse: (
        f:
            | (
                (
                    self: ReadonlyNode,
                    worldMat: Readonly<Matrix4Like> & Readonly<
                        Omit<
                            Float32Array<ArrayBufferLike>,
                            "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
                        >,
                    > & {
                        buffer: Readonly<
                            Pick<
                                Float32Array["buffer"],
                                "byteLength"
                                | "maxByteLength"
                                | "slice"
                                | typeof Symbol.toStringTag,
                            >,
                        >;
                    },
                ) => boolean
            )
            | (
                (
                    self: ReadonlyNode,
                    worldMat: Readonly<Matrix4Like> & Readonly<
                        Omit<
                            Float32Array<ArrayBufferLike>,
                            "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
                        >,
                    > & {
                        buffer: Readonly<
                            Pick<
                                Float32Array["buffer"],
                                "byteLength"
                                | "maxByteLength"
                                | "slice"
                                | typeof Symbol.toStringTag,
                            >,
                        >;
                    },
                ) => void
            ),
    ) => void

    Perform a function on this node and each of its children recursively.

    Type Declaration

      • (
            f:
                | (
                    (
                        self: ReadonlyNode,
                        worldMat: Readonly<Matrix4Like> & Readonly<
                            Omit<
                                Float32Array<ArrayBufferLike>,
                                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
                            >,
                        > & {
                            buffer: Readonly<
                                Pick<
                                    Float32Array["buffer"],
                                    "byteLength"
                                    | "maxByteLength"
                                    | "slice"
                                    | typeof Symbol.toStringTag,
                                >,
                            >;
                        },
                    ) => boolean
                )
                | (
                    (
                        self: ReadonlyNode,
                        worldMat: Readonly<Matrix4Like> & Readonly<
                            Omit<
                                Float32Array<ArrayBufferLike>,
                                "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
                            >,
                        > & {
                            buffer: Readonly<
                                Pick<
                                    Float32Array["buffer"],
                                    "byteLength"
                                    | "maxByteLength"
                                    | "slice"
                                    | typeof Symbol.toStringTag,
                                >,
                            >;
                        },
                    ) => void
                ),
        ): void
      • Parameters

        • f:
              | (
                  (
                      self: ReadonlyNode,
                      worldMat: Readonly<Matrix4Like> & Readonly<
                          Omit<
                              Float32Array<ArrayBufferLike>,
                              "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
                          >,
                      > & {
                          buffer: Readonly<
                              Pick<
                                  Float32Array["buffer"],
                                  "byteLength"
                                  | "maxByteLength"
                                  | "slice"
                                  | typeof Symbol.toStringTag,
                              >,
                          >;
                      },
                  ) => boolean
              )
              | (
                  (
                      self: ReadonlyNode,
                      worldMat: Readonly<Matrix4Like> & Readonly<
                          Omit<
                              Float32Array<ArrayBufferLike>,
                              "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
                          >,
                      > & {
                          buffer: Readonly<
                              Pick<
                                  Float32Array["buffer"],
                                  "byteLength"
                                  | "maxByteLength"
                                  | "slice"
                                  | typeof Symbol.toStringTag,
                              >,
                          >;
                      },
                  ) => void
              )

          The function to perform for each node. Receives as an argument the node and the node's world matrix. If this function returns true, the node's children are not included in the traversal.

        Returns void

    viewMat: Readonly<Matrix4Like> & Readonly<
        Omit<
            Float32Array<ArrayBufferLike>,
            "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
        >,
    > & {
        buffer: Readonly<
            Pick<
                Float32Array["buffer"],
                "byteLength"
                | "maxByteLength"
                | "slice"
                | typeof Symbol.toStringTag,
            >,
        >;
    }

    The view matrix of this camera, which represents the transformation that would move a scene into view of this camera. This is the inverse of this camera's world matrix.

    Type Declaration

    • Readonlybuffer: Readonly<
          Pick<
              Float32Array["buffer"],
              "byteLength"
              | "maxByteLength"
              | "slice"
              | typeof Symbol.toStringTag,
          >,
      >

      The ArrayBuffer instance referenced by the array.

    viewProjMat: Readonly<Matrix4Like> & Readonly<
        Omit<
            Float32Array<ArrayBufferLike>,
            "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
        >,
    > & {
        buffer: Readonly<
            Pick<
                Float32Array["buffer"],
                "byteLength"
                | "maxByteLength"
                | "slice"
                | typeof Symbol.toStringTag,
            >,
        >;
    }

    The view projection matrix of this camera, which represents the transformation that would move a scene into view of this camera and apply a projection to it. This is the product of this camera's view matrix and projection matrix.

    Type Declaration

    • Readonlybuffer: Readonly<
          Pick<
              Float32Array["buffer"],
              "byteLength"
              | "maxByteLength"
              | "slice"
              | typeof Symbol.toStringTag,
          >,
      >

      The ArrayBuffer instance referenced by the array.

    worldMat: Readonly<Matrix4Like> & Readonly<
        Omit<
            Float32Array<ArrayBufferLike>,
            "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
        >,
    > & {
        buffer: Readonly<
            Pick<
                Float32Array["buffer"],
                "byteLength"
                | "maxByteLength"
                | "slice"
                | typeof Symbol.toStringTag,
            >,
        >;
    }

    The world matrix of this node, which represents its transformation relative to the origin.

    Type Declaration

    • Readonlybuffer: Readonly<
          Pick<
              Float32Array["buffer"],
              "byteLength"
              | "maxByteLength"
              | "slice"
              | typeof Symbol.toStringTag,
          >,
      >

      The ArrayBuffer instance referenced by the array.

    worldTranslation: Readonly<Vector3Like> & Readonly<
        Omit<
            Float32Array<ArrayBufferLike>,
            "buffer" | "copyWithin" | "fill" | "reverse" | "set" | "sort",
        >,
    > & {
        buffer: Readonly<
            Pick<
                Float32Array["buffer"],
                "byteLength"
                | "maxByteLength"
                | "slice"
                | typeof Symbol.toStringTag,
            >,
        >;
    }

    The translation of this node relative to the origin.

    Type Declaration

    • Readonlybuffer: Readonly<
          Pick<
              Float32Array["buffer"],
              "byteLength"
              | "maxByteLength"
              | "slice"
              | typeof Symbol.toStringTag,
          >,
      >

      The ArrayBuffer instance referenced by the array.