@glissade/scene 0.55.0-pre.1 → 0.55.0-pre.2

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/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.55.0-pre.1";
26
+ const RAW_VERSION = "0.55.0-pre.2";
27
27
  const PACKAGE_VERSION = RAW_VERSION.includes("GLISSADE_".concat("VERSION")) ? "0.0.0-dev" : RAW_VERSION;
28
28
  /**
29
29
  * Parse the documented positional-arg count from a helper `usage` string — the
package/dist/motion.d.ts CHANGED
@@ -123,6 +123,9 @@ interface ShakeSpec {
123
123
  /** Noise cycles per second (higher = twitchier); default 8. */
124
124
  frequency?: number;
125
125
  }
126
+ /** The shake spec applied to `node` via {@link shake}, or undefined — the seam an
127
+ * exporter uses to emit an honest "shake is render-only" warn (never a silent drop). */
128
+ declare function shakenSpec(node: Node): ShakeSpec | undefined;
126
129
  /**
127
130
  * The pure per-time shake offset for a spec: `{ dx, dy }` px + `dr` degrees, each
128
131
  * a deterministic function of `(seed, t)`. Both the {@link shake} node driver and
@@ -213,4 +216,4 @@ declare class Camera extends Group {
213
216
  */
214
217
  declare function camera(layers: CameraLayer[], props?: CameraProps): Camera;
215
218
  //#endregion
216
- export { Camera, CameraError, type CameraLayer, type CameraProps, FollowPath, type FollowPathProps, LookAt, type LookAtProps, OrientToPath, type OrientToPathProps, type PathSampler, type ShakeSpec, camera, cameraLayerMatrix, followPath, lookAt, motionPath, orientToPath, pathLength, pointAtLength, shake, shakeOffset };
219
+ export { Camera, CameraError, type CameraLayer, type CameraProps, FollowPath, type FollowPathProps, LookAt, type LookAtProps, OrientToPath, type OrientToPathProps, type PathSampler, type ShakeSpec, camera, cameraLayerMatrix, followPath, lookAt, motionPath, orientToPath, pathLength, pointAtLength, shake, shakeOffset, shakenSpec };
package/dist/motion.js CHANGED
@@ -29,6 +29,19 @@ function snoise(seed, t) {
29
29
  return valueNoise(seed, t) * 2 - 1;
30
30
  }
31
31
  /**
32
+ * Render-INVISIBLE marker: which nodes a {@link shake} driver is applied to, and
33
+ * with what spec. The render path NEVER reads this (shake works purely by wrapping
34
+ * `emit`), so it is byte-neutral for goldens — it exists ONLY so an EXPORTER
35
+ * (which reads signals, not `emit`) can detect the render-only jitter and warn
36
+ * honestly instead of silently dropping it. A WeakMap keeps it off the Node type.
37
+ */
38
+ const SHAKEN = /* @__PURE__ */ new WeakMap();
39
+ /** The shake spec applied to `node` via {@link shake}, or undefined — the seam an
40
+ * exporter uses to emit an honest "shake is render-only" warn (never a silent drop). */
41
+ function shakenSpec(node) {
42
+ return SHAKEN.get(node);
43
+ }
44
+ /**
32
45
  * The pure per-time shake offset for a spec: `{ dx, dy }` px + `dr` degrees, each
33
46
  * a deterministic function of `(seed, t)`. Both the {@link shake} node driver and
34
47
  * the Camera whole-frame shake fold this in.
@@ -89,6 +102,7 @@ function shake(node, spec) {
89
102
  const tr = spec.translate ?? 0;
90
103
  const rot = spec.rotate ?? 0;
91
104
  if (tr === 0 && rot === 0) throw new Error("shake(): pass a nonzero `translate` (px) or `rotate` (deg) amplitude — both are 0/omitted, so nothing would move.");
105
+ SHAKEN.set(node, spec);
92
106
  const origEmit = node.emit.bind(node);
93
107
  node.emit = (out, ctx) => {
94
108
  const { dx, dy, dr } = shakeOffset(spec, ctx.time);
@@ -270,4 +284,4 @@ function camera(layers, props = {}) {
270
284
  return new Camera(layers, props);
271
285
  }
272
286
  //#endregion
273
- export { Camera, CameraError, FollowPath, LookAt, OrientToPath, camera, cameraLayerMatrix, followPath, lookAt, motionPath, orientToPath, pathLength, pointAtLength, shake, shakeOffset };
287
+ export { Camera, CameraError, FollowPath, LookAt, OrientToPath, camera, cameraLayerMatrix, followPath, lookAt, motionPath, orientToPath, pathLength, pointAtLength, shake, shakeOffset, shakenSpec };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissade/scene",
3
- "version": "0.55.0-pre.1",
3
+ "version": "0.55.0-pre.2",
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.55.0-pre.1"
80
+ "@glissade/core": "0.55.0-pre.2"
81
81
  },
82
82
  "repository": {
83
83
  "type": "git",