-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathHueSaturation.html
46 lines (33 loc) · 1.13 KB
/
HueSaturation.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="styles.css">
<script type="importmap">
{
"imports": {
"three": "../libs/build/three.module.js",
"three/addons/": "../libs/examples/jsm/",
"oops": "../src/oops.js"
}
}
</script>
</head>
<body>
<script type="module">
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
import { HueSaturationShader } from 'three/addons/shaders/HueSaturationShader.js';
import { renderer, randomBalls, animationLoop } from './examples.js';
import { Effects } from 'oops';
var effects = new Effects( renderer )
.addEffect( HueSaturationShader )
.addParameter( 'hue' )
.addParameter( 'saturation' );
var gui = new GUI( { title: '<big><em>Hue Saturation</em></big>' } );
gui.add( effects, 'hue', -1, 1 ).step( 0.01 ).name( 'Hue' );
gui.add( effects, 'saturation', -1, 1 ).step( 0.01 ).name( 'Saturation' ).$input.classList.add('bottom');
randomBalls( );
animationLoop( effects );
</script>
</body>
</html>