API Docs for: 1.0.0

PlaneHelper

Helper that visualizes the position and direction of a plane.

Constructor

PlaneHelper

(
  • cfg
)

Parameters:

  • cfg

    Configuration

    • [pos=[0,0,0]] Float32Array optional

      World-space position.

    • [dir=[0,0,1]] Float32Array optional

      World-space direction vector.

    • [color=[0.4,0.4,0.4]] Float32Array optional

      Emmissive color

    • [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 PlaneHelper plane indicator.

    • [autoPlaneSize=false] Boolean optional

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

Properties

autoPlaneSize

Boolean

Indicates whether this PlaneHelper'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

color

Float32Array

Emmissive color of this PlaneHelper.

Fires an color event on change.

Default: [0.4,0.4,0.4]

dir

Float32Array

World-space direction of this PlaneHelper. Fires an dir event on change.

Default: [0,0,1]

planeSize

Float32Array

The width and height of the PlaneHelper plane indicator.

Values assigned to this property will be overridden by an auto-computed value when autoPlaneSize is true.

Fires an planeSize event on change.

Default: [1,1]

solid

Boolean

Indicates whether this PlaneHelper is filled with color or just wireframe.

Fires a PlaneHelper/active:event event on change.

Default: true

visible

Boolean

Indicates whether this PlaneHelper is visible or not.

Fires a visible event on change.

Default: true

worldPos

Float32Array

World-space position of this PlaneHelper. Fires an PlaneHelper/worldPos:event event on change.

Default: [0,0,0]

Events

autoPlaneSize

Fired whenever this PlaneHelper's autoPlaneSize property changes.

Event Payload:

  • value Boolean

    The property's new value

color

Fired whenever this PlaneHelper's color property changes.

Event Payload:

  • value Float32Array

    The property's new value

dir

Fired whenever this PlaneHelper's dir property changes.

Event Payload:

  • value Float32Array

    The property's new value

planeSize

Fired whenever this PlaneHelper's planeSize property changes.

Event Payload:

  • value Float32Array

    The property's new value

pos

Fired whenever this PlaneHelper's PlaneHelper/pos:property 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