-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVignetteX.html
50 lines (38 loc) · 1.29 KB
/
VignetteX.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
<!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",
"oops/shaders/": "../src/shaders/"
}
}
</script>
</head>
<body>
<script type="module">
import { Color } from 'three';
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
import { renderer, scene, randomBalls, animationLoop } from './examples.js';
import { Effects } from 'oops';
import { VignetteShaderX } from 'oops/shaders/VignetteShaderX.js';
var effects = new Effects( renderer )
.addEffect( VignetteShaderX )
.addParameter( 'radius' )
.addParameter( 'blur' )
.addParameter( 'color' );
var gui = new GUI( { title: '<big><em>Vignette X</em></big>' } );
gui.add( effects, 'radius', 0, 2 ).step( 0.01 ).name( 'Radius' );
gui.add( effects, 'blur', 0, 5 ).step( 0.1 ).name( 'Blur' );
gui.addColor( effects, 'color' ).name( 'Color' ).$text.classList.add('bottom');
scene.background = new Color( 'linen' );
randomBalls( );
animationLoop( effects );
</script>
</body>
</html>