Jump to content

Install Babylon.js with bower


olrehm
 Share

Recommended Posts

Hi,

 

I am checking out Babylon.js and wanted to pull it in as a dependency using everyone's favorite hipster tools gulp and bower  :P

Alas, I am only getting version 1.10.0 and the bower.json does not have dependencies and main property, making wiredep choke on it. 

This thread says there back in January, Meulta was working on something related to bower - anybody know how that's coming along?

 

Cheers

Ole

Link to comment
Share on other sites

I made some progress in the meanwhile. The reason why bower is always taking version 1.10.0, is that it does not understand the two digit 2.0. It checks out what it thinks is the latest, and then complains because there is no bower.json file (I filed an issue against bower for a better warning message: https://github.com/bower/bower/issues/1795). So I forked Babylon, checked out tag v2.0, added a commit with a bower.js and then tagged that as v2.0.0, and now it works like a charm. I will look into if I can make a pull request with that, in case others are interested - but I am not sure a pull request can contain a tag.

Link to comment
Share on other sites

  • 3 weeks later...

I just saw you added a bower.json - thanks deltakosh!

I replaced my hacky workaround with yours, and it mostly works. Two small issues:

 

1) I got a warning 

bower babylonjs#*                      mismatch Version declared in the json (2.1.0) is different than the resolved one (2.0.0)

When running

 bower install babylonjs --save

Probably because there is no tag 2.1.0 yet - is that because it is beta? Would it make sense to keep bower.json 2.0.0 until 2.1.0 is released?

 

2) I got some type errors:

bower_components/babylonjs/babylon.2.1.d.ts(303,19): error TS2304: Cannot find name 'AudioContext'.
bower_components/babylonjs/babylon.2.1.d.ts(304,25): error TS2304: Cannot find name 'AudioContext'.
bower_components/babylonjs/babylon.2.1.d.ts(1314,43): error TS2304: Cannot find name 'AudioNode'.
bower_components/babylonjs/babylon.2.1.d.ts(1314,71): error TS2304: Cannot find name 'AudioNode'.
bower_components/babylonjs/babylon.2.1.d.ts(1323,21): error TS2304: Cannot find name 'GainNode'.
bower_components/babylonjs/babylon.2.1.d.ts(1326,23): error TS2304: Cannot find name 'AudioContext'.
bower_components/babylonjs/babylon.2.1.d.ts(1384,37): error TS2304: Cannot find name 'AudioBuffer'.
bower_components/babylonjs/babylon.2.1.d.ts(1390,59): error TS2304: Cannot find name 'AudioNode'.
 
Looks like its because I don't have waa.d.ts. Where are these coming from? Is there a bower package for them? Is it possible to put it into the bower deps of babylonjs? Seems to work fine even with the error, I am also not using any audio stuff, but would of course be nice not to have these errors :)
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...