forked from J0SUKE/grid-deformation-effect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (52 loc) · 2.21 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
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Grid Displacement Texture | Codrops</title>
<meta name="description" content="Demo for the tutorial on how to apply a pixel/grid displacement to a texture in Three.js" />
<meta name="keywords" content="cursor displacement, mousemove rgb shift, threejs" />
<meta name="author" content="Jean Mazouni for Codrops" />
<link rel="shortcut icon" href="./favicon.ico">
<script>document.documentElement.className="js";</script>
<script>
window.addEventListener('load', function() {
const image = document.querySelector('.image-container img');
// Check if the image is already fully loaded
if (image.complete) {
removeLoadingClass();
} else {
image.addEventListener('load', removeLoadingClass);
}
function removeLoadingClass() {
// Remove the "loading" class from the body
document.body.classList.remove('loading');
}
});
</script>
</head>
<body class="loading">
<header class="frame">
<h1 class="frame__title">Grid Deformation Effect by <a href="https://www.jeanmazouni.com/" target="_blank">Jean Mazouni</a></h1>
<a class="frame__back" href="https://tympanus.net/codrops/?p=80158">Read the tutorial</a>
<a class="frame__archive" href="https://tympanus.net/codrops/demos/">All demos</a>
<a class="frame__github" href="https://github.com/J0SUKE/grid-deformation-effect">GitHub</a>
<nav class="frame__tags">
<a href="https://tympanus.net/codrops/demos/?tag=three-js">#three.js</a>
<a href="https://tympanus.net/codrops/demos/?tag=webgl">#webgl</a>
<a href="https://tympanus.net/codrops/demos/?tag=distortion">#distortion</a>
</nav>
</header>
<div id="app">
<div class="container">
<div class="wrapper">
<div class="image-container">
<img src="./image.jpg" alt="Japanese table scene" />
</div>
</div>
</div>
</div>
<canvas id="webgl"></canvas>
<script type="module" src="/src/main.ts"></script>
</body>
</html>