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

107
Views
Tres lienzos js no se cargan

Estoy tratando de renderizar el lienzo de tres js en mi navegador, pero no se renderiza. Estoy usando vite.js para el servidor en vivo. El camino y todo es correcto. Sin errores. Pero todavía no funcionará. Por favor, dé consejos sobre esto.

HTML

 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <link rel="stylesheet" type="text/css" href="./style.css"> <link rel="icon" type="image/svg+xml" href="favicon.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Vite App</title> </head> <body> <div id="app"></div> <script type="module" src="/main.js"> </script> </body> </html>

JS

 import * as THREE from "https://unpkg.com/three@0.137.5/build/three.module.js" const scene = new THREE.Scene(); const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000) const renderer = new THREE.WebGLRenderer( ); console.log(scene); console.log(camera); console.log(renderer); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Debe representar al menos un solo cuadro para ver un resultado en su página HTML. Agregue la siguiente línea al final de su lista de códigos:

 renderer.render( scene, camera );
about 4 years ago · Juan Pablo Isaza Report
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!