Skip to content

Commit aa5f642

Browse files
authored
Merge pull request #44 from Absulit/dev
Dev
2 parents 652c905 + 1bd85fa commit aa5f642

2 files changed

Lines changed: 14 additions & 15 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.5.0/build/points.min.js",
28+
"points": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/build/points.min.js",
2929

30-
"points/animation": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.0/build/core/animation.min.js",
31-
"points/audio": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.0/build/core/audio.min.js",
32-
"points/color": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.0/build/core/color.min.js",
33-
"points/debug": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.0/build/core/debug.min.js",
34-
"points/effects": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.0/build/core/effects.min.js",
35-
"points/image": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.0/build/core/image.min.js",
36-
"points/math": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.0/build/core/math.min.js",
37-
"points/noise2d": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.0/build/core/noise2d.min.js",
38-
"points/classicnoise2d": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.0/build/core/classicnoise2d.min.js",
39-
"points/random": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.0/build/core/random.min.js",
40-
"points/sdf": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.0/build/core/sdf.min.js",
30+
"points/animation": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/build/core/animation.min.js",
31+
"points/audio": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/build/core/audio.min.js",
32+
"points/color": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/build/core/color.min.js",
33+
"points/debug": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/build/core/debug.min.js",
34+
"points/effects": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/build/core/effects.min.js",
35+
"points/image": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/build/core/image.min.js",
36+
"points/math": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/build/core/math.min.js",
37+
"points/noise2d": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/build/core/noise2d.min.js",
38+
"points/classicnoise2d": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/build/core/classicnoise2d.min.js",
39+
"points/random": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/build/core/random.min.js",
40+
"points/sdf": "https://cdn.jsdelivr.net/gh/absulit/points@0.5.1/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: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ function clickSong() {
5050

5151
function assingMediaSession(song) {
5252
if ('mediaSession' in navigator) {
53-
console.log(song);
54-
5553
navigator.mediaSession.metadata = new MediaMetadata({
5654
title: song.title || song.name,
5755
artist: song.artist,
@@ -81,6 +79,7 @@ async function playSong(song) {
8179
await points.setTextureString('songName', title, atlasPath, size, offset);
8280

8381
let artworkLoaded = 0;
82+
8483
song?.artworkColors && points.setStorageMap('artworkColors', song?.artworkColors.flat());
8584
song?.artworkColors && (artworkLoaded = 1);
8685
points.setUniform('artworkLoaded', artworkLoaded);
@@ -369,7 +368,7 @@ points.setUniform('rand', 0);
369368
points.setUniform('progress', 0);
370369
points.setUniform('artworkLoaded', 0);
371370
// points.setStorageMap('chars', strToCodes('Gravity Pull'), 'array<f32>')// TODO: setStorageMap doesn't work with u32 wrong sized
372-
points.setStorageMap('artworkColors', Array(16).fill(1), 'array<vec4f>');
371+
points.setStorageMap('artworkColors', Array(40).fill(1), 'array<vec4f, 10>');
373372
points.setStorage('variables', 'Variables', false, GPUShaderStage.FRAGMENT);
374373

375374

0 commit comments

Comments
 (0)