Skip to main content

ClipPlane

Represents a single clipping plane in a 3D scene.

A ClipPlane defines a plane by position and normal, and can be enabled or disabled. When enabled, geometry intersecting the plane is clipped and the intersection is colored using the plane's color. The fadeSize property controls how much the color is smudged (faded) over the clipped area.

ClipPlane instances are used to clip IFC geometry in a scene.

Index

Properties

readonlycolor

color: Color3

The color applied to the intersection where geometry is clipped by this plane.

enabled

enabled: boolean

Whether this clip plane is enabled and actively clipping geometry.

fadeSize

fadeSize: number

Controls how much the clip color is faded (smudged) over the clipped area. Higher values increase the fade distance.

ignoreDepthWrite

ignoreDepthWrite: boolean

If true, disables depth writing for geometry clipped by this plane.

readonlyindex

index: clipPlane | clipPlane2 | clipPlane3 | clipPlane4 | clipPlane5 | clipPlane6

The name/index of this clip plane (e.g. 'clipPlane', 'clipPlane2', ...).

readonlynormal

normal: Vertex3

The normal vector of the clip plane. Should always be normalized.

readonlyplane

plane: Plane

The underlying Babylon.js Plane object representing this clip plane.

readonlyposition

position: Vertex3

The position (origin) of the clip plane in 3D space.

publicstaticreadonlyallClipPlanes

allClipPlanes: Set<clipPlane | clipPlane2 | clipPlane3 | clipPlane4 | clipPlane5 | clipPlane6> = ...

Set of all valid clip plane names supported by the system.

Methods

publicstaticcreate

  • Creates a set of observable ClipPlane instances from a configuration object.


    Parameters

    • o: ClipPlanes<{ color: Color3 }>

      An object mapping clip plane names to their initial color.

    Returns ClipPlanes<PropertyChangeObservable<ClipPlane>>

    A map of clip plane names to observable ClipPlane instances.

publicstaticentries

  • entries<T>(o: ClipPlanes<T>): IterableIterator<[clipPlane | clipPlane2 | clipPlane3 | clipPlane4 | clipPlane5 | clipPlane6, T], any, any>
  • Iterates over all valid entries in a ClipPlanes object.


    Type parameters

    • T

    Parameters

    Returns IterableIterator<[clipPlane | clipPlane2 | clipPlane3 | clipPlane4 | clipPlane5 | clipPlane6, T], any, any>

publicstaticentry

  • entry(name: clipPlane | clipPlane2 | clipPlane3 | clipPlane4 | clipPlane5 | clipPlane6): ClipPlane
  • Looks up a ClipPlane by name.

    @throws

    If the clip plane does not exist.


    Parameters

    • name: clipPlane | clipPlane2 | clipPlane3 | clipPlane4 | clipPlane5 | clipPlane6

      The name of the clip plane.

    Returns ClipPlane

    The ClipPlane instance.