Gets the projection aspect ratio.
Sets the projection aspect ratio and recomputes the projection matrix.
Gets the far clipping plane distance.
Sets the far clipping plane distance and recomputes the projection matrix.
Gets the Field of View angle in radians.
Sets the Field of View angle in radians and recomputes the projection matrix.
Gets the material associated with this node if it is a Mesh, or recursively searches descendants and returns the material of the first child Mesh found.
The Material instance, or null if none was found.
Sets the material for this node (if it is a Mesh) or recursively applies it to all descendant Mesh nodes.
The Material instance to assign.
Gets all unique materials associated with this node and its descendants.
An array of Material instances.
Gets the near clipping plane distance.
Sets the near clipping plane distance and recomputes the projection matrix.
Gets the spatial 3D position vector of this node. Modifying individual components of this vector will automatically flag the node as dirty.
Sets the spatial 3D position vector of this node. Copies the components of the incoming vector and flags the node as dirty.
Gets the spatial Euler rotation vector (pitch, yaw, roll) in radians. Modifying individual components of this vector will automatically flag the node as dirty.
Sets the spatial Euler rotation vector (pitch, yaw, roll) in radians. Copies the components of the incoming vector and flags the node as dirty.
Gets the spatial Euler rotation vector in degrees. Accessing or mutating components of this proxy converts automatically to/from radians.
Sets the spatial Euler rotation vector in degrees. Converts the incoming components to radians and flags the node as dirty.
Gets the spatial 3D scale vector of this node. Modifying individual components of this vector will automatically flag the node as dirty.
Sets the spatial 3D scale vector of this node. Copies the components of the incoming vector and flags the node as dirty.
Instantiates a new Camera node with specified configurations.
Custom camera configurations.
Adds a child node to this node's hierarchy. If the child already has a parent, it is automatically removed from that parent first. Sets the child's dirty flag to true to force transform updates.
The Node instance to append as a child.
Spawns and registers an interactive CameraController of the designated operational mode.
Orbit, first-person orbital, or target third-person camera controls.
Custom configurations matching parameters of the specific mode.
The newly allocated CameraController instance.
Spawns and registers an interactive CameraController of the designated operational mode.
Orbit, first-person orbital, or target third-person camera controls.
Custom configurations matching parameters of the specific mode.
The newly allocated CameraController instance.
Spawns and registers an interactive CameraController of the designated operational mode.
Orbit, first-person orbital, or target third-person camera controls.
Optionaloptions: OrbitOptionsCustom configurations matching parameters of the specific mode.
The newly allocated CameraController instance.
Computes and returns the world-space bounding box (AABB) of this node's collision shape. Transform the local shape bounds by the node's current world-space transformation matrix.
The transformed AABB bounding box, or null if no collision shape is set.
Allocates logical GPUBuffers and registers camera memory tracking within the VRAM tracker.
Shared framework context.
Determines if this node's world-space collision bounds overlap with another node's bounds. Both nodes must have active collision shapes; returns false otherwise.
The other Node3D instance to test against.
True if the world-space AABBs intersect, false otherwise.
Removes a child node from this node's hierarchy. Clears the parent reference of the child node and sets its dirty flag.
The Node instance to detach.
Helper method to set position, rotation, and scale components simultaneously. Copies existing components from provided vectors and marks the node transform as dirty.
Performs a depth-first traversal of the node hierarchy starting from this node, executing the provided callback on each visited node.
The function to invoke for each node.
Recomputes the view matrix (lookAt transformation) and propagates
view-projection matrices directly into GPU uniform buffer buffers.
Forces recomputation of the perspective projection matrix based on fov, aspect, near, and far.
Updates the global world matrix of this node and recursively propagates the updates down the hierarchy to all child nodes.
If true, forces transformation matrices to be recomputed even if they are not flagged as dirty.
OptionalbindShared resource GPUBindGroup layout mapping.
ReadonlychildrenList of child nodes belonging to this node.
Optional collision shape representing the physical bounds of this node. Utilized for standard AABB intersection tests and spatial overlap checks.
Attached interactive controller handling standard input orbital, first-person, or third-person cameras.
Whether the local transform has changed and needs to be recomputed and propagated.
Local transformation matrix relative to the parent node.
Unique identifier or friendly name for the node.
Parent node in the scene graph. Null if this is the root node.
Mathematical perspective projection matrix.
OptionaluniformDedicated WebGPU GPUBuffer holding camera matrices.
Mathematical view matrix representing inverse coordinate space transformations.
Combined view-projection matrix representing global clip-space transforms.
Visibility flag. If false, this node and its descendants are typically skipped in rendering.
Global world transformation matrix relative to the scene origin.
Camera represents a viewpoint node within the 3D scene. It manages projection, view, and concatenated view-projection matrices, and maintains dedicated WebGPU uniform buffers describing camera matrices and spatial positions to fragment shaders.