Capítulo 644 de 859

Chapter 644: ClippingGroup

Core Idea

In earlier three.js versions, clipping was defined globally on the renderer or on material level. This special version of THREE.Group allows to encode the clipping state into the scene graph. Meaning if you create an instance of this group, all descendant 3D objects will be affected by the respective clipping planes.

Note: ClippingGroup can only be used with WebGPURenderer.

Key Concepts

  • clipIntersection : boolean: Whether the intersection of the clipping planes is used to clip objects, rather than their union.
  • clipShadows : boolean: Whether shadows should be clipped or not.
  • clippingPlanes : Array.<Plane>: An array with clipping planes.
  • enabled : boolean: Whether clipping should be enabled or not.
  • isClippingGroup : boolean (readonly): This flag can be used for type testing.

Reference Tables

Constructor

Signature
new ClippingGroup()

Properties

PropertyDescription
.clipIntersection : booleanWhether the intersection of the clipping planes is used to clip objects, rather than their union.
.clipShadows : booleanWhether shadows should be clipped or not.
.clippingPlanes : Array.<Plane>An array with clipping planes.
.enabled : booleanWhether clipping should be enabled or not.
.isClippingGroup : boolean (readonly)This flag can be used for type testing.

Key Takeaways

  1. ClippingGroup extends: EventDispatcher → Object3D → Group
  2. Most relevant properties: clipIntersection, clipShadows, clippingPlanes, enabled.

Connects To