Translate the geometry. This is typically done as a one time operation, and not during a loop Use Object3D.position for typical real-time mesh translation.
Documentation warns about not using the translate/rotate/scale in a for loop but dosen’t gives any reason for it. Can someone throw light on why ?
For leafs am doing something like this.
const leafsGeo = new t.Geometry();
const leafGeo = new t.ConeGeometry(1.5, 3, 4, 2, false);
leafGeo.translate(0, 4, 0);
const leafMtl = new t.MeshLambertMaterial({
color: 0x228B22
});
const leafCount = 3;
for (var i = 0; i < leafCount; i++) {
leafGeo.translate(0, 1.2, 0);
leafsGeo.merge(leafGeo);
}
var leaf = new t.Mesh(leafsGeo, leafMtl);
The idea behind doing this is to reduce the draw calls. Am I doing it wrong