Closed simonharrisco closed 6 years ago
Then you just create JS array inline, no need to call extra function.
Too true, I'm used to vec3 objects with vector3.x over vec3[0] arrays. Silly suggestion
No its a reasonable question from API design point of view but at the end of the day we already destroying the JS garbage collector, so you API shouldn't encourage even more allocations and function creations.
@nicknikolov the problem is we already have create:
function create () {
return [0, 0, 0]
}
that means vec3.create(1,2,3) does nothing and returns [0,0,0].. not good!
True actually, up for removing it in 4.0
At the moment if you initialise a vec3 you can only create [0,0,0].
What if you would like to set a vector manually for future calculations how about: