When I convert some 3D objects to Points using Three.Points, a few objects cannot be successfully converted and the error message said that Maximum call stack size exceeded.
Is there any way to fix the error? Is the only way to lower the poly numbers of an 3D object? Looks like that Three.Points has its own limitation for 3D objects.
I don’t think so. It rather sounds like your code enters a recursion one way or the other. Please provide a working piece of code, like in a JSFiddle or CodePen.
Thanks for your reply. I used the following code for conversion using Three.Points.
The code above only works for a few 3D objects with lower numbers of Poly. For example, the attached 3D objects cannot be converted and will show error messages, like RangeError: Maximum call stack size exceeded.
If possible, please provide any solution to that. Thanks.
whale.obj (7.47 MB)
basicman.obj (1.39 MB)
When I click “Run” in your JSFiddle, I get this:
Please fix this, before we can proceed.
const p = new THREE.Points(p_geom, p_material);
p.scale.set(5, 5, 5);
has to be
particles = new THREE.Points(p_geom, p_material);
particles.scale.set(5, 5, 5);
Sir, Thanks for your reply.
I deleted TweenMax animation. Now there should be no error message about particle.rotation.
Please try checking it out again.
Thanks for your input.
I removed the keyword, const, but the code still cannot convert some 3D objects with higher resolution into particles, using Three.Points.
The key part should be the following code. You may try using the code with other 3D obj files with higher file sizes (attached to the last email) and see if it works.
Please kindly refer to the updated link. Thanks.
I just updated the code as follows.
Can I ask if it’s true that OBJLoader.load and Three.Points cannot be used to convert 3D objects with high poly numbers to points?