diff --git a/examples/imgs/Attribution.txt b/examples/imgs/Attribution.txt
index 3b7b6504..59c9c94d 100644
--- a/examples/imgs/Attribution.txt
+++ b/examples/imgs/Attribution.txt
@@ -6,6 +6,7 @@ CC0 1.0 Universal
Assets from:
http://opengameart.org/content/platformer-tiles
+ https://opengameart.org/content/classic-hero
https://www.kenney.nl/assets/ui-pack
https://www.kenney.nl/assets/topdown-tanks-redux
diff --git a/examples/imgs/oldHero.png b/examples/imgs/oldHero.png
new file mode 100644
index 00000000..669fc248
Binary files /dev/null and b/examples/imgs/oldHero.png differ
diff --git a/examples/spriteSheet/margin.html b/examples/spriteSheet/margin.html
new file mode 100644
index 00000000..2cab6a12
--- /dev/null
+++ b/examples/spriteSheet/margin.html
@@ -0,0 +1,65 @@
+
+
+
+ Animation Sprite
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/tileEngine/margin/marginTiles.json b/examples/tileEngine/margin/marginTiles.json
index a13c6057..6cad2fd1 100644
--- a/examples/tileEngine/margin/marginTiles.json
+++ b/examples/tileEngine/margin/marginTiles.json
@@ -1,9 +1,35 @@
-{ "height":25,
+{ "compressionlevel":-1,
+ "height":25,
"infinite":false,
"layers":[
{
- "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 153, 151, 151, 151, 151, 151, 151, 151, 151, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 210, 210, 210, 210, 210, 210, 210, 210, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 266, 266, 266, 266, 266, 266, 266, 266, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 181, 151, 151, 151, 151, 151, 151, 154, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 209, 210, 210, 211, 210, 210, 210, 180, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 265, 266, 266, 267, 266, 266, 266, 180, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 180, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 325, 150, 151, 151, 151, 151, 151, 183, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 325, 209, 210, 210, 210, 210, 210, 180, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 325, 265, 266, 266, 266, 266, 266, 180, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 180, 0, 0, 0, 0, 0, 0, 0, 0, 180, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 180, 0, 0, 0, 0, 0, 0, 0, 0, 181, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 182, 0, 0, 0, 0, 0, 0, 0, 0, 205, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 208, 0, 0, 0, 0, 0, 0, 0, 0, 261, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+ "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 158, 156, 156, 156, 156, 156, 156, 156, 156, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 217, 217, 217, 217, 217, 217, 217, 217, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 275, 275, 275, 275, 275, 275, 275, 275, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 187, 156, 156, 156, 156, 156, 156, 159, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 216, 217, 217, 218, 217, 217, 217, 186, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 274, 275, 275, 276, 275, 275, 275, 186, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 186, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 336, 155, 156, 156, 156, 156, 156, 189, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 336, 216, 217, 217, 217, 217, 217, 186, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 336, 274, 275, 275, 275, 275, 275, 186, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 186, 0, 0, 0, 0,
+ 0, 0, 0, 0, 186, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 186, 0, 0, 0, 0,
+ 0, 0, 0, 0, 187, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 188, 0, 0, 0, 0,
+ 0, 0, 0, 0, 212, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 215, 0, 0, 0, 0,
+ 0, 0, 0, 0, 270, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 273, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":25,
+ "id":1,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
@@ -11,10 +37,35 @@
"width":25,
"x":0,
"y":0
- },
+ },
{
- "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 0, 0, 163, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 191, 196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":25,
+ "id":2,
"name":"Tile Layer 2",
"opacity":1,
"type":"tilelayer",
@@ -23,18 +74,28 @@
"x":0,
"y":0
}],
+ "nextlayerid":3,
"nextobjectid":1,
"orientation":"orthogonal",
"renderorder":"right-down",
- "tiledversion":"1.1.6",
+ "tiledversion":"1.10.2",
"tileheight":16,
"tilesets":[
{
+ "columns":29,
"firstgid":1,
- "source":"roguelikeDungeon_transparent.json"
+ "image":"roguelikeDungeon_transparent.png",
+ "imageheight":315,
+ "imagewidth":502,
+ "margin":5,
+ "name":"roguelikeDungeon_transparent",
+ "spacing":1,
+ "tilecount":522,
+ "tileheight":16,
+ "tilewidth":16
}],
"tilewidth":16,
"type":"map",
- "version":1,
+ "version":"1.10",
"width":25
}
\ No newline at end of file
diff --git a/examples/tileEngine/margin/marginTiles.tmx b/examples/tileEngine/margin/marginTiles.tmx
index 483d6e95..bd146e8f 100644
--- a/examples/tileEngine/margin/marginTiles.tmx
+++ b/examples/tileEngine/margin/marginTiles.tmx
@@ -1,54 +1,59 @@
-