aframe-react icon indicating copy to clipboard operation
aframe-react copied to clipboard

How to use loader with draco compression

Open netgfx opened this issue 2 years ago • 1 comments

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.

netgfx avatar Mar 15 '22 17:03 netgfx

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
Screen Shot 2022-04-27 at 9 12 42 AM

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') 

jparismorgan avatar Apr 27 '22 16:04 jparismorgan