forked from desandro/breathing-halftone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsandbox.html
54 lines (44 loc) · 1.16 KB
/
sandbox.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>
<head>
<meta charset="utf-8">
<title>breathing halftone</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
.halftone {
width: 50%;
display: block;
}
</style>
</head>
<body>
<!-- <h1>breathing halftone</h1> -->
<!-- <img id="breathing-halftone" src="img/korodark2.jpg" /> -->
<img id="breathing-halftone" class="halftone" src="_img/sarah2-dots.png" data-src="_img/sarah2.jpg" />
<script src="js/vector.js"></script>
<script src="js/particle.js"></script>
<script src="js/breathing-halftone.js"></script>
<script>
window.onload = function() {
var img = document.querySelector('#breathing-halftone');
var halftone = window.halftone = new BreathingHalftone( img, {
// dotSize: 1/30
// dotSizeThreshold: 0.4
// oscAmplitude: 0.3
// oscPeriod: 2
// initVelocity: 0.01,
isAdditive: false,
// isRadial: true,
// friction: 0.2,
// isChannelLens: false,
// channels: [ 'green', 'blue' ],
// channels: [ 'lum' ],
// hoverDiameter: 0.3,
// hoverForce: -0.02,
// activeDiameter: 0.6,
// activeForce: 0.01
});
};
</script>
</body>
</html>