最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Unexpected RangeError in Three.js - Stack Overflow

programmeradmin0浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论