View options demo

Central projection; depth ordering for points

This demo shows how the new projection and depthOrderPoints options of a View3D affect the view. Use the controls to:

To see what depth ordering does, rotate the view to make two points overlap, and then rotate again to switch which point is in front.

Virtual trackball; bank angle slider

In the default orientation control mode, dragging the mouse changes the Tait-Bryan angles of the camera.

The Tait-Bryan angles can also be controlled with sliders, which are hidden by default. To show them, set the following attributes:

Version 1.9.2 introduces a new orientation control mode: the virtual trackball. In this mode, dragging from near the center of the board rolls the view along the drag direction, while dragging from near the edge of the board rotates the view in the plane of the board. These two motions transition smoothly into each other as the drag start position changes. To enable the virtual trackball, set the trackball attribute of the View3D to {enabled: true}.

This demo is based on the virtual trackball example in the examples folder included with the source code.