API Docs for: 1.0.0

ClipHelper

Helper that visualizes the position and direction of a Clip. The helper works by tracking updates to the Clip's pos and dir.

Constructor

ClipHelper

(
  • cfg
)

Parameters:

  • cfg

    Configuration

    • clip Clip

      A Clip to visualize.

    • [solid=true] Boolean optional

      Indicates whether or not this helper is filled with color or just wireframe.

    • [visible=true] Boolean optional

      Indicates whether or not this helper is visible.

    • [planeSize] Float32Array optional

      The width and height of the ClipHelper plane indicator.

    • [autoPlaneSize=false] Boolean optional

      Indicates whether or not this ClipHelper's planeSize is automatically sized to fit within the Scene's worldBoundary.

Properties

autoPlaneSize

Boolean

Indicates whether this ClipHelper's planeSize is automatically generated or not.

When auto-generated, planeSize will automatically size to fit within the Scene's worldBoundary.

Fires an autoPlaneSize event on change.

Default: false

clip

Clip

The Clip attached to this ClipHelper.

Fires an ClipHelper/Clip:event event on change.

planeSize

Float32Array

The width and height of the ClipHelper plane indicator.

When no value is specified, will automatically size to fit within the Scene's worldBoundary.

Fires an planeSize event on change.

Default: Fitted to scene boundary

solid

Boolean

Indicates whether this ClipHelper's plane is filled or just wireframe.

Fires a ClipHelper/active:event event on change.

Default: true

visible

Boolean

Indicates whether this ClipHelper is visible or not.

Fires a ClipHelper/active:event event on change.

Default: true

Events

autoPlaneSize

Fired whenever this ClipHelper's autoPlaneSize property changes.

Event Payload:

  • value Float32Array

    The property's new value

planeSize

Fired whenever this ClipHelper's planeSize property changes.

Event Payload:

  • value Float32Array

    The property's new value

solid

Fired whenever this helper's solid property changes.

Event Payload:

  • value Boolean

    The property's new value

visible

Fired whenever this helper's visible property changes.

Event Payload:

  • value Boolean

    The property's new value