I have an instance buffer like so:
const buffer = new Float32Array([
// instance 0
0, 1, 0, 1, // color=green
1, 0, 0, 0, // world0
0, 1, 0, 0, // world1
0, 0, 1, 0, // world2
-1, 0, 0, 1, // world3
// instance 1
0, 0, 1, 1, // color=blue
1, 0, 0, 0, // world0
0, 1, 0, 0, // world1
0, 0, 1, 0, // world2
1, 0, 0, 1, // world3
]);
I want to create thin instances from the buffer as is without copying elements to intermediate buffer or array. Seems, thinInstanceSetBuffer
doesn’t suit me because it cannot accepts an offset. I found out the only solution. But I’m confused about the hidden field _thinInstanceDataStorage
. Please, advice me a better solution.