nodality 1.3.26 → 1.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/dist/animator.cjs.js +1 -1
- package/dist/animator.cjs.js.LICENSE.txt +1 -1
- package/dist/animator.esm.js +1 -1
- package/dist/animator.esm.js.LICENSE.txt +1 -1
- package/dist/audionew.cjs.js +1 -1
- package/dist/audionew.cjs.js.LICENSE.txt +1 -1
- package/dist/audionew.esm.js +1 -1
- package/dist/audionew.esm.js.LICENSE.txt +1 -1
- package/dist/base.cjs.js +1 -1
- package/dist/base.cjs.js.LICENSE.txt +1 -1
- package/dist/base.esm.js +1 -1
- package/dist/base.esm.js.LICENSE.txt +1 -1
- package/dist/beta-desktop-bar.cjs.js +1 -1
- package/dist/beta-desktop-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/beta-desktop-bar.esm.js +1 -1
- package/dist/beta-desktop-bar.esm.js.LICENSE.txt +1 -1
- package/dist/beta-mobile-bar.cjs.js +1 -1
- package/dist/beta-mobile-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/beta-mobile-bar.esm.js +1 -1
- package/dist/beta-mobile-bar.esm.js.LICENSE.txt +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/bundle.umd.js.LICENSE.txt +20 -1
- package/dist/button.cjs.js +1 -1
- package/dist/button.cjs.js.LICENSE.txt +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/button.esm.js.LICENSE.txt +1 -1
- package/dist/card-getter.cjs.js.LICENSE.txt +1 -1
- package/dist/card-getter.esm.js.LICENSE.txt +1 -1
- package/dist/center.cjs.js +1 -1
- package/dist/center.cjs.js.LICENSE.txt +1 -1
- package/dist/center.esm.js +1 -1
- package/dist/center.esm.js.LICENSE.txt +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
- package/dist/checkbox.esm.js +1 -1
- package/dist/checkbox.esm.js.LICENSE.txt +1 -1
- package/dist/code.cjs.js +1 -1
- package/dist/code.cjs.js.LICENSE.txt +1 -1
- package/dist/code.esm.js +1 -1
- package/dist/code.esm.js.LICENSE.txt +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.cjs.js.LICENSE.txt +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/container.esm.js.LICENSE.txt +1 -1
- package/dist/data-list.cjs.js +1 -1
- package/dist/data-list.cjs.js.LICENSE.txt +1 -1
- package/dist/data-list.esm.js.LICENSE.txt +1 -1
- package/dist/designer.cjs.js +1 -1
- package/dist/designer.cjs.js.LICENSE.txt +20 -1
- package/dist/designer.esm.js +1 -1
- package/dist/designer.esm.js.LICENSE.txt +20 -1
- package/dist/element-mapper.cjs.js +1 -1
- package/dist/element-mapper.cjs.js.LICENSE.txt +1 -1
- package/dist/element-mapper.esm.js +1 -1
- package/dist/element-mapper.esm.js.LICENSE.txt +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/finalresult.esm.js.LICENSE.txt +20 -1
- package/dist/flex-card.cjs.js +1 -1
- package/dist/flex-card.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-card.esm.js +1 -1
- package/dist/flex-card.esm.js.LICENSE.txt +1 -1
- package/dist/flex-grid.cjs.js +1 -1
- package/dist/flex-grid.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-grid.esm.js +1 -1
- package/dist/flex-grid.esm.js.LICENSE.txt +1 -1
- package/dist/flex-row.cjs.js +1 -1
- package/dist/flex-row.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-row.esm.js +1 -1
- package/dist/flex-row.esm.js.LICENSE.txt +1 -1
- package/dist/floating-input.cjs.js +1 -1
- package/dist/floating-input.cjs.js.LICENSE.txt +1 -1
- package/dist/floating-input.esm.js +1 -1
- package/dist/floating-input.esm.js.LICENSE.txt +1 -1
- package/dist/free.cjs.js +1 -1
- package/dist/free.cjs.js.LICENSE.txt +1 -1
- package/dist/free.esm.js +1 -1
- package/dist/free.esm.js.LICENSE.txt +1 -1
- package/dist/horizontal-scroller.cjs.js.LICENSE.txt +1 -1
- package/dist/horizontal-scroller.esm.js.LICENSE.txt +1 -1
- package/dist/image-picker.cjs.js +1 -1
- package/dist/image-picker.cjs.js.LICENSE.txt +1 -1
- package/dist/image-picker.esm.js +1 -1
- package/dist/image-picker.esm.js.LICENSE.txt +1 -1
- package/dist/image.cjs.js +1 -1
- package/dist/image.cjs.js.LICENSE.txt +1 -1
- package/dist/image.esm.js +1 -1
- package/dist/image.esm.js.LICENSE.txt +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.LICENSE.txt +20 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.LICENSE.txt +20 -1
- package/dist/keyframe-animation.cjs.js.LICENSE.txt +1 -1
- package/dist/keyframe-animation.esm.js.LICENSE.txt +1 -1
- package/dist/link-getter.cjs.js +1 -1
- package/dist/link-getter.cjs.js.LICENSE.txt +1 -1
- package/dist/link-getter.esm.js +1 -1
- package/dist/link-getter.esm.js.LICENSE.txt +1 -1
- package/dist/link.cjs.js +1 -1
- package/dist/link.cjs.js.LICENSE.txt +1 -1
- package/dist/link.esm.js +1 -1
- package/dist/link.esm.js.LICENSE.txt +1 -1
- package/dist/meta-adder.cjs.js +1 -1
- package/dist/meta-adder.cjs.js.LICENSE.txt +1 -1
- package/dist/meta-adder.esm.js +1 -1
- package/dist/meta-adder.esm.js.LICENSE.txt +1 -1
- package/dist/modal-2025.cjs.js +1 -1
- package/dist/modal-2025.cjs.js.LICENSE.txt +1 -1
- package/dist/modal-2025.esm.js +1 -1
- package/dist/modal-2025.esm.js.LICENSE.txt +1 -1
- package/dist/multiswitcher.cjs.js +1 -1
- package/dist/multiswitcher.cjs.js.LICENSE.txt +1 -1
- package/dist/multiswitcher.esm.js +1 -1
- package/dist/multiswitcher.esm.js.LICENSE.txt +1 -1
- package/dist/new-nav-bar.cjs.js +1 -1
- package/dist/new-nav-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/new-nav-bar.esm.js +1 -1
- package/dist/new-nav-bar.esm.js.LICENSE.txt +1 -1
- package/dist/picker.cjs.js +1 -1
- package/dist/picker.cjs.js.LICENSE.txt +1 -1
- package/dist/picker.esm.js +1 -1
- package/dist/picker.esm.js.LICENSE.txt +1 -1
- package/dist/progress.cjs.js +1 -1
- package/dist/progress.cjs.js.LICENSE.txt +1 -1
- package/dist/progress.esm.js +1 -1
- package/dist/progress.esm.js.LICENSE.txt +1 -1
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.cjs.js.LICENSE.txt +1 -1
- package/dist/radio.esm.js.LICENSE.txt +1 -1
- package/dist/range.cjs.js +1 -1
- package/dist/range.cjs.js.LICENSE.txt +1 -1
- package/dist/range.esm.js.LICENSE.txt +1 -1
- package/dist/scroll-video.cjs.js.LICENSE.txt +1 -1
- package/dist/scroll-video.esm.js.LICENSE.txt +1 -1
- package/dist/side-bar.cjs.js +1 -1
- package/dist/side-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/side-bar.esm.js +1 -1
- package/dist/side-bar.esm.js.LICENSE.txt +1 -1
- package/dist/side-nav-bar.cjs.js +1 -1
- package/dist/side-nav-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/side-nav-bar.esm.js +1 -1
- package/dist/side-nav-bar.esm.js.LICENSE.txt +1 -1
- package/dist/simple-bar.cjs.js +1 -1
- package/dist/simple-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/simple-bar.esm.js +1 -1
- package/dist/simple-bar.esm.js.LICENSE.txt +1 -1
- package/dist/slider-2025.cjs.js +1 -1
- package/dist/slider-2025.cjs.js.LICENSE.txt +1 -1
- package/dist/slider-2025.esm.js +1 -1
- package/dist/slider-2025.esm.js.LICENSE.txt +1 -1
- package/dist/spacer.cjs.js +1 -1
- package/dist/spacer.cjs.js.LICENSE.txt +1 -1
- package/dist/spacer.esm.js +1 -1
- package/dist/spacer.esm.js.LICENSE.txt +1 -1
- package/dist/stack.cjs.js +1 -1
- package/dist/stack.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.esm.js +1 -1
- package/dist/stack.esm.js.LICENSE.txt +1 -1
- package/dist/stacker.cjs.js.LICENSE.txt +1 -1
- package/dist/stacker.esm.js.LICENSE.txt +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.cjs.js.LICENSE.txt +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/table.esm.js.LICENSE.txt +1 -1
- package/dist/text-field.cjs.js +1 -1
- package/dist/text-field.cjs.js.LICENSE.txt +1 -1
- package/dist/text-field.esm.js +1 -1
- package/dist/text-field.esm.js.LICENSE.txt +1 -1
- package/dist/text.cjs.js +1 -1
- package/dist/text.cjs.js.LICENSE.txt +1 -1
- package/dist/text.esm.js +1 -1
- package/dist/text.esm.js.LICENSE.txt +1 -1
- package/dist/theme.cjs.js.LICENSE.txt +1 -1
- package/dist/theme.esm.js.LICENSE.txt +1 -1
- package/dist/transform-anim.cjs.js.LICENSE.txt +1 -1
- package/dist/transform-anim.esm.js.LICENSE.txt +1 -1
- package/dist/ulist.cjs.js +1 -1
- package/dist/ulist.cjs.js.LICENSE.txt +1 -1
- package/dist/ulist.esm.js +1 -1
- package/dist/ulist.esm.js.LICENSE.txt +1 -1
- package/dist/video.cjs.js +1 -1
- package/dist/video.cjs.js.LICENSE.txt +1 -1
- package/dist/video.esm.js +1 -1
- package/dist/video.esm.js.LICENSE.txt +1 -1
- package/dist/wrap.cjs.js +1 -1
- package/dist/wrap.cjs.js.LICENSE.txt +1 -1
- package/dist/wrap.esm.js +1 -1
- package/dist/wrap.esm.js.LICENSE.txt +1 -1
- package/dist/zoom-card.cjs.js +1 -1
- package/dist/zoom-card.cjs.js.LICENSE.txt +1 -1
- package/dist/zoom-card.esm.js +1 -1
- package/dist/zoom-card.esm.js.LICENSE.txt +1 -1
- package/layout/animator.js +13 -4
- package/layout/audio.js +1 -1
- package/layout/audionew.js +1 -1
- package/layout/base.js +1 -1
- package/layout/beta-desktop-bar.js +1 -1
- package/layout/beta-mobile-bar.js +1 -1
- package/layout/button.js +1 -1
- package/layout/center.js +1 -1
- package/layout/checkbox.js +1 -1
- package/layout/circle.js +1 -1
- package/layout/code.js +1 -1
- package/layout/container.js +1 -1
- package/layout/dropdown-2025.js +1 -1
- package/layout/flex-card.js +1 -1
- package/layout/flex-grid.js +1 -1
- package/layout/flex-row.js +1 -1
- package/layout/form-components/custom.js +1 -1
- package/layout/form-components/data-list.js +1 -1
- package/layout/form-components/floating-input.js +1 -1
- package/layout/form-components/form-all.js +1 -1
- package/layout/form-components/form.js +1 -1
- package/layout/form-components/image-picker.js +1 -1
- package/layout/form-components/picker.js +1 -1
- package/layout/form-components/radio.js +1 -1
- package/layout/form-components/radiogroup.js +1 -1
- package/layout/form-components/range.js +1 -1
- package/layout/free.js +1 -1
- package/layout/grid-overlay.js +1 -1
- package/layout/grid-switcher.js +1 -1
- package/layout/grid.js +1 -1
- package/layout/horizontal-scroller.js +1 -1
- package/layout/image.js +1 -1
- package/layout/index.js +1 -1
- package/layout/link.js +1 -1
- package/layout/list.js +1 -1
- package/layout/meta-adder.js +1 -1
- package/layout/modal-2025.js +1 -1
- package/layout/morph.js +1 -1
- package/layout/multiswitcher.js +1 -1
- package/layout/nav-bar.js +1 -1
- package/layout/nav-factor/custom-div.js +1 -1
- package/layout/new-nav-bar.js +1 -1
- package/layout/polygon.js +1 -1
- package/layout/prerender-site.js +1 -1
- package/layout/prerender.js +1 -1
- package/layout/progress.js +1 -1
- package/layout/row.js +1 -1
- package/layout/scroll-video.js +1 -1
- package/layout/shop.js +1 -1
- package/layout/side-bar.js +1 -1
- package/layout/side-nav-bar.js +1 -1
- package/layout/simple-bar.js +1 -1
- package/layout/slider-2025.js +1 -1
- package/layout/spacer.js +1 -1
- package/layout/stack.js +1 -1
- package/layout/svg.js +1 -1
- package/layout/switcher.js +1 -1
- package/layout/table.js +1 -1
- package/layout/text-field.js +1 -1
- package/layout/text.js +1 -1
- package/layout/ulist.js +1 -1
- package/layout/video.js +1 -1
- package/layout/wrap.js +1 -1
- package/layout/zoom-card.js +1 -1
- package/lib/agent-surface.js +1 -1
- package/lib/card-getter.js +1 -1
- package/lib/check-page.js +1 -1
- package/lib/codegen.js +1 -1
- package/lib/data.js +1 -1
- package/lib/designer.js +14 -1
- package/lib/element-mapper.js +1 -1
- package/lib/element-params.generated.js +1 -1
- package/lib/grid-geometry.js +1 -1
- package/lib/keyframe-animation.js +1 -1
- package/lib/known-inert.js +1 -1
- package/lib/link-getter.js +1 -1
- package/lib/morph-node.js +39 -7
- package/lib/normalize-spec.js +1 -1
- package/lib/parse-html.js +1 -1
- package/lib/raster-inspect.js +1 -1
- package/lib/raster-ops.js +255 -34
- package/lib/raster-presets.js +32 -1
- package/lib/react.js +1 -1
- package/lib/resolve-refs.js +1 -1
- package/lib/responsive.js +647 -0
- package/lib/scroll-video.js +1 -1
- package/lib/seo.js +1 -1
- package/lib/stacker.js +1 -1
- package/lib/suggest.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/transform-anim.js +1 -1
- package/lib/transition.js +1 -1
- package/lib/validate-nodes.js +27 -2
- package/lib/view-transition.js +287 -0
- package/lib/webmcp-adapter.js +1 -1
- package/package.json +3 -1
- package/skills/nodality/SKILL.md +9 -0
package/lib/raster-ops.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.
|
|
2
|
+
* nodality v1.4.0
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -29,10 +29,14 @@
|
|
|
29
29
|
// October 2026, long after embedding shipped.)
|
|
30
30
|
// live (the DEFAULT where it applies; opt OUT with `live: false` on any
|
|
31
31
|
// node) — the emerging HTML-in-Canvas API (WICG, Chrome origin trial):
|
|
32
|
-
// the mount subtree moves inside the effect
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
32
|
+
// the mount subtree moves inside the effect canvas and is uploaded per
|
|
33
|
+
// frame, staying interactive and live. Two generations of the API are
|
|
34
|
+
// spoken (see htmlInCanvasGeneration): Chrome 155+ opts in with
|
|
35
|
+
// <canvas content="drawable"> and uploads with gl.texElementSubImage2D()
|
|
36
|
+
// into storage allocated here; the trial before it opted in with
|
|
37
|
+
// <canvas layoutsubtree> and uploaded with gl.texElementImage2D().
|
|
38
|
+
// Falls back to snapshot when the API is absent, and again if no paint
|
|
39
|
+
// event arrives within 1500ms.
|
|
36
40
|
//
|
|
37
41
|
// "Where it applies" = any chain that is not PURE overlay. A
|
|
38
42
|
// pure-overlay chain (blobs alone) restructures nothing, so there is
|
|
@@ -698,6 +702,101 @@ ${NB.map(([x, y]) => probe(x, y)).join("")}
|
|
|
698
702
|
}),
|
|
699
703
|
},
|
|
700
704
|
|
|
705
|
+
// Particle scatter. The image breaks into one particle per cell; each
|
|
706
|
+
// shrinks to a dot, is carried off on its own heading and comes back.
|
|
707
|
+
// Built for transitions — `t-particles` keyframes it to be absent at
|
|
708
|
+
// both ends — where the gaps between particles are transparent, so the
|
|
709
|
+
// two captures read as one cloud of dots changing shape while the
|
|
710
|
+
// morph's boxes carry it from the old rect to the new.
|
|
711
|
+
//
|
|
712
|
+
// { op: "particles", size: 5, amount: [0, 1, 0] } // in a transition
|
|
713
|
+
//
|
|
714
|
+
// A gather, not a scatter. The pipeline only runs per-pixel programs,
|
|
715
|
+
// so each output pixel searches the cells a particle could have come
|
|
716
|
+
// from and keeps the topmost one that covers it. That search is what
|
|
717
|
+
// bounds the travel — a particle moves at most reach - 1 cells — and
|
|
718
|
+
// why `reach` is compiled in: a GLSL loop bound must be a constant,
|
|
719
|
+
// and it is also the cost, (2·reach + 1)² cells per pixel.
|
|
720
|
+
particles: {
|
|
721
|
+
doc: {
|
|
722
|
+
summary: "Breaks the image into one particle per cell, which shrinks to a dot "
|
|
723
|
+
+ "and scatters on its own heading. Built for transitions (t-particles), "
|
|
724
|
+
+ "where the gaps are transparent; elsewhere they show the image unmoved.",
|
|
725
|
+
params: {
|
|
726
|
+
size: { default: 6, unit: "px", summary: "particle size: one particle per cell this big" },
|
|
727
|
+
amount: { default: 1, unit: "ratio", summary: "0 is the intact image, 1 fully scattered" },
|
|
728
|
+
reach: {
|
|
729
|
+
default: 4, unit: "count", structural: true,
|
|
730
|
+
summary: "travel limit: a particle moves at most reach - 1 cells. Compiled in, "
|
|
731
|
+
+ "and the cost: each pixel searches (2·reach + 1)² cells.",
|
|
732
|
+
},
|
|
733
|
+
seed: { default: 0, unit: "count", summary: "picks a different scatter of the same character" },
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
structural: ["reach"],
|
|
737
|
+
stage: "displace",
|
|
738
|
+
decl: (p) => `
|
|
739
|
+
uniform float ${p}size;
|
|
740
|
+
uniform float ${p}amount;
|
|
741
|
+
uniform float ${p}seed;
|
|
742
|
+
// Polynomial hash, as in flow: trig hashes band on Apple
|
|
743
|
+
// silicon and differ between GPU vendors.
|
|
744
|
+
float ${p}h(vec2 v) {
|
|
745
|
+
vec3 q = fract(vec3(v.xyx) * 0.1031 + ${p}seed * 0.1);
|
|
746
|
+
q += dot(q, q.yzx + 33.33);
|
|
747
|
+
return fract((q.x + q.y) * q.z);
|
|
748
|
+
}`,
|
|
749
|
+
code: (p, node) => {
|
|
750
|
+
const R = Math.max(1, Math.min(6, Math.round(node.reach != null ? node.reach : 4)));
|
|
751
|
+
return `
|
|
752
|
+
{
|
|
753
|
+
float sz = max(${p}size, 1.0);
|
|
754
|
+
float a = clamp(${p}amount, 0.0, 1.0);
|
|
755
|
+
if (a > 0.0) {
|
|
756
|
+
vec2 x = sampleP;
|
|
757
|
+
vec2 q = floor(x / sz);
|
|
758
|
+
// Square and full-size at rest, so at a = 0 the cells tile
|
|
759
|
+
// the image exactly; round and at 45% in full flight.
|
|
760
|
+
float h = sz * 0.5 * (1.0 - 0.55 * a);
|
|
761
|
+
float travel = ${R - 1}.0 * sz * a;
|
|
762
|
+
float best = -1.0;
|
|
763
|
+
vec2 hit = vec2(-1.0e5);
|
|
764
|
+
for (int j = -${R}; j <= ${R}; j++) {
|
|
765
|
+
for (int i = -${R}; i <= ${R}; i++) {
|
|
766
|
+
vec2 c = q + vec2(float(i), float(j));
|
|
767
|
+
vec2 dir = vec2(${p}h(c), ${p}h(c + vec2(57.3, 11.9))) * 2.0 - 1.0;
|
|
768
|
+
// How far this one goes, and how high it stacks.
|
|
769
|
+
float k = ${p}h(c + vec2(31.7, 83.1));
|
|
770
|
+
vec2 home = (c + 0.5) * sz;
|
|
771
|
+
vec2 d = x - (home + dir * travel * (0.35 + 0.65 * k));
|
|
772
|
+
float dist = mix(max(abs(d.x), abs(d.y)), length(d), a);
|
|
773
|
+
if (dist <= h && k > best) {
|
|
774
|
+
best = k;
|
|
775
|
+
// The particle carries its own cell, shrunk.
|
|
776
|
+
hit = home + d * (0.5 * sz / h);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
#ifdef NOD_TRANSITION
|
|
781
|
+
// A gap lands outside both boxes, which is transparent.
|
|
782
|
+
sampleP = hit;
|
|
783
|
+
#else
|
|
784
|
+
// No backdrop outside a transition: a gap would clamp to an
|
|
785
|
+
// edge texel, so it shows the image unmoved instead.
|
|
786
|
+
if (best >= 0.0) sampleP = hit;
|
|
787
|
+
#endif
|
|
788
|
+
}
|
|
789
|
+
}`;
|
|
790
|
+
},
|
|
791
|
+
uniforms: (node, dpr) => ({
|
|
792
|
+
// A length, so dpr-scaled.
|
|
793
|
+
size: ["1f", (node.size != null ? node.size : 6) * dpr],
|
|
794
|
+
amount: ["1f", node.amount != null ? node.amount : 1],
|
|
795
|
+
// Selects a scatter; not a length.
|
|
796
|
+
seed: ["1f", node.seed != null ? node.seed : 0],
|
|
797
|
+
}),
|
|
798
|
+
},
|
|
799
|
+
|
|
701
800
|
// ── Field producers ──────────────────────────────────────────────
|
|
702
801
|
// These draw nothing. They write a scalar field that LATER ops read
|
|
703
802
|
// via `masked:`, which is the whole of the node-to-node data flow:
|
|
@@ -2031,9 +2130,43 @@ function registerRasterOp(name, def) {
|
|
|
2031
2130
|
return def;
|
|
2032
2131
|
}
|
|
2033
2132
|
|
|
2133
|
+
// Which generation of the HTML-in-Canvas WebGL upload `target` (a context
|
|
2134
|
+
// or a context prototype) speaks:
|
|
2135
|
+
// "sub-image" — Chrome 155+: texElementSubImage2D() into texture storage
|
|
2136
|
+
// the caller allocates; the canvas opts in with
|
|
2137
|
+
// content="drawable" and the uploaded element carries
|
|
2138
|
+
// `drawable`.
|
|
2139
|
+
// "image" — the origin trial before that: texElementImage2D(), which
|
|
2140
|
+
// allocates by itself; the canvas opts in with layoutsubtree.
|
|
2141
|
+
// null — neither.
|
|
2142
|
+
// Chrome 156 exposes BOTH methods, so the newer one is checked first.
|
|
2143
|
+
// Testing for the old name alone kept working only because Chrome left it
|
|
2144
|
+
// in place after the rename; the day it goes, that test reads "no API" and
|
|
2145
|
+
// every live pipeline quietly becomes a snapshot.
|
|
2146
|
+
function htmlInCanvasGeneration(target) {
|
|
2147
|
+
if (!target) return null;
|
|
2148
|
+
if ("texElementSubImage2D" in target) return "sub-image";
|
|
2149
|
+
if ("texElementImage2D" in target) return "image";
|
|
2150
|
+
return null;
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
// The canvas opt-in for each generation. It must be present before the
|
|
2154
|
+
// context is created, so the browser prepares the canvas for laid-out
|
|
2155
|
+
// children.
|
|
2156
|
+
function setLiveOptIn(canvas, generation) {
|
|
2157
|
+
if (generation === "sub-image") canvas.setAttribute("content", "drawable");
|
|
2158
|
+
else canvas.setAttribute("layoutsubtree", "");
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
function clearLiveOptIn(canvas) {
|
|
2162
|
+
canvas.removeAttribute("content");
|
|
2163
|
+
canvas.removeAttribute("layoutsubtree");
|
|
2164
|
+
canvas.removeAttribute("data-nodality-raster-api");
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2034
2167
|
function isHTMLInCanvasAvailable() {
|
|
2035
2168
|
if (typeof WebGLRenderingContext === "undefined") return false;
|
|
2036
|
-
return
|
|
2169
|
+
return htmlInCanvasGeneration(WebGLRenderingContext.prototype) !== null;
|
|
2037
2170
|
}
|
|
2038
2171
|
|
|
2039
2172
|
// ── Shader assembly ──────────────────────────────────────────────────
|
|
@@ -2250,6 +2383,23 @@ function buildFragmentShader(recs, flat, probe, transition) {
|
|
|
2250
2383
|
// "opaque" (default) keeps the union solid; "dissolve" is a true
|
|
2251
2384
|
// cross-dissolve. See nodBlend.
|
|
2252
2385
|
const fade = (transition && transition.fade) || "opaque";
|
|
2386
|
+
// Optional transition shaping, both compiled in (they are fixed for
|
|
2387
|
+
// the life of a transition):
|
|
2388
|
+
// fit: "width" each capture keeps its own aspect ratio — drawn
|
|
2389
|
+
// at its box's width, top-aligned, clipped to the
|
|
2390
|
+
// box — instead of being stretched to fill it. A
|
|
2391
|
+
// small element growing into a large one otherwise
|
|
2392
|
+
// smears its text across the whole new shape. Same
|
|
2393
|
+
// sizing the platform gives ::view-transition-old/new.
|
|
2394
|
+
// crossfade: [a,b] the old-to-new handover happens inside that slice
|
|
2395
|
+
// of t, while the boxes still travel the whole way.
|
|
2396
|
+
// The container-transform pattern: the old content
|
|
2397
|
+
// goes early, before it has been blown up.
|
|
2398
|
+
const glf = (v) => { const x = Number(v); return (Number.isFinite(x) ? x : 0).toFixed(5); };
|
|
2399
|
+
const aspectOf = (r) => (r && r.w > 0 && r.h > 0 ? r.h / r.w : 0);
|
|
2400
|
+
const fitWidth = !!(transition && transition.fit === "width");
|
|
2401
|
+
const xf = transition && Array.isArray(transition.crossfade) &&
|
|
2402
|
+
transition.crossfade.length === 2 ? transition.crossfade : null;
|
|
2253
2403
|
let decls = "";
|
|
2254
2404
|
|
|
2255
2405
|
// Every field any node writes or reads, declared up front at 1.0 so
|
|
@@ -2384,9 +2534,13 @@ ${b.color}
|
|
|
2384
2534
|
gl_FragColor = vec4(hi.x, lo.x, hi.y, lo.y) / 255.0;
|
|
2385
2535
|
}`;
|
|
2386
2536
|
|
|
2537
|
+
// NOD_TRANSITION lets an op's GLSL tell the two modes apart. Only a
|
|
2538
|
+
// transition has a backdrop: a sample outside both captures' boxes is
|
|
2539
|
+
// transparent there, while the single-image path clamps it to the
|
|
2540
|
+
// nearest edge texel.
|
|
2387
2541
|
return `
|
|
2388
2542
|
precision highp float;
|
|
2389
|
-
uniform sampler2D u_tex;
|
|
2543
|
+
${transition ? "#define NOD_TRANSITION 1\n" : ""}uniform sampler2D u_tex;
|
|
2390
2544
|
uniform vec2 u_res;
|
|
2391
2545
|
uniform vec2 u_mouse;
|
|
2392
2546
|
uniform float u_time;
|
|
@@ -2475,9 +2629,15 @@ vec2 nodBoxUV(vec4 box, vec2 p) {
|
|
|
2475
2629
|
float nodInBox(vec2 uv) {
|
|
2476
2630
|
return step(0.0, uv.x) * step(uv.x, 1.0) * step(0.0, uv.y) * step(uv.y, 1.0);
|
|
2477
2631
|
}
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
vec2
|
|
2632
|
+
${fitWidth ? `// fit: "width" — the capture's own height at this box width.
|
|
2633
|
+
vec2 nodFitUV(vec4 box, vec2 p, float aspect) {
|
|
2634
|
+
return vec2((p.x - box.x) / max(box.z, 1.0),
|
|
2635
|
+
1.0 - (p.y - box.y) / max(box.z * aspect, 1.0));
|
|
2636
|
+
}
|
|
2637
|
+
` : ""}vec4 nodSampleAt(vec2 p) {
|
|
2638
|
+
${fitWidth ? ` vec2 uo = nodFitUV(u_boxOld, p, ${glf(aspectOf(transition.oldRect))});
|
|
2639
|
+
vec2 un = nodFitUV(u_boxNew, p, ${glf(aspectOf(transition.newRect))});` : ` vec2 uo = nodBoxUV(u_boxOld, p);
|
|
2640
|
+
vec2 un = nodBoxUV(u_boxNew, p);`}
|
|
2481
2641
|
vec4 o = texture2D(u_old, clamp(uo, 0.001, 0.999));
|
|
2482
2642
|
// With newImage the new side is a capture of the ELEMENT, so both
|
|
2483
2643
|
// sides can travel between their own rects and converge into one
|
|
@@ -2489,7 +2649,11 @@ vec4 nodSampleAt(vec2 p) {
|
|
|
2489
2649
|
clamp(un, 0.001, 0.999));
|
|
2490
2650
|
o.a *= nodInBox(uo);
|
|
2491
2651
|
n.a *= nodInBox(un);
|
|
2492
|
-
${
|
|
2652
|
+
${fitWidth ? ` // Clipped to the travelling box as well, so a tall capture in a
|
|
2653
|
+
// short box shows its top rather than spilling below it.
|
|
2654
|
+
o.a *= nodInBox(nodBoxUV(u_boxOld, p));
|
|
2655
|
+
n.a *= nodInBox(nodBoxUV(u_boxNew, p));
|
|
2656
|
+
` : ""}${oldSideCode}${newSideCode}
|
|
2493
2657
|
// The threshold each pixel flips at. Mostly a COHERENT ramp down the
|
|
2494
2658
|
// box with a little grain on top — pure white noise chooses correctly
|
|
2495
2659
|
// (never two legible images at once) but reads as television static
|
|
@@ -2498,7 +2662,7 @@ ${oldSideCode}${newSideCode}
|
|
|
2498
2662
|
float grain = fract(sin(dot(floor(p / 3.0), vec2(12.9898, 78.233))) * 43758.5453);
|
|
2499
2663
|
float ramp = clamp(un.y, 0.0, 1.0);
|
|
2500
2664
|
float d = ramp * 0.82 + grain * 0.18;
|
|
2501
|
-
return nodBlend(o, n, u_t, d);
|
|
2665
|
+
return nodBlend(o, n, ${xf ? `smoothstep(${glf(xf[0])}, ${glf(xf[1])}, u_t)` : "u_t"}, d);
|
|
2502
2666
|
}` : ""}
|
|
2503
2667
|
void main() {
|
|
2504
2668
|
vec2 fc = ${fragCoord};
|
|
@@ -3301,7 +3465,7 @@ function applyRasterPipeline(el, rasterNodes, opts) {
|
|
|
3301
3465
|
const pureOverlay = rasterNodes.length > 0 && !transition &&
|
|
3302
3466
|
rasterNodes.every((n) => (REGISTRY[n.op] || {}).overlay);
|
|
3303
3467
|
// Live-first (HTML-in-Canvas). The live backend captures content that
|
|
3304
|
-
// lives INSIDE the canvas (
|
|
3468
|
+
// lives INSIDE the canvas (the live upload over the restructured
|
|
3305
3469
|
// subtree) — the same model canvasUI's bubble uses: content in the
|
|
3306
3470
|
// canvas, the lens drawn over that live capture. So live is viable
|
|
3307
3471
|
// whenever the host is hidden and its content moves into the canvas,
|
|
@@ -3333,33 +3497,36 @@ function applyRasterPipeline(el, rasterNodes, opts) {
|
|
|
3333
3497
|
const forceLive = !!(transition && transition.live === true);
|
|
3334
3498
|
const wantLive = !pureOverlay && (!transition || forceLive) &&
|
|
3335
3499
|
!rasterNodes.some((n) => n.live === false);
|
|
3336
|
-
const
|
|
3337
|
-
(typeof WebGL2RenderingContext !== "undefined" &&
|
|
3338
|
-
|
|
3339
|
-
(typeof WebGLRenderingContext !== "undefined" &&
|
|
3340
|
-
|
|
3341
|
-
let live = wantLive &&
|
|
3500
|
+
const apiGeneration =
|
|
3501
|
+
htmlInCanvasGeneration(typeof WebGL2RenderingContext !== "undefined" &&
|
|
3502
|
+
WebGL2RenderingContext.prototype) ||
|
|
3503
|
+
htmlInCanvasGeneration(typeof WebGLRenderingContext !== "undefined" &&
|
|
3504
|
+
WebGLRenderingContext.prototype);
|
|
3505
|
+
let live = wantLive && apiGeneration !== null;
|
|
3342
3506
|
if (wantLive && !live) {
|
|
3343
3507
|
console.info("[nodality] HTML-in-Canvas API not available - raster ops fall back to snapshot capture.");
|
|
3344
3508
|
}
|
|
3345
3509
|
|
|
3346
3510
|
const canvas = document.createElement("canvas");
|
|
3347
|
-
|
|
3348
|
-
// browser prepares the canvas for laid-out children (origin trial).
|
|
3349
|
-
if (live) canvas.setAttribute("layoutsubtree", "");
|
|
3511
|
+
if (live) setLiveOptIn(canvas, apiGeneration);
|
|
3350
3512
|
const ctxOpts = { alpha: true, premultipliedAlpha: false };
|
|
3351
3513
|
// WebGL2-first everywhere: NPOT mipmaps (offset-scaled blur for the
|
|
3352
|
-
// glassy ops) and
|
|
3353
|
-
// a sharp-rendering fallback (mip blur simply
|
|
3514
|
+
// glassy ops) and the live upload's sized RGBA8 format both need it;
|
|
3515
|
+
// WebGL1 remains as a sharp-rendering fallback (mip blur simply
|
|
3516
|
+
// disables).
|
|
3354
3517
|
const gl = canvas.getContext("webgl2", ctxOpts) ||
|
|
3355
3518
|
canvas.getContext("webgl", ctxOpts);
|
|
3356
3519
|
if (!gl) return null;
|
|
3357
3520
|
const isGL2 = (typeof WebGL2RenderingContext !== "undefined") &&
|
|
3358
3521
|
(gl instanceof WebGL2RenderingContext);
|
|
3359
3522
|
const needMips = isGL2 && rasterNodes.some((n) => (REGISTRY[n.op] || {}).mips);
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3523
|
+
// The generation that counts is the one on the context actually
|
|
3524
|
+
// created. It has to match the opt-in already set from the prototype.
|
|
3525
|
+
const liveGeneration = live ? htmlInCanvasGeneration(gl) : null;
|
|
3526
|
+
if (live && liveGeneration !== apiGeneration) {
|
|
3527
|
+
console.info("[nodality] HTML-in-Canvas upload missing on the created context (" +
|
|
3528
|
+
liveGeneration + " vs " + apiGeneration + ") - snapshot fallback.");
|
|
3529
|
+
clearLiveOptIn(canvas);
|
|
3363
3530
|
live = false;
|
|
3364
3531
|
}
|
|
3365
3532
|
|
|
@@ -3371,7 +3538,11 @@ function applyRasterPipeline(el, rasterNodes, opts) {
|
|
|
3371
3538
|
canvas.width = Math.round(rect.width * dpr);
|
|
3372
3539
|
canvas.height = Math.round(rect.height * dpr);
|
|
3373
3540
|
canvas.setAttribute("data-nodality-raster", live ? "live" : "snapshot");
|
|
3374
|
-
|
|
3541
|
+
// Which upload generation a live canvas runs on, so a test or an
|
|
3542
|
+
// inspector can tell the two apart; Chrome 156 can run either.
|
|
3543
|
+
if (live) canvas.setAttribute("data-nodality-raster-api", liveGeneration);
|
|
3544
|
+
console.info("[nodality] raster backend:",
|
|
3545
|
+
live ? "html-in-canvas (live, " + liveGeneration + ")" : "snapshot");
|
|
3375
3546
|
|
|
3376
3547
|
// In live mode the canvas fills the host's CONTENT box, not its border
|
|
3377
3548
|
// box (it is a child of the host). Filled in below when live attaches.
|
|
@@ -3379,15 +3550,15 @@ function applyRasterPipeline(el, rasterNodes, opts) {
|
|
|
3379
3550
|
let sourceEl = el; // element uploaded as the texture in live mode
|
|
3380
3551
|
if (live) {
|
|
3381
3552
|
// HTML-in-Canvas: the subtree becomes canvas children (wrapped in
|
|
3382
|
-
// a single div we can pass to
|
|
3553
|
+
// a single div we can pass to the live upload) so it keeps
|
|
3383
3554
|
// layout, interactivity and its accessibility-tree presence while
|
|
3384
3555
|
// the canvas paints it (WICG proposal; Chrome origin trial behind
|
|
3385
|
-
// chrome://flags/#canvas-draw-element).
|
|
3386
|
-
// set before context creation above.
|
|
3556
|
+
// chrome://flags/#canvas-draw-element). The canvas opt-in was
|
|
3557
|
+
// already set before context creation above.
|
|
3387
3558
|
const wrap = document.createElement("div");
|
|
3388
3559
|
// The wrapper MUST fill the canvas box. Left to itself it
|
|
3389
3560
|
// shrink-wraps its content — a headline wraps to the text width,
|
|
3390
|
-
// not the element width — and
|
|
3561
|
+
// not the element width — and the live upload then captures
|
|
3391
3562
|
// that narrower box while the shader maps the texture across the
|
|
3392
3563
|
// whole canvas. Everything comes out stretched horizontally by
|
|
3393
3564
|
// canvasWidth/contentWidth, so the drawn glyphs no longer sit
|
|
@@ -3446,6 +3617,8 @@ function applyRasterPipeline(el, rasterNodes, opts) {
|
|
|
3446
3617
|
wrap.style.justifyContent = hostCS.justifyContent;
|
|
3447
3618
|
wrap.style.gap = hostCS.gap;
|
|
3448
3619
|
}
|
|
3620
|
+
// Chrome 155+ draws only canvas descendants marked `drawable`.
|
|
3621
|
+
if (liveGeneration === "sub-image") wrap.setAttribute("drawable", "");
|
|
3449
3622
|
while (el.firstChild) wrap.appendChild(el.firstChild);
|
|
3450
3623
|
canvas.appendChild(wrap);
|
|
3451
3624
|
sourceEl = wrap;
|
|
@@ -4043,6 +4216,39 @@ function applyRasterPipeline(el, rasterNodes, opts) {
|
|
|
4043
4216
|
// renders or redraws. Uploading outside of it yields an empty
|
|
4044
4217
|
// (fully transparent) texture — which looks like a blank box.
|
|
4045
4218
|
//
|
|
4219
|
+
// Chrome 155+ (`sub-image`) no longer allocates the destination: the
|
|
4220
|
+
// texture's storage has to exist before texElementSubImage2D writes
|
|
4221
|
+
// into it, sized to the element's image as captureElementImage()
|
|
4222
|
+
// reports it. That size follows the canvas box, so it is measured
|
|
4223
|
+
// again only when the backing store changes rather than on every
|
|
4224
|
+
// paint.
|
|
4225
|
+
//
|
|
4226
|
+
// updateElementGeometry() is deliberately NOT called. In this
|
|
4227
|
+
// generation it is what makes canvas descendants hit-testable, and the
|
|
4228
|
+
// pipeline already hit-tests the hosted subtree itself (see
|
|
4229
|
+
// hostedElementAt), retargeting each event to where the shader drew
|
|
4230
|
+
// the content. With native hit testing switched on as well, a
|
|
4231
|
+
// displaced click would reach the element under the cursor natively
|
|
4232
|
+
// AND the one under the drawn pixel through the retarget.
|
|
4233
|
+
let storageFor = "";
|
|
4234
|
+
const allocateSubImageStorage = () => {
|
|
4235
|
+
const key = canvas.width + "x" + canvas.height;
|
|
4236
|
+
if (key === storageFor) return;
|
|
4237
|
+
let w = canvas.width, h = canvas.height;
|
|
4238
|
+
if (typeof canvas.captureElementImage === "function") {
|
|
4239
|
+
const image = canvas.captureElementImage(sourceEl);
|
|
4240
|
+
try {
|
|
4241
|
+
w = Math.ceil(image.width);
|
|
4242
|
+
h = Math.ceil(image.height);
|
|
4243
|
+
} finally {
|
|
4244
|
+
if (image && typeof image.close === "function") image.close();
|
|
4245
|
+
}
|
|
4246
|
+
}
|
|
4247
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, isGL2 ? (gl.RGBA8 || 0x8058) : gl.RGBA,
|
|
4248
|
+
Math.max(1, w), Math.max(1, h), 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
|
|
4249
|
+
storageFor = key;
|
|
4250
|
+
};
|
|
4251
|
+
|
|
4046
4252
|
// The trial's texElementImage2D signature has drifted across Chrome
|
|
4047
4253
|
// builds (the element parameter has moved as the arg list shrank),
|
|
4048
4254
|
// so the working call form is discovered at runtime — guided by the
|
|
@@ -4051,6 +4257,21 @@ function applyRasterPipeline(el, rasterNodes, opts) {
|
|
|
4051
4257
|
const onPaint = () => {
|
|
4052
4258
|
if (destroyed || mode !== "live") return;
|
|
4053
4259
|
gl.bindTexture(gl.TEXTURE_2D, tex);
|
|
4260
|
+
if (liveGeneration === "sub-image") {
|
|
4261
|
+
try {
|
|
4262
|
+
allocateSubImageStorage();
|
|
4263
|
+
gl.texElementSubImage2D(gl.TEXTURE_2D, 0, 0, 0, sourceEl);
|
|
4264
|
+
} catch (e) {
|
|
4265
|
+
// Measured again next time, in case storage was the problem.
|
|
4266
|
+
storageFor = "";
|
|
4267
|
+
fallbackToSnapshot("texElementSubImage2D failed: " +
|
|
4268
|
+
(e && e.name ? e.name : "?") + ": " + (e && e.message ? e.message : e));
|
|
4269
|
+
return;
|
|
4270
|
+
}
|
|
4271
|
+
finishUpload();
|
|
4272
|
+
textureReady = true;
|
|
4273
|
+
return;
|
|
4274
|
+
}
|
|
4054
4275
|
// Confirmed signature in Chrome 148+ (origin trial):
|
|
4055
4276
|
// texElementImage2D(target, internalformat, element)
|
|
4056
4277
|
// where internalformat must be a *sized* WebGL2 format
|
|
@@ -4104,7 +4325,7 @@ function applyRasterPipeline(el, rasterNodes, opts) {
|
|
|
4104
4325
|
canvas.removeEventListener("paint", onPaint);
|
|
4105
4326
|
while (sourceEl.firstChild) el.appendChild(sourceEl.firstChild);
|
|
4106
4327
|
if (sourceEl.parentNode === canvas) canvas.removeChild(sourceEl);
|
|
4107
|
-
canvas
|
|
4328
|
+
clearLiveOptIn(canvas);
|
|
4108
4329
|
canvas.style.cssText =
|
|
4109
4330
|
"position:absolute;top:0;left:0;" +
|
|
4110
4331
|
`width:${rect.width}px;height:${rect.height}px;` +
|
|
@@ -5000,7 +5221,7 @@ function applyRasterPipeline(el, rasterNodes, opts) {
|
|
|
5000
5221
|
|
|
5001
5222
|
export {
|
|
5002
5223
|
applyRasterPipeline, registerRasterOp, RASTER_OP_NAMES,
|
|
5003
|
-
isHTMLInCanvasAvailable, DRIVER_NAMES, DRIVER_DOCS,
|
|
5224
|
+
isHTMLInCanvasAvailable, htmlInCanvasGeneration, DRIVER_NAMES, DRIVER_DOCS,
|
|
5004
5225
|
// Phase H3. The registry is already effectively public — registerRasterOp
|
|
5005
5226
|
// mutates it — and a dev tool needs to read an op's stage and params to
|
|
5006
5227
|
// show them. `isStructuralChange` is exported so the inspector can label
|
package/lib/raster-presets.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.
|
|
2
|
+
* nodality v1.4.0
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -93,6 +93,37 @@ const PRESETS = {
|
|
|
93
93
|
],
|
|
94
94
|
},
|
|
95
95
|
|
|
96
|
+
// Particles travel a few cells at most (the op gathers rather than
|
|
97
|
+
// scatters). The long journey from the old rect to the new one is the
|
|
98
|
+
// morph's geometry; what this adds is the shape coming apart into
|
|
99
|
+
// dots on the way and re-forming as the other one.
|
|
100
|
+
// A current through the morph: both stills are carried along a
|
|
101
|
+
// divergence-free flow that rises and settles, so the shape seems to
|
|
102
|
+
// pour into its new box. flow needs no solver and no float targets, so
|
|
103
|
+
// it runs wherever the transition runs. `speed` keeps the field moving
|
|
104
|
+
// during the morph; at both ends strength is 0 and it does nothing.
|
|
105
|
+
"t-fluid": {
|
|
106
|
+
summary: "Liquid morph: the old state is carried on a current and pours " +
|
|
107
|
+
"into the new one, calm at both ends.",
|
|
108
|
+
nodes: [
|
|
109
|
+
{ op: "flow", strength: [0, 46, 0], scale: 130, speed: 0.8, ease: "in-out" },
|
|
110
|
+
{ op: "aberration", amount: [0, 4, 0], window: [0.2, 0.8] },
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
//
|
|
115
|
+
// Held at full scatter through the middle third: a single [0, 1, 0]
|
|
116
|
+
// peak is over in an instant at ordinary morph durations, and on pale
|
|
117
|
+
// content the dots barely register. reach 5 lets a 9px particle travel
|
|
118
|
+
// 36px, at (2·5 + 1)² = 121 cells searched per pixel.
|
|
119
|
+
"t-particles": {
|
|
120
|
+
summary: "Particle morph: the old state breaks into dots that scatter and " +
|
|
121
|
+
"re-form as the new one, with see-through gaps in between.",
|
|
122
|
+
nodes: [
|
|
123
|
+
{ op: "particles", size: 9, amount: [0, 1, 1, 0], reach: 5, ease: "in-out" },
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
|
|
96
127
|
// ── fluid ────────────────────────────────────────────────────────
|
|
97
128
|
// The two `stir` numbers are the PROVEN values from
|
|
98
129
|
// designerTest/raster-spot.html, not fresh guesses: radius 0.055 is
|
package/lib/react.js
CHANGED
package/lib/resolve-refs.js
CHANGED