UNPKG

620 BJavaScriptView Raw
1import { TYPES } from '@pixi/constants';
2
3class Attribute {
4 constructor(buffer, size = 0, normalized = false, type = TYPES.FLOAT, stride, start, instance, divisor = 1) {
5 this.buffer = buffer;
6 this.size = size;
7 this.normalized = normalized;
8 this.type = type;
9 this.stride = stride;
10 this.start = start;
11 this.instance = instance;
12 this.divisor = divisor;
13 }
14 destroy() {
15 this.buffer = null;
16 }
17 static from(buffer, size, normalized, type, stride) {
18 return new Attribute(buffer, size, normalized, type, stride);
19 }
20}
21
22export { Attribute };
23//# sourceMappingURL=Attribute.mjs.map