45 lines
1.0 KiB
JavaScript
45 lines
1.0 KiB
JavaScript
/**
|
|
* R3.D3.Geometry.Buffer.Tetrahedron
|
|
* @param apiComponent
|
|
* @constructor
|
|
*/
|
|
R3.D3.Geometry.Buffer.Tetrahedron = function(
|
|
apiComponent
|
|
) {
|
|
|
|
__RUNTIME_COMPONENT__;
|
|
|
|
__RUNTIME_BUFFER_COMPONENT__;
|
|
|
|
};
|
|
|
|
R3.D3.Geometry.Buffer.Tetrahedron.prototype = Object.create(R3.D3.Geometry.Buffer.prototype);
|
|
R3.D3.Geometry.Buffer.Tetrahedron.prototype.constructor = R3.D3.Geometry.Buffer.Tetrahedron;
|
|
|
|
/**
|
|
* Create Instance
|
|
* @returns {*}
|
|
*/
|
|
R3.D3.Geometry.Buffer.Tetrahedron.prototype.createInstance = function() {
|
|
|
|
this.instance = this.graphics.GeometryBufferTetrahedron(this);
|
|
|
|
R3.D3.Geometry.Buffer.prototype.createInstance.call(this);
|
|
};
|
|
|
|
/**
|
|
* Updates the instance with the current state
|
|
*/
|
|
R3.D3.Geometry.Buffer.Tetrahedron.prototype.updateInstance = function(property) {
|
|
|
|
if (
|
|
property === 'radius' ||
|
|
property === 'detail'
|
|
) {
|
|
this.instance = this.createInstance();
|
|
return;
|
|
}
|
|
|
|
R3.D3.Geometry.Buffer.prototype.updateInstance.call(this, property);
|
|
};
|