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

187
Views
No se puede analizar el archivo STL en Azure Blob Storage con Three.js

Estoy tratando de usar el paquete @azure/storage-blob para descargar un blob de archivo STL para usarlo en Three.JS de la siguiente manera:

 const downloadResponse = await containerClient.getBlobClient('models/Large Knob.STL').download(); const downloaded = ( await streamToBuffer(downloadResponse.readableStreamBody) ).toString(); const loader = new STLLoader(); const obj = loader.parse(downloaded);

y lo cargo en una malla como esta:

 const mesh = new Mesh(model, material); scene.add(mesh); const renderer = new WebGLRenderer(); renderer.render(scene, camera);

Obtengo el siguiente seguimiento de la pila:

 three.module.js?ffb8:5319 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'center') at Sphere.copy (webpack-internal:///./node_modules/three/build/three.module.js:5759:28) at Frustum.intersectsObject (webpack-internal:///./node_modules/three/build/three.module.js:12767:13) at projectObject (webpack-internal:///./node_modules/three/build/three.module.js:27383:45) at projectObject (webpack-internal:///./node_modules/three/build/three.module.js:27428:4) at WebGLRenderer.render (webpack-internal:///./node_modules/three/build/three.module.js:27212:3) at _callee$ (webpack-internal:///./pages/index.tsx:130:30) at tryCatch (webpack-internal:///./node_modules/next/dist/compiled/regenerator-runtime/runtime.js:45:40) at Generator.invoke [as _invoke] (webpack-internal:///./node_modules/next/dist/compiled/regenerator-runtime/runtime.js:274:22) at Generator.prototype.<computed> [as next] (webpack-internal:///./node_modules/next/dist/compiled/regenerator-runtime/runtime.js:97:21) at asyncGeneratorStep (webpack-internal:///./pages/index.tsx:35:28) at _next (webpack-internal:///./pages/index.tsx:53:17) at eval (webpack-internal:///./pages/index.tsx:58:13) at new Promise (<anonymous>) at eval (webpack-internal:///./pages/index.tsx:50:16) at createScene (webpack-internal:///./pages/index.tsx:89:25) at Home (webpack-internal:///./pages/index.tsx:209:9) at renderWithHooks (webpack-internal:///./node_modules/react-dom/cjs/react-dom.development.js:14985:18)

Puedo cargar y ver correctamente la malla si uso loader.load(<filepath , pero como mi archivo está alojado en Azure blob storage, no creo que esta sea una opción viable. Cualquier consejo sería muy apreciado.

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

0

No estoy seguro de qué es compatible con STLLoader, pero si está ejecutando en NodeJS, BlobClient también tiene métodos downloadToFile() y downloadToBuffer() que pueden ser más convenientes. Consulte el sitio de documentación para obtener más información:

https://docs.microsoft.com/en-us/javascript/api/@azure/storage-blob/blobclient?view=azure-node-latest#@azure-storage-blob-blobclient-downloadtofile

https://docs.microsoft.com/en-us/javascript/api/@azure/storage-blob/blobclient?view=azure-node-latest#@azure-storage-blob-blobclient-downloadtobuffer-1

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!