47 lines
1.0 KiB
JavaScript
47 lines
1.0 KiB
JavaScript
/**
|
|
* R3.D3.Geometry.Buffer.Lathe
|
|
* @param apiComponent
|
|
* @constructor
|
|
*/
|
|
R3.D3.Geometry.Buffer.Lathe = function(
|
|
apiComponent
|
|
) {
|
|
|
|
__RUNTIME_COMPONENT__;
|
|
|
|
__RUNTIME_BUFFER_COMPONENT__;
|
|
|
|
};
|
|
|
|
R3.D3.Geometry.Buffer.Lathe.prototype = Object.create(R3.D3.Geometry.Buffer.prototype);
|
|
R3.D3.Geometry.Buffer.Lathe.prototype.constructor = R3.D3.Geometry.Buffer.Lathe;
|
|
|
|
/**
|
|
* Creates a light instance
|
|
* @returns {*}
|
|
*/
|
|
R3.D3.Geometry.Buffer.Lathe.prototype.createInstance = function() {
|
|
|
|
this.instance = this.graphics.GeometryBufferLathe(this);
|
|
|
|
R3.D3.Geometry.Buffer.prototype.createInstance.call(this);
|
|
};
|
|
|
|
/**
|
|
* Updates the instance with the current state
|
|
*/
|
|
R3.D3.Geometry.Buffer.Lathe.prototype.updateInstance = function(property) {
|
|
|
|
if (
|
|
property === 'points' ||
|
|
property === 'segments' ||
|
|
property === 'phiStart' ||
|
|
property === 'phiLength'
|
|
) {
|
|
this.instance = this.createInstance();
|
|
return;
|
|
}
|
|
|
|
R3.D3.Geometry.Buffer.prototype.updateInstance.call(this, property);
|
|
};
|