Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redline under .geometry . geometry={nodes.T_Shirt_male.geometry} #58

Open
berkanioussama opened this issue Dec 29, 2023 · 2 comments
Open

Comments

@berkanioussama
Copy link

Property 'geometry' does not exist on type 'Object3D
i use nexjs 14 typescript . not vite js
image

@berkanioussama
Copy link
Author

i creat another on with js not ts and its work

@hannesuw
Copy link

In typescript, you should create a type for GLTF result and assign it to useGLTF hooks.

Create an interface or a type.
interface GLTFResult extends GLTF { nodes: { T_Shirt_male: THREE.SkinnedMesh } materials: { lambert1: THREE.MeshStandardMaterial } }

Assign the type to the hooks.
const { nodes, materials } = useGLTF("/shirt_baked.glb") as GLTFResult

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants