Skip to content

Commit cb2d285

Browse files
committed
points version updated to v0.7.0
1 parent 888b2d3 commit cb2d285

2 files changed

Lines changed: 15 additions & 16 deletions

File tree

index.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@
2525
<script type="importmap">
2626
{
2727
"imports": {
28-
"points": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/points.min.js",
28+
"points": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/points.min.js",
2929

30-
"points/animation": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/core/animation.min.js",
31-
"points/audio": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/core/audio.min.js",
32-
"points/color": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/core/color.min.js",
33-
"points/debug": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/core/debug.min.js",
34-
"points/effects": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/core/effects.min.js",
35-
"points/image": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/core/image.min.js",
36-
"points/math": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/core/math.min.js",
37-
"points/noise2d": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/core/noise2d.min.js",
38-
"points/classicnoise2d": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/core/classicnoise2d.min.js",
39-
"points/random": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/core/random.min.js",
40-
"points/sdf": "https://cdn.jsdelivr.net/gh/absulit/points@0.6.0/build/core/sdf.min.js",
30+
"points/animation": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/core/animation.min.js",
31+
"points/audio": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/core/audio.min.js",
32+
"points/color": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/core/color.min.js",
33+
"points/debug": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/core/debug.min.js",
34+
"points/effects": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/core/effects.min.js",
35+
"points/image": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/core/image.min.js",
36+
"points/math": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/core/math.min.js",
37+
"points/noise2d": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/core/noise2d.min.js",
38+
"points/classicnoise2d": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/core/classicnoise2d.min.js",
39+
"points/random": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/core/random.min.js",
40+
"points/sdf": "https://cdn.jsdelivr.net/gh/absulit/points@0.7.0/build/core/sdf.min.js",
4141

4242
"datgui": "https://cdn.jsdelivr.net/gh/dataarts/dat.gui@0.7.9/build/dat.gui.module.js"
4343
}

src/main.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ const folderControls = gui.addFolder('controls');
1515
const folderSongs = gui.addFolder('songs');
1616
const size = { x: 8, y: 22 }, offset = -32, atlasPath = 'src/img/inconsolata_regular_8x22.png';
1717

18+
points.debug = false;
19+
1820
let audio = null;
1921
let loop = false;
2022
let pauseClickTimeout = null;
@@ -381,7 +383,7 @@ const renderPasses = [
381383

382384
if (await points.init(renderPasses)) {
383385
points.fitWindow = true;
384-
update();
386+
points.update(update);
385387
} else {
386388
const el = document.getElementById('nowebgpu');
387389
el.classList.toggle('show');
@@ -418,14 +420,11 @@ setInterval(_ => {
418420
points.setUniform('rand', Math.random());
419421
}, 10000)
420422

421-
update();
422423

423424
// call `points.update()` methods to render a new frame
424425
function update() {
425426
Object.keys(options).forEach(key => points.setUniform(key, options[key]));
426427
// points.setUniform('somecolor', colors.color2.map(i => i / 255))
427-
points.update();
428-
requestAnimationFrame(update);
429428
}
430429

431430
/******************************/

0 commit comments

Comments
 (0)