oxyflour Posted January 25, 2017 Share Posted January 25, 2017 Hey! I've been a big fan of TypeScript and am just starting to build a new game with this awesome engine. My workflow is based on npm, but it seems the latest npm distribution (v2.5) is missing files like babylon.2.5.canvas2d.d.ts. Is it missed by accident, or are you planing to publish it in a separate package? At present I have to clone the hole repository for that file. BTW, is it okay to compile the source with the "noImplicitAny" flag? I tried but the documented command "gulp Canvas2D" seems broken :/ Quote Link to comment Share on other sites More sharing options...
iiceman Posted January 25, 2017 Share Posted January 25, 2017 Hi there oxyflour, and welcome to the forum! I had the same problem some days ago and I ended up putting the compiled files (babylon.2.5.canvas2d.d.ts + babylon.2.5.canvas2d.js) from the dist folder in my project . I think that's all I did to make it work (but not sure since I tired a lot before getting there - I also tried to compile it myself but somehow it didn't work - I'll check if that was everything I did when I am back home tonight.) Maybe that helps. But I second that it would be cool if Canvas2D could be acquired via npm! Quote Link to comment Share on other sites More sharing options...
oxyflour Posted January 25, 2017 Author Share Posted January 25, 2017 3 hours ago, iiceman said: Hi there oxyflour, and welcome to the forum! I had the same problem some days ago and I ended up putting the compiled files (babylon.2.5.canvas2d.d.ts + babylon.2.5.canvas2d.js) from the dist folder in my project . I think that's all I did to make it work (but not sure since I tired a lot before getting there - I also tried to compile it myself but somehow it didn't work - I'll check if that was everything I did when I am back home tonight.) Maybe that helps. But I second that it would be cool if Canvas2D could be acquired via npm! Hello @iiceman! It sounds a good idea and I'll try that later. I just found the script generating the npm package (https://github.com/BabylonJS/Babylon.js/blob/master/Tools/Npm/getfiles.bat) so maybe the declaration file was simply forgotten and will be added back later . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.