Migrating from r66 to r67 I get the message:
DEPRECATED: GeometryUtils's .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.
It doesn't seem to be a direct conversion as the old code looks like this:
THREE.GeometryUtils.merge(cgeo, cloudgeometry);
I have tried the following:
cgeo.merge(cloudgeometry.geometry,cgeo.matrixWorld);
Edit, have also tried the following which produces the same result as above:
cgeo.merge(cloudgeometry.geometry);
The results are a mesh which is compressed in area as if it is completely ignoring the positioning of the sub meshes which are being added to the new mesh I created, so rather than a large nice looking cloud I get a small white blog.
There is no documentation for this latest change so I am trying to understand how it works blind, if it was a simple 1 for 1 migration it would have been nice as it would have worked but it appears the way it works completely changed.
Make sure the matrix has been updated before merging. The code should probably look something like this:
cloudgeometry.updateMatrix();
cgeo.merge( cloudgeometry.geometry, cloudgeometry.matrix );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With