r3-legacy/src/r3-d3-camera-orthographic-0.js

47 lines
926 B
JavaScript

/**
* R3.D3.Camera.Orthographic
*
* - This class cannot be instantiated
*
* @constructor
*/
R3.D3.Camera.Orthographic = function(
apiComponent,
inherited
) {
__INHERIT_ONLY__
R3.D3.Camera.call(
this,
apiComponent,
true
);
};
R3.D3.Camera.Orthographic.prototype = Object.create(R3.D3.Camera.prototype);
R3.D3.Camera.Orthographic.prototype.constructor = R3.D3.Camera.Orthographic;
/**
* Updates the instance with the current state
*/
R3.D3.Camera.Orthographic.prototype.updateInstance = function(property) {
if (property === 'near') {
this.instance.near = this.near;
return;
}
if (property === 'far') {
this.instance.far = this.far;
}
if (property === 'zoom') {
this.instance.zoom = this.zoom;
this.instance.updateProjectionMatrix()
}
R3.D3.Camera.prototype.updateInstance.call(this, property);
};