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

200
Visualizações
AR.js & Three.js position image on marker

I am new to AR.js and Three.js and I am working with the examples from https://github.com/stemkoski/AR-Examples.

In the texture.html we have the following code for displaying an image of the earth on top of the marker

    markerRoot1 = new THREE.Group();
    scene.add(markerRoot1);
    let markerControls1 = new THREEx.ArMarkerControls(arToolkitContext, markerRoot1, {
        type: 'pattern', patternUrl: "data/hiro.patt",
    })

    let geometry1 = new THREE.PlaneBufferGeometry(1,3,  1,1);
    let loader = new THREE.TextureLoader();
    let texture = loader.load( 'images/earth.jpg', render );
    let material1 = new THREE.MeshBasicMaterial( { map: texture } );
    
    mesh1 = new THREE.Mesh( geometry1, material1 );
    mesh1.rotation.x = -Math.PI/2;
    
    markerRoot1.add( mesh1 );

I've changed the Y in PlaneBufferGeometry from 1 to 3 and scaled the image on Y axle. But the image is always horizontally and vertically centered on the marker. Is it possible to only horizontal center?

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