aframe-react
aframe-react copied to clipboard
How to use loader with draco compression
I tried to load this model: https://market.pmnd.rs/model/wall but it won't show up.
I tried to enable the draco decoder via <Scene gltfModel="dracoDecoderPath: https://www.gstatic.com/draco/versioned/decoders/1.4.1/"/>
but with no luck.
I am also having issues here. When I do:
<Scene gltf-model='dracoDecoderPath: https://www.unpkg.com/[email protected]/examples/js/libs/draco/;' ...
then it looks like we are creating a network request which accidentally includes dracodecoderpath:
:
Request URL: dracodecoderpath: https://www.unpkg.com/[email protected]/examples/js/libs/draco/;
GET dracodecoderpath: https://www.unpkg.com/[email protected]/examples/js/libs/draco/; net::ERR_FAILED

If I instead do:
<Scene gltf-model='https://www.unpkg.com/[email protected]/examples/js/libs/draco/' ...
I get a 302 back:
Request URL: https://www.unpkg.com/[email protected]/examples/js/libs/draco/
Request Method: GET
Status Code: 302
and no error from the network request. But draco loading does not work:
components:gltf-model:warn Cannot read properties of undefined (reading 'byteStride')
aframe-master.js?b048:3026 components:gltf-model:warn Unexpected token < in JSON at position 0
And if I instead do:
<Scene gltfModel='dracoDecoderPath: https://www.unpkg.com/[email protected]/examples/js/libs/draco/' ...
I do not have an error, but I also don't request the draco folder, and get:
components:gltf-model:warn Cannot read properties of undefined (reading 'byteStride')