@spearwolf/twopoint5d
Version:
Create 2.5D realtime graphics and pixelart with WebGL and three.js
12 lines • 414 B
JavaScript
export function createIndicesArray(indices, count) {
const itemCount = indices.length;
const arr = new Uint32Array(count * itemCount);
const stride = Math.max(...indices) + 1;
for (let i = 0; i < count; i++) {
for (let j = 0; j < itemCount; j++) {
arr[i * itemCount + j] = indices[j] + i * stride;
}
}
return arr;
}
//# sourceMappingURL=createIndicesArray.js.map