-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
173 lines (145 loc) · 6.32 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Videodromm 3.09.06</title>
<base href="/" />
<meta
name="viewport"
content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<link rel="manifest" href="/manifest.json" />
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Videodromm" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="stylesheet" href="./css/codemirror.css">
<link rel="stylesheet" href="./css/tomorrow-night-eighties.css">
<!--
<script type="x-shader/x-fragment" id="image-shader">
#ifdef GL_ES
precision highp float;
#endif
uniform float T;
uniform vec2 R;
uniform float D;
uniform vec2 iMouse;
#define iTime T
#define iResolution R
#define iMinDimension D
const float SPEED = 4.;
const float LENGTH = 10.;
// https://www.shadertoy.com/view/ldlXRS
//Noise animation - Electric
//by nimitz (stormoid.com) (twitter: @stormoid)
//The domain is displaced by two fbm calls one for each axis.
//Turbulent fbm (aka ridged) is used for better effect.
#define time iTime*0.15
#define tau 6.2831853
mat2 makem2(in float theta){float c = cos(theta);float s = sin(theta);return mat2(c,-s,s,c);}
float noise( in vec2 x ){return 0.1;}
mat2 m2 = mat2( 0.80, 0.60, -0.60, 0.80 );
float fbm( in vec2 p )
{
float z=2.;
float rz = 0.;
vec2 bp = p;
for (float i= 1.;i < 6.;i++ )
{
rz+= abs((noise(p)-0.5)*2.)/z;
z = z*2.;
p = p*2.;
}
return rz;
}
float circ(vec2 p)
{
float r = length(p);
r = log(sqrt(r));
return abs(mod(r*4.,tau)-3.14)*3.+.2;
}
/*void main() {
vec2 st = (gl_FragCoord.xy * 2. - iResolution) / iMinDimension;
vec2 mouse = (iMouse * 2. - iResolution) / iMinDimension;
float dist = distance(st, mouse);
float luma = (sin(dist * LENGTH - iTime * SPEED) + 1.) / 2.;
gl_FragColor = vec4(vec3(luma), 1.0);
}*/
void main()
{
//setup system
vec2 uv = (gl_FragCoord.xy / iResolution.xy-0.5);
uv.x *= iResolution.x/iResolution.y;
uv*=4.;
//get two rotated fbm calls and displace the domain
vec2 p2 = uv*.7;
vec2 basis = vec2(fbm(p2-time*1.6),fbm(p2+time*1.7));
basis = (basis-.5)*.2;
uv += basis;
//coloring
float rz = fbm(uv*makem2(time*0.2));
//rings
uv /= exp(mod(time*10.,3.14159));
rz *= pow(abs((0.1-circ(uv))),.9);
//final color
vec3 col = vec3(.2,0.1,0.4)/rz;
col=pow(abs(col),vec3(.99));
gl_FragColor = vec4(col,1.);
}
</script>
<script src="js/shader-web-background.min.js"></script>
<script>
// start in the center
var mouseX = window.innerWidth / 2;
var mouseY = window.innerHeight / 2;
document.addEventListener("mousemove", (event) => {
// shader gl_FragCoord coordinates start in the middle of the pixel
// so we need to accommodate for that by removing half.
// also vertical coordinate needs to be flipped.
mouseX = event.offsetX - .5;
mouseY = window.innerHeight - event.offsetY - .5;
});
shaderWebBackground.shadeOnLoad({
imageShader: "image-shader",
uniforms: {
"iMouse": (gl, loc) => gl.uniform2f(loc, mouseX, mouseY)
}
});
</script> -->
<!-- <link rel="stylesheet" type="text/css" href="%PUBLIC_URL%/litegraph/css/litegraph.css">
<link rel="stylesheet" type="text/css" href="%PUBLIC_URL%/litegraph/css/litegraph-editor.css">
<link rel="stylesheet" type="text/css" href="%PUBLIC_URL%/litegraph/css/style.css"> -->
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<!-- <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAmAwkv8-x2I--ne-NtA3C_4E_-xLCsFJs" async defer></script>
<script type="text/javascript" src="../external/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="https://tamats.com/projects/sillyserver/src/sillyclient.js"></script> -->
<!-- <div id="main"> -->
</div>
<!-- <script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/gl-matrix-min.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/audiosynth.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/midi-parser.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/litegraph.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/litegraph-editor.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/base.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/logic.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/events.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/math.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/math3d.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/strings.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/interface.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/geometry.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/graphics.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/input.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/midi.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/audio.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/nodes/network.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/demos.js"></script>
<script type="text/javascript" src="%PUBLIC_URL%/litegraph/js/code.js"></script> -->
</body>
</html>