vizmatic 0.3.1 → 0.4.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/PROMPT.md +9 -3
- package/README.md +479 -3
- package/dist/chunk-FEIPTPBZ.js +1165 -0
- package/dist/chunk-TH3F4SDB.js +79 -0
- package/dist/cli.js +14 -8
- package/dist/index.cjs +2732 -125
- package/dist/index.d.cts +557 -2
- package/dist/index.d.ts +557 -2
- package/dist/index.js +2026 -559
- package/dist/scene-cli.d.ts +1 -0
- package/dist/scene-cli.js +4 -0
- package/dist/scene-runtime.cjs +930 -0
- package/dist/scene-runtime.d.cts +80 -0
- package/dist/scene-runtime.d.ts +80 -0
- package/dist/scene-runtime.js +20 -0
- package/examples/README.md +4 -0
- package/examples/aurora-incident.tsx +108 -0
- package/examples/daybreak-launch.tsx +81 -0
- package/examples/model-garden.tsx +97 -0
- package/examples/pressure-mechanism.scene.json +14 -0
- package/examples/videos/README.md +28 -0
- package/examples/videos/request-lifecycle.tsx +99 -0
- package/examples/videos/signal-to-story.tsx +126 -0
- package/examples/vizmatic-bare.d.ts +7 -0
- package/examples/weekend-field-notes.tsx +81 -0
- package/package.json +18 -7
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
declare const SCENE_RUNTIME_VERSION = "vizmatic-scene/1";
|
|
2
|
+
declare const SCENE_LIMITS: Readonly<{
|
|
3
|
+
sourceBytes: 131072;
|
|
4
|
+
graphBytes: 2097152;
|
|
5
|
+
nodes: 2000;
|
|
6
|
+
depth: 64;
|
|
7
|
+
stringLength: 65536;
|
|
8
|
+
canvasEdge: 1920;
|
|
9
|
+
canvasPixels: 2073600;
|
|
10
|
+
duration: 120;
|
|
11
|
+
frames: 3600;
|
|
12
|
+
memoryBytes: number;
|
|
13
|
+
stackBytes: number;
|
|
14
|
+
evaluationMs: 250;
|
|
15
|
+
}>;
|
|
16
|
+
/** All scene time values, including cues and duration, are in seconds. */
|
|
17
|
+
interface SceneRequest {
|
|
18
|
+
source: string;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
duration: number;
|
|
22
|
+
fps?: number;
|
|
23
|
+
theme?: 'dark' | 'light';
|
|
24
|
+
cues?: Record<string, number>;
|
|
25
|
+
seed?: number;
|
|
26
|
+
}
|
|
27
|
+
interface SceneFrameRequest extends SceneRequest {
|
|
28
|
+
time?: number;
|
|
29
|
+
}
|
|
30
|
+
interface NormalizedSceneRequest {
|
|
31
|
+
source: string;
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
duration: number;
|
|
35
|
+
fps: number;
|
|
36
|
+
theme: 'dark' | 'light';
|
|
37
|
+
cues: Record<string, number>;
|
|
38
|
+
seed: number;
|
|
39
|
+
frameCount: number;
|
|
40
|
+
}
|
|
41
|
+
type SceneJson = null | boolean | number | string | SceneJson[] | {
|
|
42
|
+
[key: string]: SceneJson;
|
|
43
|
+
};
|
|
44
|
+
interface SceneElement {
|
|
45
|
+
kind: 'vizmatic.element';
|
|
46
|
+
type: string;
|
|
47
|
+
props: {
|
|
48
|
+
[key: string]: SceneJson;
|
|
49
|
+
};
|
|
50
|
+
children: SceneJson[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Explicit names keep the editable scene language separate from the Node API. */
|
|
54
|
+
declare const SCENE_COMPONENT_NAMES: readonly ["Arrow", "ArrowMarkerDef", "AxisPlot", "Badge", "BadgePill", "BarChart", "Board", "Box", "CalloutCard", "Canvas", "CanvasItem", "Card", "ChartFrame", "CodeBlock", "Column", "Comparison", "Connector", "DashedLine", "DataTable", "DataflowDiagram", "DeploymentDiagram", "DetailList", "DonutChart", "DotPoint", "EquationCard", "Flow", "FlowArrow", "GradientChip", "GraphDiagram", "Grid", "Heatmap", "Icon", "IntervalPlot", "KeyValueList", "LayeredNetwork", "Legend", "LineChart", "MathText", "Matrix", "MetricCard", "MiniBarChart", "Panel", "ParetoBarChart", "ParetoChart", "PieChart", "Pipeline", "ProgressList", "ProgressRow", "QuadrantChart", "Row", "ScatterPlot", "Scene", "SequenceDiagram", "Stack", "StackedBar", "StatusList", "StatusRow", "StepCard", "SvgFrame", "SvgMathText", "SvgPoint", "TextLabel", "Tile", "TileGrid", "TiledMatrix", "Timeline", "TitleBar", "ToneStrip", "TransformerTopology", "TreeDiagram", "ValuePill", "VectorArrow", "VectorSegment", "WindowFrame"];
|
|
55
|
+
declare const SCENE_DOM_TAGS: readonly ["div", "span", "p", "strong", "em", "b", "i", "br", "svg", "g", "path", "rect", "circle", "ellipse", "line", "polyline", "polygon", "text", "tspan", "defs", "clipPath", "linearGradient", "radialGradient", "stop", "pattern", "marker", "mask", "title", "desc", "use"];
|
|
56
|
+
|
|
57
|
+
/** Validate after the VM boundary as well as inside it. Nothing executable crosses it. */
|
|
58
|
+
declare function validateSceneGraph(value: unknown): SceneJson;
|
|
59
|
+
|
|
60
|
+
interface EvaluatedSceneFrame {
|
|
61
|
+
graph: SceneJson;
|
|
62
|
+
request: NormalizedSceneRequest;
|
|
63
|
+
time: number;
|
|
64
|
+
runtimeVersion: string;
|
|
65
|
+
sourceSha256: string;
|
|
66
|
+
inputSha256: string;
|
|
67
|
+
}
|
|
68
|
+
declare function prepareSceneSource(source: string): string;
|
|
69
|
+
interface PreparedScene {
|
|
70
|
+
request: NormalizedSceneRequest;
|
|
71
|
+
sourceSha256: string;
|
|
72
|
+
inputSha256: string;
|
|
73
|
+
/** Each call creates a fresh bounded QuickJS runtime, including serialization. */
|
|
74
|
+
evaluate(time?: number): Promise<EvaluatedSceneFrame>;
|
|
75
|
+
}
|
|
76
|
+
declare function prepareScene(request: SceneFrameRequest): Promise<PreparedScene>;
|
|
77
|
+
/** Browser Workers and Node rendering share this exact evaluator and graph contract. */
|
|
78
|
+
declare function evaluateSceneSource(request: SceneFrameRequest): Promise<EvaluatedSceneFrame>;
|
|
79
|
+
|
|
80
|
+
export { type EvaluatedSceneFrame, type NormalizedSceneRequest, type PreparedScene, SCENE_COMPONENT_NAMES, SCENE_DOM_TAGS, SCENE_LIMITS, SCENE_RUNTIME_VERSION, type SceneElement, type SceneFrameRequest, type SceneJson, type SceneRequest, evaluateSceneSource, prepareScene, prepareSceneSource, validateSceneGraph };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
declare const SCENE_RUNTIME_VERSION = "vizmatic-scene/1";
|
|
2
|
+
declare const SCENE_LIMITS: Readonly<{
|
|
3
|
+
sourceBytes: 131072;
|
|
4
|
+
graphBytes: 2097152;
|
|
5
|
+
nodes: 2000;
|
|
6
|
+
depth: 64;
|
|
7
|
+
stringLength: 65536;
|
|
8
|
+
canvasEdge: 1920;
|
|
9
|
+
canvasPixels: 2073600;
|
|
10
|
+
duration: 120;
|
|
11
|
+
frames: 3600;
|
|
12
|
+
memoryBytes: number;
|
|
13
|
+
stackBytes: number;
|
|
14
|
+
evaluationMs: 250;
|
|
15
|
+
}>;
|
|
16
|
+
/** All scene time values, including cues and duration, are in seconds. */
|
|
17
|
+
interface SceneRequest {
|
|
18
|
+
source: string;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
duration: number;
|
|
22
|
+
fps?: number;
|
|
23
|
+
theme?: 'dark' | 'light';
|
|
24
|
+
cues?: Record<string, number>;
|
|
25
|
+
seed?: number;
|
|
26
|
+
}
|
|
27
|
+
interface SceneFrameRequest extends SceneRequest {
|
|
28
|
+
time?: number;
|
|
29
|
+
}
|
|
30
|
+
interface NormalizedSceneRequest {
|
|
31
|
+
source: string;
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
duration: number;
|
|
35
|
+
fps: number;
|
|
36
|
+
theme: 'dark' | 'light';
|
|
37
|
+
cues: Record<string, number>;
|
|
38
|
+
seed: number;
|
|
39
|
+
frameCount: number;
|
|
40
|
+
}
|
|
41
|
+
type SceneJson = null | boolean | number | string | SceneJson[] | {
|
|
42
|
+
[key: string]: SceneJson;
|
|
43
|
+
};
|
|
44
|
+
interface SceneElement {
|
|
45
|
+
kind: 'vizmatic.element';
|
|
46
|
+
type: string;
|
|
47
|
+
props: {
|
|
48
|
+
[key: string]: SceneJson;
|
|
49
|
+
};
|
|
50
|
+
children: SceneJson[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Explicit names keep the editable scene language separate from the Node API. */
|
|
54
|
+
declare const SCENE_COMPONENT_NAMES: readonly ["Arrow", "ArrowMarkerDef", "AxisPlot", "Badge", "BadgePill", "BarChart", "Board", "Box", "CalloutCard", "Canvas", "CanvasItem", "Card", "ChartFrame", "CodeBlock", "Column", "Comparison", "Connector", "DashedLine", "DataTable", "DataflowDiagram", "DeploymentDiagram", "DetailList", "DonutChart", "DotPoint", "EquationCard", "Flow", "FlowArrow", "GradientChip", "GraphDiagram", "Grid", "Heatmap", "Icon", "IntervalPlot", "KeyValueList", "LayeredNetwork", "Legend", "LineChart", "MathText", "Matrix", "MetricCard", "MiniBarChart", "Panel", "ParetoBarChart", "ParetoChart", "PieChart", "Pipeline", "ProgressList", "ProgressRow", "QuadrantChart", "Row", "ScatterPlot", "Scene", "SequenceDiagram", "Stack", "StackedBar", "StatusList", "StatusRow", "StepCard", "SvgFrame", "SvgMathText", "SvgPoint", "TextLabel", "Tile", "TileGrid", "TiledMatrix", "Timeline", "TitleBar", "ToneStrip", "TransformerTopology", "TreeDiagram", "ValuePill", "VectorArrow", "VectorSegment", "WindowFrame"];
|
|
55
|
+
declare const SCENE_DOM_TAGS: readonly ["div", "span", "p", "strong", "em", "b", "i", "br", "svg", "g", "path", "rect", "circle", "ellipse", "line", "polyline", "polygon", "text", "tspan", "defs", "clipPath", "linearGradient", "radialGradient", "stop", "pattern", "marker", "mask", "title", "desc", "use"];
|
|
56
|
+
|
|
57
|
+
/** Validate after the VM boundary as well as inside it. Nothing executable crosses it. */
|
|
58
|
+
declare function validateSceneGraph(value: unknown): SceneJson;
|
|
59
|
+
|
|
60
|
+
interface EvaluatedSceneFrame {
|
|
61
|
+
graph: SceneJson;
|
|
62
|
+
request: NormalizedSceneRequest;
|
|
63
|
+
time: number;
|
|
64
|
+
runtimeVersion: string;
|
|
65
|
+
sourceSha256: string;
|
|
66
|
+
inputSha256: string;
|
|
67
|
+
}
|
|
68
|
+
declare function prepareSceneSource(source: string): string;
|
|
69
|
+
interface PreparedScene {
|
|
70
|
+
request: NormalizedSceneRequest;
|
|
71
|
+
sourceSha256: string;
|
|
72
|
+
inputSha256: string;
|
|
73
|
+
/** Each call creates a fresh bounded QuickJS runtime, including serialization. */
|
|
74
|
+
evaluate(time?: number): Promise<EvaluatedSceneFrame>;
|
|
75
|
+
}
|
|
76
|
+
declare function prepareScene(request: SceneFrameRequest): Promise<PreparedScene>;
|
|
77
|
+
/** Browser Workers and Node rendering share this exact evaluator and graph contract. */
|
|
78
|
+
declare function evaluateSceneSource(request: SceneFrameRequest): Promise<EvaluatedSceneFrame>;
|
|
79
|
+
|
|
80
|
+
export { type EvaluatedSceneFrame, type NormalizedSceneRequest, type PreparedScene, SCENE_COMPONENT_NAMES, SCENE_DOM_TAGS, SCENE_LIMITS, SCENE_RUNTIME_VERSION, type SceneElement, type SceneFrameRequest, type SceneJson, type SceneRequest, evaluateSceneSource, prepareScene, prepareSceneSource, validateSceneGraph };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SCENE_COMPONENT_NAMES,
|
|
3
|
+
SCENE_DOM_TAGS,
|
|
4
|
+
SCENE_LIMITS,
|
|
5
|
+
SCENE_RUNTIME_VERSION,
|
|
6
|
+
evaluateSceneSource,
|
|
7
|
+
prepareScene,
|
|
8
|
+
prepareSceneSource,
|
|
9
|
+
validateSceneGraph
|
|
10
|
+
} from "./chunk-FEIPTPBZ.js";
|
|
11
|
+
export {
|
|
12
|
+
SCENE_COMPONENT_NAMES,
|
|
13
|
+
SCENE_DOM_TAGS,
|
|
14
|
+
SCENE_LIMITS,
|
|
15
|
+
SCENE_RUNTIME_VERSION,
|
|
16
|
+
evaluateSceneSource,
|
|
17
|
+
prepareScene,
|
|
18
|
+
prepareSceneSource,
|
|
19
|
+
validateSceneGraph
|
|
20
|
+
};
|
package/examples/README.md
CHANGED
|
@@ -9,6 +9,7 @@ Rendered assets live on the [Vizmatic gallery](https://bvolpato.github.io/vizmat
|
|
|
9
9
|
| [Agent Pipeline](agent-pipeline.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/agent-pipeline_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/agent-pipeline_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/agent-pipeline_light.png" alt="Agent Pipeline preview" width="720" /></picture> |
|
|
10
10
|
| [Animated Pipeline](animated-pipeline.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/animated-pipeline_dark.gif" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/animated-pipeline_light.gif" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/animated-pipeline_light.gif" alt="Animated Pipeline preview" width="720" /></picture> |
|
|
11
11
|
| [Attention Head](attention-head.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/attention-head_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/attention-head_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/attention-head_light.png" alt="Attention Head preview" width="720" /></picture> |
|
|
12
|
+
| [Aurora Incident](aurora-incident.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/aurora-incident_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/aurora-incident_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/aurora-incident_light.png" alt="Aurora Incident preview" width="720" /></picture> |
|
|
12
13
|
| [Building Blocks](building-blocks.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/building-blocks_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/building-blocks_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/building-blocks_light.png" alt="Building Blocks preview" width="720" /></picture> |
|
|
13
14
|
| [Catalog Charts](catalog-charts.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-charts_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-charts_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/catalog-charts_light.png" alt="Catalog Charts preview" width="720" /></picture> |
|
|
14
15
|
| [Catalog Content](catalog-content.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-content_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-content_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/catalog-content_light.png" alt="Catalog Content preview" width="720" /></picture> |
|
|
@@ -21,10 +22,12 @@ Rendered assets live on the [Vizmatic gallery](https://bvolpato.github.io/vizmat
|
|
|
21
22
|
| [Catalog Foundations](catalog-foundations.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-foundations_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-foundations_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/catalog-foundations_light.png" alt="Catalog Foundations preview" width="720" /></picture> |
|
|
22
23
|
| [Catalog ML](catalog-ml.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-ml_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-ml_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/catalog-ml_light.png" alt="Catalog ML preview" width="720" /></picture> |
|
|
23
24
|
| [Catalog Sequence](catalog-sequence.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-sequence_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-sequence_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/catalog-sequence_light.png" alt="Catalog Sequence preview" width="720" /></picture> |
|
|
25
|
+
| [Daybreak Launch](daybreak-launch.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/daybreak-launch_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/daybreak-launch_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/daybreak-launch_light.png" alt="Daybreak Launch preview" width="720" /></picture> |
|
|
24
26
|
| [Desired Quadrant](desired-quadrant.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/desired-quadrant_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/desired-quadrant_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/desired-quadrant_light.png" alt="Desired Quadrant preview" width="720" /></picture> |
|
|
25
27
|
| [Embedding Map](embedding-map.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/embedding-map_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/embedding-map_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/embedding-map_light.png" alt="Embedding Map preview" width="720" /></picture> |
|
|
26
28
|
| [Engineering Flow](engineering-flow.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/engineering-flow_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/engineering-flow_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/engineering-flow_light.png" alt="Engineering Flow preview" width="720" /></picture> |
|
|
27
29
|
| [Eval Dashboard](eval-dashboard.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/eval-dashboard_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/eval-dashboard_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/eval-dashboard_light.png" alt="Eval Dashboard preview" width="720" /></picture> |
|
|
30
|
+
| [Model Garden](model-garden.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/model-garden_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/model-garden_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/model-garden_light.png" alt="Model Garden preview" width="720" /></picture> |
|
|
28
31
|
| [Model Router](model-router.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/model-router_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/model-router_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/model-router_light.png" alt="Model Router preview" width="720" /></picture> |
|
|
29
32
|
| [NCCL All Gather](nccl-all-gather.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-gather_dark.gif" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-gather_light.gif" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-gather_light.gif" alt="NCCL All Gather preview" width="720" /></picture> |
|
|
30
33
|
| [NCCL All Reduce](nccl-all-reduce.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-reduce_dark.gif" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-reduce_light.gif" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-reduce_light.gif" alt="NCCL All Reduce preview" width="720" /></picture> |
|
|
@@ -47,3 +50,4 @@ Rendered assets live on the [Vizmatic gallery](https://bvolpato.github.io/vizmat
|
|
|
47
50
|
| [Transparent Badge](transparent-badge.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/transparent-badge_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/transparent-badge_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/transparent-badge_light.png" alt="Transparent Badge preview" width="720" /></picture> |
|
|
48
51
|
| [Vizmatic Hero](vizmatic-hero.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/vizmatic-hero_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/vizmatic-hero_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/vizmatic-hero_light.png" alt="Vizmatic Hero preview" width="720" /></picture> |
|
|
49
52
|
| [Website Workflow](website-workflow.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/website-workflow_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/website-workflow_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/website-workflow_light.png" alt="Website Workflow preview" width="720" /></picture> |
|
|
53
|
+
| [Weekend Field Notes](weekend-field-notes.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/weekend-field-notes_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/weekend-field-notes_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/weekend-field-notes_light.png" alt="Weekend Field Notes preview" width="720" /></picture> |
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
width = 1120;
|
|
2
|
+
height = 800;
|
|
3
|
+
background = "theme";
|
|
4
|
+
|
|
5
|
+
<Board c={c} width={1120} height={800}>
|
|
6
|
+
<CanvasItem x={24} y={20} width={1072} height={112}>
|
|
7
|
+
<CalloutCard
|
|
8
|
+
c={c}
|
|
9
|
+
width={1072}
|
|
10
|
+
minHeight={112}
|
|
11
|
+
padding={22}
|
|
12
|
+
align="left"
|
|
13
|
+
tone="purple"
|
|
14
|
+
filled={false}
|
|
15
|
+
title="AURORA / RELIABILITY DRILL 07"
|
|
16
|
+
titleFontSize={12}
|
|
17
|
+
detail="FICTIONAL CHECKOUT INCIDENT · traffic shifts around a degraded queue while recovery unfolds live."
|
|
18
|
+
detailFontSize={17}
|
|
19
|
+
/>
|
|
20
|
+
</CanvasItem>
|
|
21
|
+
|
|
22
|
+
<CanvasItem x={24} y={146} width={254} height={86}>
|
|
23
|
+
<MetricCard c={c} width={254} minHeight={86} tone="warm" label="P95 LATENCY" value="428 ms" detail="down from 1.8 s" valueFontSize={25} />
|
|
24
|
+
</CanvasItem>
|
|
25
|
+
<CanvasItem x={296} y={146} width={254} height={86}>
|
|
26
|
+
<MetricCard c={c} width={254} minHeight={86} tone="green" label="CHECKOUT SUCCESS" value="99.93%" detail="recovered above objective" valueFontSize={25} />
|
|
27
|
+
</CanvasItem>
|
|
28
|
+
<CanvasItem x={568} y={146} width={254} height={86}>
|
|
29
|
+
<MetricCard c={c} width={254} minHeight={86} tone="cyan" label="OLDEST QUEUE ITEM" value="18 s" detail="was 94 s at peak" valueFontSize={25} />
|
|
30
|
+
</CanvasItem>
|
|
31
|
+
<CanvasItem x={840} y={146} width={256} height={86}>
|
|
32
|
+
<MetricCard c={c} width={256} minHeight={86} tone="blue" label="TRAFFIC ON HEALTHY POOL" value="100%" detail="zone-b serving checkout" valueFontSize={25} />
|
|
33
|
+
</CanvasItem>
|
|
34
|
+
|
|
35
|
+
<CanvasItem x={24} y={244} width={650} height={260}>
|
|
36
|
+
<Panel
|
|
37
|
+
c={c}
|
|
38
|
+
width={650}
|
|
39
|
+
height={260}
|
|
40
|
+
padding={12}
|
|
41
|
+
gap={6}
|
|
42
|
+
tone="cyan"
|
|
43
|
+
title="LIVE ROUTING / CHECKOUT PLANE"
|
|
44
|
+
subtitle="The degraded worker is isolated; the healthy pool carries the rerouted queue."
|
|
45
|
+
>
|
|
46
|
+
<GraphDiagram
|
|
47
|
+
c={c}
|
|
48
|
+
width={624}
|
|
49
|
+
height={190}
|
|
50
|
+
layout="manual"
|
|
51
|
+
routing="orthogonal"
|
|
52
|
+
routingClearance={8}
|
|
53
|
+
edgeGap={18}
|
|
54
|
+
padding={12}
|
|
55
|
+
nodeWidth={122}
|
|
56
|
+
nodeHeight={58}
|
|
57
|
+
labelFontSize={11}
|
|
58
|
+
detailFontSize={11}
|
|
59
|
+
nodes={[
|
|
60
|
+
{ id: 'edge', label: 'Edge gateway', detail: 'checkout API', x: 0.10, y: 0.50, tone: 'blue', icon: 'gateway' },
|
|
61
|
+
{ id: 'queue', label: 'Event queue', detail: 'replay paused', x: 0.34, y: 0.50, tone: 'purple', icon: 'queue' },
|
|
62
|
+
{ id: 'worker-a', label: 'Zone A pool', detail: 'degraded · 1/3', x: 0.63, y: 0.27, tone: 'critical', icon: 'server' },
|
|
63
|
+
{ id: 'worker-b', label: 'Zone B pool', detail: 'healthy · 3/3', x: 0.63, y: 0.73, tone: 'green', icon: 'container' },
|
|
64
|
+
{ id: 'orders', label: 'Orders store', detail: 'writes steady', x: 0.91, y: 0.50, tone: 'green', icon: 'database' },
|
|
65
|
+
]}
|
|
66
|
+
edges={[
|
|
67
|
+
{ from: 'edge', to: 'queue', fromSide: 'right', toSide: 'left', tone: 'blue' },
|
|
68
|
+
{ from: 'queue', to: 'worker-a', fromSide: 'right', toSide: 'left', tone: 'critical', style: 'dashed' },
|
|
69
|
+
{ from: 'queue', to: 'worker-b', fromSide: 'right', toSide: 'left', tone: 'green' },
|
|
70
|
+
{ from: 'worker-a', to: 'orders', fromSide: 'right', toSide: 'left', tone: 'warm', style: 'dashed' },
|
|
71
|
+
{ from: 'worker-b', to: 'orders', fromSide: 'right', toSide: 'left', tone: 'green' },
|
|
72
|
+
]}
|
|
73
|
+
/>
|
|
74
|
+
</Panel>
|
|
75
|
+
</CanvasItem>
|
|
76
|
+
|
|
77
|
+
<CanvasItem x={700} y={244} width={396} height={260}>
|
|
78
|
+
<Timeline
|
|
79
|
+
c={c}
|
|
80
|
+
width={396}
|
|
81
|
+
direction="vertical"
|
|
82
|
+
gap={7}
|
|
83
|
+
title="DRILL TIMELINE / RESPONSE"
|
|
84
|
+
events={[
|
|
85
|
+
{ time: '14:32', title: 'Queue crosses 90 s', detail: 'Retry rate spikes 3×.', tone: 'critical' },
|
|
86
|
+
{ time: '14:34', title: 'Replay throttled', detail: 'Protect healthy pool.', tone: 'warm' },
|
|
87
|
+
{ time: '14:38', title: 'Fail over to zone B', detail: 'Lag falls steadily.', tone: 'green' },
|
|
88
|
+
]}
|
|
89
|
+
/>
|
|
90
|
+
</CanvasItem>
|
|
91
|
+
|
|
92
|
+
<CanvasItem x={24} y={514} width={1072} height={236}>
|
|
93
|
+
<LineChart
|
|
94
|
+
c={c}
|
|
95
|
+
width={1020}
|
|
96
|
+
height={106}
|
|
97
|
+
title="P95 LATENCY / RECOVERY CURVE"
|
|
98
|
+
subtitle="Lower is better · reroute restored the checkout SLO."
|
|
99
|
+
min={0}
|
|
100
|
+
max={2000}
|
|
101
|
+
format="integer"
|
|
102
|
+
labels={['14:32', '14:33', '14:34', '14:35', '14:36', '14:37', '14:38', '14:39']}
|
|
103
|
+
series={[
|
|
104
|
+
{ name: 'p95 latency', points: [1800, 1690, 1320, 980, 710, 540, 428, 428], color: 'positive', area: true },
|
|
105
|
+
]}
|
|
106
|
+
/>
|
|
107
|
+
</CanvasItem>
|
|
108
|
+
</Board>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
width = 1120;
|
|
2
|
+
height = 800;
|
|
3
|
+
background = "theme";
|
|
4
|
+
|
|
5
|
+
// themeColors = {"primary":"#6d28d9","primaryLight":"#c4b5fd","primaryDark":"#4c1d95","secondary":"#0e7490","secondaryLight":"#22d3ee","secondaryDark":"#155e75","positive":"#15803d","positiveLight":"#4ade80","positiveDark":"#166534","warning":"#c2410c","warningLight":"#fb923c","warningDark":"#9a3412","info":"#0369a1","infoLight":"#38bdf8","infoDark":"#075985","accent":"#be185d","accentLight":"#f9a8d4"}
|
|
6
|
+
|
|
7
|
+
<Board width={1120} height={800}>
|
|
8
|
+
<CanvasItem x={40} y={28} width={208} height={28}>
|
|
9
|
+
<BadgePill text="DAYBREAK / ISSUE 01" tone="purple" filled />
|
|
10
|
+
</CanvasItem>
|
|
11
|
+
<CanvasItem x={40} y={66} width={690} height={46}>
|
|
12
|
+
<TextLabel text="The launch found its people." variant="title" fontSize={31} color={c.textPrimary} />
|
|
13
|
+
</CanvasItem>
|
|
14
|
+
<CanvasItem x={40} y={116} width={690} height={32}>
|
|
15
|
+
<TextLabel text="A first-day field report · all figures are illustrative demo data" variant="body" fontSize={14} color={c.textSecondary} />
|
|
16
|
+
</CanvasItem>
|
|
17
|
+
<CanvasItem x={790} y={28} width={290} height={126}>
|
|
18
|
+
<MetricCard label="THE FIRST 24 HOURS" value="18,402" detail="new readers · +42% over goal" tone="purple" valueFontSize={34} align="left" />
|
|
19
|
+
</CanvasItem>
|
|
20
|
+
|
|
21
|
+
<CanvasItem x={40} y={172} width={248} height={82}>
|
|
22
|
+
<MetricCard label="ACTIVATION" value="64%" detail="opened a second story" tone="green" align="left" />
|
|
23
|
+
</CanvasItem>
|
|
24
|
+
<CanvasItem x={304} y={172} width={248} height={82}>
|
|
25
|
+
<MetricCard label="READ TIME" value="8m 24s" detail="median first session" tone="cyan" align="left" />
|
|
26
|
+
</CanvasItem>
|
|
27
|
+
<CanvasItem x={568} y={172} width={248} height={82}>
|
|
28
|
+
<MetricCard label="PAID TRIALS" value="1,286" detail="started before midnight" tone="warm" align="left" />
|
|
29
|
+
</CanvasItem>
|
|
30
|
+
<CanvasItem x={832} y={172} width={248} height={82}>
|
|
31
|
+
<MetricCard label="REFERRALS" value="2,940" detail="readers brought a friend" tone="pink" align="left" />
|
|
32
|
+
</CanvasItem>
|
|
33
|
+
|
|
34
|
+
<CanvasItem x={40} y={276} width={676} height={472}>
|
|
35
|
+
<LineChart
|
|
36
|
+
width={628}
|
|
37
|
+
height={358}
|
|
38
|
+
title="Momentum peaked at 6 pm"
|
|
39
|
+
subtitle="Hourly readers · mobile and desktop · demo cohort"
|
|
40
|
+
labels={['08', '10', '12', '14', '16', '18', '20', '22']}
|
|
41
|
+
format="compact"
|
|
42
|
+
yAxisLabel="readers"
|
|
43
|
+
series={[
|
|
44
|
+
{ name: 'Mobile', points: [460, 720, 940, 1240, 1680, 1980, 1660, 1120], color: 'info', area: true },
|
|
45
|
+
{ name: 'Desktop', points: [340, 570, 780, 1110, 1460, 1600, 1200, 900], color: 'accent' },
|
|
46
|
+
]}
|
|
47
|
+
/>
|
|
48
|
+
</CanvasItem>
|
|
49
|
+
<CanvasItem x={740} y={276} width={340} height={218}>
|
|
50
|
+
<DonutChart
|
|
51
|
+
width={306}
|
|
52
|
+
height={218}
|
|
53
|
+
size={132}
|
|
54
|
+
title="A launch list led discovery"
|
|
55
|
+
centerLabel="new readers"
|
|
56
|
+
centerValue="18.4k"
|
|
57
|
+
format="percent"
|
|
58
|
+
segments={[
|
|
59
|
+
{ label: 'Launch list', value: 0.38, color: 'primary' },
|
|
60
|
+
{ label: 'Search', value: 0.26, color: 'info' },
|
|
61
|
+
{ label: 'Community', value: 0.21, color: 'positive' },
|
|
62
|
+
{ label: 'Direct', value: 0.15, color: 'warning' },
|
|
63
|
+
]}
|
|
64
|
+
/>
|
|
65
|
+
</CanvasItem>
|
|
66
|
+
<CanvasItem x={740} y={516} width={340} height={222}>
|
|
67
|
+
<ParetoBarChart
|
|
68
|
+
width={306}
|
|
69
|
+
height={158}
|
|
70
|
+
title="Two steps drove most setup questions"
|
|
71
|
+
format="integer"
|
|
72
|
+
showValues={false}
|
|
73
|
+
data={[
|
|
74
|
+
{ label: 'Setup', value: 40, color: 'warning' },
|
|
75
|
+
{ label: 'Import', value: 28, color: 'critical' },
|
|
76
|
+
{ label: 'Invite', value: 19, color: 'info' },
|
|
77
|
+
{ label: 'Billing', value: 13, color: 'neutral' },
|
|
78
|
+
]}
|
|
79
|
+
/>
|
|
80
|
+
</CanvasItem>
|
|
81
|
+
</Board>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
width = 1120;
|
|
2
|
+
height = 760;
|
|
3
|
+
background = "theme";
|
|
4
|
+
|
|
5
|
+
<Board c={c} width={1120} height={760}>
|
|
6
|
+
<CanvasItem x={24} y={20} width={1072} height={104}>
|
|
7
|
+
<CalloutCard
|
|
8
|
+
c={c}
|
|
9
|
+
width={1072}
|
|
10
|
+
minHeight={104}
|
|
11
|
+
padding={20}
|
|
12
|
+
align="left"
|
|
13
|
+
tone="blue"
|
|
14
|
+
filled={false}
|
|
15
|
+
title="MODEL GARDEN / ROUTE BY THE JOB"
|
|
16
|
+
titleFontSize={12}
|
|
17
|
+
detail="ILLUSTRATIVE DATA ONLY · compare the cost, quality, and latency trade-offs before choosing a default."
|
|
18
|
+
detailFontSize={16}
|
|
19
|
+
/>
|
|
20
|
+
</CanvasItem>
|
|
21
|
+
|
|
22
|
+
<CanvasItem x={24} y={140} width={668} height={420}>
|
|
23
|
+
<ParetoChart
|
|
24
|
+
c={c}
|
|
25
|
+
width={450}
|
|
26
|
+
height={294}
|
|
27
|
+
title="MODEL OPTIONS / COST × QUALITY FRONTIER"
|
|
28
|
+
subtitle="Synthetic values · lower cost and higher quality are preferred."
|
|
29
|
+
xMin={0}
|
|
30
|
+
xMax={10}
|
|
31
|
+
yMin={50}
|
|
32
|
+
yMax={100}
|
|
33
|
+
xAxisLabel="credits per request · illustrative"
|
|
34
|
+
formatX="decimal"
|
|
35
|
+
formatY="integer"
|
|
36
|
+
frontierColor="positive"
|
|
37
|
+
showGoal={false}
|
|
38
|
+
points={[
|
|
39
|
+
{ x: 0.5, y: 64, label: 'Swift', color: 'info', size: 8 },
|
|
40
|
+
{ x: 1.2, y: 76, label: 'Sage', color: 'primary', size: 9 },
|
|
41
|
+
{ x: 2.7, y: 88, label: 'Orbit', color: 'secondary', size: 9 },
|
|
42
|
+
{ x: 5.8, y: 95, label: 'Apex', color: 'warning', size: 9 },
|
|
43
|
+
{ x: 8.4, y: 97, label: 'Max', color: 'positive', size: 8 },
|
|
44
|
+
{ x: 4.2, y: 81, label: 'Classic', color: 'critical', size: 8 },
|
|
45
|
+
{ x: 7.1, y: 91, label: 'Studio', color: 'neutral', size: 8 },
|
|
46
|
+
]}
|
|
47
|
+
footer="Fictional values for illustration, not model benchmarks."
|
|
48
|
+
/>
|
|
49
|
+
</CanvasItem>
|
|
50
|
+
|
|
51
|
+
<CanvasItem x={712} y={140} width={384} height={178}>
|
|
52
|
+
<CalloutCard
|
|
53
|
+
c={c}
|
|
54
|
+
width={384}
|
|
55
|
+
minHeight={178}
|
|
56
|
+
padding={20}
|
|
57
|
+
align="left"
|
|
58
|
+
tone="green"
|
|
59
|
+
filled={false}
|
|
60
|
+
title="THE BALANCED DEFAULT"
|
|
61
|
+
titleFontSize={15}
|
|
62
|
+
detail="Sage covers routine support at 1.2 credits per request, with a fictional quality index of 76. Escalate only when the task needs deeper reasoning."
|
|
63
|
+
detailFontSize={13}
|
|
64
|
+
/>
|
|
65
|
+
</CanvasItem>
|
|
66
|
+
|
|
67
|
+
<CanvasItem x={712} y={322} width={384} height={240}>
|
|
68
|
+
<BarChart
|
|
69
|
+
c={c}
|
|
70
|
+
width={350}
|
|
71
|
+
height={128}
|
|
72
|
+
title="SPEED / SECONDS · ILLUSTRATIVE P50"
|
|
73
|
+
subtitle="Lower latency · measure on your own workloads."
|
|
74
|
+
footer="P50 s: Swift 0.42 · Sage 0.68 · Orbit 1.20 · Apex 2.40"
|
|
75
|
+
format="decimal"
|
|
76
|
+
showValues={false}
|
|
77
|
+
min={0}
|
|
78
|
+
max={3}
|
|
79
|
+
data={[
|
|
80
|
+
{ label: 'Swift', value: 0.42, color: 'info' },
|
|
81
|
+
{ label: 'Sage', value: 0.68, color: 'primary' },
|
|
82
|
+
{ label: 'Orbit', value: 1.2, color: 'secondary' },
|
|
83
|
+
{ label: 'Apex', value: 2.4, color: 'warning' },
|
|
84
|
+
]}
|
|
85
|
+
/>
|
|
86
|
+
</CanvasItem>
|
|
87
|
+
|
|
88
|
+
<CanvasItem x={24} y={578} width={344} height={134}>
|
|
89
|
+
<CalloutCard c={c} width={344} minHeight={134} padding={16} align="left" tone="cyan" filled={false} title="FAST PATH / SWIFT" titleFontSize={13} detail="Tagging, extraction, and low stakes actions." detailFontSize={13} />
|
|
90
|
+
</CanvasItem>
|
|
91
|
+
<CanvasItem x={388} y={578} width={344} height={134}>
|
|
92
|
+
<CalloutCard c={c} width={344} minHeight={134} padding={16} align="left" tone="purple" filled={false} title="BALANCED / SAGE" titleFontSize={13} detail="Everyday support and dependable summaries." detailFontSize={13} />
|
|
93
|
+
</CanvasItem>
|
|
94
|
+
<CanvasItem x={752} y={578} width={344} height={134}>
|
|
95
|
+
<CalloutCard c={c} width={344} minHeight={134} padding={16} align="left" tone="warm" filled={false} title="DEEP WORK / APEX" titleFontSize={13} detail="Long plans, hard analysis, and careful reviews." detailFontSize={13} />
|
|
96
|
+
</CanvasItem>
|
|
97
|
+
</Board>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"width": 960,
|
|
3
|
+
"height": 540,
|
|
4
|
+
"duration": 8,
|
|
5
|
+
"fps": 30,
|
|
6
|
+
"theme": "dark",
|
|
7
|
+
"seed": 0,
|
|
8
|
+
"cues": {
|
|
9
|
+
"heat": 1,
|
|
10
|
+
"pressure": 3,
|
|
11
|
+
"release": 5.5
|
|
12
|
+
},
|
|
13
|
+
"source": "const heat = ease(cue('heat', 2));\nconst pressure = ease(cue('pressure', 2));\nconst release = easeOut(cue('release', 1.4));\nfunction Label({x,y,text,color=c.textPrimary,size=24}) { return <text x={x} y={y} fill={color} fontFamily='Inter' fontSize={size} textAnchor='middle'>{text}</text>; }\n<svg width={width} height={height} viewBox='0 0 960 540'>\n <rect width={960} height={540} fill={c.bg}/>\n <Label x={480} y={54} text='An animated mechanism, not a slide' size={32}/>\n <Label x={480} y={97} text='Heat → pressure → release' color={c.textSecondary} size={22}/>\n <rect x={360} y={165} width={240} height={240} rx={35} fill={c.bgCard} stroke={c.border} strokeWidth={3}/>\n <rect x={375} y={lerp(365,245,heat)} width={210} height={lerp(25,145,heat)} rx={20} fill={c.warning} opacity={0.25+heat*0.5}/>\n {Array.from({length:18},(_,i) => {const a=i*2.399; const r=35+(i%4)*17;return <circle key={i} cx={480+Math.cos(a+time*(0.15+heat*0.3))*r} cy={285+Math.sin(a+time*(0.15+heat*0.3))*r*(1-pressure*0.4)} r={5} fill={c.infoLight}/>;})}\n <g opacity={pressure*(1-release)}><VectorArrow x1={420} y1={285} x2={385} y2={285} color={c.warningLight}/><VectorArrow x1={540} y1={285} x2={575} y2={285} color={c.warningLight}/></g>\n <g transform={`translate(0 ${-release*25})`}><rect x={350} y={153} width={260} height={20} rx={10} fill={c.textSecondary}/></g>\n <g opacity={release}><VectorArrow x1={455} y1={230} x2={455} y2={115+release*5} color={c.infoLight}/><VectorArrow x1={505} y1={230} x2={505} y2={115+release*5} color={c.infoLight}/></g>\n <Label x={480} y={456} text={release>0.1?'Release changes the system':pressure>0.1?'Pressure rises inside the container':'Heat drives particle motion'} size={25}/>\n <rect x={180} y={487} width={600} height={5} rx={2} fill={c.border}/><rect x={180} y={487} width={600*progress} height={5} rx={2} fill={c.info}/>\n</svg>"
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Video examples
|
|
2
|
+
|
|
3
|
+
These TSX modules define finite videos with `createAnimation(theme)`. Each is a
|
|
4
|
+
generic example that depends on the published Vizmatic package.
|
|
5
|
+
|
|
6
|
+
- [`request-lifecycle.tsx`](request-lifecycle.tsx) is a short starter. It moves
|
|
7
|
+
one request through receive, process, and return stages.
|
|
8
|
+
- [`signal-to-story.tsx`](signal-to-story.tsx) is a longer example. It adds
|
|
9
|
+
observations to a chart, traces a fitted line, and holds the result on screen.
|
|
10
|
+
|
|
11
|
+
Use Node.js 20 or newer. In a project that contains the downloaded or copied
|
|
12
|
+
TSX file, install Vizmatic and React:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install --save-dev vizmatic@0.4.0 react
|
|
16
|
+
npx vizmatic video ./request-lifecycle.tsx --out ./dist/videos --theme dark --fps 30
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Install [FFmpeg](https://ffmpeg.org/download.html) separately and confirm it
|
|
20
|
+
includes the `libx264` encoder. To add a narration track, use
|
|
21
|
+
`--audio ./narration.wav`; the FFmpeg build must also include AAC. Vizmatic pads
|
|
22
|
+
or trims audio to the animation duration. Keep `.vtt` or `.srt` captions as
|
|
23
|
+
sidecar files and align their cues to the final timeline.
|
|
24
|
+
|
|
25
|
+
The CLI writes `request-lifecycle_dark.mp4` and `video-manifest.json` under the
|
|
26
|
+
output directory. Pass `--theme dark,light` to render both theme variants. Video
|
|
27
|
+
rendering runs in Node.js and requires an opaque background. Canvas width and
|
|
28
|
+
height after scaling must be even numbers.
|