three-stdlib icon indicating copy to clipboard operation
three-stdlib copied to clipboard

webworker does not support loading dae

Open Baleen-Y opened this issue 1 year ago • 1 comments
trafficstars

  • three version: "0.158.0"
  • @types/three version: "0.158.2"
  • three-stdlib version: "2.28.5"

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.

Baleen-Y avatar Jan 09 '24 12:01 Baleen-Y

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

All other codepaths work in workers.

CodyJasonBennett avatar Jan 09 '24 17:01 CodyJasonBennett