pub struct ClippingGroup {
pub clipping_planes: Vec<Plane>,
pub enabled: bool,
pub clip_intersection: bool,
pub clip_shadows: bool,
}Expand description
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).
The renderer’s walk keeps a clipping context per group it enters
(ClippingContext.getGroupContext()): a nested group’s planes are added to
its parent’s, as an intersection when clip_intersection is set and as a
union otherwise. The planes are world-space and read every frame, so moving
one needs nothing; changing how many there are rebuilds the programs below
the group, as a new cache key does in three.js.
The node is an Object3D with type = 'ClippingGroup' and isGroup = true; this state is its Payload::ClippingGroup.
Fields§
§clipping_planes: Vec<Plane>ClippingGroup.clippingPlanes, world-space.
enabled: boolClippingGroup.enabled — with it off the group clips nothing and its
descendants keep the context they would have had without it.
clip_intersection: boolClippingGroup.clipIntersection — clip only what is behind all of
the planes, rather than what is behind any one of them.
clip_shadows: boolClippingGroup.clipShadows — whether the planes also clip the
descendants’ shadow-map draws.