@pixerate/flair 0.9.0 → 0.11.0
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 +22 -0
- package/README.md +14 -6
- package/dist/catalog/index.d.ts +3 -3
- package/dist/catalog/index.js +1 -1
- package/dist/chunk-36OCXXPY.js +10447 -0
- package/dist/chunk-36OCXXPY.js.map +1 -0
- package/dist/{chunk-EQS4EXNM.js → chunk-SH66CNLC.js} +52 -6
- package/dist/chunk-SH66CNLC.js.map +1 -0
- package/dist/{chunk-TDMD5XAU.js → chunk-YACVME3D.js} +75 -4
- package/dist/{chunk-TDMD5XAU.js.map → chunk-YACVME3D.js.map} +1 -1
- package/dist/{chunk-EZRRKQFV.js → chunk-YLJWC4N2.js} +96 -1
- package/dist/chunk-YLJWC4N2.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/editor/index.d.ts +3 -4
- package/dist/editor/index.js +4 -4
- package/dist/editor/index.js.map +1 -1
- package/dist/index.d.ts +65 -6
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/{renderer-0_Ap1tyi.d.ts → renderer-SNYZu__R.d.ts} +17 -0
- package/dist/svg-CpeanaE_.d.ts +375 -0
- package/dist/{types-CgHG5JLv.d.ts → types-DwXdtN-Y.d.ts} +8 -2
- package/dist/vector/index.d.ts +2 -120
- package/dist/vector/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-EQS4EXNM.js.map +0 -1
- package/dist/chunk-EZRRKQFV.js.map +0 -1
- package/dist/chunk-F754SFRY.js +0 -4973
- package/dist/chunk-F754SFRY.js.map +0 -1
- package/dist/clock-BhdXWH-n.d.ts +0 -47
- package/dist/motion-Ce0lmzm3.d.ts +0 -179
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @pixerate/flair
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ef5f69f: Catalog: 54 new effects in four new categories and the retro category.
|
|
8
|
+
|
|
9
|
+
- **pyrotechnics** (new): fireworks (also bursting at clicks), sparkler, explosion, spark fountain, roman candle, fuse burn and smoke bomb overlays, a light-show finale, and a vector firework burst.
|
|
10
|
+
- **timewarp** (new): time echo, chrono split, time slice, VHS rewind, bullet time, time tunnel, speed ramp and stutter freeze over an image, and a vector time-lapse clock.
|
|
11
|
+
- **melt** (new): drip melt, heat haze, wax melt, melting text, liquify, melting clock and lava flow, and vector ice cube melt and candle.
|
|
12
|
+
- **electric** (new): lightning (also striking at clicks), Tesla arc, plasma ball, electric border, electric text, Jacob's ladder, short circuit, power surge and electric field, and vector zap icon, power button (click toggle) and battery charge.
|
|
13
|
+
- **retro**: 8-bit palettes with dithering (Game Boy, PICO-8, NES, CGA, C64, 1-bit), Game Boy screen, pixel fire, pixel landscape, OutRun road, palette cycle, raster bars, tape loading and pixel water, a pixel dissolve transition, and vector pixel text, coin spin, space invader, heart health bar and chomp loader.
|
|
14
|
+
|
|
15
|
+
## 0.10.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 7542ad5: Interaction: pointer uniforms, `SvgPlayer` triggers and 21 interaction effects.
|
|
20
|
+
|
|
21
|
+
- Shaders get two new built-ins: `iPointer` (xy while over the canvas, eased hover amount, seconds held or minus seconds since release) and `iClicks[8]` (the latest clicks: xy, `iTime` of the click, 1). `ShaderRenderer`, standalone pages and hovered `ThumbnailPool` thumbnails feed them; `ShaderFrames.render` takes `pointer` and `clicks` for scripted recordings. `PointerTracker`, `clicksUniform`, `MAX_CLICKS` and `HOVER_SECONDS` are exported.
|
|
22
|
+
- `SvgPlayer` takes `trigger: "hover" | "press" | "click"` (and `triggerTarget`): hover and press play forward while active and back after; click plays the next step on each click, wrapping round. `setActive(on)` and `advance()` let hosts drive it. Vector effects declare `trigger`.
|
|
23
|
+
- **interaction** (new category): click ripple, click burst, cursor glow, hover liquid, X-ray reveal, magnifier, holo card, press charge and hover swap shaders (each with an idle demo), and like button, toggle switch, checkbox, menu toggle, bookmark, copy, send and download buttons, link hover, button hover fill, tooltip pop and press button vector effects.
|
|
24
|
+
|
|
3
25
|
## 0.9.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -19,13 +19,14 @@ Flair gives products a library of good-looking, configurable visual effects (her
|
|
|
19
19
|
|
|
20
20
|
### Core Capabilities
|
|
21
21
|
|
|
22
|
-
- 🎨 **Effect catalog (`@pixerate/flair/catalog`)**:
|
|
22
|
+
- 🎨 **Effect catalog (`@pixerate/flair/catalog`)**: 186 effects, each with controls and presets. There are 126 WebGL2 shaders (gradients, organic textures, patterns, light, space, retro and pixel art, image treatments, transparent overlays, text fills, image morphs, pointer interactions, pyrotechnics, time warps, melting, electricity, transitions) and 60 animated SVG effects (loaders, status icons, animated titles, shape morphs, UI micro-interactions, pixel sprites, charts, counters, node graphs). [Browse them live](https://pixerate.github.io/flair/).
|
|
23
23
|
- ⚡ **Shader engine**:
|
|
24
24
|
- Shadertoy-style GLSL ES 3.00 fragment shaders, with controls declared in the source (`// @control`), including image inputs.
|
|
25
25
|
- Compile errors come back with line numbers that match the source.
|
|
26
|
+
- Pointer input beyond Shadertoy's `iMouse`: `iPointer` (position while over the canvas, eased hover amount, seconds held or since release) and `iClicks[8]` (the latest clicks' positions and times), so effects answer hovers, presses and taps. `ShaderRenderer` and standalone pages feed them; `ShaderFrames` takes scripted `pointer` and `clicks` for recordings.
|
|
26
27
|
- Live previews (`ShaderRenderer`, with optional `{ alpha: true }` for transparent overlays) and many animated or hover-activated thumbnails on one context (`ThumbnailPool`).
|
|
27
28
|
- Frames at exact times (`ShaderFrames`), looping GIFs, and standalone HTML pages.
|
|
28
|
-
- ✒️ **Vector motion (`@pixerate/flair/vector`)**: animated SVG described as data. Catalog vector effects declare their controls in the picture (`{{name: type …}}`), text included. It covers attribute tweens, draw-on strokes, motion along paths, counters (`animateCount` / `formatCount` for DOM elements too), text written letter by letter (`write`, with `scramble` and `caret`), shape morphs between any paths (`morphPaths`, `morphSequence`) and view zooms. Every frame is a pure function of time (`svgFrame`), and `SvgPlayer` plays it (with `scrollTrigger`, `hideWhenPaused`,
|
|
29
|
+
- ✒️ **Vector motion (`@pixerate/flair/vector`)**: animated SVG described as data. Catalog vector effects declare their controls in the picture (`{{name: type …}}`), text included. It covers attribute tweens, draw-on strokes, motion along paths, counters (`animateCount` / `formatCount` for DOM elements too), text written letter by letter (`write`, with `scramble` and `caret`), shape morphs between any paths (`morphPaths`, `morphSequence`) and view zooms. Every frame is a pure function of time (`svgFrame`), and `SvgPlayer` plays it (with `scrollTrigger`, `hideWhenPaused`, `reset()`, and `trigger: "hover" | "press" | "click"` to play in answer to the pointer).
|
|
29
30
|
- 🎛️ **Effect editor (`@pixerate/flair/editor`)**:
|
|
30
31
|
- A headless editor for an effect's source, values, keyframes, presets and timeline.
|
|
31
32
|
- Built on [`@pixerate/editor`](https://github.com/Pixerate/editor)'s undo history and command registry, with no UI framework assumed.
|
|
@@ -55,7 +56,7 @@ The `flair` CLI inspects shaders, writes standalone pages and directs scenes (se
|
|
|
55
56
|
```mermaid
|
|
56
57
|
graph TD
|
|
57
58
|
subgraph Effects["Effects (no dependencies)"]
|
|
58
|
-
Catalog["catalog:
|
|
59
|
+
Catalog["catalog: 186 effects + presets"]
|
|
59
60
|
Shader["shader engine: controls, compile, render, GIF, HTML"]
|
|
60
61
|
Vector["vector motion: SvgMotion, SvgPlayer"]
|
|
61
62
|
Time["time: clocks, easing, keyframes, noise"]
|
|
@@ -131,7 +132,9 @@ animateCount({
|
|
|
131
132
|
|
|
132
133
|
Find effects with `findEffects({ text: "glow", category: "light", kind: "shader" })`. Each effect has an `id`, `name`, `description`, `category`, `tags` and optional `presets`. Image effects default to built-in sample pictures, so they look right before you set `uImage` to your own URL.
|
|
133
134
|
|
|
134
|
-
Overlay shaders (`category: "overlay"`) have `transparent: true`: they write coverage to `fragColor.a` and draw nothing elsewhere, so render them with `new ShaderRenderer(host, { alpha: true })` (or `new ThumbnailPool({ alpha: true })`) and lay the canvas over a picture, video or page.
|
|
135
|
+
Overlay shaders (`category: "overlay"`) have `transparent: true`: they write coverage to `fragColor.a` and draw nothing elsewhere, so render them with `new ShaderRenderer(host, { alpha: true })` (or `new ThumbnailPool({ alpha: true })`) and lay the canvas over a picture, video or page. Interaction effects answer the pointer. Interactive shaders read `iPointer` and `iClicks`, so they work in any `ShaderRenderer` with no wiring, and play an idle demo when nobody is pointing (turn off "Demo when idle" to stop it). Vector micro-interactions carry a `trigger`: pass it to the player, `new SvgPlayer(host, renderVectorEffect(effect), { trigger: effect.trigger })`. A hover or press trigger plays to the end while hovered or held and back again after; a click trigger plays the next step on each click, so toggles turn on and off. Hosts can drive them too, with `player.setActive(on)` and `player.advance()` (from a keyboard handler, say).
|
|
136
|
+
|
|
137
|
+
To morph between any two SVG shapes, `morphPaths(from, to)` (from `@pixerate/flair/vector`) returns two paths with one structure, so `attrs: { d: [a, b] }` blends them point by point: curves and arcs are read, pieces are paired by position and size, and a piece with no partner grows from or shrinks to a point (draw them with `fill-rule="evenodd"`). `morphSequence` does the same for three or more shapes. `feature-morph` morphs two photos from five matching points, and `silhouette-morph` morphs any two silhouettes or logos (or words, through `textImage`).
|
|
135
138
|
|
|
136
139
|
`shader-text` fills letters from a text image: set its `uText` control to `textImage("Your title", { weight: 900 })`, a transparent SVG `data:` URL of any Unicode text.
|
|
137
140
|
|
|
@@ -268,12 +271,17 @@ The exporters carry the camera too:
|
|
|
268
271
|
| organic | liquid marble, smoke, lava lamp, plasma, caustics, flames, blob morph |
|
|
269
272
|
| pattern | dot wave, Truchet flow, hex pulse, living cells, moiré rings, kaleidoscope, stripes, neon circuit |
|
|
270
273
|
| light / space | bokeh, god rays, sparkles, neon ripple, light ribbons, warp starfield, nebula, event horizon |
|
|
271
|
-
| retro | synthwave, digital rain, dithered gradient, TV static |
|
|
274
|
+
| retro | synthwave, digital rain, dithered gradient, TV static, 8-bit, Game Boy screen, pixel fire, pixel landscape, OutRun road, palette cycle, raster bars, tape loading, pixel water, pixel text, coin spin, space invader, heart health bar, chomp loader |
|
|
272
275
|
| image | ripple, glitch, duotone, halftone, pixel reveal, Ken Burns, ASCII art, shatter, melt, risograph, thermal, edge glow, tilt-shift, slit-scan, mosaic flip, chromatic lens, oil paint, CRT screen, film look |
|
|
273
276
|
| overlay | rain on glass, snowfall, lens flare, vignette & grain, scanline sweep, spotlight, embers, shine sweep, frost creep, viewfinder |
|
|
274
277
|
| text | shader text, drip text, typewriter, scramble text, kinetic stagger, neon sign, stroke draw text, split reveal, highlighter, word cycle, liquid fill, glitch text, extruded text |
|
|
275
278
|
| morph | feature morph, silhouette morph, shape morph, icon toggle, morph sequence, gooey morph, particle morph, digit morph |
|
|
276
|
-
|
|
|
279
|
+
| interaction | click ripple, click burst, cursor glow, hover liquid, X-ray reveal, magnifier, holo card, press charge, hover swap, like button, toggle switch, checkbox, menu toggle, bookmark, copy button, send button, download button, link hover, button hover fill, tooltip pop, press button |
|
|
280
|
+
| pyrotechnics | fireworks, sparkler, explosion, spark fountain, roman candle, fuse burn, smoke bomb, light show, firework burst |
|
|
281
|
+
| timewarp | time echo, chrono split, time slice, VHS rewind, bullet time, time tunnel, speed ramp, stutter freeze, time-lapse clock |
|
|
282
|
+
| melt | drip melt, heat haze, wax melt, melting text, liquify, melting clock, lava flow, ice cube melt, candle |
|
|
283
|
+
| electric | lightning, Tesla arc, plasma ball, electric border, electric text, Jacob's ladder, short circuit, power surge, electric field, zap icon, power button, battery charge |
|
|
284
|
+
| transition | liquid morph, displacement, luma fade, particle swap, ink bleed, pixel dissolve, wipe, iris, block dissolve, grid wipe, glass wipe, twister, light leak, cross zoom |
|
|
277
285
|
| loader / icon / data | spinner, bouncing dots, pulse ping, equalizer, progress ring, bar chart, line chart, stat counter, route, timeline track, success check, error cross, heartbeat, signature, confetti, flow network |
|
|
278
286
|
|
|
279
287
|
Every shader is self-contained and compiles on WebGL2. Open [`#check`](https://pixerate.github.io/flair/#check) on the demo to compile the catalog on your own GPU.
|
package/dist/catalog/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as ControlDef, C as ControlValue } from '../controls-Syr6drzO.js';
|
|
2
|
-
import { E as EffectDefinition, a as EffectCategory, S as ShaderEffect } from '../types-
|
|
3
|
-
export { b as EFFECT_CATEGORIES, c as EffectPreset, V as VECTOR_CONTROL_TYPES, d as VectorControl, e as VectorEffect, f as colorControl, n as numberControl, r as renderVectorEffect, v as vectorControlDef, g as vectorControlIssues, h as vectorControls, i as vectorEffectControls } from '../types-
|
|
4
|
-
import '../
|
|
2
|
+
import { E as EffectDefinition, a as EffectCategory, S as ShaderEffect } from '../types-DwXdtN-Y.js';
|
|
3
|
+
export { b as EFFECT_CATEGORIES, c as EffectPreset, V as VECTOR_CONTROL_TYPES, d as VectorControl, e as VectorEffect, f as colorControl, n as numberControl, r as renderVectorEffect, v as vectorControlDef, g as vectorControlIssues, h as vectorControls, i as vectorEffectControls } from '../types-DwXdtN-Y.js';
|
|
4
|
+
import '../svg-CpeanaE_.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Sample pictures for the catalog's image effects: small SVGs as `data:` URLs,
|
package/dist/catalog/index.js
CHANGED