dracoLoader loading from root even after setting a different path with .setDecoderPath
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description:
- A-Frame Version: 1.0.4
- Platform / Device: Desktop Chrome
I'm doing this on my js
// Instantiate a loader
var loader = new THREE.GLTFLoader();
// Optional: Provide a DRACOLoader instance to decode compressed mesh data
const dracoLoader = new THREE.DRACOLoader();
dracoLoader.setDecoderPath( "http://localhost/aframe-test/js/src/3d/decorders/draco/" ); // using absolute path because I couldn't get it to work either way
loader.setDRACOLoader( dracoLoader );
But I'm getting the following errors on the console. Like if it was ignoring the path I setted.
http://localhost/aframe-test/draco_wasm_wrapper.js 404 (Not Found)
http://localhost/aframe-test/draco_decoder.wasm 404 (Not Found)
When setting the dracoDecorderPath using the a-scene gltf-model component, it works as expected.
<a-scene id="scene" embedded gltf-model="dracoDecoderPath: js/src/3d/decorders/draco/">
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GLTFLoader and DRACOLoader setup shown in the report, then trace how the A-Frame gltf-model component passes its decoder path. Compare the configured path with the root-relative URLs requested for draco_wasm_wrapper.js and draco_decoder.wasm; done when the decoder assets load from the path supplied to setDecoderPath.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, three.js
- Domain
- computer-graphics, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100