-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnew-year-2024.html
689 lines (607 loc) · 33.6 KB
/
new-year-2024.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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
<!DOCTYPE html>
<html>
<head>
<!-- via: https://www.shadertoy.com/view/MdXSWn -->
<meta charset="utf-8">
<title>-- New Year's 2024 -- </title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="https://jakedowns.github.io/starpages/res/CCapture.all.min.js"></script>
<!-- <script src="./res/import/dat.gui.min.js"></script> -->
<!-- TODO:
https://threejs.org/examples/#webgl_video_panorama_equirectangular
https://threejs.org/examples/#webgl_materials_video
https://threejs.org/examples/#webgl_effects_anaglyph
add fog from: https://threejs.org/examples/#webgl_geometry_dynamic
-->
<style>
body { margin: 0; background-color: #000; overflow: hidden; position: relative; display: block; height: 100vh; width: 100vw; }
canvas { width: 100%; height: 100%; background-color: #0FF; }
#pasteFromClipboardPrompt {
position: absolute;
top: 0;
left: 0;
width: calc(100% - 100px);
height: 50px;
opacity: 0;
transition: opacity 0.5s ease-in-out;
pointer-events: none;
/* transition: opacity 0.5s ease-in-out; */
}
#pasteFromClipboardPrompt.show {
opacity: 1;
pointer-events: all;
}
#controls {
position: absolute;
right: 0;
top: 0;
width: 100px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: stretch;
}
video {
position: absolute;
top: 0;
left: 0;
width: 160px;
opacity: 0.5;
}
#record-video-button {
position: absolute;
bottom: 10px;
right: 10px;
width: 100px;
z-index: 1000;
}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<div id="controls">
<input type="file" accept="image/*,video/*,image/svg+xml" id="fileupload" />
<progress id="progress" value="0" max="100"></progress>
<button id="record-video-button" onclick="window.startCapture()">record video</button>
</div>
<div id="pasteFromClipboardPrompt">
<div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center;">
<h1>Paste from clipboard?</h1>
<p>Press <kbd>Ctrl</kbd>+<kbd>V</kbd> to paste the image from your clipboard.</p>
<p>Press <kbd>Esc</kbd> to dismiss this message.</p>
<button onclick="window.doPasteFromClipboard()">Tap Here</button>
</div>
</div>
<script>
window.frame_blend_mode = "additive";
window.do_clear_frame = false;
window.maxFrames = 120 * 10;
window.image_height = window.innerHeight;
window.progress = document.getElementById("progress");
function setupCapturing(){
try{
// Create a capturer that exports a WebM video
var isWebMSupported = document.createElement('video').canPlayType('video/webm; codecs="vp8, vorbis"');
var motionBlurFrames = 0;//2;
capturer = isWebMSupported
? new CCapture( {
format: 'webm',
motionBlurFrames,
verbose: false,
fps: 120
} )
: new CCapture( {
format: 'png',
motionBlurFrames,
verbose: false,
framerate: 120
} );
}catch(e){
console.error('failed to create capturer',e);
}
window.startCapture = function(){
if(!window.capturer){
console.warn("capturer not initialized");
return;
}
//window.maxFrames = 120 * image_height
// console.warn('image_height',{
// image_height: window.image_height,
// maxFrames: window.maxFrames,
// height: window.innerHeight
// })
window.capturing = true;
window.capturedFrames = 0;
window.capturer.start();
animate();
}
window.stopCapture = function(){
if(!window.capturer){
console.warn("capturer not initialized");
return;
}
window.capturing = false;
window.capturer.stop();
window.capturer.save();
}
}
let canvas;
document.addEventListener("DOMContentLoaded",async()=>{
setupCapturing();
window.fragmentShader = await (await fetch("./shaders/frosted-video-mandlebulb.glsl")).text();
const pasteFromClipboardPrompt = document.getElementById("pasteFromClipboardPrompt");
function showPasteFromClipboardPrompt(){
pasteFromClipboardPrompt.classList.add("show");
setTimeout(()=>{
pasteFromClipboardPrompt.classList.remove("show");
},5000);
}
function hidePasteFromClipboardPrompt(){
pasteFromClipboardPrompt.classList.remove("show");
}
let didShowClipboardPrompt = false;
let currentClipboardBagValueHash = null;
let previousClipboardBagValueHash = null;
// let clipboardCheckInterval = setInterval(async()=>{
// if(didShowClipboardPrompt){
// // check if clipboard has changed
// let currentClipboardBagValueHash = null;
// try{
// const items = await navigator.clipboard.read();
// let hash_string = '';
// for (const item of items) {
// let types_concat = item.types.join('');
// hash_string += types_concat;
// hash_string += item.size ?? 0;
// hash_string += item.lastModified ?? 0;
// }
// console.warn({hash_string})
// currentClipboardBagValueHash = hash_string;
// }catch(e){
// console.error(e);
// }
// if(currentClipboardBagValueHash != previousClipboardBagValueHash){
// didShowClipboardPrompt = false;
// }
// }
// if(didShowClipboardPrompt){
// return;
// }
// didShowClipboardPrompt = true;
// try{
// const text = await navigator.clipboard.readText();
// if(text){
// showPasteFromClipboardPrompt();
// }else{
// hidePasteFromClipboardPrompt();
// console.warn('nothing in clipboard')
// }
// }catch(e){
// console.error(e);
// }
// },1000);
/* adds paste support for Clipboard ImageBlob -> Three.js Texture */
window.doPasteFromClipboard = async function(){
try{
const items = await navigator.clipboard.read();
console.warn('items',items)
for (const item of items) {
if (item.types.includes('image/png')) {
const blob = await item.getType('image/png');
const url = URL.createObjectURL(blob);
texture.image.onload = function() {
URL.revokeObjectURL(url);
texture.needsUpdate = true;
};
texture.image.src = url;
break;
}
// or if ti's a base64 image in a text string, pass _that_ to image.src
if (item.types.includes('text/plain')) {
const text = await item.getType('text/plain');
texture.image.onload = function() {
URL.revokeObjectURL(url);
texture.needsUpdate = true;
};
texture.image.src = text;
break;
}
}
}catch(e){
console.error(e);
}
}
document.addEventListener("keydown",(e)=>{
if(e.key == "v" && (e.ctrlKey || e.metaKey)){
try{
window.doPasteFromClipboard();
}catch(e){
console.error(e);
}
}
},false);
document.getElementById("fileupload")?.addEventListener("change", (e) => {
const file = e.target.files[0];
console.warn('filetype',file.type)
if (file.type.indexOf('video') === 0) {
const reader = new FileReader();
reader.onload = (e) => {
window.setVideoAsChannel(e.target.result);
};
reader.readAsDataURL(file);
}
else if (file.type.indexOf('image') === 0) {
const reader = new FileReader();
reader.onload = (e) => {
texture.image.src = e.target.result;
texture.needsUpdate = true;
};
reader.readAsDataURL(file);
}
});
canvas = document.getElementById("canvas");
const renderer = new THREE.WebGLRenderer({canvas});
// Orthographic camera setup
const frustumSize = 1;
const aspect = canvas.clientWidth / canvas.clientHeight;
const camera = new THREE.OrthographicCamera(
frustumSize * aspect / -2,
frustumSize * aspect / 2,
frustumSize / 2,
frustumSize / -2,
1,
1000
);
camera.position.z = 2;
const scene = new THREE.Scene();
// Full-screen plane geometry
const planeGeometry = new THREE.PlaneGeometry(2 * aspect, 2);
const textureLoader = new THREE.TextureLoader();
let rand_int_1_thru_17 = Math.floor(Math.random() * 17) + 1;
//let url = `./res/bg_${rand_int_1_thru_17}.png`;
//let url = "./res/download (3).png";
let url = "./res/download (10).png";
let texture = textureLoader.load(url);
// Assuming you have a texture loaded into a variable named 'texture'
texture.wrapS = THREE.MirroredRepeatWrapping; // For horizontal mirroring
texture.wrapT = THREE.MirroredRepeatWrapping; // For vertical mirroring
window.image_height = texture.height;
// Alternatively, use RepeatWrapping for wrap-around effect
// texture.wrapS = THREE.RepeatWrapping;
// texture.wrapT = THREE.RepeatWrapping;
// Set how many times the texture should repeat
texture.repeat.set(2, 2); // Adjust as needed
/* Match ShaderToy uniforms for compatibility */
// ERROR: 0:151: 'iTime' : undeclared identifier
// ERROR: 0:244: 'iChannel0' : undeclared identifier
// ERROR: 0:244: 'iResolution' : undeclared identifier
// Custom Shader
const shaderMaterial = new THREE.ShaderMaterial({
uniforms: {
u_texture: { value: texture },
u_time: { value: 1.0 },
u_resolution: { value: new THREE.Vector2(window.innerWidth, window.innerHeight) },
u_mouse: { value: new THREE.Vector2(0.0, 0.0) },
// compatibility uniforms
iTime: { value: 1.0 },
iChannel0: { value: texture },
iResolution: { value: new THREE.Vector3(window.innerWidth, window.innerHeight, 1.0) },
},
vertexShader: `
void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
`,
fragmentShader: fragmentShader,
transparent: true, // Enable transparency
});
// Creating and adding the plane to the scene
const plane = new THREE.Mesh(planeGeometry, shaderMaterial);
scene.add(plane);
function resizeRendererToDisplaySize(renderer) {
const canvas = renderer.domElement;
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
let width = canvas.clientWidth;
let height = canvas.clientHeight;
// force to even dimensions for ffmpeg compatibility
width = 2 * Math.floor(width / 2);
height = 2 * Math.floor(height / 2);
const needResize = canvas.width !== width || canvas.height !== height;
if (needResize) {
renderer.setSize(width, height, false);
}
return needResize;
}
window.mouseX = window.mouseY = 0;
document.addEventListener('mousemove', (e)=>{
window.mouseX = e.clientX;
window.mouseY = e.clientY;
});
function updateMouseUniform() {
// Normalize coordinates (0 to 1)
let normalizedX = window.mouseX / window.innerWidth;
let normalizedY = window.mouseY / window.innerHeight;
// Adjust for aspect ratio
const aspect = window.innerWidth / window.innerHeight;
if (aspect > 1) {
// Wider than tall
normalizedX = (normalizedX - 0.5) * aspect + 0.5;
} else {
// Taller than wide
normalizedY = (normalizedY - 0.5) / aspect + 0.5;
}
// offset to center of "quad"
normalizedX = normalizedX * 2 - 1;
normalizedY = normalizedY * 2 - 1;
// Set the shader uniform
shaderMaterial.uniforms.u_mouse.value.set(normalizedX, normalizedY);
}
// Global variable to store the last played video
let lastPlayedVideo = null;
window.onVideoPause = function(){
window.fixedTime = shaderMaterial.uniforms.u_time.value;
window.isPaused = true;
}
window.onVideoResume = function(){
window.fixedTime = null;
window.isPaused = false;
}
window.isPaused = false;
window.setVideoAsChannel = function(videoURL){
let video = document.getElementById("video");
if(!video){
video = document.createElement('video');
video.setAttribute('id', 'video');
video.crossOrigin = 'anonymous';
video.loop = true;
// Add an event listener for when the video ends
video.onended = pickOne;
video.onpause = onVideoPause;
video.onplay = onVideoResume;
//video.muted = true;
}
video.src = videoURL;
video.autoplay = false; // true;
video.controls = true;
video.play();
video.oncanplay = function() {
window.videoTexture = new THREE.VideoTexture(video);
window.videoTexture.minFilter = THREE.LinearFilter;
window.videoTexture.magFilter = THREE.LinearFilter;
window.videoTexture.format = THREE.RGBFormat;
window.videoTexture.crossOrigin = 'anonymous';
window.videoTexture.needsUpdate = true;
shaderMaterial.uniforms.u_texture.value = window.videoTexture.texture;
}
document.body.appendChild(video);
}
window.animate = function(time) {
if (resizeRendererToDisplaySize(renderer)) {
const canvas = renderer.domElement;
// enforce dimensions of 2 for ffmpeg compatibility
canvas.width = 2 * Math.floor(canvas.clientWidth / 2);
canvas.height = 2 * Math.floor(canvas.clientHeight / 2);
camera.aspect = canvas.clientWidth / canvas.clientHeight;
camera.updateProjectionMatrix();
}
if(!window.fixedTime){
shaderMaterial.uniforms.u_time.value = time * 0.001; // Convert time to seconds
}else{
shaderMaterial.uniforms.u_time.value = window.fixedTime;
}
shaderMaterial.uniforms.u_resolution.value.set(window.innerWidth, window.innerHeight);
updateMouseUniform();
//
// update ShaderToy compatibility uniforms
// iTime: { value: 1.0 },
// iChannel0: { value: texture },
// iResolution: { value: new THREE.Vector3(window.innerWidth, window.innerHeight, 1.0) },
//
shaderMaterial.uniforms.iTime.value = shaderMaterial.uniforms.u_time.value
shaderMaterial.uniforms.iChannel0.value = texture;
shaderMaterial.uniforms.iResolution.value.set(window.innerWidth, window.innerHeight, 1.0);
if(window.do_clear_frame){
}else{
}
renderer.render(scene, camera);
// next frame
requestAnimationFrame(animate);
// or ... next frame
if(window.capturing){
window.capturer.capture(canvas);
window.capturedFrames++;
if(progress){
progress.value = (window.capturedFrames / maxFrames) * 100;
}
if(window.capturedFrames >= maxFrames){
window.stopCapture();
}
}
}
resizeRendererToDisplaySize(renderer);
// first frame...
requestAnimationFrame(animate);
// make sure we don't pick the same one back to back
// also make sure we auto switch to the next one after the end of the video
function pickOne(){
console.warn("pick one called");
// video time
let much = [
"Katy Perry - California Gurls (Official Music Video) ft. Snoop Dogg.mp4",
"Katy Perry - Dark Horse ft. Juicy J.mp4",
"Katy Perry - Firework (Official Music Video).mp4"
]
// Filter out the last played video
let filteredMuch = much.filter(v => v !== lastPlayedVideo);
// Randomly select a video from the filtered list
let one = filteredMuch[Math.floor(Math.random() * filteredMuch.length)];
// Update the last played video
lastPlayedVideo = one;
setVideoAsChannel("https://jakedowns.com/media/"+one);
}
let did_react_to_first_user_input = false;
let onuserinput = ()=>{
if(!did_react_to_first_user_input){
did_react_to_first_user_input = true;
pickOne();
}
}
// when a user drops an image on the canvas, load it to our texture
canvas.addEventListener('drop', (e) => {
did_react_to_first_user_input = true;
e.preventDefault();
e.stopPropagation();
// ondrop
if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
const file = e.dataTransfer.files[0];
// we accept videos too
if (file.type.indexOf('video') === 0) {
const reader = new FileReader();
reader.onload = (e) => {
window.setVideoAsChannel(e.target.result);
};
reader.readAsDataURL(file);
}
else if (file.type.indexOf('image') === 0) {
const reader = new FileReader();
reader.onload = (e) => {
texture.image.src = e.target.result;
texture.needsUpdate = true;
// "setImageAsChannel"
shaderMaterial.uniforms.u_texture.value = texture;
};
reader.readAsDataURL(file);
}
}
});
canvas.addEventListener('dragover', (e) => {
e.preventDefault();
e.stopPropagation();
});
function imageBlobToBase64(imageBlob){
return new Promise((resolve,reject)=>{
let reader = new FileReader();
reader.onload = function(e){
resolve(e.target.result);
}
reader.readAsDataURL(imageBlob);
});
}
async function onPasteAttempt(){
try {
// Check if the Clipboard API is available
if (!navigator.clipboard) {
console.warn('Clipboard API not available.');
throw new Error('Clipboard API not available');
}
// Attempt to read from the clipboard
const clipboardItems = await navigator.clipboard.read();
console.log('Clipboard items retrieved:', clipboardItems);
let clipboardBag = {images:[]};
// Find text content in clipboard items
const textItem = clipboardItems.find(item => item.types.includes('text/plain'));
if (textItem) {
const textBlob = await textItem.getType('text/plain');
const text = await textBlob.text();
console.log('Pasted text content: ', text);
clipboardBag.text = text;
}
// Find HTML content in clipboard items
const htmlItem = clipboardItems.find(item => item.types.includes('text/html'));
if (htmlItem) {
const htmlBlob = await htmlItem.getType('text/html');
const html = await htmlBlob.text();
console.log('Pasted HTML content: ', html);
clipboardBag.html = html;
}
// Note: imageBlob is an instance of Blob
// to get pixel data OUT of the blob and INTO 3D space, we need to load it as a texture
// to do THAT (we need to assume it could be a _local_ file so we _can not_ use the img.src shortcut,)
// we need to do the slow, full conversion of a Blob to a base64 encoded string
// then we can use that base64 encoded string to load the image as a texture
// Find any "image" items:
const imageItems = clipboardItems.filter(item => item.types.includes('image/png'));
// Alert if there's multiple, we only support one for now
if (imageItems.length > 1) {
alert('Multiple images found. Using the last image.');
}
for (const imageItem of imageItems) {
const imageBlob = await imageItem.getType('image/png');
//console.log('Pasted image: ', image);
clipboardBag.imageBlob = imageBlob;
//loadImageBlobAsTexture(imageBlob);
let b64 = await imageBlobToBase64(imageBlob);
//console.log('Pasted image: ', b64);
await loadBase64AsTexture(b64);
clipboardBag.images.push(b64);
}
hideIntroText()
// Process clipboardBag as needed
console.warn({clipboardBag});
} catch (error) {
console.error('Error accessing clipboard:', error);
// Handle error appropriately
}
}
document.addEventListener("keydown",async(e)=>{
if(e.key == "Escape"){
hidePasteFromClipboardPrompt();
}
// if command v on mac,
// or control v on other,
// paste image from clipboard
if (
(e.keyCode === 22 || e.keyCode === 86)
&& (e.metaKey || e.ctrlKey)
){
await onPasteAttempt();
e.preventDefault();
}
onuserinput();
},false);
document.addEventListener("mouseup",()=>{
window.isPaused = !window.isPaused;
let vid;
if(vid = document.getElementById("video") && vid){
vid.style.opacity = window.isPaused ? 0 : 0.1;
}
if(!did_react_to_first_user_input){
did_react_to_first_user_input = true;
pickOne();
return;
}
if(window.isPaused){
document.getElementById("video")?.pause();
}else{
document.getElementById("video")?.play();
}
});
document.addEventListener("dblclick",()=>{
onuserinput();
pickOne();
})
document.addEventListener("resize",()=>{
canvas = document.getElementById("canvas");
const renderer = new THREE.WebGLRenderer({canvas,alpha:true});
const width = canvas.clientWidth;
const height = canvas.clientHeight;
renderer.setSize(width, height, false);
})
});
</script>
<style>
/* here comes dat gui */
.dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .cr.function .property-name{width:100%}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}
</style>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-GYK2ZMX0M9"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-GYK2ZMX0M9');
</script>
</body>
</html>