Skip to content

Commit a0ea73a

Browse files
committed
Support for tiles rotated and/or flipped in Tiled
1 parent a70dd81 commit a0ea73a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/tilemap/TilemapParser.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,19 +270,19 @@ Phaser.TilemapParser = {
270270
flippedVal+=2;
271271
}
272272
if(gid>0x20000000) // FlippedAD
273-
{
273+
{
274274
gid-=0x20000000;
275275
flippedVal+=1;
276276
}
277277

278-
switch (flippedVal)
278+
switch (flippedVal)
279279
{
280280
case 5:
281281
rotation = Math.PI/2;
282282
break;
283283
case 6:
284-
rotation = Math.PI;
285-
break;
284+
rotation = Math.PI;
285+
break;
286286
case 3:
287287
rotation = 3*Math.PI/2;
288288
break;
@@ -299,10 +299,10 @@ Phaser.TilemapParser = {
299299
flipped = true;
300300
break;
301301
case 1:
302-
rotation = 3*Math.PI/2;;
302+
rotation = 3*Math.PI/2;
303303
flipped = true;
304304
break;
305-
}
305+
}
306306
}
307307
// index, x, y, width, height
308308
if (gid > 0)

0 commit comments

Comments
 (0)