Skip to main content

Module objects

Module objects 

Source
Expand description

Ports of three.js/src/objects (plus Scene and the renderer’s QuadMesh).

Re-exports§

pub use batched_mesh::BatchCamera;
pub use batched_mesh::BatchedMesh;
pub use batched_mesh::CustomSort;
pub use batched_mesh::GeometryInfo;
pub use batched_mesh::MultiDrawItem;
pub use batched_mesh::SortContext;

Structs§

BatchCamera
The camera state onBeforeRender() needs.
BatchedMesh
BatchedMesh extends Mesh.
Bone
class Bone extends Object3D.
ClippingGroup
ClippingGroup — a Group whose clipping planes clip every descendant, which is how WebGPURenderer encodes clipping in the scene graph (Material.clippingPlanes and renderer.clippingPlanes are WebGL-only).
Fog
Fog — linear fog: none before near, all fog from far on.
FogExp2
FogExp2 — exponential squared fog of one density.
GeometryInfo
One entry of _geometryInfo.
Group
Group — an Object3D that exists only to hold children, with type = 'Group' and isGroup = true. three.js implements it as a subclass with no extra state, so here it is a constructor returning a ObjectRef.
InstancedBufferAttribute
new InstancedBufferAttribute( new Float32Array( count * 16 ), 16 ).
InstancedMesh
InstancedMesh extends Mesh: one geometry and material, drawn count times with a per-instance transform (and optionally colour).
Line
The state Line adds to Object3D: geometry and material, exactly as Mesh has them. It lives in a node’s Payload — see docs/scene-graph.md.
LineSegments
class LineSegments extends Line — a series of lines drawn between pairs of vertices, i.e. line-list rather than line-strip. The only state it adds is isLineSegments, so it is a constructor on Line’s payload rather than a payload of its own.
Mesh
The state Mesh adds to Object3D. It lives in a node’s Payload rather than wrapping an Object3D, because the renderer finds meshes by walking the tree — see docs/scene-graph.md.
MultiDrawItem
One entry of MultiDrawRenderList.list.
Points
The state Points adds to Object3D: geometry and material, plus the non-standard count the compute examples set.
QuadMesh
QuadMesh — draws one oversized triangle covering the full screen, for a post-processing pass.
Scene
Scene extends Object3D.
Skeleton
class Skeleton.
SkinnedMesh
class SkinnedMesh extends Mesh.
SortContext
What the page’s sortFunction reads off this and camera. three.js calls the custom sort with this bound to the mesh and the camera as the second argument; the port hands it only the two values any sort on the ladder uses.
Sprite
The state Sprite adds to Object3D. It lives in a node’s Payload, as Mesh’s does — see docs/scene-graph.md.

Enums§

Background
Scene.background. three.js accepts a Color, a Texture or a CubeTexture; Background.update() branches on which one it is — a colour becomes the clear value, anything else becomes the skybox mesh.
BindMode
AttachedBindMode / DetachedBindMode from src/constants.js.
Payload
The subclass state of one crate::core::Object3D.
SceneFog
What scene.fog may hold: a Fog or a FogExp2.

Functions§

is_bone
object.isBone.

Type Aliases§

CustomSort
BatchedMesh.customSort.