Peachiie Posted October 2, 2018 Share Posted October 2, 2018 Hello everyone! I have a sprite sheet and the json folder and I'm trying to add it to my preload for a Phaser 3 game. I was doing a tutorial which I think is using maybe an older version of Phaser but it tells me to use this.load.atlasJSONHash but when I run that I get an error: this.load.atlasJSONHash is not a function My code so far is... import explorerJSON from '../assets/explorer.json'; import explorer from '../assets/explorer.png'; class Game extends Phaser.Scene { constructor() { super({ key: 'Game' }); } preload() { // load all the images this.load.atlasJSONHash('explorer', explorer, explorerJSON); Link to comment Share on other sites More sharing options...
samme Posted October 2, 2018 Share Posted October 2, 2018 You'll have to avoid the Phaser 2 tutorials because the code won't work in Phaser 3. See http://phaser.io/news/category/tutorial http://labs.phaser.io/index.html?dir=loader/texture atlas json/&q= Link to comment Share on other sites More sharing options...
Recommended Posts