You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varconfig={type: Phaser.CANVAS,width: 800,height: 600,backgroundColor: '#2d2d2d',parent: 'phaser-example',pixelArt: true,scene: {preload: preload,create: create,update: update}};vargame=newPhaser.Game(config);varcontrols;functionpreload(){this.load.image('tiles','assets/tilemaps/tiles/cybernoid.png');this.load.tilemapTiledJSON('map','assets/tilemaps/maps/cybernoid.json');}functioncreate(){varmap=this.make.tilemap({key: 'map'});// The first parameter is the name of the tileset in Tiled and the second parameter is the key// of the tileset image used when loading the file in preload.vartiles=map.addTilesetImage('cybernoid','tiles');// You can load a layer from the map using the layer name from Tiled, or by using the layer// index (0 in this case).varlayer=map.createLayer(0,tiles,0,0);this.cameras.main.setBounds(0,0,map.widthInPixels,map.heightInPixels);varcursors=this.input.keyboard.createCursorKeys();varcontrolConfig={camera: this.cameras.main,left: cursors.left,right: cursors.right,up: cursors.up,down: cursors.down,speed: 0.5};controls=newPhaser.Cameras.Controls.FixedKeyControl(controlConfig);varhelp=this.add.text(16,16,'Arrow keys to scroll',{fontSize: '18px',padding: {x: 10,y: 5},backgroundColor: '#000000',fill: '#ffffff'});help.setScrollFactor(0);}functionupdate(time,delta){controls.update(delta);}
Additional Information
The text was updated successfully, but these errors were encountered:
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Version
Description
It appears that tilemap (from Tiled JSON) no longer work with Canvas display. Seems to work in WebGL.
This was working fine with Canvas in 3.24.1 but seems to have broken since.
Can be reproduced by taking the following example and switching to Canvas instead of WebGL: https://phaser.io/examples/v3/view/tilemap/tiled-json-map
Example Test Code
Additional Information
The text was updated successfully, but these errors were encountered: