zakhov Posted June 16, 2015 Share Posted June 16, 2015 Hi,I'm a bit a new to Panda.JS. is there a way to load up image assets stored on a CDN? e.g Amazon In Phaser it's something like this:Remove the next 2 lines if running locally this.load.baseURL = 'http://files.phaser.io.s3.amazonaws.com/codingtips/issue008/'; this.load.crossOrigin = 'anonymous'; this.load.image('alien', 'assets/ufo.png');Is there a similar way to achieve this with Panda.js? Thanks Quote Link to comment Share on other sites More sharing options...
enpu Posted June 16, 2015 Share Posted June 16, 2015 Hi! This will be possible on Panda Engine 2, like this:game.addAsset('http://files.phaser.io.s3.amazonaws.com/codingtips/issue008/assets/ufo.png', 'ufo');game.createScene('Main', { init: function() { var sprite = new game.Sprite('ufo'); sprite.addTo(this.stage); }}); Quote Link to comment Share on other sites More sharing options...
zakhov Posted June 16, 2015 Author Share Posted June 16, 2015 Thanks for the reply. Tested it and loading assets from CDN indeed works great with the Panda 2 Engine.I suppose there's no harm in me using this as our base engine in it's current state. On a side note,If I were to use a source code of a game made with pre-2.0 engine as a starting in learning Panda, do I have to make a lot of changes to the code? Keep up the good work! Quote Link to comment Share on other sites More sharing options...
enpu Posted June 16, 2015 Share Posted June 16, 2015 The current state of 2.0 is pretty stable (using it currently on my own projects), so i'm not expecting to make any big changes anymore.Just few new features:https://github.com/ekelokorpi/panda.js-engine/issues If you spot any issues with 2.0, please let me know so i can fix them Quote Link to comment Share on other sites More sharing options...
zakhov Posted June 16, 2015 Author Share Posted June 16, 2015 Sure, we really appreciate the amount of work you've put into Panda JS. Cheers Quote Link to comment Share on other sites More sharing options...
Neso Posted July 7, 2015 Share Posted July 7, 2015 I don't know if it is worth noting but I am using CDN with older version and it works perfectly with minor changes. Either way loader is in the pixijs. Which worked in version 2.1.0 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.