API Docs for: 1.0.0

Ruler

Helper that visualizes the position and direction of a plane.

Constructor

Ruler

(
  • 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 Ruler plane indicator.

    • [autoPlaneSize=false] Boolean optional

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

Index

Properties

Events

Properties

dist

Number

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

Default: 0

origin

Pin

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

target

Pin

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

visible

Boolean

Indicates whether this Ruler 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