Skip to content

Commit

Permalink
fix: gltf preload types update, make useDraco and useMeshopt optional (
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisweb authored Oct 8, 2024
1 parent 6956eb1 commit c586258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Gltf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const useGLTF = <T extends Path>(
): T extends any[] ? (GLTF & ObjectMap)[] : GLTF & ObjectMap =>
useLoader(GLTFLoader, path, extensions(useDraco, useMeshopt, extendLoader))

useGLTF.preload = (path: Path, useDraco: UseDraco, useMeshopt: UseMeshopt, extendLoader?: ExtendLoader) =>
useGLTF.preload = (path: Path, useDraco?: UseDraco, useMeshopt?: UseMeshopt, extendLoader?: ExtendLoader) =>
useLoader.preload(GLTFLoader, path, extensions(useDraco, useMeshopt, extendLoader))

useGLTF.clear = (path: Path) => useLoader.clear(GLTFLoader, path)
Expand Down

1 comment on commit c586258

@abernier
Copy link
Member

@abernier abernier commented on c586258 Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I broke this! @chrisweb thank you for the fix :)

Please sign in to comment.