API Docs for: 1.0.0

Region

Helper that visualizes the position and direction of a plane.

Constructor

Region

(
  • 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

    • [visible=true] Boolean optional

      Indicates whether or not this helper is visible.

    • [planeSize] Float32Array optional

      The width and height of the Region plane indicator.

    • [autoPlaneSize=false] Boolean optional

      Indicates whether or not this Region's Region/planeSize:property is automatically sized to fit within the Scene's worldBoundary.

Index

Properties

Events

Properties

dist

Number

Length of this Region. Fires an Region/dist:event event on change.

Default: 0

origin

Pin

Origin Pin. Fires an Region/origin:event event on change.

target

Pin

Target Pin. Fires an Region/target:event event on change.

visible

Boolean

Indicates whether this Region is visible or not.

Fires a visible event on change.

Default: true

Events

visible

Fired whenever this helper's visible property changes.

Event Payload:

  • value Boolean

    The property's new value