-
Notifications
You must be signed in to change notification settings - Fork 20
/
index.html
35 lines (31 loc) · 1.8 KB
/
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
34
35
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>FastLED XY Map Generator</title>
<link rel="stylesheet" type="text/css" href="XYmapper.css">
<script src="XYmapper.js"></script>
</head>
<body>
<h1>FastLED XY Map Generator</h1>
<p>by Garrett Mace (macetech.com), inspired by Mark Kriegsman</p>
<p>Code: <a href="https://github.com/macetech/FastLED-XY-Map-Generator">https://github.com/macetech/FastLED-XY-Map-Generator</a>
<h3>Automatically generates XYmap function for irregular/gapped LED arrays.</h3>
<p>Set the maximum x and y dimensions, layout style (how the LEDs are actually wired), and click Rebuild.</p>
<p>Then click LEDs to edit the shape of the array by enabling and disabling pixels. The code is updated in realtime.</p>
<p>Copy the resulting function and paste into your code.</p>
<p>The function will map ordinary X-Y coordinates to the irregular array, preserving pixels that land in gaps.</p>
<div class="controls">
<input type="checkbox" id="serpentineCHK" onchange="serpentineLayout(this)" checked>Serpentine</input>
<input type="checkbox" id="verticalCHK" onchange="verticalLayout(this)">Vertical</input><br>
<input type="checkbox" id="vflipCHK" onchange="vflipLayout(this)">V-Flip</input>
<input type="checkbox" id="hflipCHK" onchange="hflipLayout(this)">H-Flip</input><br>
<br>
<div class="inputBox"><label class="inputText">Width</label><input id="xdim" type="number" name="xdim" min="1" value="16"/></div>
<div class="inputBox"><label class="inputText">Height</label><input id="ydim" type="number" name="ydim" min="1" value="5"/></div>
</div>
<button id="rebuildArray" onclick="buildGrid()">Rebuild</button>
<div id="ledgrid"></div>
<div id="result">Map goes here.</div>
</body>
</html>