Referencing test in index.html and adding some text in the test map.

This commit is contained in:
David Négrier 2021-06-28 10:06:56 +02:00
parent b0eb241fc3
commit f18291e9d2
2 changed files with 115 additions and 93 deletions

View File

@ -162,6 +162,22 @@
<a href="#" class="testLink" data-testmap="animated_tiles.json" target="_blank">Test animated tiles</a> <a href="#" class="testLink" data-testmap="animated_tiles.json" target="_blank">Test animated tiles</a>
</td> </td>
</tr> </tr>
<tr>
<td>
<input type="radio" name="test-start-tile-S1"> Success <input type="radio" name="test-start-tile-S1"> Failure <input type="radio" name="test-start-tile-S1" checked> Pending
</td>
<td>
<a href="#" class="testLink" data-testmap="start-tile.json#S1" target="_blank">Test start tile (S1)</a>
</td>
</tr>
<tr>
<td>
<input type="radio" name="test-start-tile-S2"> Success <input type="radio" name="test-start-tile-S2"> Failure <input type="radio" name="test-start-tile-S2" checked> Pending
</td>
<td>
<a href="#" class="testLink" data-testmap="start-tile.json#S2" target="_blank">Test start tile (S2)</a>
</td>
</tr>
</table> </table>
<script> <script>

View File

@ -1,95 +1,101 @@
{ { "compressionlevel":-1,
"compressionlevel": -1, "height":5,
"height": 5, "infinite":false,
"infinite": false, "layers":[
"layers": [
{ {
"data": [ "data":[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, "height":5,
4 "id":4,
], "name":"background",
"height": 5, "opacity":1,
"id": 4, "type":"tilelayer",
"name": "background", "visible":true,
"opacity": 1, "width":5,
"type": "tilelayer", "x":0,
"visible": true, "y":0
"width": 5,
"x": 0,
"y": 0
}, },
{ {
"data": [ "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 2, 3, 3, 0, 2, 2],
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 2, 3, 3, 0, 2, "height":5,
2 "id":1,
], "name":"start",
"height": 5, "opacity":1,
"id": 1, "type":"tilelayer",
"name": "start", "visible":true,
"opacity": 1, "width":5,
"type": "tilelayer", "x":0,
"visible": true, "y":0
"width": 5,
"x": 0,
"y": 0
}, },
{ {
"draworder": "topdown", "draworder":"topdown",
"id": 3, "id":3,
"name": "floorLayer", "name":"floorLayer",
"objects": [], "objects":[
"opacity": 1,
"type": "objectgroup",
"visible": true,
"x": 0,
"y": 0
}
],
"nextlayerid": 5,
"nextobjectid": 1,
"orientation": "orthogonal",
"renderorder": "right-down",
"tiledversion": "1.6.0",
"tileheight": 32,
"tilesets": [
{ {
"columns": 2, "height":66.6666666666667,
"firstgid": 1, "id":1,
"image": "function_tiles.png", "name":"",
"imageheight": 64, "rotation":0,
"imagewidth": 64, "text":
"margin": 0,
"name": "function_tiles",
"spacing": 0,
"tilecount": 4,
"tileheight": 32,
"tiles": [
{ {
"id": 0, "fontfamily":"Sans Serif",
"properties": [ "pixelsize":11,
"text":"If URL contains hash #S1, player starts on S1.\nIf URL contains hash #S2, player starts on S2.",
"wrap":true
},
"type":"",
"visible":true,
"width":155.104166666667,
"x":3.28125,
"y":2.5
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}],
"nextlayerid":5,
"nextobjectid":2,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"2021.03.23",
"tileheight":32,
"tilesets":[
{ {
"name": "start", "columns":2,
"type": "string", "firstgid":1,
"value": "S1" "image":"function_tiles.png",
} "imageheight":64,
] "imagewidth":64,
"margin":0,
"name":"function_tiles",
"spacing":0,
"tilecount":4,
"tileheight":32,
"tiles":[
{
"id":0,
"properties":[
{
"name":"start",
"type":"string",
"value":"S1"
}]
}, },
{ {
"id": 1, "id":1,
"properties": [ "properties":[
{ {
"name": "start", "name":"start",
"type": "string", "type":"string",
"value": "S2" "value":"S2"
} }]
] }],
} "tilewidth":32
], }],
"tilewidth": 32 "tilewidth":32,
} "type":"map",
], "version":1.5,
"tilewidth": 32, "width":5
"type": "map",
"version": "1.6",
"width": 5
} }