diff examples/js-animation/resources/sprites/margins.json @ 98:f4d23ad4aa27

Common: refactoring class mlk::size 1. Make uniform size representation in JSON format: { "width": 100, "height": 200 } The Javascript API was using this form while an array was used in loaders. 2. Create brand new functions in util::json to parse mlk::size objects, Updated util::json::require_(u)int as well. 3. Add new tests for mlk::size object, 4. Get rid of utilities in loader as they are in util::json instead.
author David Demelier <markand@malikania.fr>
date Tue, 04 Jul 2017 13:23:15 +0200
parents 78de82cc6bde
children
line wrap: on
line diff
--- a/examples/js-animation/resources/sprites/margins.json	Fri Jun 16 12:38:04 2017 +0200
+++ b/examples/js-animation/resources/sprites/margins.json	Tue Jul 04 13:23:15 2017 +0200
@@ -1,6 +1,15 @@
 {
-  "image": "images/margins.png",
-  "cell": [ 32, 32 ],
-  "margin": [ 4, 6 ],
-  "space": [ 2, 3 ]
+    "image": "images/margins.png",
+    "cell": {
+        "width": 32,
+        "height": 32
+    },
+    "margin": {
+        "width": 4,
+        "height": 6
+    },
+    "space": {
+        "width": 2,
+        "height": 3
+    }
 }