Global

Methods

autorotate(opts)

Parameters:
Name Type Description
opts Object
Properties
Name Type Attributes Default Description
yawSpeed Number <optional>
0.1

Yaw maximum speed

pitchSpeed Number <optional>
0.1

Pitch maximum speed

fovSpeed Number <optional>
0.1

Fov maximum speed

yawAccel Number <optional>
0.01

Yaw acceleration

pitchAccel Number <optional>
0.01

Pitch acceleration

fovAccel Number <optional>
0.01

Fov acceleration

targetPitch Number <optional>
0

Value that pitch converges to. null means that the pitch will not change.

targetFov Number <optional>
null

Value that fov converges to. null means that the fov will not change.

Returns:

Movement function that can be passed to Viewer#setIdleMovement or Scene#startMovement

registerDefaultControls(controls, element, opts, mouseViewMode)

Instantiate and register some commonly used ControlMethod instances.

The following instances are registered:

  • mouseViewDrag
  • mouseViewQtvr
  • touchView
  • pinch
  • arrowKeys
  • plusMinusKeys
  • wasdKeys
  • qeKeys
Parameters:
Name Type Description
controls Controls

Where to register the instances.

element Element

Element to listen for events.

opts Object
mouseViewMode 'drag' | 'qtvr'

registerDefaultRenderers(stage)

Registers all known renderers for the given stage type into that stage. Most users will not need to register renderers, as Viewer does it for them.

Parameters:
Name Type Description
stage Stage

The stage where the renderers are to be registered.

Throws:

An error if the stage type is unknown.