CubeCamera constructor
CubeCamera(
- num near,
- num far,
- WebGLCubeRenderTarget renderTarget
Implementation
CubeCamera(num near, num far, this.renderTarget) {
type = 'CubeCamera';
if (renderTarget.isWebGLCubeRenderTarget != true) {
print(
'THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.');
return;
}
cameraPX = PerspectiveCamera(fov, aspect, near, far);
cameraPX.layers = layers;
//cameraPX.position=this.renderTarget.
cameraPX.up.set(0, -1, 0);
cameraPX.lookAt(Vector3(1, 0, 0));
add(cameraPX);
cameraNX = PerspectiveCamera(fov, aspect, near, far);
cameraNX.layers = layers;
cameraNX.up.set(0, -1, 0);
cameraNX.lookAt(Vector3(-1, 0, 0));
add(cameraNX);
cameraPY = PerspectiveCamera(fov, aspect, near, far);
cameraPY.layers = layers;
cameraPY.up.set(0, 0, 1);
cameraPY.lookAt(Vector3(0, 1, 0));
add(cameraPY);
cameraNY = PerspectiveCamera(fov, aspect, near, far);
cameraNY.layers = layers;
cameraNY.up.set(0, 0, -1);
cameraNY.lookAt(Vector3(0, -1, 0));
add(cameraNY);
cameraPZ = PerspectiveCamera(fov, aspect, near, far);
cameraPZ.layers = layers;
cameraPZ.up.set(0, -1, 0);
cameraPZ.lookAt(Vector3(0, 0, 1));
add(cameraPZ);
cameraNZ = PerspectiveCamera(fov, aspect, near, far);
cameraNZ.layers = layers;
cameraNZ.up.set(0, -1, 0);
cameraNZ.lookAt(Vector3(0, 0, -1));
add(cameraNZ);
}