Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
glb no aparece en three.js

Así que tengo un glb que simplemente no aparece en la escena sin importar dónde lo coloque, ¿tal vez sea el código? (como probé glb, sé que funciona con el mismo código y no aparece) aquí están las partes relevantes del código:

 var loader2 = new GLTFLoader(); loader2.load( 'https://jokertattoo.co.uk/gun.glb', function ( gltfgame ) { hammer = gltfgame.scene; gltfgame.scene.traverse( function ( child ) { if ( child.isMesh ) { child.frustumCulled = false; child.castShadow = true; child.receiveShadow = true; } }); hammer.position.y = 120; scene.add(hammer); });

y:

 function hammerLoaded( geometry ) { geometry.computeVertexNormals(); geometry.computeFaceNormals(); hammer.position.y = 120; scene.add(hammer); var wood = new THREE.MeshPhongMaterial( { color: 0xffffff, map: THREE.ImageUtils.loadTexture( "284-v7.jpg"), shininess: 100, side: THREE.DoubleSide } ); geometry.materials[0] = wood; var metal = new THREE.MeshPhongMaterial( { color: 0x222222, specular: 0x888888, shininess: 10, metal: true } ); geometry.materials[1] = metal; var h = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial() ); h.castShadow = true; h.receiveShadow = false; var scale = 3.5; h.scale.set(scale,scale,scale); h.rotation.x = Math.PI/2; h.rotation.z = -Math.PI/2; h.position.y = 12.0; h.position.z = -26.5; h.position.x = -6.2; hammer.add(h); }

aquí hay un codepen también https://codepen.io/uiunicorn/pen/YzQjJmp

gracias por leer

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!