JSFiddle - React, Tailwind, and code Playground
by InferOn
HTML
<body onload="Javascript:main();">
<center><canvas id="viewport" width="800" height="400" style="border:1px solid black;"></canvas></center>
</body>
JavaScript
var assets = {
"0000": { "img": "http://s24.postimg.org/l4hhj3n2p/0000.png", "name" : "grass", "height": 64, "width": 64, "depth":0 },
"0001": { "img": "http://s24.postimg.org/l4hhj3n2p/0000.png", "name": "grass", "height": 64, "width": 64, "depth":0 },
"0002": { "img": "http://s24.postimg.org/l4hhj3n2p/0000.png", "name": "grass", "height": 64, "width": 64, "depth":0 },
"0003": { "img": "http://s24.postimg.org/l4hhj3n2p/0000.png", "name": "grass", "height": 64, "width": 64, "depth":0 },
"0004": { "img": "http://s24.postimg.org/l4hhj3n2p/0000.png", "name": "grass", "height": 64, "width": 64, "depth":0 },
"0005": { "img": "http://s24.postimg.org/l4hhj3n2p/0000.png", "name": "grass", "height": 64, "width": 64, "depth":0 },
"0062": { "img": "http://s4.postimg.org/9jo79n4rt/0062.png", "name": "tree", "height": 128, "width": 64, "depth":1 },
"0064": { "img": "http://s27.postimg.org/fvyrnbvjz/0064.png", "name": "rock", "height": 64, "width": 64, "depth":0 },
"0066": { "img": "http://s30.postimg.org/lvc9yicn1/0066.png", "name": "rock", "height": 64, "width": 64, "depth":0 },
"0129": { "img": "http://s22.postimg.org/ky7tzncwt/0129.png", "name" : "bush", "height": 64, "width": 64, "depth":0 }
};
var floor = [
//0 1 2 3 4 5 6 7 8 9 10 11 12
/* 0*/['0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000'],
/* 1*/['0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000'],
/* 2*/['0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000'],
/* 3*/['0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000'],
/* 4*/['0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000','0000'],
/*...