Skip to content

Not working with React Native CLI (OBJ & GLTF) #8

@mattlewer

Description

@mattlewer

I've spent the last several hours trying to get this library to work with React Native CLI and haven't managed to get a single custom 3d object rendered, feel like I'm losing it.

Reference to my original bug post (closed to make this one instead, but please reference if needed):
pmndrs/react-three-fiber#3298

Initially wanted to render an OBJ file, ran into the same issues posted here where it is admitted that loading a OBJ file does not work properly, the solutions do not work for me either:
#9
pmndrs/react-three-fiber#3199

Gave up on that and converted it to a GLTF to start from the simplest approach of following the docs.
First of all I have a TypeScript error that Property 'scene' does not exist on type 'GLTF | GLTF[]'. when this is what the docs say to do here?:
https://docs.pmnd.rs/react-three-fiber/getting-started/installation#react-native:~:text=...props%7D-,object%3D%7Bgltf.scene%7D,-/%3E%0A%7D%0A%0Aexport

Then when I run it I get another error:
Error: Could not load 1: THREE.GLTFLoader: Failed to load buffer "model.bin".

I'm honestly at a loss, will provide example repo's so hopefully you can spot the issue here...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions