I’m new to three.js and i’m trying to render a 3D loading spinner that’ll show as my model is loading but it’s not showing on my screen. I’m using the component as a fallback component to the React Suspense. The scene is also being logged correctly (it’s logging an object).
This is the code which logs the scene as an object, but nothing is showing on my screen.
import React from "react";
import { Html, useGLTF } from "@react-three/drei";
const Features = () => {
const { scene } = useGLTF("/models/pokeball_loader.glb");
console.log(scene);
return (
<mesh>
<primitive object={scene} scale={0.8} position={[0, -3.25, -1.5]} />
</mesh>
);
};
export default Features;
New contributor
Code_deev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.