admin管理员组文章数量:1023744
I've been using Three.js to generate 3D objects in my website and I just came across this problem yesterday.
I was gonna generate a PlaneGeometry
with widthSegments = 1100
and heightSegments = 17500
Now then the points would have been stored in a position array with
length = 3 * widthSegments * heightSegments = 57750000
which is way lower than the imposed 2^32 length limit of arrays.
But when I tried to run it, it threw a RangeError: Invalid array length
What?
Tried testing it on a Three.js playground, and got the same results.
I've been using Three.js to generate 3D objects in my website and I just came across this problem yesterday.
I was gonna generate a PlaneGeometry
with widthSegments = 1100
and heightSegments = 17500
Now then the points would have been stored in a position array with
length = 3 * widthSegments * heightSegments = 57750000
which is way lower than the imposed 2^32 length limit of arrays.
But when I tried to run it, it threw a RangeError: Invalid array length
What?
Tried testing it on a Three.js playground, and got the same results.
本文标签: javascriptUnexpected RangeError in ThreejsStack Overflow
版权声明:本文标题:javascript - Unexpected RangeError in Three.js - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745584094a2157477.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论