48 lines
961 B
JavaScript
48 lines
961 B
JavaScript
/**
|
|
* R3.D3.Camera.Perspective.Stereo
|
|
* @param apiComponent
|
|
* @constructor
|
|
*/
|
|
R3.D3.Camera.Perspective.Stereo = function(
|
|
apiComponent
|
|
) {
|
|
|
|
__RUNTIME_COMPONENT__;
|
|
|
|
R3.D3.Camera.Perspective.call(
|
|
this,
|
|
apiComponent,
|
|
true
|
|
);
|
|
|
|
};
|
|
|
|
R3.D3.Camera.Perspective.Stereo.prototype = Object.create(R3.D3.Camera.Perspective.prototype);
|
|
R3.D3.Camera.Perspective.Stereo.prototype.constructor = R3.D3.Camera.Perspective.Stereo;
|
|
|
|
/**
|
|
* Creates a camera instance
|
|
* @returns {*}
|
|
*/
|
|
R3.D3.Camera.Perspective.Stereo.prototype.createInstance = function() {
|
|
|
|
this.instance = this.graphics.StereoCamera(
|
|
this.fov,
|
|
this.aspect,
|
|
this.near,
|
|
this.far
|
|
);
|
|
|
|
__CREATE_INSTANCE__;
|
|
|
|
};
|
|
|
|
/**
|
|
* Updates the instance with the current state
|
|
*/
|
|
R3.D3.Camera.Perspective.Stereo.prototype.updateInstance = function(property) {
|
|
|
|
R3.D3.Camera.Perspective.prototype.updateInstance.call(this, property);
|
|
|
|
};
|