frenchtoast747 / webgl-obj-loader

A simple OBJ model loader to help facilitate the learning of WebGL.
http://frenchtoast747.github.io/webgl-obj-loader/
MIT License
281 stars 59 forks source link

Missing TypeScript header file #58

Closed DCtheTall closed 5 years ago

DCtheTall commented 5 years ago

This module is currently missing and index.d.ts file which means that it is not compatible with TypeScript without type casting to any type, which removes the benefit of the static typing.

If any maintainer of this repo is interested, I would be happy to open a PR to add one?

frenchtoast747 commented 5 years ago

I've actually contemplated on converting the whole library over to TS and would gladly accept a type def file for now until that can happen. Feel free to create a PR and I'll pull it in. Thanks!

DCtheTall commented 5 years ago

One way I was thinking of generating the .d.ts file is to translate the working JavaScript into TypeScript then use Webpack to generate type defs automatically. Would including any of the translated JS be helpful?

frenchtoast747 commented 5 years ago

I think I'm going to spend a couple of hours today and just go ahead and do the TS conversion. Standby.

frenchtoast747 commented 5 years ago

Took me longer than I thought, but I updated everything to be TS and included the .d.ts files along side the main library. Let me know if I borked something up. Thanks!