S3D.renderer


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


S3D.renderer.setView#

important

This is for the 3D renderer. To get this functionality with the modeling renderer see S3D.graphics.setCameraView

Description: Set the camera angle for the detailed render.

Operation Type: Synchronous

Params: S3D.renderer.setView(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');