-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
52 lines (49 loc) · 2.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CSS Paint API: Fragmentation Effect</title>
<meta name="description" content="A fragmentation effect created using the CSS Paint API from the Houdini project">
<meta name="author" content="Temani Afif">
<meta property="og:title" content="CSS Paint API: Fragmentation Effect">
<meta property="og:type" content="website">
<meta property="og:url" content="https://afif13.github.io/CSS-fragmentation-effect/">
<meta property="og:description" content="A fragmentation effect created using the CSS Paint API from the Houdini project">
<meta property="og:image" content="https://github.com/Afif13/CSS-fragmentation-effect/blob/f5271e0647207eec3631c96c3caebff0a88526f2/header.gif">
<link rel="stylesheet" href="src/style.css">
</head>
<body>
<h1>CSS Paint API: Fragmentation Effect</h1>
<hr>
<h2>Square fragmentation</h2>
<section class="square">
<img src="https://picsum.photos/id/1069/300/300" style="--f-n:40;--f-m:40;--f-seed:54">
<img src="https://picsum.photos/id/1032/300/300" style="--f-n:20;--f-m:20;--f-seed:122">
<img src="https://picsum.photos/id/1072/300/300" style="--f-n:10;--f-m:10;--f-seed:589">
</section>
<hr>
<h2>Triangle fragmentation</h2>
<section class="Triangle">
<img src="https://picsum.photos/id/1069/300/300" style="--f-n:50;--f-seed:514">
<img src="https://picsum.photos/id/1032/300/300" style="--f-n:40;--f-seed:111">
<img src="https://picsum.photos/id/1072/300/300" style="--f-n:20;--f-seed:141">
</section>
<hr>
<h2>Hexagon fragmentation</h2>
<section class="hexagon">
<img src="https://picsum.photos/id/1069/300/300" style="--f-r:10;--f-seed:96">
<img src="https://picsum.photos/id/1032/300/300" style="--f-r:25;--f-seed:999">
<img src="https://picsum.photos/id/1072/300/300" style="--f-r:50;--f-seed:68">
</section>
<script>
if(CSS.paintWorklet) {
CSS.paintWorklet.addModule('src/fragmentation.js');
CSS.paintWorklet.addModule('src/fragmentation-triangle.js');
CSS.paintWorklet.addModule('src/fragmentation-hexagon.js');
} else {
console.log("Your browser doesn't support the Paint API :(");
}
</script>
</body>
</html>