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.camera.frameBoundingSphere();
getPosition([target])
Get the active camera's position
Kind: inner method of Camera
parameter | type |
---|---|
[target] | vector3 |
player.camera.getPosition(tmpVector3)
setPosition([position])
Set the active camera's position
Kind: inner method of Camera
parameter | type |
---|---|
[position] | vector3 |
player.camera.setPosition(new Vector3(0, 0, 10));
getQuaternion()
Get the active camera's quaternion
Kind: inner method of Camera
parameter | type |
---|---|
[target] | quaternion |
player.camera.getQuaternion()
setQuaternion([quaternion])
Set the active camera's quaternion
Kind: inner method of Camera
parameter | type |
---|---|
[quaternion] | quaternion |
player.camera.setQuaternion(new Quaternion().setFromAxisAngle(new Vector3(0,1,0), Math.PI));