Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Dungeons and Dragons 3.5 Map Generator</title>
- <script src="GenerateMaps.js"></script>
- <link rel='stylesheet'>
- <link rel="stylesheet" type="text/css" href="index.css">
- </head>
- <body onload="runExperiments();">
- <div id="row">
- <div class="page_items" id="map">
- <script>
- window.onload=function() {
- let c = document.getElementById("map");
- let ctx = c.getContext("2d");
- let x;
- let y;
- c.width = (window.innerWidth / 2)-(window.innerWidth % 30);
- c.height = (window.innerHeight)-(window.innerHeight % 30);
- ctx.width = c.width - 30;
- ctx.height = c.width - 30;
- let elem = document.createElement("image");
- elem.setAttribute("src", "floor.png");
- elem.setAttribute("height", "30");
- elem.setAttribute("width", "30");
- elem.setAttribute("src", "floor.png");
- for (x = 30; x < ctx.height; x += 30) {
- for (y = 30; y < ctx.width; y += 30) {
- c.appendChild(elem);
- }
- }
- }
- </script>
- </div>
- </div>
- </body>
Add Comment
Please, Sign In to add comment