javascript - Creating a ConvexGeometry hangs the page, in three.js -


i want create convex geometry hull around geometry lots of vertices make collision detection/ray casting easier. when add above 60 vertices convexgeometry page hangs.

is not possible or have missed something? know of better way handle this?

here's parts of code.

var x, y, z, max = 1.0,min = 0.1,points = []; (var = 0; <= 20; i++) { // <-- alter value above 60- hangs page     x = math.floor(math.random() * (max - min + 1)) + min;     y = math.floor(math.random() * (max - min + 1)) + min;     z = math.floor(math.random() * (max - min + 1)) + min;     points.push(new three.vector3(x, y, z)); } var geometry = new three.convexgeometry(points); 

here's fiddle rest. not hang page :)

http://jsfiddle.net/arpo/e45zhryk/


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -