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

316
Views
Cómo importar un modelo externo en vue.js usando babylon js

Estoy tratando de importar un archivo gltf en vue.js usando babylon.js y agregar una vista tridimensional a la página web. No puedo entender cómo hacerlo y la documentación en línea también es bastante vaga. Esto es lo que probé: esto es lo que puse en el archivo Hello.vue

 <div> <h1> Hello </h1> <Scene> <Box :position="[0, 0, 5]"></Box> </Scene> </div> </template> <script src = "./Hello.js"> </script>

Esto es lo que puse en el archivo Hello.js

 import vb from 'vue-babylonjs'; import Hello from './Hello.vue'; Vue.use(vb); new Vue({ components: { Hello }, render: c => c('Hello'), }).$mount('#app'); var delayCreateScene = function () { // Create a scene. var scene = new BABYLON.Scene(engine); // Create a default skybox with an environment. var hdrTexture = BABYLON.CubeTexture.CreateFromPrefilteredData("../assets/magic_book_of_eden/textures/material_0_baseColor.png", scene); var currentSkybox = scene.createDefaultSkybox(hdrTexture, true); // Append glTF model to scene. BABYLON.SceneLoader.Append("../assets/magic_book_of_eden/", "scene.gltf", scene, function (scene) { // Create a default arc rotate camera and light. scene.createDefaultCameraOrLight(true, true, true); // The default camera looks at the back of the asset. // Rotate the camera by 180 degrees to the front of the asset. scene.activeCamera.alpha += Math.PI; }); return scene; };

Si es posible, ¿podría alguien explicar usando un ejemplo cómo se podría hacer eso? Estoy obteniendo el modelo gltf de sketchfab. ¡Gracias!

Producción:

ingrese la descripción de la imagen aquí

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!