starry / backend /libs /three /core /InstancedBufferGeometry.js
k-l-lambda's picture
feat: add Python ML services (CPU mode) with model download
2b7aae2
import { BufferGeometry } from './BufferGeometry.js';
class InstancedBufferGeometry extends BufferGeometry {
constructor() {
super();
this.type = 'InstancedBufferGeometry';
this.instanceCount = Infinity;
}
copy(source) {
super.copy(source);
this.instanceCount = source.instanceCount;
return this;
}
clone() {
return new this.constructor().copy(this);
}
toJSON() {
const data = super.toJSON(this);
data.instanceCount = this.instanceCount;
data.isInstancedBufferGeometry = true;
return data;
}
}
InstancedBufferGeometry.prototype.isInstancedBufferGeometry = true;
export { InstancedBufferGeometry };