Camera

This module is for manipulating the camera.

Camera

orbit(dx, dy)

Orbit the active camera.
Kind: inner method of Camera

parameter

type

dx

integer

dy

integer

player.camera.orbit(1, 0);

pan(dx, dy)

Pan the active camera.
Kind: inner method of Camera

parameter

type

dx

integer

dy

integer

player.camera.pan(1, 0);

zoom(delta)

Zoom the active camera.
Kind: inner method of Camera

parameter

type

delta

integer

player.camera.zoom(1);

frameBoundingSphere([assetIds], [direction], [options])

Frame the active camera.
Kind: inner method of Camera

parameter

type

[assetIds]

array, string

[direction]

vector3

[options]

any

player.cameraController.frameBoundingSphere();

getPosition([target])

Get the active camera's position
Kind: inner method of Camera

parameter

type

[target]

vector3

player.cameraController.getPosition(tmpVector3)

setPosition([position])

Set the active camera's position
Kind: inner method of Camera

parameter

type

[position]

vector3

player.cameraController.setPosition(new Vector3(0, 0, 10));

getQuaternion([target])

Get the active camera's quaternion
Kind: inner method of Camera

parameter

type

[target]

quaternion

player.cameraController.getQuaternion(tmpQuaternion)

setQuaternion([quaternion])

Set the active camera's quaternion
Kind: inner method of Camera

parameter

type

[quaternion]

quaternion

player.cameraController.setQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0,1,0), Math.PI));