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 :)
Comments
Post a Comment