UNPKG

three-csg-ts

Version:
22 lines (21 loc) 464 B
export class NBuf3 { constructor(ct) { this.top = 0; this.array = new Float32Array(ct); } write(v) { this.array[this.top++] = v.x; this.array[this.top++] = v.y; this.array[this.top++] = v.z; } } export class NBuf2 { constructor(ct) { this.top = 0; this.array = new Float32Array(ct); } write(v) { this.array[this.top++] = v.x; this.array[this.top++] = v.y; } }