Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

321
Vistas
CLOSE - How to merge mesh in THREE.js (r128)

what I want to do is the following, I create a custom shape voxel and I want to merge the different custom voxels into a single one. I try with:

let geom = new THREE.BufferGeometry();

for(let i = 0; i < scene.children.length; i++){
        if(scene.children[i].name === "custom-voxel"){
                geom.merge(scene.children[i].geometry);
        }
}

But it doesn't work so I try with:

var geometries = [];
for(let i = 0; i < scene.children.length; i++){
        if(scene.children[i].name === "custom-voxel"){
                geometry.push(scene.children[i].geometry.clone());
        }
}

geom = mergeBufferGeometries(geometries);
geom.computeBoundingBox();
var meshh = new THREE.Mesh(
        geom,
        new THREE.MeshBasicMaterial({ color: 0x0000ff })
);

But in this way it also doesn't work or better it create the all object in the same position, do you have an idea on how I can keep the distance between objects?

Thanks.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda