@spearwolf/twopoint5d
Version:
Create 2.5D realtime graphics and pixelart with WebGL and three.js
13 lines • 730 B
JavaScript
import { BufferGeometry } from 'three/webgpu';
import { InstancedVOBufferGeometry } from './InstancedVOBufferGeometry.js';
import { VertexObjectPool } from './VertexObjectPool.js';
const asPool = (pool, capacity = 1) => (pool instanceof VertexObjectPool ? pool : new VertexObjectPool(pool, capacity));
export class InstancedVertexObjectGeometry extends InstancedVOBufferGeometry {
constructor(...args) {
super(...(args[2] instanceof BufferGeometry
? [asPool(args[0], args[1]), args[1], args[2]]
: [asPool(args[0], args[1]), args[1], asPool(args[2], args[3] || 1), args[3]]));
this.name = 'InstancedVertexObjectGeometry';
}
}
//# sourceMappingURL=InstancedVertexObjectGeometry.js.map