| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- function GLBufferAttribute( buffer, type, itemSize, elementSize, count ) {
- this.buffer = buffer;
- this.type = type;
- this.itemSize = itemSize;
- this.elementSize = elementSize;
- this.count = count;
- this.version = 0;
- }
- Object.defineProperty( GLBufferAttribute.prototype, 'needsUpdate', {
- set: function ( value ) {
- if ( value === true ) this.version ++;
- }
- } );
- Object.assign( GLBufferAttribute.prototype, {
- isGLBufferAttribute: true,
- setBuffer: function ( buffer ) {
- this.buffer = buffer;
- return this;
- },
- setType: function ( type, elementSize ) {
- this.type = type;
- this.elementSize = elementSize;
- return this;
- },
- setItemSize: function ( itemSize ) {
- this.itemSize = itemSize;
- return this;
- },
- setCount: function ( count ) {
- this.count = count;
- return this;
- },
- } );
- export { GLBufferAttribute };
|