-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathKaleidoX.html
47 lines (34 loc) · 1.17 KB
/
KaleidoX.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
<!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 { GUI } from 'three/addons/libs/lil-gui.module.min.js';
import { renderer, randomBallsAndCubes, animationLoop } from './examples.js';
import { Effects } from 'oops';
import { KaleidoShaderX } from 'oops/shaders/KaleidoShaderX.js';
var effects = new Effects( renderer )
.addEffect( KaleidoShaderX )
.addParameter( 'sides' )
.addParameter( 'angle' )
var gui = new GUI( { title: '<big><em>Kaleido X</em></big>' } );
gui.add( effects, 'sides', [3,4,5,6,7,8,9,10,11,12,13,14,15,20,30,50]).name( 'Sides' );
gui.add( effects, 'angle', 0, 6.28 ).step( 0.01 ).name( 'Angle' ).$input.classList.add('bottom');
randomBallsAndCubes( );
animationLoop( effects );
</script>
</body>
</html>