pmndrs / three-stdlib

📚 Stand-alone library of threejs examples designed to run without transpilation in node & browser
https://npmjs.com/three-stdlib
MIT License
676 stars 110 forks source link

webworker does not support loading dae #333

Open Baleen-Y opened 6 months ago

Baleen-Y commented 6 months ago

Problem description:

Your README describes support for workers: A build system for ESM and CJS, compatible with browser, workers, and Node. However, it is not supported in actual use. When using ColladaLoader to load the dae model, an error will be reported: ReferenceError: DOMParser is not defined

Relevant code:

  const loadingManager = new THREE.LoadingManager()
  const loader = new ColladaLoader(loadingManager)
  loader.load(‘xxx.dae’, function (collada) {
  })

Suggested solution:

support webworker load dae model.

CodyJasonBennett commented 6 months ago

PR or suggestions welcome for how to parse an XML format without browser APIs.

All other codepaths work in workers.