r3-legacy/src/r3-d3-fog-normal.js

45 lines
802 B
JavaScript
Raw Normal View History

2019-08-10 19:48:08 +02:00
/**
* R3.D3.Fog.Normal
* @param apiComponent
* @constructor
*/
R3.D3.Fog.Normal = function(
apiComponent
) {
2019-10-06 21:11:18 +02:00
__RUNTIME_COMPONENT__;
2019-08-10 19:48:08 +02:00
2019-10-06 21:11:18 +02:00
R3.D3.Fog.call(
2019-08-10 19:48:08 +02:00
this,
2019-10-06 21:11:18 +02:00
true
2019-08-10 19:48:08 +02:00
);
};
R3.D3.Fog.Normal.prototype = Object.create(R3.D3.Fog.prototype);
R3.D3.Fog.Normal.prototype.constructor = R3.D3.Fog.Normal;
R3.D3.Fog.Normal.prototype.createInstance = function() {
this.instance = this.graphics.Fog(
this.color,
this.near,
this.far
);
2019-10-06 21:11:18 +02:00
__CREATE_INSTANCE__;
2019-08-10 19:48:08 +02:00
};
R3.D3.Fog.Normal.prototype.updateInstance = function(property) {
if (
property === 'near' ||
property === 'far'
) {
this.graphics.updateInstance(this, property);
return;
}
R3.D3.Fog.prototype.updateInstance.call(this, property);
};