RobLoach / node-raylib

Node.js bindings for Raylib
https://robloach.github.io/node-raylib/
Other
245 stars 20 forks source link

index.d.ts #93

Open Googcoon opened 3 years ago

Googcoon commented 3 years ago

So when you use dts-gen it does not read the c++ and header files, therefore, making all function definitions null, meaning all functions besides a few exceptions have no arguments so what do I do?

twuky commented 2 years ago

i found some more filled in type info for the functions in the typescript branch: https://github.com/RobLoach/node-raylib/tree/typescript it appears to be a few years old, so i doubt everything is fully accurate to raylib 3.5. at the very least, I noticed some missing functions from its defs compared to the cheatsheet on the raylib site, but it may be a good starting point. im not all that familar with raylib (just started checking out this package yesterday) so I don't know much about the version differences. for the time being i put together a definition file from that branch, and tried to include what i could from the cheatsheet as docstring comments. I can't guarantee its accurate, i haven't tested anything, but it seems to cover most of the functions.

https://gist.github.com/twuky/77913b249cc3b294ec0d3d443e39dae7 i may try to cross reference with the definitions file from the current branch to see if there are any missing/changed function names later

Googcoon commented 2 years ago

yeah the index.d.ts file provided has a lot of functionality included but is missing a few functions here and there