@logomarks/lookbook 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +110 -0
- package/README.md +1 -1
- package/package.json +2 -2
- package/src/fields.d.ts +12 -2
- package/src/fields.js +240 -2
- package/src/glass.d.ts +1 -1
- package/src/glass.js +229 -63
- package/src/live.d.ts +4 -2
- package/src/live.js +45 -11
- package/src/looks/blur.d.ts +16 -0
- package/src/looks/blur.js +71 -0
- package/src/looks/exposure.js +139 -0
- package/src/looks/index.d.ts +10 -0
- package/src/looks/index.js +73 -0
- package/src/looks/tone.d.ts +20 -0
- package/src/looks/tone.js +132 -0
- package/src/styles/wall-looks.css +859 -1
- package/src/styles/wall.css +13 -0
- package/src/wall.js +8 -5
package/src/styles/wall.css
CHANGED
|
@@ -388,6 +388,18 @@
|
|
|
388
388
|
opacity: 0.16;
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
+
/* while live the wallpaper drifts up the diagonal by exactly one tile (100 across and 100 down, turned with the pattern's
|
|
392
|
+
-14°) a loop, so it repeats without a jump; the still is the paper at rest */
|
|
393
|
+
.wc-pattern.is-live .wc-pat rect {
|
|
394
|
+
animation: wc-pat-drift 28s linear infinite;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
@keyframes wc-pat-drift {
|
|
398
|
+
to {
|
|
399
|
+
transform: translate(-121.22px, -72.84px);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
391
403
|
.wc-pattern .wc-chip {
|
|
392
404
|
background: var(--fg);
|
|
393
405
|
color: var(--bg);
|
|
@@ -421,6 +433,7 @@
|
|
|
421
433
|
}
|
|
422
434
|
|
|
423
435
|
@media (prefers-reduced-motion: reduce) {
|
|
436
|
+
.wc-pat rect,
|
|
424
437
|
.wc-jitter .wc-j,
|
|
425
438
|
.wc-jitter .wc-lockup,
|
|
426
439
|
.wc-crt .wc-lockup,
|
package/src/wall.js
CHANGED
|
@@ -329,11 +329,13 @@ export function lookbook(options) {
|
|
|
329
329
|
attrs = ' data-anim'; // the flicker and the cursor run only while live
|
|
330
330
|
inner = `<span class="wc-lockup">${svg()}<b class="wc-name">${escapeHtml(name.toLowerCase())}<i class="wc-cursor">_</i></b></span>`;
|
|
331
331
|
} else if (kind === 'pattern') {
|
|
332
|
-
// the mark tiled as tilted wallpaper, the name on a solid chip over it
|
|
332
|
+
// the mark tiled as tilted wallpaper, the name on a solid chip over it; while live the paper drifts slowly
|
|
333
|
+
// (wall.css: one tile on the diagonal a loop, so it never jumps)
|
|
333
334
|
const [bg, fg] = pick(PALETTES),
|
|
334
335
|
id = `wp${hash(m.slug).toString(36)}${deal}`;
|
|
335
336
|
style += `;--bg:${bg};--fg:${fg}`;
|
|
336
|
-
|
|
337
|
+
attrs = ' data-anim';
|
|
338
|
+
inner = `<svg class="wc-pat" viewBox="0 0 400 500" preserveAspectRatio="xMidYMid slice" aria-hidden="true"><defs><pattern id="${id}" width="100" height="100" patternUnits="userSpaceOnUse" patternTransform="rotate(-14)"><g transform="translate(22 22) scale(0.1094)">${m.paths}</g></pattern></defs><rect x="-160" y="-160" width="720" height="820" fill="url(#${id})" /></svg><span class="wc-lockup wc-chip">${svg()}<b class="wc-name" style="${type}">${escapeHtml(name)}</b></span>`;
|
|
337
339
|
} else if (kind === 'crop') {
|
|
338
340
|
// the mark huge and cropped off the edge, the name small in the corner (poster style)
|
|
339
341
|
const [bg, fg] = pick(PALETTES);
|
|
@@ -389,7 +391,8 @@ export function lookbook(options) {
|
|
|
389
391
|
// over its quiet middle; what shows before it starts is the field's still (a CSS background, or markup under
|
|
390
392
|
// the canvas)
|
|
391
393
|
const field = FIELDS[kind];
|
|
392
|
-
|
|
394
|
+
// (a field on a photo, the bokeh card, takes one from the glass set: kept among the recent backgrounds)
|
|
395
|
+
const f = field.deal({ pick, r, accent, mono: MONO, glass: glassOf, photo: photoOf });
|
|
393
396
|
attrs = ` data-shader="${escapeHtml(JSON.stringify({ effect: field.effect, ...f.cfg }))}"`;
|
|
394
397
|
style += `;--bg:${f.ground};--fg:${f.ink}${f.still ? `;background:${f.still}` : ''}`;
|
|
395
398
|
const face = f.mono ? (MONO?.[0] ?? MONO_FALLBACK) : null;
|
|
@@ -399,9 +402,9 @@ export function lookbook(options) {
|
|
|
399
402
|
// a glass card (./glass.js): the mark itself drawn live in glass, started on screen like a field card, the name
|
|
400
403
|
// under it; what shows before it starts is the still mark, laid where the effect draws it
|
|
401
404
|
const glass = GLASS[kind];
|
|
402
|
-
const g = glass.deal({ pick, r, accent, paths: m.paths, uid });
|
|
405
|
+
const g = glass.deal({ pick, r, accent, paths: m.paths, uid, glass: glassOf });
|
|
403
406
|
attrs = ` data-shader="${escapeHtml(JSON.stringify({ effect: glass.effect, ...g.cfg }))}"`;
|
|
404
|
-
style += `;--bg:${g.ground};--fg:${g.ink}`;
|
|
407
|
+
style += `;--bg:${g.ground};--fg:${g.ink}${g.still ? `;background:${g.still}` : ''}`;
|
|
405
408
|
inner = `${g.under}<canvas class="wc-fx" aria-hidden="true"></canvas>${glassFoot(name, line, type)}`;
|
|
406
409
|
} else if (kind === 'tone') {
|
|
407
410
|
const [bg, tint] = pick(TONES);
|