S3D.renderer


The S3D.renderer namespace provides functionality to control the renderer.


S3D.renderer.setView#

Description: Updates the UI to reflect any changes made.

Operation Type: Synchronous

Params: S3D.UI.update(type: String, options?: Object)

type: custom, top, bottom, front, back, left, right, top_front_left, back_left, etc...

options properties:

KeyTypeDescription
xnumberX position of the camera.
ynumberY position of the camera.
znumberZ position of the camera.

Sample:

setView.js
// Set the camera position
S3D.renderer.setView('custom', { x: 10, y: 30, z: 0 });
// Set a predefined view
S3D.renderer.setView('bottom_left');