'Is it possible to load a Three.js Editor exported scene with React Three Fiber (r3f)

I was wondering some issue during r3f implementation of a scene made with Three.js Editor.

There is any issue about loading of json from an exported file ?

function Scene() {
    const gltf = useLoader (GLTFLoader, '/app.json')    
    return (
    <Suspense fallback={null}> 
      <primitive object={gltf} />
    </Suspense>
    )
  } 


Solution 1:[1]

I’m not sure what the editor may or may not be doing, but if you use the GLTFloader in vanilla than it should via react.

One thing to note is you’re telling r3f to use the GLTF importer and while it is possible to export GLTF from the editor, being saved as json is less common…

Solution 2:[2]

I believe GLTFLoader works with GLTF file types.

You can use three fiber drei functions with a "glb" export to load the model with out the colors then use the json file to reference and hard code all the colors and styles manually but it might be too tedious.

Unless you figured out a way to use the json file with GLTFLoader?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dennis Smolek
Solution 2 Tommy Rivera