Class: ClipPlaneSet
Defined in: src/utils/ClipPlane.ts:251
Manages multiple clip planes for a surface.
Provides convenience methods for common clipping operations and synchronizes with both CPU and GPU rendering modes.
Constructors
Constructor
new ClipPlaneSet(): ClipPlaneSet;Defined in: src/utils/ClipPlane.ts:260
Returns
ClipPlaneSet
Properties
x
readonly x: ClipPlane;Defined in: src/utils/ClipPlane.ts:253
Clip planes indexed by axis
y
readonly y: ClipPlane;Defined in: src/utils/ClipPlane.ts:254
z
readonly z: ClipPlane;Defined in: src/utils/ClipPlane.ts:255
Methods
setClipPlane()
setClipPlane(
axis,
distance,
enabled?,
flip?): this;Defined in: src/utils/ClipPlane.ts:275
Set a clip plane by axis.
Parameters
axis
ClipAxis
Which axis to clip
distance
number
Distance from origin
enabled?
boolean = true
Whether to enable (default: true)
flip?
boolean = false
Flip clipping direction (default: false)
Returns
this
getClipPlane()
getClipPlane(axis): ClipPlane;Defined in: src/utils/ClipPlane.ts:290
Get clip plane by axis.
Parameters
axis
ClipAxis
Returns
enableClipPlane()
enableClipPlane(axis): this;Defined in: src/utils/ClipPlane.ts:297
Enable a clip plane.
Parameters
axis
ClipAxis
Returns
this
disableClipPlane()
disableClipPlane(axis): this;Defined in: src/utils/ClipPlane.ts:305
Disable a clip plane.
Parameters
axis
ClipAxis
Returns
this
clearClipPlanes()
clearClipPlanes(): this;Defined in: src/utils/ClipPlane.ts:313
Disable all clip planes.
Returns
this
getThreePlanes()
getThreePlanes(): Plane[];Defined in: src/utils/ClipPlane.ts:322
Get all enabled clip planes as Three.js Plane array. For use with material.clippingPlanes.
Returns
Plane[]
getAllPlanes()
getAllPlanes(): ClipPlane[];Defined in: src/utils/ClipPlane.ts:331
Get all clip planes (enabled and disabled).
Returns
getEnabledPlanes()
getEnabledPlanes(): ClipPlane[];Defined in: src/utils/ClipPlane.ts:338
Get enabled planes only.
Returns
hasEnabledPlanes()
hasEnabledPlanes(): boolean;Defined in: src/utils/ClipPlane.ts:345
Check if any clip plane is enabled.
Returns
boolean
toStateJSON()
toStateJSON(): object[];Defined in: src/utils/ClipPlane.ts:349
Returns
object[]
getShaderUniforms()
getShaderUniforms(): object;Defined in: src/utils/ClipPlane.ts:356
Get shader uniforms for all three planes.
Returns
object
clipPlaneX
clipPlaneX: object;clipPlaneX.normal
normal: Vector3;clipPlaneX.point
point: Vector3;clipPlaneX.enabled
enabled: boolean;clipPlaneY
clipPlaneY: object;clipPlaneY.normal
normal: Vector3;clipPlaneY.point
point: Vector3;clipPlaneY.enabled
enabled: boolean;clipPlaneZ
clipPlaneZ: object;clipPlaneZ.normal
normal: Vector3;clipPlaneZ.point
point: Vector3;clipPlaneZ.enabled
enabled: boolean;