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

188
Views
error de boceto de lienzo: "TRES. ParametricGeometry se ha movido a /examples/jsm/geometries/ParametricGeometry.js"

Estoy usando canvas-sketch para crear algo de contenido de Three.js.

Usé el siguiente comando para la plantilla Three.js

 canvas-sketch --new --template=three --open

La versión instalada es 1.11.14

 canvas-sketch -v

Cuando intento acceder a TRES.ParametricGeometry, aparece el error "TRES.ParametricGeometry se ha movido a /examples/jsm/geometries/ParametricGeometry.js"

 // Ensure ThreeJS is in global scope for the 'examples/' global.THREE = require("three"); // Include any additional ThreeJS examples below require("three/examples/js/controls/OrbitControls"); const canvasSketch = require("canvas-sketch"); // code const geometry = new THREE.ParametricGeometry(calculateHelicoid, 25, 25) // rest of the code

Para solucionarlo, agrego el siguiente require

 require("three/examples/jsm/geometries/ParametricGeometry.js")

Pero luego da el error: ParseError: 'importar' y 'exportar' pueden aparecer solo con 'sourceType: module' línea 6 threejs_marbles/node_modules/three/examples/jsm/geometries/ParametricGeometry.js

Alguna manera de arreglarlo?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Estaba configurando la ruta incorrecta, mi requerimiento tenía ejemplos/jsm/..., debería haber sido ejemplos/js/...

 require("three/examples/js/geometries/ParametricGeometry.js")
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!