Changeset 39dab6b in Klonkt for src/assets/js/ward-sky.js
- Timestamp:
- 08/12/2026 09:43:20 PM (3 months ago)
- Children:
- 5e0fea7
- Parents:
- 2086ea2
- File:
-
- 1 edited
-
src/assets/js/ward-sky.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/js/ward-sky.js
r2086ea2 r39dab6b 99 99 100 100 /** Eén canvas met alle avatars naast elkaar, zodat tekenen één drawImage is. */ 101 async function buildAtlas(faces ) {101 async function buildAtlas(faces, accent) { 102 102 const size = FACE * 2; // retina-scherp 103 103 const cols = Math.max(1, Math.ceil(Math.sqrt(faces.length || 1))); … … 120 120 g.save(); 121 121 g.beginPath(); g.arc(x + size / 2, y + size / 2, size / 2, 0, Math.PI * 2); g.clip(); 122 g.fillStyle = '#5a32e6'; g.fillRect(x, y, size, size);122 g.fillStyle = accent || '#5a32e6'; g.fillRect(x, y, size, size); 123 123 g.fillStyle = '#fff'; 124 124 g.font = `600 ${size * 0.45}px system-ui, sans-serif`; … … 176 176 this.faces = faces; 177 177 this.spots = orbitPlacement(faces.map((f) => f.ageMs)); 178 this.atlas = await buildAtlas(faces );178 this.atlas = await buildAtlas(faces, this._accent()); 179 179 this._resize(); 180 } 181 182 /** De themakleur uit de CSS-variabele, voor de placeholder-schijfjes. */ 183 _accent() { 184 return getComputedStyle(document.documentElement).getPropertyValue('--accent').trim() || '#5a32e6'; 185 } 186 187 /** Het thema veranderde: de letters-op-schijf opnieuw in het nieuwe accent. */ 188 async reskin() { 189 if (this.faces.length) this.atlas = await buildAtlas(this.faces, this._accent()); 180 190 } 181 191
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)