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

types of useGLTF missing in 3.9.0 #418

Open
5 tasks done
NamesMT opened this issue May 13, 2024 · 2 comments
Open
5 tasks done

types of useGLTF missing in 3.9.0 #418

NamesMT opened this issue May 13, 2024 · 2 comments

Comments

@NamesMT
Copy link

NamesMT commented May 13, 2024

Describe the bug

3.8.0:
image

3.9.0:
image

It's still exported in .js file and is usable, but the types missing makes IDE yelling error.
image

Reproduction

https://www.npmjs.com/package/@tresjs/cientos?activeTab=code

Steps to reproduce

N/A

System Info

N/A

Used Package Manager

pnpm

Code of Conduct

@wcheek
Copy link

wcheek commented May 21, 2024

I'm using a temporary hack to get around this issue and still be able to build my project:

// tresjs-hack.d.ts

// HACK: THIS IS A HACK! REMOVE AFTER TRESJS FIXES TYPES
declare module "@tresjs/cientos" {
  export function useGLTF(any, any);
  export function CameraControls(any);
// Necessary to declare any other cientos packages you are importing here
}

@NamesMT
Copy link
Author

NamesMT commented May 21, 2024

Currently I just simlpy remove opt out of TS (remove lang="ts") on model components :D,
Should be a quick fix but the team is preparing for 4.0 I guess.

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