-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
33 lines (27 loc) · 871 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<html>
<head>
<link rel="stylesheet" href="build/main.css"/>
<title>Sass Raytracing</title>
</head>
<body>
<p>By <a href="https://github.com/mjkaufer">Matthew Kaufer</a></p>
<p>Add your own shapes by cloning <a href="https://github.com/mjkaufer/SassRaytracing">the repo</a> and following the instructions in the readme</p>
<div id="container"></div>
<script>
var width = 100;
var height = 100;
// sass indexes at 1 so we'll follow their lead
for (var i = 1; i <= height; i++) {
var row = document.createElement('div');
row.classList.add('col');
for (var j = 1; j <= width; j++) {
var pixel = document.createElement('div');
pixel.classList.add('pixel');
pixel.id = 'p-' + j + '-' + i;
row.appendChild(pixel);
}
document.getElementById('container').appendChild(row);
}
</script>
</body>
</html>