InstancedBufferGeometry.js 717 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { BufferGeometry } from './BufferGeometry.js';
  2. /**
  3. * @author benaadams / https://twitter.com/ben_a_adams
  4. */
  5. function InstancedBufferGeometry() {
  6. BufferGeometry.call( this );
  7. this.type = 'InstancedBufferGeometry';
  8. this.maxInstancedCount = undefined;
  9. }
  10. InstancedBufferGeometry.prototype = Object.assign( Object.create( BufferGeometry.prototype ), {
  11. constructor: InstancedBufferGeometry,
  12. isInstancedBufferGeometry: true,
  13. copy: function ( source ) {
  14. BufferGeometry.prototype.copy.call( this, source );
  15. this.maxInstancedCount = source.maxInstancedCount;
  16. return this;
  17. },
  18. clone: function () {
  19. return new this.constructor().copy( this );
  20. }
  21. } );
  22. export { InstancedBufferGeometry };
粤ICP备19079148号