r3-legacy/src/r3-d3-effect-anaglyph.js

43 lines
931 B
JavaScript

/**
* R3.D3.Effect.Anaglyph
* @param apiComponent
* @constructor
*/
R3.D3.Effect.Anaglyph = function(
apiComponent
) {
__RUNTIME_COMPONENT__;
R3.D3.Effect.call(
this,
true
);
};
R3.D3.Effect.Anaglyph.prototype = Object.create(R3.D3.Effect.prototype);
R3.D3.Effect.Anaglyph.prototype.constructor = R3.D3.Effect.Anaglyph;
/**
* Creates a camera instance
* @returns {*}
*/
R3.D3.Effect.Anaglyph.prototype.createInstance = function() {
if (R3.Utils.Unloaded(this.renderer)) {
throw new Error('R3.D3.Effect.AnaglyphEffect.prototype.renderer not loaded');
}
this.instance = this.graphics.AnaglyphEffect(this.renderer);
R3.D3.Effect.prototype.createInstance.call(this);
};
/**
* Updates the instance with the current state
*/
R3.D3.Effect.Anaglyph.prototype.updateInstance = function(property) {
R3.D3.Effect.prototype.updateInstance.call(this, property);
};