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 pressed in area as if it is pletely 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 pletely changed.
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 pressed in area as if it is pletely 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 pletely changed.
Share Improve this question edited Jun 24, 2014 at 13:34 mrdoob 19.6k4 gold badges66 silver badges62 bronze badges asked Jun 22, 2014 at 17:23 user2529200user25292001 Answer
Reset to default 10Make sure the matrix has been updated before merging. The code should probably look something like this:
cloudgeometry.updateMatrix();
cgeo.merge( cloudgeometry.geometry, cloudgeometry.matrix );