Back to Tools and Commands

Orbit

The orbit command handles the orbit of the primary camera in the scene. To activate this command, call:

api.commands.activateCommand('orbit')

options

The default options for orbit are:

touchVerticalDefault: false,
turnTable: false,

touchVerticalDefault

If true, touch events will fall through so that the default behavior is not prevented.

turnTable

If true, the camera will only orbit around the y-axis, otherwise orbit will act freely on the sphere.

Note that the following two situations will result the similar view on the screen except the first one didn't affect the light and shadow because the scene itself didn't change:

  • Fix object and rotate camera, see Custom Color as an example.
  • Fix camera and rotate object, see Rotate Object as an example.

So make sure to choose the correct one due to your need.