supermedium / aframe-react

:atom: Build virtual reality experiences with A-Frame and React.

Home Page:https://ngokevin.github.io/aframe-react-boilerplate/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use loader with draco compression

netgfx opened this issue · 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.

I am also having issues here. When I do:

<Scene gltf-model='dracoDecoderPath: https://www.unpkg.com/three@0.123.0/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/three@0.123.0/examples/js/libs/draco/;

GET dracodecoderpath: https://www.unpkg.com/three@0.123.0/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/three@0.123.0/examples/js/libs/draco/' ...

I get a 302 back:

Request URL: https://www.unpkg.com/three@0.123.0/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/three@0.123.0/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')