r3-legacy/src/r3-d3-geometry-buffer-ring.js

49 lines
1.1 KiB
JavaScript

/**
* R3.D3.Geometry.Buffer.Ring
* @param apiComponent
* @constructor
*/
R3.D3.Geometry.Buffer.Ring = function(
apiComponent
) {
__RUNTIME_COMPONENT__;
__RUNTIME_BUFFER_COMPONENT__;
};
R3.D3.Geometry.Buffer.Ring.prototype = Object.create(R3.D3.Geometry.Buffer.prototype);
R3.D3.Geometry.Buffer.Ring.prototype.constructor = R3.D3.Geometry.Buffer.Ring;
/**
* Creates a light instance
* @returns {*}
*/
R3.D3.Geometry.Buffer.Ring.prototype.createInstance = function() {
this.instance = this.graphics.GeometryBufferRing(this);
R3.D3.Geometry.Buffer.prototype.createInstance.call(this);
};
/**
* Updates the instance with the current state
*/
R3.D3.Geometry.Buffer.Ring.prototype.updateInstance = function(property) {
if (
property === 'innerRadius' ||
property === 'outerRadius' ||
property === 'thetaSegments' ||
property === 'phiSegments' ||
property === 'thetaStart' ||
property === 'thetaLength'
) {
this.instance = this.createInstance();
return;
}
R3.D3.Geometry.Buffer.prototype.updateInstance.call(this, property);
};