s4m_ur4i Posted October 5, 2018 Share Posted October 5, 2018 UPDATE: Phaser is throwing an error since version 3.14 for: datasource of undefined By setting the pipeline for lighting. (Normalmap is also defined and loaded) This worked before. Now I try to find out what changed and what has to be changed.. but that's quite hard despite a real API version changelog. Has anyone a clue? Bug on GitHub: https://github.com/photonstorm/phaser/issues/4079?_pjax=%23js-repo-pjax-container Also the example breaks: http://labs.phaser.io/view.html?src=src\game objects\lights\dynamic tilemap layer.js //layer_ground is a dynamicTilemaplayer reference layer_ground.setPipeline('Light2D'); Help! by updating to phaser 3.14 my games are broken. EDIT: I set the dynamic tilemap code to a string ('tilemap') instead of referring to their variable. But then the tilemap simply does not render. It's there anyway. But it seems it cannot find the texture anymore. But referring (as in the code) to the variable for the texture causes the error as described below. my games are breaking and I can't figure out what's exactly wrong. Here is the console output of the non-minified phaser file. (attached) As far as I know, this has something to do with dynamic tilemap layers? phaser14.js:45334 Uncaught TypeError: Cannot read property 'dataSource' of undefined How I use them: // tilemap graphic and map are loaded: the graphic is loaded and at the right place this.map = this.make.tilemap({ key: key, tileWidth: TILESIZE, tileHeight: TILESIZE }); const tileset = this.map.addTilesetImage('tilemap'); // dynamic tilemaps: const layer_clouds = this.map.createDynamicLayer(0, tileset, 0, 0); this.layer.clouds.add(layer_clouds); layer_clouds.setScale(SCALE); but it worked before, it's hard to find a place where I can track changes of the API on phaser.io ?... maybe I just need the reference, but I can't find one. Thanks in advance for any help! Link to comment Share on other sites More sharing options...
rich Posted October 5, 2018 Share Posted October 5, 2018 1 hour ago, SamTheMighty said: UPDATE: Phaser is throwing an error since version 3.14 for: datasource of undefined By setting the pipeline for lighting. (Normalmap is also defined and loaded) This worked before. Now I try to find out what changed and what has to be changed.. but that's quite hard despite a real API version changelog. Has anyone a clue? There's nothing to find, this isn't the result of an API change. It's just another bug with the less than stellar light map code, which honestly ought to be removed entirely. Link to comment Share on other sites More sharing options...
Rose Game Solutions Posted July 10, 2020 Share Posted July 10, 2020 I'm running into this issue with version `3.20.1` just looking at where it's breaking: `ForwardDiffuseLightPipeline.js` ``` else if (gameObject.tileset) { normalTexture = gameObject.tileset.image.dataSource[0]; } ``` tileset is an array so the code might should be: `normalTexture = gameObject.tileset[0].image.dataSource[0]` Link to comment Share on other sites More sharing options...
Recommended Posts