Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

320
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda