Skip to content
Snippets Groups Projects
sharedbuffergeometrymanager.js 400 B
Newer Older
import SharedBufferGeometry from "./sharedbuffergeometry";

export default class SharedBufferGeometryManager {
Kevin Lee's avatar
Kevin Lee committed
  constructor() {
    this.sharedBuffers = {};
  }
Kevin Lee's avatar
Kevin Lee committed
  addSharedBuffer(name, material, primitiveMode, maxBufferSize) {
    this.sharedBuffers[name] = new SharedBufferGeometry(material, primitiveMode, maxBufferSize);
  }
Kevin Lee's avatar
Kevin Lee committed
  getSharedBuffer(name) {
    return this.sharedBuffers[name];
  }