-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
189 lines (163 loc) · 6.22 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!DOCTYPE html>
<html lang="en">
<head>
<title>LIGHTPAINT LIVE</title>
<meta charset="utf-8">
<link href='https://fonts.googleapis.com/css?family=Ubuntu:300,400,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Oswald:300,400,700' rel='stylesheet' type='text/css'>
<meta name="keywords" content="light painting, live light painting, paint live, light paint live, light painting online, light painting software, light painting tools, light painting photography, light painting tutorials, webcam, photography, photo app, chrome app, android, iOS, long exposure">
<meta property="og:url" content="https://app.lightpaintlive.com">
<meta property="og:site_name" content="Lightpaint Live">
<meta property="og:type" content="website">
<meta property="og:image" content="https://lightpaintlive.com/assets/images/og-image.png">
<meta property="og:description" content="Real-time light painting software.">
<meta property="fb:app_id" content="331545326882067">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0">
<link rel="icon" type="image/x-icon" href="./assets/logo-green-icon-128.png">
<link rel="manifest" href="manifest.json">
<script src="sw.js"></script>
<style>
html, body {
width: 100%;
height: 100%;
}
body {
margin: 0;
background-color: #000;
color: #fff;
/* font-family: 'Ubuntu', sans-serif; */
overflow: hidden;
/* disable scrolling / rubberband effect on mobile */
}
/* canvas {
display: block;
position: absolute;
outline: 0;
} */
* {
/* disable on touch highlights of html elements, especially on mobile! */
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* footer {
position: absolute;
bottom: 0;
left: 0;
box-sizing: border-box;
width: 100vw;
padding: 20px 40px;
text-align: right;
font-size: 18px;
color: white;
}
footer a,
footer a:hover,
footer a:active {
color: lime;
text-decoration: none;
}
#lpl-logo {
float: left;
margin-left: -22px;
background-image: url(./assets/logo-green-icon-512.png);
width: 100px; height: 100px;
background-size: 80%;
background-position: center;
background-repeat: no-repeat;
}
.logo-type {
display: block;
float: left;
user-select: none;
}
.logo-type span {
font-family: 'Oswald', sans-serif;
line-height: 100px;
color: white;
}
.logo-type span:first-child {
font-weight: 400;
}
.sidebar-cables {
--sidebar-color: lime !important;
}
.edit {
padding: 40px 0;
float: right;
} */
</style>
</head>
<body>
<canvas id="glcanvas" width="100vw" height="100vh" tabindex="1"></canvas>
<!-- <footer>
<div class="left">
<a href="https://lightpaintlive.com" target="_blank" id="lpl-logo"></a>
<a href="https://lightpaintlive.com" target="_blank" class="logo-type">
<span>LIGHTPAINT</span>
<span> LIVE</span>
</a>
</div>
<a class="edit" href='https://cables.gl/edit/6kk1nZ' target="_blank">view cables</a>
</footer> -->
<libs />
<script type="text/javascript" src="build/js/patch.js" async></script>
<corelibs />
<script>
// disable rubberband effect on mobile devices
document.getElementById('glcanvas').addEventListener('touchmove', (e) => { e.preventDefault(); }, false);
function patchInitialized(patch) {
// You can now access the patch object (patch), register variable watchers and so on
}
function patchFinishedLoading(patch) {
// The patch is ready now, all assets have been loaded
}
document.addEventListener('CABLES.jsLoaded', function (event) {
CABLES.patch = new CABLES.Patch({
patch: CABLES.exportedPatch,
"prefixAssetPath": "",
"glCanvasId": "glcanvas",
"glCanvasResizeToWindow": true,
"onPatchLoaded": patchInitialized,
"onFinishedLoading": patchFinishedLoading,
// "canvas":{"alpha":true,"premultipliedAlpha":true} // make canvas transparent
});
});
</script>
<script>
const registerServiceWorker = async () => {
if ('serviceWorker' in navigator) {
try {
const registration = await navigator.serviceWorker.register(
'./sw.js',
{
scope: '/',
}
);
if (registration.installing) {
console.log('Service worker installing');
} else if (registration.waiting) {
console.log('Service worker installed');
} else if (registration.active) {
console.log('Service worker active');
}
} catch (error) {
console.error(`Registration failed with ${error}`);
}
}
};
registerServiceWorker();
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-28885410-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-28885410-1');
</script>
</body>
</html>