-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtexturePainter.html
More file actions
51 lines (48 loc) · 1.26 KB
/
texturePainter.html
File metadata and controls
51 lines (48 loc) · 1.26 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Texture Painter</title>
<style>
.canvas-container {
display: flex;
flex-wrap: wrap;
width: 256px;
}
.pixel {
width: 16px;
height: 16px;
border: 1px solid #ccc;
box-sizing: border-box;
}
.color-picker {
margin-top: 16px;
}
.code-box {
width: 100%;
margin-top: 16px;
}
.code-box textarea {
width: 100%;
resize: vertical;
}
</style>
</head>
<body>
<h1>Texture Painter</h1>
<div class="canvas-container"></div>
<div class="controls">
<input type="color" id="colorPicker">
<button onclick="setCanvasSize()">Set Size</button>
<button onclick="copyImageData()">Copy Image Data</button>
<button onclick="clearImageData()">Clear(!)</button>
<input type="file" accept="image/*" onchange="handleImageUpload(event)">
</div>
<div class="code-box">
<textarea id="imageData" rows="15" cols="50" placeholder="Code appears here" readonly></textarea>
</div>
<script src="shared.js"></script>
<script src="texturePainter.js"></script>
</body>
</html>