@glissade/scene 0.38.0-pre.0 → 0.38.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/README.md CHANGED
@@ -1,6 +1,22 @@
1
1
  # @glissade/scene
2
2
 
3
- The scene graph and the **DisplayList IR**: nodes (Group, Rect, Circle, Path, Text, Image, Video) whose every animatable property is a signal, `createScene`, and the canonical `evaluate(scene, timeline, t) → DisplayList`. Text layout (explicit fonts, Intl.Segmenter line breaking) is deterministic across browser and headless render. Yoga flexbox lives behind the LayoutEngine seam at the separate `@glissade/scene/layout` entry — the base path never pays for wasm — including `width/height: 'auto'` content sizing and `computedSize()`. Other tree-shaken subpaths carry `splitText` (`./type`), `Grid` (`./grid`), motion-path drivers (`./motion`), the SVG `d` parser (`./path`), and `Chart()` + serializable scales (`./chart`).
3
+ The scene graph and the **DisplayList IR**: nodes (Group, Rect, Circle, Path, Text, Image, Video) whose every animatable property is a signal, `createScene`, and the canonical `evaluate(scene, timeline, t) → DisplayList`. Text layout (explicit fonts, Intl.Segmenter line breaking) is deterministic across browser and headless render. Yoga flexbox lives behind the LayoutEngine seam at the separate `@glissade/scene/layout` entry — the base path never pays for wasm — including `width/height: 'auto'` content sizing and `computedSize()`. Other tree-shaken subpaths carry `splitText` (`./type`), `Grid` (`./grid`), motion-path drivers (`./motion`), the SVG `d` parser (`./path`), `Chart()` + serializable scales (`./chart`), `Gauge()`/`Meter()` radial gauges (`./gauge`), and `defineComponent()` (`./component`).
4
+
5
+ ## Radial gauges — `Gauge()` / `Meter()`
6
+
7
+ Radial data-viz on the tree-shakeable `@glissade/scene/gauge` subpath (off the base embed) — a pure build-time fan-out like `Chart()`: a spec → N stroked-arc **zones** + boundary **ticks** + a **needle** + separate **labels**, returning a `Group`.
8
+
9
+ ```ts
10
+ import { Gauge } from '@glissade/scene/gauge';
11
+ const g = Gauge({ id: 'trust', radius: 120, gap: 2.5, zones: [
12
+ { extent: [-90, -30], color: '#e6a700', label: 'BLIND' },
13
+ { extent: [-30, 30], color: '#3ddc97', label: 'CALIBRATED' },
14
+ { extent: [ 30, 90], color: '#ff5d73', label: 'RAGE' } ]});
15
+ // authored needle: tl.to(g.targets('needle','rotation'), -70, { from: 0 }) // deg, 0 = up, + = clockwise
16
+ // or value→angle: Meter({ id, radius, zones, value: () => sig(), domain: [0, 100] })
17
+ ```
18
+
19
+ Every part is an addressable sub-id (`needle`, `zone-{i}`, `tick-{i}`, `label-{i}`, `glow`) via `g.targets(sub, prop)`; **labels draw z-above the zones**, so a zone can dim without crushing its label. `apexEmphasis` (portrait-safe) and per-zone `labelStyle` override the label defaults. Full guide: [docs/gauges.md](https://github.com/tyevco/glissade/blob/main/docs/gauges.md).
4
20
 
5
21
  ```sh
6
22
  npm i @glissade/scene @glissade/core
package/dist/describe.js CHANGED
@@ -23,7 +23,7 @@ import { easings, listValueTypes } from "@glissade/core";
23
23
  * never pulled onto the base embed path — a scene that never calls `describe()`
24
24
  * pays zero bytes for it.
25
25
  */
26
- const RAW_VERSION = "0.38.0-pre.0";
26
+ const RAW_VERSION = "0.38.0";
27
27
  const PACKAGE_VERSION = RAW_VERSION.includes("GLISSADE_".concat("VERSION")) ? "0.0.0-dev" : RAW_VERSION;
28
28
  /** Arity of a value type's numeric repr: vec2/vec2-arc → 2, number → 1; others (color/paint/path/string/boolean) carry no scalar arity. */
29
29
  function arityOf(type) {
@@ -439,7 +439,7 @@ const HELPERS = [
439
439
  name: "Gauge",
440
440
  summary: "Build-time radial gauge (data-viz, like Chart): a spec → N categorical stroked-arc zones + boundary ticks + a needle + separate labels, returning a Group. Angle deg: 0=up, +=clockwise. Needle takes AUTHORED keys (tl on targets(\"needle\",\"rotation\")) OR value→angle (Meter mode). Zones/ticks/needle/labels are each addressable sub-ids (zone-{i}, tick-{i}, needle, label-{i}, glow); labels draw z-above zones so a zone dim never crushes a label. Tree-shaken off the base scene index.",
441
441
  import: "@glissade/scene/gauge",
442
- usage: "Gauge({ id, radius, zones: { extent: [start,end], color, label?, labelStyle?: { family?, size?, fill?, weight? } }[], thickness?, gap?, needle?, needleAngle?, value?, domain?, sweep?, ticks?, apexEmphasis?: boolean | number, glow?, position? }): { node: Group, id, childId(sub?), targets(sub, prop): string[] }"
442
+ usage: "Gauge({ id, radius, zones: { extent: [start,end], color, label?, labelStyle?: { family?, size?, fill?, weight? } }[], thickness?, gap?, needle?, needleAngle?, value?, domain?, sweep?, ticks?, apexEmphasis?: boolean | number, glow?: boolean | { color?, radius?, blur? }, position? }): { node: Group, id, childId(sub?), targets(sub, prop): string[] }"
443
443
  },
444
444
  {
445
445
  name: "Meter",
package/dist/gauge.d.ts CHANGED
@@ -70,10 +70,15 @@ interface GaugeSpec {
70
70
  * your own `isPortrait(size)`.
71
71
  */
72
72
  apexEmphasis?: boolean | number;
73
- /** add a center glow Circle (`glow` sub-id, opacity 0 — author animates it). */
73
+ /**
74
+ * add a center glow Circle (`glow` sub-id, opacity 0 — author animates it).
75
+ * By default it's a HARD-edged disc; pass `{ blur }` for a soft falloff (a
76
+ * Gaussian blur filter, stdDeviation px) so it reads as a real center-glow.
77
+ */
74
78
  glow?: boolean | {
75
79
  color?: string;
76
80
  radius?: number;
81
+ blur?: number;
77
82
  };
78
83
  /** where to place the gauge center in the parent (default the parent origin). */
79
84
  position?: readonly [number, number];
package/dist/gauge.js CHANGED
@@ -74,7 +74,11 @@ function Gauge(spec) {
74
74
  id: cid("glow"),
75
75
  radius: g.radius ?? radius * .5,
76
76
  fill: g.color ?? "#ffffff",
77
- opacity: 0
77
+ opacity: 0,
78
+ ...g.blur !== void 0 && g.blur > 0 ? { filters: [{
79
+ kind: "blur",
80
+ radius: g.blur
81
+ }] } : {}
78
82
  }));
79
83
  }
80
84
  spec.zones.forEach((z, i) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissade/scene",
3
- "version": "0.38.0-pre.0",
3
+ "version": "0.38.0",
4
4
  "description": "glissade scene graph: nodes, transforms, DisplayList emission. Renderer-agnostic; zero DOM/Node dependencies.",
5
5
  "license": "Apache-2.0",
6
6
  "engines": {
@@ -77,7 +77,7 @@
77
77
  ],
78
78
  "dependencies": {
79
79
  "yoga-layout": "^3.2.1",
80
- "@glissade/core": "0.38.0-pre.0"
80
+ "@glissade/core": "0.38.0"
81
81
  },
82
82
  "repository": {
83
83
  "type": "git",