Currently, I am utilizing a Float32Array
to store vertex positions within the realm of Three.js
. My objective is to generate a new array of vertex positions that begin at a random starting point.
[0...10000].slice( n, n + 100 ) // This piece of code functions properly
positions = new Float32Array( amount * 3 )
randPositions = positions.slice( n, n + 100 ) // Unfortunately, this line does not work - undefined is not a function
Despite my efforts, an error arises when attempting the aforementioned operation (positions
is defined and contains data)? Is there compatibility between Array.prototype
methods and Float32Array
instances?