Skip to content

Commit

Permalink
fix: backwards compat for three-stdlib (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Sep 23, 2021
1 parent 01dd6fa commit c255ecb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/useGLTF.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ function extensions(useDraco: boolean | string, useMeshopt: boolean, extendLoade
;(loader as GLTFLoader).setDRACOLoader(dracoLoader)
}
if (useMeshopt) {
;(loader as GLTFLoader).setMeshoptDecoder(MeshoptDecoder)
;(loader as GLTFLoader).setMeshoptDecoder(
typeof MeshoptDecoder === 'function' ? MeshoptDecoder() : MeshoptDecoder
)
}
}
}
Expand Down

1 comment on commit c255ecb

@vercel
Copy link

@vercel vercel bot commented on c255ecb Sep 23, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.