-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (47 loc) · 1.38 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
<html lang="en">
<head>
<title>ThreeJS Demo Korea</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
margin: 0;
}
.label {
color: rgba(200, 200, 200, 0.9);
font-family: sans-serif;
padding: 2px;
filter: drop-shadow(0px 2px 4px black);
}
</style>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/tweakpane.min.js"></script>
<script type="module" src="./src/main.js" defer></script>
</head>
<body>
<!-- ---------------- Custom Shader Code ------------------------ -->
<!-- <script id="vertexShader" type="x-shader/x-vertex">
uniform vec3 viewVector;
uniform float c;
uniform float p;
varying float intensity;
void main()
{
vec3 vNormal = normalize( normalMatrix * normal );
vec3 vNormel = normalize( normalMatrix * viewVector );
intensity = pow( c - dot(vNormal, vNormel), p );
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}
</script> -->
<!-- fragment shader a.k.a. pixel shader -->
<!-- <script id="fragmentShader" type="x-shader/x-vertex">
uniform vec3 glowColor;
varying float intensity;
void main()
{
vec3 glow = glowColor * intensity;
gl_FragColor = vec4( glow, 0.5 );
}
</script> -->
<!-- ----------------------------------------------------------- -->
</body>
</html>