I’m trying to install this plugin to my project.
I built it using npm install
then npm run build
, and got the js file.
I put it inside lib
folder inside my project with the following hierarchy:
index.html
game.js
lib/phaser.min.js
lib/ninepatch.min.js
Then I have included it in my index.html
file like this:
<script src="lib/phaser.min.js" type="text/javascript"></script>
<script src="lib/ninepatch.min.js" type="text/javascript"></script>
<script src="game.js" type="text/javascript"></script>
Then in the preload()
function I loaded the plugin like this:
this.load.plugin('ninepatchplugin', "lib/ninepatch.min.js", true);
However, I get a warning: Invalid Plugin: ninepatchplugin
and the plugin didn’t get loaded.
Is this something wrong with the plugin itself? Or a bug? Or did I do anything wrong?