@lakuna/uscene
    Preparing search index...

    Interface ReadonlyNode

    A node in a scene graph. Read-only.

    interface ReadonlyNode {
        children: readonly ReadonlyNode[];
        enabled: boolean;
        matrix: Readonly<Matrix4Like>;
        parent: ReadonlyNode | undefined;
        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;
        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.

    matrix: Readonly<Matrix4Like>

    The transformation matrix of this node relative to its parent.

    parent: ReadonlyNode | undefined

    The parent of this node.

    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

    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.