Skip to content

Commit 82e4490

Browse files
authored
Merge pull request phaserjs#4827 from koljakutschera/master
fix light2d using tileset from dynamictilemaplayer (phaserjs#4167,phaserjs#4079)
2 parents 8528e41 + c893ca6 commit 82e4490

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,14 @@ var ForwardDiffuseLightPipeline = new Class({
250250
}
251251
else if (gameObject.tileset)
252252
{
253-
normalTexture = gameObject.tileset.image.dataSource[0];
253+
if (Array.isArray(gameObject.tileset))
254+
{
255+
normalTexture = gameObject.tileset[0].image.dataSource[0];
256+
}
257+
else
258+
{
259+
normalTexture = gameObject.tileset.image.dataSource[0];
260+
}
254261
}
255262

256263
if (!normalTexture)

0 commit comments

Comments
 (0)