Discussions

Camera

This module is for manipulating the camera.

Camera

orbit(dx, dy)

Orbit the active camera.
Kind: inner method of Camera

parametertype
dxinteger
dyinteger
player.camera.orbit(1, 0);

pan(dx, dy)

Pan the active camera.
Kind: inner method of Camera

parametertype
dxinteger
dyinteger
player.camera.pan(1, 0);

zoom(delta)

Zoom the active camera.
Kind: inner method of Camera

parametertype
deltainteger
player.camera.zoom(1);

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

Frame the active camera.
Kind: inner method of Camera

parametertype
[assetIds]array, string
[direction]vector3
[options]any
player.camera.frameBoundingSphere();

getPosition([target])

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

parametertype
[target]vector3
player.camera.getPosition(tmpVector3)

setPosition([position])

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

parametertype
[position]vector3
player.camera.setPosition(new Vector3(0, 0, 10));

getQuaternion()

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

parametertype
[target]quaternion
player.camera.getQuaternion()

setQuaternion([quaternion])

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

parametertype
[quaternion]quaternion
player.camera.setQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0,1,0), Math.PI));