r3-legacy/src/r3-d3-geometry-buffer-octah...

45 lines
1020 B
JavaScript

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