Str1ngS Posted March 18, 2016 Share Posted March 18, 2016 Hey guys, So I'm back with another plugin, a nine slice/patch container this time. It fits right in Phaser with preloading and object Factory/Creator methods. It uses a RenderTexture for the the image to scale, so it's pretty fast =) Anyway, head on to github to check it out :) Link to comment Share on other sites More sharing options...
stupot Posted March 18, 2016 Share Posted March 18, 2016 you used 'phaser-spine' in the github npm install command Link to comment Share on other sites More sharing options...
Str1ngS Posted March 18, 2016 Author Share Posted March 18, 2016 haha, good find. I tend to get shit mixed up, working on too many projects atm Link to comment Share on other sites More sharing options...
avatech Posted December 16, 2017 Share Posted December 16, 2017 Hi Str1ngS, I'm using webpack, but when I try to import phaser-nineslice, it always give me empty object. Does this plugin work with webpack? Or did I make any mistake in the config? Thanks in advance, great plugin btw! webpack.config.js Link to comment Share on other sites More sharing options...
Str1ngS Posted December 18, 2017 Author Share Posted December 18, 2017 Hey @avatech thanks! You need to use the exports-loader in webpack as per: https://github.com/orange-games/phaser-input/issues/7 Let me know if you still run into any issues Link to comment Share on other sites More sharing options...
avatech Posted December 18, 2017 Share Posted December 18, 2017 @Str1ngS It works!! Attached is my final working webpack.config.js. Note that there is a quirk, in the code, whenever I use: import Phaser from "phaser-ce" This will cause the plugin to show this error: "The value passed as the `game` argument ([object Object]) is not an instance of Phaser.Game." I fixed this problem by changing the import statement to: import Phaser from "phaser" This is so that the instance of Phaser that is used by Nineslice and the game is the same. Because in my webpack.config.js file, I explicitly wrote "phaser" in resolve.alias, which is ultimately used by PhaserNineSlice plugin, not "phaser-ce". Thanks again for your help! webpack.config.js Str1ngS 1 Link to comment Share on other sites More sharing options...
Recommended Posts