@adobe/data-gpu 0.10.8 → 0.10.11

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.
Files changed (49) hide show
  1. package/dist/core/core-plugin.d.ts +1 -1
  2. package/dist/graphics/animation/animation-data-plugin.d.ts +4 -0
  3. package/dist/graphics/animation/animation-plugin.d.ts +6 -2
  4. package/dist/graphics/animation/animation-track/interpolate.d.ts +2 -1
  5. package/dist/graphics/animation/animation-track/interpolate.js +9 -3
  6. package/dist/graphics/animation/animation-track/interpolate.js.map +1 -1
  7. package/dist/graphics/animation/animation-track/interpolate.test.d.ts +1 -0
  8. package/dist/graphics/animation/animation-track/interpolate.test.js +23 -0
  9. package/dist/graphics/animation/animation-track/interpolate.test.js.map +1 -0
  10. package/dist/graphics/animation/animation-track/interpolator-registry.d.ts +8 -0
  11. package/dist/graphics/animation/animation-track/interpolator-registry.js +11 -0
  12. package/dist/graphics/animation/animation-track/interpolator-registry.js.map +1 -0
  13. package/dist/graphics/camera/camera-plugin.d.ts +1 -1
  14. package/dist/graphics/camera/orbit/orbit-data-plugin.d.ts +1 -1
  15. package/dist/graphics/camera/orbit/orbit-plugin.d.ts +1 -1
  16. package/dist/graphics/camera/orbit/orbit-system-plugin.d.ts +1 -1
  17. package/dist/graphics/graphics-plugin.d.ts +1 -1
  18. package/dist/graphics/picking/picking-plugin.d.ts +147 -24
  19. package/dist/graphics/rendering/bone-collider-plugin.d.ts +79 -21
  20. package/dist/graphics/rendering/display-transform-plugin.d.ts +1 -1
  21. package/dist/graphics/rendering/ibl-render/ibl-render-plugin.d.ts +47 -13
  22. package/dist/graphics/rendering/interpolation-plugin.d.ts +34 -15
  23. package/dist/graphics/rendering/jolt-ragdoll-plugin.d.ts +77 -20
  24. package/dist/graphics/rendering/material-palette-gpu/material-palette-gpu-plugin.d.ts +13 -7
  25. package/dist/graphics/rendering/model-collider-plugin.d.ts +60 -13
  26. package/dist/graphics/rendering/pbr-core-plugin.d.ts +3 -0
  27. package/dist/graphics/rendering/pbr-render/pbr-factor-render-plugin.d.ts +48 -14
  28. package/dist/graphics/rendering/pbr-render/physics-bridge-plugin.d.ts +24 -6
  29. package/dist/graphics/rendering/skinning/skinning-plugin.d.ts +51 -8
  30. package/dist/graphics/scene/model/mesh-plugin.d.ts +50 -10
  31. package/dist/graphics/scene/model/model-loader-plugin.d.ts +41 -7
  32. package/dist/graphics/scene/model/shape/shape-geometry-plugin.d.ts +8 -2
  33. package/dist/graphics/scene/model/world-bounds-plugin.d.ts +41 -7
  34. package/dist/graphics/scene/node/node-data-plugin.d.ts +2 -1
  35. package/dist/graphics/scene/node/node-plugin.d.ts +2 -1
  36. package/dist/graphics/scene/node/transform-plugin.d.ts +2 -1
  37. package/dist/graphics/scene/scene-plugin.d.ts +31 -11
  38. package/dist/graphics/scene/scene-uniforms/scene-uniforms-plugin.d.ts +1 -1
  39. package/dist/material/material-plugin.d.ts +6 -0
  40. package/dist/physics/joint/joint-plugin.d.ts +2 -0
  41. package/dist/physics/physics-clock-plugin.d.ts +1 -1
  42. package/dist/physics/physics-data-plugin.d.ts +24 -6
  43. package/dist/physics/solvers/jolt-solver-plugin.d.ts +27 -7
  44. package/dist/physics/solvers/rapier-solver-plugin.d.ts +27 -7
  45. package/package.json +2 -2
  46. package/src/graphics/animation/animation-track/interpolate.test.ts +27 -0
  47. package/src/graphics/animation/animation-track/interpolate.ts +9 -3
  48. package/src/graphics/animation/animation-track/interpolator-registry.ts +14 -0
  49. package/tsconfig.tsbuildinfo +1 -1
@@ -36,7 +36,7 @@ export declare const core: {
36
36
  };
37
37
  readonly archetypes: {};
38
38
  readonly transactions: {} & {};
39
- readonly systems: import("@adobe/data/ecs").SystemDeclarations<"update" | "_frameTime" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender">;
39
+ readonly systems: import("@adobe/data/ecs").SystemDeclarations<"_frameTime" | "update" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender">;
40
40
  readonly actions: {};
41
41
  readonly services: {};
42
42
  readonly computed: {};
@@ -11,6 +11,7 @@ declare const animationBase: {
11
11
  readonly default: number;
12
12
  };
13
13
  readonly animationClipRef: {
14
+ readonly entity: true;
14
15
  readonly type: "integer";
15
16
  readonly minimum: -2147483648;
16
17
  readonly maximum: 2147483647;
@@ -68,6 +69,7 @@ export declare const animationData: {
68
69
  readonly default: number;
69
70
  };
70
71
  readonly animationClipRef: {
72
+ readonly entity: true;
71
73
  readonly type: "integer";
72
74
  readonly minimum: -2147483648;
73
75
  readonly maximum: 2147483647;
@@ -117,6 +119,7 @@ export declare const animationData: {
117
119
  readonly default: number;
118
120
  };
119
121
  readonly animationClipRef: {
122
+ readonly entity: true;
120
123
  readonly type: "integer";
121
124
  readonly minimum: -2147483648;
122
125
  readonly maximum: 2147483647;
@@ -166,6 +169,7 @@ export declare const animationData: {
166
169
  readonly default: number;
167
170
  };
168
171
  readonly animationClipRef: {
172
+ readonly entity: true;
169
173
  readonly type: "integer";
170
174
  readonly minimum: -2147483648;
171
175
  readonly maximum: 2147483647;
@@ -17,6 +17,7 @@ export declare const animation: {
17
17
  readonly default: number;
18
18
  };
19
19
  readonly animationClipRef: {
20
+ readonly entity: true;
20
21
  readonly type: "integer";
21
22
  readonly minimum: -2147483648;
22
23
  readonly maximum: 2147483647;
@@ -49,12 +50,12 @@ export declare const animation: {
49
50
  readonly default: true;
50
51
  };
51
52
  };
52
- readonly resources: {} & {
53
+ readonly resources: {
53
54
  readonly frameTime: {
54
55
  readonly default: FrameTime;
55
56
  readonly nonPersistent: true;
56
57
  };
57
- };
58
+ } & {};
58
59
  readonly archetypes: {} & {
59
60
  readonly AnimationClip: readonly ["animationClipTracks", "animationClipDuration"];
60
61
  readonly Animation: readonly ["animationClipRef", "animationTargets", "animationTime", "animationSpeed", "animationLoop", "animationPlaying"];
@@ -71,6 +72,7 @@ export declare const animation: {
71
72
  readonly default: number;
72
73
  };
73
74
  readonly animationClipRef: {
75
+ readonly entity: true;
74
76
  readonly type: "integer";
75
77
  readonly minimum: -2147483648;
76
78
  readonly maximum: 2147483647;
@@ -120,6 +122,7 @@ export declare const animation: {
120
122
  readonly default: number;
121
123
  };
122
124
  readonly animationClipRef: {
125
+ readonly entity: true;
123
126
  readonly type: "integer";
124
127
  readonly minimum: -2147483648;
125
128
  readonly maximum: 2147483647;
@@ -174,6 +177,7 @@ export declare const animation: {
174
177
  readonly default: number;
175
178
  };
176
179
  readonly animationClipRef: {
180
+ readonly entity: true;
177
181
  readonly type: "integer";
178
182
  readonly minimum: -2147483648;
179
183
  readonly maximum: 2147483647;
@@ -3,6 +3,7 @@ import type { InterpolationMode } from "../interpolation-mode/interpolation-mode
3
3
  /**
4
4
  * Dispatches to a schema-declared interpolator if present, otherwise falls
5
5
  * back to a sensible default: `step` returns `next`, `linear` walks the schema
6
- * and lerps numeric leaves. `cubicSpline` requires a schema override.
6
+ * and lerps numeric leaves. `cubicSpline` requires a schema override. A schema
7
+ * names its interpolator (pure JSON); the name is resolved via the registry.
7
8
  */
8
9
  export declare function interpolate(schema: Schema, mode: InterpolationMode, prev: any, next: any, t: number): any;
@@ -1,14 +1,20 @@
1
1
  // © 2026 Adobe. MIT License. See /LICENSE for details.
2
2
  import { componentwiseLerp } from "./componentwise-lerp.js";
3
+ import { interpolatorRegistry } from "./interpolator-registry.js";
3
4
  /**
4
5
  * Dispatches to a schema-declared interpolator if present, otherwise falls
5
6
  * back to a sensible default: `step` returns `next`, `linear` walks the schema
6
- * and lerps numeric leaves. `cubicSpline` requires a schema override.
7
+ * and lerps numeric leaves. `cubicSpline` requires a schema override. A schema
8
+ * names its interpolator (pure JSON); the name is resolved via the registry.
7
9
  */
8
10
  export function interpolate(schema, mode, prev, next, t) {
9
- const custom = schema.interpolators?.[mode];
10
- if (custom)
11
+ const name = schema.interpolators?.[mode];
12
+ if (name !== undefined) {
13
+ const custom = interpolatorRegistry[name];
14
+ if (!custom)
15
+ throw new Error(`interpolate: unknown interpolator "${name}" for mode "${mode}"`);
11
16
  return custom(prev, next, t);
17
+ }
12
18
  if (mode === "step")
13
19
  return prev;
14
20
  if (mode === "linear")
@@ -1 +1 @@
1
- {"version":3,"file":"interpolate.js","sourceRoot":"","sources":["../../../../src/graphics/animation/animation-track/interpolate.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAIvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D;;;;GAIG;AACH,MAAM,UAAU,WAAW,CACvB,MAAc,EACd,IAAuB,EACvB,IAAS,EACT,IAAS,EACT,CAAS;IAET,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC;IAC5C,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACzC,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACjC,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,iBAAiB,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvE,MAAM,IAAI,KAAK,CAAC,6BAA6B,MAAM,CAAC,IAAI,aAAa,IAAI,gBAAgB,CAAC,CAAC;AAC/F,CAAC"}
1
+ {"version":3,"file":"interpolate.js","sourceRoot":"","sources":["../../../../src/graphics/animation/animation-track/interpolate.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAIvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACvB,MAAc,EACd,IAAuB,EACvB,IAAS,EACT,IAAS,EACT,CAAS;IAET,MAAM,IAAI,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,IAAI,eAAe,IAAI,GAAG,CAAC,CAAC;QAC/F,OAAO,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACjC,CAAC;IACD,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACjC,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,iBAAiB,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvE,MAAM,IAAI,KAAK,CAAC,6BAA6B,MAAM,CAAC,IAAI,aAAa,IAAI,gBAAgB,CAAC,CAAC;AAC/F,CAAC"}
@@ -0,0 +1,23 @@
1
+ // © 2026 Adobe. MIT License. See /LICENSE for details.
2
+ import { describe, it, expect } from "vitest";
3
+ import { Quat } from "@adobe/data/math";
4
+ import { interpolate } from "./interpolate.js";
5
+ describe("interpolate", () => {
6
+ it("resolves a schema's named interpolator via the registry (Quat linear ⇒ slerp)", () => {
7
+ const a = [0, 0, 0, 1]; // identity
8
+ const b = [0, Math.SQRT1_2, 0, Math.SQRT1_2]; // 90° about Y
9
+ // Must equal slerp exactly — proving it dispatched to the registered
10
+ // "slerp" function, not the componentwise-lerp fallback (which would
11
+ // produce a different, non-normalized result).
12
+ expect(interpolate(Quat.schema, "linear", a, b, 0.5)).toEqual(Quat.slerp(a, b, 0.5));
13
+ });
14
+ it("falls back to componentwise lerp when no interpolator is named", () => {
15
+ const schema = { type: "array", items: { type: "number" } };
16
+ expect(interpolate(schema, "linear", [0, 10], [10, 20], 0.5)).toEqual([5, 15]);
17
+ });
18
+ it("throws on a named interpolator that isn't registered", () => {
19
+ const schema = { type: "number", interpolators: { linear: "nope" } };
20
+ expect(() => interpolate(schema, "linear", 0, 1, 0.5)).toThrow(/unknown interpolator "nope"/);
21
+ });
22
+ });
23
+ //# sourceMappingURL=interpolate.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpolate.test.js","sourceRoot":"","sources":["../../../../src/graphics/animation/animation-track/interpolate.test.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,+EAA+E,EAAE,GAAG,EAAE;QACrF,MAAM,CAAC,GAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAiC,WAAW;QACzE,MAAM,CAAC,GAAS,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAU,cAAc;QAC3E,qEAAqE;QACrE,qEAAqE;QACrE,+CAA+C;QAC/C,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IACzF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACtE,MAAM,MAAM,GAAW,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC;QACpE,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACnF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC5D,MAAM,MAAM,GAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;QAC7E,MAAM,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAClG,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ type Interpolator = (prev: any, next: any, t: number) => any;
2
+ /**
3
+ * Resolves the serializable interpolator NAMES a pure-JSON `Schema` may declare
4
+ * (e.g. `Quat.schema`'s `interpolators.linear = "slerp"`) to their functions.
5
+ * The schema names the interpolator; the animation system owns the behavior.
6
+ */
7
+ export declare const interpolatorRegistry: Readonly<Record<string, Interpolator>>;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ // © 2026 Adobe. MIT License. See /LICENSE for details.
2
+ import { Quat } from "@adobe/data/math";
3
+ /**
4
+ * Resolves the serializable interpolator NAMES a pure-JSON `Schema` may declare
5
+ * (e.g. `Quat.schema`'s `interpolators.linear = "slerp"`) to their functions.
6
+ * The schema names the interpolator; the animation system owns the behavior.
7
+ */
8
+ export const interpolatorRegistry = {
9
+ slerp: Quat.slerp,
10
+ };
11
+ //# sourceMappingURL=interpolator-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpolator-registry.js","sourceRoot":"","sources":["../../../../src/graphics/animation/animation-track/interpolator-registry.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAIxC;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA2C;IACxE,KAAK,EAAE,IAAI,CAAC,KAAK;CACpB,CAAC"}
@@ -104,7 +104,7 @@ export declare const plugin: {
104
104
  };
105
105
  }>, {}, {}, never>, canvas: HTMLCanvasElement | null) => void;
106
106
  } & {};
107
- readonly systems: import("@adobe/data/ecs").SystemDeclarations<"update" | "_frameTime" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender" | "configureCanvas" | "beginRenderPass" | "endRenderPass" | "updateCameraAspect">;
107
+ readonly systems: import("@adobe/data/ecs").SystemDeclarations<"_frameTime" | "update" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender" | "configureCanvas" | "beginRenderPass" | "endRenderPass" | "updateCameraAspect">;
108
108
  readonly actions: {};
109
109
  readonly services: {};
110
110
  readonly computed: {};
@@ -282,7 +282,7 @@ export declare const orbitData: {
282
282
  };
283
283
  }>, {}, {}, never>) => void;
284
284
  };
285
- readonly systems: import("@adobe/data/ecs").SystemDeclarations<"update" | "_frameTime" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender" | "configureCanvas" | "beginRenderPass" | "endRenderPass" | "updateCameraAspect">;
285
+ readonly systems: import("@adobe/data/ecs").SystemDeclarations<"_frameTime" | "update" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender" | "configureCanvas" | "beginRenderPass" | "endRenderPass" | "updateCameraAspect">;
286
286
  readonly actions: {};
287
287
  readonly services: {};
288
288
  readonly computed: {};
@@ -278,4 +278,4 @@ export declare const plugin: Database.Plugin<{}, {
278
278
  readonly default: import("../public.js");
279
279
  };
280
280
  }>, {}, {}, never>) => void;
281
- } & {}, "update" | "_frameTime" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender" | "configureCanvas" | "beginRenderPass" | "endRenderPass" | "updateCameraAspect" | "_orbitCameraSystem" | "_orbitAutoFitSystem", {}, {}, {}, {}>;
281
+ } & {}, "_frameTime" | "update" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender" | "configureCanvas" | "beginRenderPass" | "endRenderPass" | "updateCameraAspect" | "_orbitCameraSystem" | "_orbitAutoFitSystem", {}, {}, {}, {}>;
@@ -284,7 +284,7 @@ export declare const orbitSystem: {
284
284
  };
285
285
  }>, {}, {}, never>) => void;
286
286
  } & {};
287
- readonly systems: import("@adobe/data/ecs").SystemDeclarations<"update" | "_frameTime" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender" | "configureCanvas" | "beginRenderPass" | "endRenderPass" | "updateCameraAspect" | "_orbitCameraSystem" | "_orbitAutoFitSystem">;
287
+ readonly systems: import("@adobe/data/ecs").SystemDeclarations<"_frameTime" | "update" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender" | "configureCanvas" | "beginRenderPass" | "endRenderPass" | "updateCameraAspect" | "_orbitCameraSystem" | "_orbitAutoFitSystem">;
288
288
  readonly actions: {};
289
289
  readonly services: {};
290
290
  readonly computed: {};
@@ -113,7 +113,7 @@ export declare const graphics: {
113
113
  };
114
114
  }>, {}, {}, never>, canvas: HTMLCanvasElement | null) => void;
115
115
  };
116
- readonly systems: import("@adobe/data/ecs").SystemDeclarations<"update" | "_frameTime" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender" | "configureCanvas" | "beginRenderPass" | "endRenderPass">;
116
+ readonly systems: import("@adobe/data/ecs").SystemDeclarations<"_frameTime" | "update" | "schedulerSystem" | "input" | "preUpdate" | "postUpdate" | "physics" | "preRender" | "render" | "postRender" | "configureCanvas" | "beginRenderPass" | "endRenderPass">;
117
117
  readonly actions: {};
118
118
  readonly services: {};
119
119
  readonly computed: {};