@hatiolab/things-scene 10.1.59 → 10.1.61

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 (36) hide show
  1. package/dist-types/figure/figure-capability.d.ts +4 -4
  2. package/dist-types/figure/figure-capability.d.ts.map +1 -1
  3. package/dist-types/figure/{v3/figure-v3-compile-cache.d.ts → figure-compile-cache.d.ts} +14 -14
  4. package/dist-types/figure/figure-compile-cache.d.ts.map +1 -0
  5. package/dist-types/figure/figure-geometry.d.ts +11 -0
  6. package/dist-types/figure/figure-geometry.d.ts.map +1 -0
  7. package/dist-types/figure/figure-instance.d.ts +7 -2
  8. package/dist-types/figure/figure-instance.d.ts.map +1 -1
  9. package/dist-types/figure/{v3/figure-v3-part-component.d.ts → figure-part-component.d.ts} +59 -59
  10. package/dist-types/figure/figure-part-component.d.ts.map +1 -0
  11. package/dist-types/figure/{v3/figure-v3-real-object.d.ts → figure-real-object.d.ts} +12 -8
  12. package/dist-types/figure/figure-real-object.d.ts.map +1 -0
  13. package/dist-types/figure/figure-registry.d.ts +13 -0
  14. package/dist-types/figure/figure-registry.d.ts.map +1 -0
  15. package/dist-types/figure/{v3/figure-v3-rig.d.ts → figure-rig.d.ts} +30 -14
  16. package/dist-types/figure/figure-rig.d.ts.map +1 -0
  17. package/dist-types/figure/figure-shape.d.ts +1 -1
  18. package/dist-types/figure/{v3/figure-v3-top-view.d.ts → figure-top-view.d.ts} +3 -3
  19. package/dist-types/figure/figure-top-view.d.ts.map +1 -0
  20. package/dist-types/figure/index.d.ts +4 -4
  21. package/dist-types/figure/index.d.ts.map +1 -1
  22. package/dist-types/threed/instanced-set.d.ts +1 -1
  23. package/package.json +3 -3
  24. package/things-scene-min.js +6 -6
  25. package/things-scene-min.js.map +1 -1
  26. package/things-scene.mjs +3 -3
  27. package/things-scene.mjs.map +1 -1
  28. package/dist-types/figure/v3/figure-v3-compile-cache.d.ts.map +0 -1
  29. package/dist-types/figure/v3/figure-v3-geometry.d.ts +0 -11
  30. package/dist-types/figure/v3/figure-v3-geometry.d.ts.map +0 -1
  31. package/dist-types/figure/v3/figure-v3-part-component.d.ts.map +0 -1
  32. package/dist-types/figure/v3/figure-v3-real-object.d.ts.map +0 -1
  33. package/dist-types/figure/v3/figure-v3-registry.d.ts +0 -13
  34. package/dist-types/figure/v3/figure-v3-registry.d.ts.map +0 -1
  35. package/dist-types/figure/v3/figure-v3-rig.d.ts.map +0 -1
  36. package/dist-types/figure/v3/figure-v3-top-view.d.ts.map +0 -1
@@ -24,7 +24,7 @@
24
24
  */
25
25
  import Component from '../components/component.js';
26
26
  import type { SlotDef } from '../transfer/types.js';
27
- import type { FigureCapability, V3BindingDeclaration } from '@hatiolab/figure-model';
27
+ import type { FigureCapability, FigureBindingDeclaration } from '@hatiolab/figure-model';
28
28
  type Ctor<T = object> = new (...args: any[]) => T;
29
29
  /**
30
30
  * 저작이 고를 수 있는 능력 — **목록은 형식이 갖는다.**
@@ -49,10 +49,10 @@ export declare const CAPABILITY_MIXINS: Readonly<Record<FigureCapabilityName, (b
49
49
  /** 저작 화면이 사다리를 그릴 때 쓰는 설명. 모델러의 「능력」 탭이 읽는다. */
50
50
  export declare const FIGURE_CAPABILITY_NOTES: Readonly<Record<FigureCapabilityName, string>>;
51
51
  /**
52
- * A V3 figure's places (`capabilities.bindings`, a seat or a grip) as the scene's `SlotDef`. What a place takes is
53
- * always named in V3, so `allowedTypes` is always written; how many it holds is its capacity.
52
+ * A figure's places (`capabilities.bindings`, a seat or a grip) as the scene's `SlotDef`. What a place takes is
53
+ * always named, so `allowedTypes` is always written; how many it holds is its capacity.
54
54
  */
55
- export declare function slotsFromBindings(bindings: readonly V3BindingDeclaration[]): SlotDef[];
55
+ export declare function slotsFromBindings(bindings: readonly FigureBindingDeclaration[]): SlotDef[];
56
56
  /**
57
57
  * 선언한 능력으로 클래스를 조립한다. 같은 조합이면 같은 클래스를 돌려준다.
58
58
  *
@@ -1 +1 @@
1
- {"version":3,"file":"figure-capability.d.ts","sourceRoot":"","sources":["../../src/figure/figure-capability.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAKlD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAGnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAGpF,KAAK,IAAI,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;AAEjD;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,+DAAqB,CAAA;AAErD,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAA;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAM7G,CAAA;AAEJ,gDAAgD;AAChD,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAKjF,CAAA;AAEF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,oBAAoB,EAAE,GAAG,OAAO,EAAE,CAEtF;AAqCD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,YAAY,GAAE,SAAS,MAAM,EAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAqC/G;AA4DD,2BAA2B;AAC3B,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
1
+ {"version":3,"file":"figure-capability.d.ts","sourceRoot":"","sources":["../../src/figure/figure-capability.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAKlD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAGnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAGxF,KAAK,IAAI,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;AAEjD;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,+DAAqB,CAAA;AAErD,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAA;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC,CAM7G,CAAA;AAEJ,gDAAgD;AAChD,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAKjF,CAAA;AAEF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,wBAAwB,EAAE,GAAG,OAAO,EAAE,CAE1F;AAqCD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,YAAY,GAAE,SAAS,MAAM,EAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAqC/G;AA4DD,2BAA2B;AAC3B,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
@@ -1,29 +1,29 @@
1
- import { type V3Appearance, type V3Asset, type V3CompiledAsset, type V3CompiledCapabilities } from '@hatiolab/figure-model';
1
+ import { type FigureAppearance, type FigureAsset, type FigureCompiledAsset, type FigureCompiledCapabilities } from '@hatiolab/figure-model';
2
2
  /** FNV-1a over the canonical JSON, twice with different seeds, as 16 hex characters. Content only, no identity. */
3
- export declare function fingerprintV3Asset(asset: V3Asset): string;
4
- export interface CompiledV3 {
3
+ export declare function fingerprintFigureAsset(asset: FigureAsset): string;
4
+ export interface CompiledFigure {
5
5
  key: string;
6
6
  fingerprint: string;
7
7
  kernel: string;
8
- /** The asset compiled at its stored inputs: what `compileV3Asset` gives, validated as a whole. */
9
- compiled: V3CompiledAsset;
8
+ /** The asset compiled at its stored inputs: what `compileFigureAsset` gives, validated as a whole. */
9
+ compiled: FigureCompiledAsset;
10
10
  /**
11
11
  * The document compiled on its own, evaluated with **every** input (size and state) per instance. The asset
12
12
  * level fixes the design inputs at compile time, which is right for storage and wrong for a board where one
13
13
  * asset stands at many sizes; the document level is what the renderer evaluates.
14
14
  */
15
- document: V3CompiledCapabilities;
15
+ document: FigureCompiledCapabilities;
16
16
  /** Appearance by placing node id (a `place@1` id or a repeated `member@1` id). */
17
- looks: Map<string, V3Appearance>;
17
+ looks: Map<string, FigureAppearance>;
18
18
  /** Value reference → the node that writes it, for mapping a repeated copy's `key` to its member. */
19
19
  writers: Map<string, string>;
20
20
  /** A frozen copy of the source the result was compiled from; the caller's object may go on changing. */
21
- asset: V3Asset;
21
+ asset: FigureAsset;
22
22
  }
23
23
  /** The cache key for an asset with this kernel: fingerprint and kernel version, nothing about the instance. */
24
- export declare function v3CompileKey(asset: V3Asset): string;
25
- /** The compiled asset for this content under this kernel, compiled once. Throws what `compileV3Asset` throws. */
26
- export declare function compiledV3Of(asset: V3Asset): CompiledV3;
27
- export declare function v3CompileCacheSize(): number;
28
- export declare function resetV3CompileCache(): void;
29
- //# sourceMappingURL=figure-v3-compile-cache.d.ts.map
24
+ export declare function figureCompileKey(asset: FigureAsset): string;
25
+ /** The compiled asset for this content under this kernel, compiled once. Throws what `compileFigureAsset` throws. */
26
+ export declare function compiledFigureOf(asset: FigureAsset): CompiledFigure;
27
+ export declare function figureCompileCacheSize(): number;
28
+ export declare function resetFigureCompileCache(): void;
29
+ //# sourceMappingURL=figure-compile-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figure-compile-cache.d.ts","sourceRoot":"","sources":["../../src/figure/figure-compile-cache.ts"],"names":[],"mappings":"AAcA,OAAO,EAAoE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,KAAK,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAe7M,mHAAmH;AACnH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAWjE;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,sGAAsG;IACtG,QAAQ,EAAE,mBAAmB,CAAA;IAC7B;;;;OAIG;IACH,QAAQ,EAAE,0BAA0B,CAAA;IACpC,kFAAkF;IAClF,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IACpC,oGAAoG;IACpG,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,wGAAwG;IACxG,KAAK,EAAE,WAAW,CAAA;CACnB;AAKD,+GAA+G;AAC/G,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAE3D;AAED,qHAAqH;AACrH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,cAAc,CA0BnE;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C"}
@@ -0,0 +1,11 @@
1
+ import * as THREE from 'three';
2
+ import type { FigureShape } from '@hatiolab/figure-model';
3
+ /** The shared geometry for a body. Call `releaseFigureGeometry` with the same shape when the mesh goes away. */
4
+ export declare function acquireFigureGeometry(shape: FigureShape, segments?: number): THREE.BufferGeometry;
5
+ export declare function releaseFigureGeometry(geometry: THREE.BufferGeometry): void;
6
+ /** How many distinct bodies are held. For tests and for the maturity numbers. */
7
+ export declare function figureGeometryCount(): number;
8
+ export declare function resetFigureGeometry(): void;
9
+ /** Builds a body centred in its own frame, as the contract defines it. Not cached; use `acquireFigureGeometry`. */
10
+ export declare function buildFigureGeometry(shape: FigureShape, segments?: number): THREE.BufferGeometry;
11
+ //# sourceMappingURL=figure-geometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figure-geometry.d.ts","sourceRoot":"","sources":["../../src/figure/figure-geometry.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAiBzD,gHAAgH;AAChH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,GAAE,MAAyB,GAAG,KAAK,CAAC,cAAc,CAWnH;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,KAAK,CAAC,cAAc,GAAG,IAAI,CAS1E;AAED,iFAAiF;AACjF,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAED,mHAAmH;AACnH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,GAAE,MAAyB,GAAG,KAAK,CAAC,cAAc,CA6DjH"}
@@ -251,7 +251,7 @@ declare const FigureInstance_base: {
251
251
  } & typeof Shape;
252
252
  export declare class FigureInstance extends FigureInstance_base {
253
253
  /**
254
- * Registers FigureInstance as what draws this type. `registerFigureV3()` calls it, so registering the asset and
254
+ * Registers FigureInstance as what draws this type. `registerFigure()` calls it, so registering the asset and
255
255
  * registering the component type always happen together and a board that names only `type` stands up.
256
256
  */
257
257
  static registerType(type: string, capabilities?: readonly string[], placement?: string): void;
@@ -262,12 +262,17 @@ export declare class FigureInstance extends FigureInstance_base {
262
262
  * `classFields` 로 보인다(`types/capability.ts`). 같은 낱말·같은 자리에 두어 그쪽이 읽을 수
263
263
  * 있게 한다(ADR-0045).
264
264
  *
265
- * What draws uses `FigureV3RealObject.effectiveZPos`, which reads the asset itself; this is where **the outside can
265
+ * What draws uses `FigureRealObject.effectiveZPos`, which reads the asset itself; this is where **the outside can
266
266
  * ask**.
267
267
  */
268
268
  static placement?: string;
269
269
  get hasTextProperty(): boolean;
270
270
  is3dish(): boolean;
271
+ /**
272
+ * The component's properties: the design values the figure publishes, as one map (ADR-0096) -- \`state.designInputs\`,
273
+ * edited by the general \`number-map\` editor, each value with its name, unit, range and the figure's own value. A
274
+ * figure that publishes none has no properties of its own.
275
+ */
271
276
  get nature(): ComponentNature;
272
277
  buildRealObject(): IRealObject | undefined;
273
278
  render(ctx: SceneRenderContext): void;
@@ -1 +1 @@
1
- {"version":3,"file":"figure-instance.d.ts","sourceRoot":"","sources":["../../src/figure/figure-instance.ts"],"names":[],"mappings":"AAIA,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,KAAK,MAAM,wBAAwB,CAAA;AAE1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+B7D,qBAAa,cAAe,SAAQ,mBAAe;IACjD;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,GAAE,SAAS,MAAM,EAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAwBjG;;;;;;;;;OASG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,GAAG,IAAI;IAwBjG;;;;;;;;;OASG;IACH,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAEzB,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED,OAAO,IAAI,OAAO;IAIlB;;;;OAIG;IACH,IAAI,MAAM,IAAI,eAAe,CAU5B;IAED,eAAe,IAAI,WAAW,GAAG,SAAS;IAI1C,MAAM,CAAC,GAAG,EAAE,kBAAkB;IAkC9B,OAAO,CAAC,IAAI,CAAC,CAAsC;IAEnD;;;;OAIG;IACH,OAAO,CAAC,OAAO;IAkBf,uEAAuE;IACvE,OAAO,CAAC,WAAW;IAiBnB;;;;OAIG;IACM,UAAU,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI;CAGvD;AAMD,eAAe,cAAc,CAAA"}
@@ -1,12 +1,12 @@
1
1
  import * as THREE from 'three';
2
- import Component from '../../components/component.js';
3
- import Shape from '../../components/shape.js';
4
- import type { SceneRenderContext } from '../../interfaces/rendering.js';
5
- import type { IRealObject } from '../../interfaces/real-object.js';
6
- import type { ComponentNature, Properties } from '../../interfaces/types.js';
7
- import { RealObject } from '../../threed/real-object.js';
2
+ import Component from '../components/component.js';
3
+ import Shape from '../components/shape.js';
4
+ import type { SceneRenderContext } from '../interfaces/rendering.js';
5
+ import type { IRealObject } from '../interfaces/real-object.js';
6
+ import type { ComponentNature, Properties } from '../interfaces/types.js';
7
+ import { RealObject } from '../threed/real-object.js';
8
8
  /** The shape figure-model evaluated for this body. */
9
- export interface FigureV3PartShape {
9
+ export interface FigurePartShape {
10
10
  provider: string;
11
11
  dimensions: Record<string, number>;
12
12
  profile?: Array<{
@@ -15,8 +15,8 @@ export interface FigureV3PartShape {
15
15
  y: number;
16
16
  }>;
17
17
  }
18
- export interface FigureV3PartState {
19
- shape?: FigureV3PartShape;
18
+ export interface FigurePartState {
19
+ shape?: FigurePartShape;
20
20
  segments?: number;
21
21
  /** The body's colour, resolved by the modeller. */
22
22
  color?: string;
@@ -32,12 +32,12 @@ export interface FigureV3PartState {
32
32
  * The body's geometry, centred on its bounding box and brought to a unit box, with the box's extents. Geometry with
33
33
  * no extent on an axis (a flat face) keeps 1 there so nothing divides by zero.
34
34
  */
35
- export declare function unitV3PartGeometry(shape: FigureV3PartShape, segments?: number): {
35
+ export declare function unitFigurePartGeometry(shape: FigurePartShape, segments?: number): {
36
36
  geometry: THREE.BufferGeometry;
37
37
  extent: THREE.Vector3;
38
38
  centre: THREE.Vector3;
39
39
  } | null;
40
- export declare class FigureV3PartRealObject extends RealObject {
40
+ export declare class FigurePartRealObject extends RealObject {
41
41
  private mesh?;
42
42
  build(): void;
43
43
  clear(): THREE.Object3D<THREE.Object3DEventMap>;
@@ -46,7 +46,7 @@ export declare class FigureV3PartRealObject extends RealObject {
46
46
  updateDimension(): void;
47
47
  private material;
48
48
  }
49
- declare const FigureV3Part_base: {
49
+ declare const FigurePart_base: {
50
50
  new (...args: any[]): {
51
51
  contains(x: number, y: number): boolean;
52
52
  get path(): {
@@ -85,8 +85,8 @@ declare const FigureV3Part_base: {
85
85
  fontSize: any;
86
86
  __cache__: any;
87
87
  created(): void;
88
- added(parent: import("../../types/component.js").Container): void;
89
- removed(parent: import("../../types/component.js").Container): void;
88
+ added(parent: import("../types/component.js").Container): void;
89
+ removed(parent: import("../types/component.js").Container): void;
90
90
  ready(): Promise<void>;
91
91
  _readyInvoked: boolean;
92
92
  invokeReady(): void | Promise<void>;
@@ -99,7 +99,7 @@ declare const FigureV3Part_base: {
99
99
  get disposed(): boolean;
100
100
  isLayer(): boolean;
101
101
  isGroup(): boolean;
102
- isContainer(): this is import("../../types/component.js").Container;
102
+ isContainer(): this is import("../types/component.js").Container;
103
103
  isLine(): boolean;
104
104
  isRoot(): boolean;
105
105
  isRootModel(): boolean;
@@ -115,20 +115,20 @@ declare const FigureV3Part_base: {
115
115
  get(property: string): any;
116
116
  set(props: any, propval?: any): any;
117
117
  getState(property: string): any;
118
- setState(props: Partial<import("../../index.js").State> | string, propval?: any): any;
118
+ setState(props: Partial<import("../index.js").State> | string, propval?: any): any;
119
119
  get model(): any;
120
- get state(): import("../../index.js").State;
120
+ get state(): import("../index.js").State;
121
121
  get refid(): any;
122
122
  get hierarchy(): any;
123
123
  get volatile(): string[];
124
- _applyProps(target: Record<string, any>, props: Record<string, any>, options: import("../../components/component.js").ApplyPropsOptions): /*elided*/ any;
124
+ _applyProps(target: Record<string, any>, props: Record<string, any>, options: import("../components/component.js").ApplyPropsOptions): /*elided*/ any;
125
125
  move(offset: {
126
126
  x: number;
127
127
  y: number;
128
128
  }, ...args: boolean[]): void;
129
129
  symmetryX(x?: number): void;
130
130
  symmetryY(y: number): void;
131
- adjustResize(bounds: import("../../index.js").BOUNDS, origin_bounds: import("../../index.js").BOUNDS, diagonal: boolean): {
131
+ adjustResize(bounds: import("../index.js").BOUNDS, origin_bounds: import("../index.js").BOUNDS, diagonal: boolean): {
132
132
  left: any;
133
133
  top: any;
134
134
  width: any;
@@ -136,16 +136,16 @@ declare const FigureV3Part_base: {
136
136
  };
137
137
  adjustRotation(rotation: number, step: boolean): number;
138
138
  outline(progress: number): any;
139
- get center(): import("../../index.js").POINT;
140
- set center(p: import("../../index.js").POINT);
141
- get location(): import("../../index.js").POINT;
142
- set location(l: import("../../index.js").POINT);
143
- get rotate(): import("../../index.js").POINT;
144
- set rotate(r: import("../../index.js").POINT);
145
- get dimension(): import("../../index.js").DIMENSION;
146
- set dimension(d: import("../../index.js").DIMENSION);
147
- get drawPath(): import("../../index.js").POINT[];
148
- get rotatePoint(): import("../../index.js").POINT;
139
+ get center(): import("../index.js").POINT;
140
+ set center(p: import("../index.js").POINT);
141
+ get location(): import("../index.js").POINT;
142
+ set location(l: import("../index.js").POINT);
143
+ get rotate(): import("../index.js").POINT;
144
+ set rotate(r: import("../index.js").POINT);
145
+ get dimension(): import("../index.js").DIMENSION;
146
+ set dimension(d: import("../index.js").DIMENSION);
147
+ get drawPath(): import("../index.js").POINT[];
148
+ get rotatePoint(): import("../index.js").POINT;
149
149
  get mutable(): boolean;
150
150
  get resizable(): boolean;
151
151
  get rotatable(): boolean;
@@ -182,12 +182,12 @@ declare const FigureV3Part_base: {
182
182
  get textSubstitutor(): () => string;
183
183
  get text(): string;
184
184
  set text(v: string);
185
- get textBounds(): import("../../index.js").BOUNDS;
185
+ get textBounds(): import("../index.js").BOUNDS;
186
186
  get textRotation(): number;
187
187
  get textHidden(): boolean;
188
188
  set textHidden(v: boolean);
189
189
  get hasTextProperty(): boolean;
190
- animate(opts: import("../../index.js").AnimationConfig): any;
190
+ animate(opts: import("../index.js").AnimationConfig): any;
191
191
  effect(context: SceneRenderContext, model: any): void;
192
192
  serialize(...others: any[]): string;
193
193
  trim(): void;
@@ -201,10 +201,10 @@ declare const FigureV3Part_base: {
201
201
  set tap(v: any);
202
202
  get mappings(): any[];
203
203
  get retention(): number;
204
- get animation(): import("../../index.js").AnimationController | undefined;
204
+ get animation(): import("../index.js").AnimationController | undefined;
205
205
  get started(): boolean;
206
206
  set started(v: boolean);
207
- get controls(): import("../../index.js").Control[] | undefined;
207
+ get controls(): import("../index.js").Control[] | undefined;
208
208
  findFirst(finder: string | ((c: Component) => boolean), ...others: any[]): Component | undefined;
209
209
  findAll(s: string | ((c: Component) => boolean), ...others: any[]): any[] | undefined;
210
210
  capture(x: number, y: number, except?: (c: Component) => boolean): any;
@@ -220,15 +220,15 @@ declare const FigureV3Part_base: {
220
220
  get capturable(): boolean;
221
221
  get position(): string;
222
222
  get origin(): string;
223
- get offset(): import("../../index.js").POINT;
224
- get app(): import("../../index.js").ApplicationContext;
223
+ get offset(): import("../index.js").POINT;
224
+ get app(): import("../index.js").ApplicationContext;
225
225
  drawEffect(context: SceneRenderContext): void;
226
226
  prepareFill(resolve: Function, reject: Function): void;
227
227
  prepareFillIf(condition: boolean): void;
228
228
  onchangeFill(after: Record<string, any>, before: Record<string, any>): void;
229
229
  drawImage(context: SceneRenderContext, image: HTMLImageElement, left: number, top: number, width: number, height: number): void;
230
- mutateBounds(logic: ((bounds: import("../../index.js").BOUNDS) => import("../../index.js").BOUNDS | void) | null, context?: any): void;
231
- mutatePath(beforeLogic: ((path: import("../../index.js").POINT[]) => import("../../index.js").POINT[] | void) | null, afterLogic: ((path: import("../../index.js").POINT[]) => import("../../index.js").POINT[] | void) | null, context?: any): void;
230
+ mutateBounds(logic: ((bounds: import("../index.js").BOUNDS) => import("../index.js").BOUNDS | void) | null, context?: any): void;
231
+ mutatePath(beforeLogic: ((path: import("../index.js").POINT[]) => import("../index.js").POINT[] | void) | null, afterLogic: ((path: import("../index.js").POINT[]) => import("../index.js").POINT[] | void) | null, context?: any): void;
232
232
  access(accessor: string): any;
233
233
  substitute(template: string, data: any): string | undefined;
234
234
  onchangeMappings(after: Record<string, any>, before: Record<string, any>): void;
@@ -237,29 +237,29 @@ declare const FigureV3Part_base: {
237
237
  executeMappings(force?: boolean): void;
238
238
  disposeMappings(): void;
239
239
  ondropfile(transfered: FileList, files: string[]): void;
240
- transcoordS2P(x: number, y: number, rp?: import("../../index.js").POINT): import("../../index.js").POINT;
241
- transcoordP2S(x: number, y: number, rp?: import("../../index.js").POINT): import("../../index.js").POINT;
242
- transcoordS2T(x: number, y: number, top?: Component): import("../../index.js").POINT;
243
- transcoordT2P(x: number, y: number, top?: Component): import("../../index.js").POINT;
244
- transcoordT2S(x: number, y: number, top?: Component): import("../../index.js").POINT;
245
- transcoordS2TR(x: number, y: number, top?: Component): import("../../index.js").POINT;
246
- transcoordS2O(x: number, y: number, target: Component): import("../../index.js").POINT;
247
- transcoordC2S(x: number, y: number, top?: Component): import("../../index.js").POINT;
248
- transcoordS2C(x: number, y: number, top?: Component): import("../../index.js").POINT;
249
- toParent(x: number, y: number, rp?: import("../../index.js").POINT): import("../../index.js").POINT;
250
- fromParent(x: number, y: number, rp?: import("../../index.js").POINT): import("../../index.js").POINT;
251
- toScene(x: number, y: number, top?: Component): import("../../index.js").POINT;
252
- fromScene(x: number, y: number, top?: Component): import("../../index.js").POINT;
253
- toLocal(x: number, y: number, top?: Component): import("../../index.js").POINT;
254
- toGlobal(x: number, y: number, top?: Component): import("../../index.js").POINT;
255
- toOther(x: number, y: number, target: Component): import("../../index.js").POINT;
256
- on<K extends keyof import("../../index.js").ComponentEventMap>(name: K, callback: (...args: import("../../index.js").ComponentEventMap[K]) => void, context?: any): /*elided*/ any;
240
+ transcoordS2P(x: number, y: number, rp?: import("../index.js").POINT): import("../index.js").POINT;
241
+ transcoordP2S(x: number, y: number, rp?: import("../index.js").POINT): import("../index.js").POINT;
242
+ transcoordS2T(x: number, y: number, top?: Component): import("../index.js").POINT;
243
+ transcoordT2P(x: number, y: number, top?: Component): import("../index.js").POINT;
244
+ transcoordT2S(x: number, y: number, top?: Component): import("../index.js").POINT;
245
+ transcoordS2TR(x: number, y: number, top?: Component): import("../index.js").POINT;
246
+ transcoordS2O(x: number, y: number, target: Component): import("../index.js").POINT;
247
+ transcoordC2S(x: number, y: number, top?: Component): import("../index.js").POINT;
248
+ transcoordS2C(x: number, y: number, top?: Component): import("../index.js").POINT;
249
+ toParent(x: number, y: number, rp?: import("../index.js").POINT): import("../index.js").POINT;
250
+ fromParent(x: number, y: number, rp?: import("../index.js").POINT): import("../index.js").POINT;
251
+ toScene(x: number, y: number, top?: Component): import("../index.js").POINT;
252
+ fromScene(x: number, y: number, top?: Component): import("../index.js").POINT;
253
+ toLocal(x: number, y: number, top?: Component): import("../index.js").POINT;
254
+ toGlobal(x: number, y: number, top?: Component): import("../index.js").POINT;
255
+ toOther(x: number, y: number, target: Component): import("../index.js").POINT;
256
+ on<K extends keyof import("../index.js").ComponentEventMap>(name: K, callback: (...args: import("../index.js").ComponentEventMap[K]) => void, context?: any): /*elided*/ any;
257
257
  on(name: string | object, callback: Function, context?: any): /*elided*/ any;
258
- off<K extends keyof import("../../index.js").ComponentEventMap>(name: K, callback?: ((...args: import("../../index.js").ComponentEventMap[K]) => void) | undefined, context?: any): /*elided*/ any;
258
+ off<K extends keyof import("../index.js").ComponentEventMap>(name: K, callback?: ((...args: import("../index.js").ComponentEventMap[K]) => void) | undefined, context?: any): /*elided*/ any;
259
259
  off(name?: string | object, callback?: Function, context?: any): /*elided*/ any;
260
- once<K extends keyof import("../../index.js").ComponentEventMap>(name: K, callback: (...args: import("../../index.js").ComponentEventMap[K]) => void, context?: any): /*elided*/ any;
260
+ once<K extends keyof import("../index.js").ComponentEventMap>(name: K, callback: (...args: import("../index.js").ComponentEventMap[K]) => void, context?: any): /*elided*/ any;
261
261
  once(name: string | object, callback: Function, context?: any): /*elided*/ any;
262
- trigger<K extends keyof import("../../index.js").ComponentEventMap>(name: K, ...args: import("../../index.js").ComponentEventMap[K]): /*elided*/ any;
262
+ trigger<K extends keyof import("../index.js").ComponentEventMap>(name: K, ...args: import("../index.js").ComponentEventMap[K]): /*elided*/ any;
263
263
  trigger(name: string, ...args: any[]): /*elided*/ any;
264
264
  delegate_on(delegator: any): /*elided*/ any;
265
265
  delegate_off(delegator: any): /*elided*/ any;
@@ -292,7 +292,7 @@ declare const FigureV3Part_base: {
292
292
  set element(_v: HTMLElement | null);
293
293
  };
294
294
  } & typeof Shape;
295
- export declare class FigureV3Part extends FigureV3Part_base {
295
+ export declare class FigurePart extends FigurePart_base {
296
296
  static registerType(): void;
297
297
  get hasTextProperty(): boolean;
298
298
  is3dish(): boolean;
@@ -302,4 +302,4 @@ export declare class FigureV3Part extends FigureV3Part_base {
302
302
  render(ctx: SceneRenderContext): void;
303
303
  }
304
304
  export {};
305
- //# sourceMappingURL=figure-v3-part-component.d.ts.map
305
+ //# sourceMappingURL=figure-part-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figure-part-component.d.ts","sourceRoot":"","sources":["../../src/figure/figure-part-component.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,KAAK,MAAM,wBAAwB,CAAA;AAE1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MA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AAG,IAAI;IAU9D,8GAA8G;IAC9G,eAAe,IAAI,IAAI;IAKvB,OAAO,CAAC,QAAQ;CAqBjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,qBAAa,UAAW,SAAQ,eAAe;IAC7C,MAAM,CAAC,YAAY,IAAI,IAAI;IAI3B,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED,OAAO,IAAI,OAAO;IAIlB,IAAI,MAAM,IAAI,eAAe,CAE5B;IAED,eAAe,IAAI,WAAW,GAAG,SAAS;IAI1C,kEAAkE;IAClE,MAAM,CAAC,GAAG,EAAE,kBAAkB;CAO/B"}
@@ -1,13 +1,15 @@
1
1
  import * as THREE from 'three';
2
- import { RealObject } from '../../threed/real-object.js';
3
- import type { Properties } from '../../interfaces/types.js';
4
- import { type RegisteredV3Figure } from './figure-v3-registry.js';
5
- export declare class FigureV3RealObject extends RealObject<THREE.Group> {
2
+ import { RealObject } from '../threed/real-object.js';
3
+ import type { Properties } from '../interfaces/types.js';
4
+ import { type RegisteredFigureFigure } from './figure-registry.js';
5
+ export declare class FigureRealObject extends RealObject<THREE.Group> {
6
6
  private rig;
7
7
  private unsubscribe?;
8
- get figure(): RegisteredV3Figure | null;
8
+ get figure(): RegisteredFigureFigure | null;
9
9
  protected getObject3dInstance(): THREE.Group;
10
10
  build(): void;
11
+ /** The instance's design values: \`state.designInputs\`, input → value, for the inputs the figure publishes (ADR-0096). */
12
+ get designInputs(): Record<string, unknown>;
11
13
  /** The instance's external state values: `state.parameters`, name → value in the input's unit. */
12
14
  get parameters(): Record<string, number>;
13
15
  /** The instance's playback speeds: `state.clips`, clip name → speed, 0 or absent stops the clip. */
@@ -31,7 +33,7 @@ export declare class FigureV3RealObject extends RealObject<THREE.Group> {
31
33
  /**
32
34
  * The asset frame rises from the floor -- its y = 0 is the bottom of the instance (ADR-0065) -- while the object3d
33
35
  * stands at the centre of the instance's box, as every real object does. The rig is lowered by half the instance's
34
- * height so the figure stands on the box's bottom. Without it every V3 figure stood half its height in the air, on a
36
+ * height so the figure stands on the box's bottom. Without it every figure stood half its height in the air, on a
35
37
  * board and in the modeller's preview (user, 2026-09-24: 「왜 공중에 떠있는거지? 바닥기반인데」).
36
38
  */
37
39
  private seat;
@@ -39,7 +41,9 @@ export declare class FigureV3RealObject extends RealObject<THREE.Group> {
39
41
  * Where the board asked for a size the figure does not declare, the size it is drawn at instead -- per axis, empty
40
42
  * when it is drawn as asked. For a board to say so ("X 4000 → 2000, the largest it declares").
41
43
  */
42
- get sizeClamps(): import("./figure-v3-rig.js").V3SizeClamp[];
44
+ get sizeClamps(): import("./figure-rig.js").FigureSizeClamp[];
45
+ /** Re-reads the design values: the instance is made again with them, once (ADR-0096). */
46
+ updateDesignInputs(): void;
43
47
  /** Re-reads the external state values. Clip times are untouched: a value written or withdrawn does not restart a clip. */
44
48
  updateParameters(): void;
45
49
  /** Re-reads the speeds. They are read every frame, so this only asks for a redraw once something may move again. */
@@ -76,4 +80,4 @@ export declare class FigureV3RealObject extends RealObject<THREE.Group> {
76
80
  * coordinate mode (`zPos` means the bottom in floor mode, the centre in space mode, the top when inverted).
77
81
  */
78
82
  export declare function ceilingZPos(mode: 'floor' | 'space' | 'inverted', ceiling: number, depth: number): number;
79
- //# sourceMappingURL=figure-v3-real-object.d.ts.map
83
+ //# sourceMappingURL=figure-real-object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figure-real-object.d.ts","sourceRoot":"","sources":["../../src/figure/figure-real-object.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,KAAK,MAAM,OAAO,C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oHAAoH;IACpH,WAAW,IAAI,IAAI;IAMnB,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,YAAY;IAUpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAgBtB,OAAO,CAAC,OAAO;IAIf;;;;;OAKG;IACH,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG;QAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC;QAAC,aAAa,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAAG,SAAS;IAa7J,KAAK,IAAI,KAAK,CAAC,KAAK;CAO9B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAUxG"}
@@ -0,0 +1,13 @@
1
+ import { type FigureAsset } from '@hatiolab/figure-model';
2
+ import { type CompiledFigure } from './figure-compile-cache.js';
3
+ export interface RegisteredFigureFigure {
4
+ type: string;
5
+ compiled: CompiledFigure;
6
+ }
7
+ /** Registers a asset under a figure type. Compiles it (or reuses the cache) so a bad asset fails here, not on a board. */
8
+ export declare function registerFigure(type: string, asset: FigureAsset): RegisteredFigureFigure;
9
+ export declare function getFigure(type: string): RegisteredFigureFigure | null;
10
+ export declare function hasFigure(type: string): boolean;
11
+ export declare function unregisterFigure(type: string): boolean;
12
+ export declare function resetFigures(): void;
13
+ //# sourceMappingURL=figure-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figure-registry.d.ts","sourceRoot":"","sources":["../../src/figure/figure-registry.ts"],"names":[],"mappings":"AAYA,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAE7E,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAEjF,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,cAAc,CAAA;CACzB;AAID,0HAA0H;AAC1H,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,sBAAsB,CAOvF;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,GAAG,IAAI,CAErE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
@@ -1,7 +1,7 @@
1
1
  import * as THREE from 'three';
2
- import { type V3Asset, type V3AssetEvaluation, type V3Driver } from '@hatiolab/figure-model';
3
- import { type CompiledV3 } from './figure-v3-compile-cache.js';
4
- export interface FigureV3RigOptions {
2
+ import { type FigureAsset, type FigureAssetEvaluation, type FigureDriver } from '@hatiolab/figure-model';
3
+ import { type CompiledFigure } from './figure-compile-cache.js';
4
+ export interface FigureRigOptions {
5
5
  /**
6
6
  * A theme mapping: token → colour, replacing the asset's own snapshot where a token is present (designer's
7
7
  * ruling 5). Tokens the mapping does not name keep the asset's default.
@@ -14,15 +14,15 @@ export interface Vec3Like {
14
14
  z: number;
15
15
  }
16
16
  /** One axis a board asked for past what the figure declares it may be placed at, and the size it is drawn at. */
17
- export interface V3SizeClamp {
17
+ export interface FigureSizeClamp {
18
18
  axis: 'x' | 'y' | 'z';
19
19
  asked: number;
20
20
  used: number;
21
21
  bound: 'min' | 'max';
22
22
  }
23
- export declare class FigureV3Rig {
23
+ export declare class FigureRig {
24
24
  readonly group: THREE.Group<THREE.Object3DEventMap>;
25
- readonly compiled: CompiledV3;
25
+ readonly compiled: CompiledFigure;
26
26
  private readonly meshes;
27
27
  /** One instanced mesh per batch of a row's copies, by the batch's key; \`ids\` is the copy drawn at each index. */
28
28
  private readonly batches;
@@ -30,6 +30,14 @@ export declare class FigureV3Rig {
30
30
  /** One node per place a thing is held (a seat or a grip), made when something first hangs from it. */
31
31
  private readonly places;
32
32
  private size;
33
+ /** The design values a board set for this instance, as accepted: public inputs only, within range (ADR-0096). */
34
+ private design;
35
+ /** Why the last design values set were not all taken: each value refused and the reason. Empty when all were. */
36
+ designRefused: Array<{
37
+ input: string;
38
+ value: unknown;
39
+ reason: string;
40
+ }>;
33
41
  /** External control sources, kept apart from what drivers compute: a connector's values, never a driver's. */
34
42
  private external;
35
43
  /** Playback seconds per clip. A driver belongs to the clip its id starts with (`<clip>/<part>/<path>`). */
@@ -48,9 +56,9 @@ export declare class FigureV3Rig {
48
56
  */
49
57
  private planned?;
50
58
  /** The last evaluation, for readers that want the numbers behind the meshes. */
51
- last: V3AssetEvaluation | null;
52
- constructor(asset: V3Asset, options?: FigureV3RigOptions);
53
- get asset(): V3Asset;
59
+ last: FigureAssetEvaluation | null;
60
+ constructor(asset: FigureAsset, options?: FigureRigOptions);
61
+ get asset(): FigureAsset;
54
62
  /** The size the asset was authored at: its stored `size.*` design inputs, or null when it is not resizable. */
55
63
  get base(): Vec3Like | null;
56
64
  /**
@@ -61,13 +69,21 @@ export declare class FigureV3Rig {
61
69
  */
62
70
  setSize(size: Vec3Like | null): void;
63
71
  /** The axes the last size was drawn at other than asked, empty when it was drawn as asked. */
64
- clamped: V3SizeClamp[];
72
+ clamped: FigureSizeClamp[];
65
73
  /** The size it is drawn at: the one asked, within what the figure declares. Null at the authored size. */
66
74
  get drawnSize(): Vec3Like | null;
75
+ /**
76
+ * The design values a board sets for this instance (ADR-0096, \`state.designInputs\`): only the inputs the figure
77
+ * publishes, within their range. The whole set is tried first; if the figure cannot be made with it (a row past its
78
+ * limit), the previous values stay and \`designRefused\` says why. Not a per-frame path: a change re-evaluates once.
79
+ */
80
+ setDesignInputs(values: Record<string, unknown>): void;
81
+ /** The design values this instance evaluates with, as accepted. */
82
+ get designValues(): Record<string, number>;
67
83
  /** External control sources: state values a connector or the board wrote. These win over drivers. */
68
84
  setState(values: Record<string, number>): void;
69
85
  /** The playback group a driver belongs to, as the asset declares it. The id is opaque; nothing is read out of it. */
70
- static clipOf(driver: V3Driver): string;
86
+ static clipOf(driver: FigureDriver): string;
71
87
  /** The asset's clip names, in driver order. */
72
88
  get clips(): string[];
73
89
  /** Playback time in seconds of one clip. Each driver is evaluated at its own clip's time. */
@@ -85,7 +101,7 @@ export declare class FigureV3Rig {
85
101
  /** The external values as last set, for readers that want to know what masks the drivers. */
86
102
  get externalState(): Record<string, number>;
87
103
  /** Evaluate at the current size, state and time, and bring the meshes up to date. */
88
- update(): V3AssetEvaluation;
104
+ update(): FigureAssetEvaluation;
89
105
  /**
90
106
  * The node a held thing hangs from at one place (`capabilities.bindings`). It is a child of the group that every
91
107
  * update moves to the place's pose, so what hangs from it follows the part it sits on -- through the joints too --
@@ -114,7 +130,7 @@ export declare class FigureV3Rig {
114
130
  */
115
131
  /** The inputs this rig evaluates at now: the figure's defaults, its drivers and external values, and its size. */
116
132
  evaluationInputs(): Record<string, number>;
117
- evaluate(): V3AssetEvaluation;
133
+ evaluate(): FigureAssetEvaluation;
118
134
  private colourOf;
119
135
  private materialFor;
120
136
  /** Meshes by body id, for tests and for bindings that need a part's mesh. */
@@ -123,4 +139,4 @@ export declare class FigureV3Rig {
123
139
  drawnIds(): string[];
124
140
  dispose(): void;
125
141
  }
126
- //# sourceMappingURL=figure-v3-rig.d.ts.map
142
+ //# sourceMappingURL=figure-rig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figure-rig.d.ts","sourceRoot":"","sources":["../../src/figure/figure-rig.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAIL,KAAK,WAAW,EAChB,KA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AC,MAAM,EAAE,MAAM,CAAC;IAkBxC,6FAA6F;IAC7F,IAAI,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE1C;IAED,qFAAqF;IACrF,MAAM,IAAI,qBAAqB;IA2F/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,CAAC,QAAQ,GAAG,IAAI;IAc5C,OAAO,CAAC,MAAM,CAAC,IAAI;IAKnB,uGAAuG;IACvG,OAAO,CAAC,MAAM;IAcd,uGAAuG;IACvG,OAAO,CAAC,MAAM,CAAC,QAAQ;IAMvB;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAUvE,uGAAuG;IACvG,IAAI,KAAK,IAAI;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAIjE;IAED;;;OAGG;IACH,kHAAkH;IAClH,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAU1C,QAAQ,IAAI,qBAAqB;IAqBjC,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,WAAW;IAqBnB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,CAAC,IAAI,GAAG,SAAS;IAI1C,yHAAyH;IACzH,QAAQ,IAAI,MAAM,EAAE;IAMpB,OAAO,IAAI,IAAI;CAehB"}
@@ -10,7 +10,7 @@ import * as THREE from 'three';
10
10
  */
11
11
  export declare function pushed(shape: THREE.Shape, depth: number, lift: number): THREE.BufferGeometry;
12
12
  /**
13
- * A rounded rectangle whose corners have two semi-axes (V3 `rounded-box@2`, shape-dimension contract §1): each
13
+ * A rounded rectangle whose corners have two semi-axes (`rounded-box@2`, shape-dimension contract §1): each
14
14
  * corner is the quadratic Bézier from the end of one edge to the start of the next with the corner as control
15
15
  * point, `roundX` along X and `roundZ` along Z.
16
16
  */
@@ -1,4 +1,4 @@
1
- import type { RegisteredV3Figure } from './figure-v3-registry.js';
1
+ import type { RegisteredFigureFigure } from './figure-registry.js';
2
2
  export interface FigureTopShape {
3
3
  /** The body it is. */
4
4
  id: string;
@@ -26,9 +26,9 @@ export declare function convexHull(points: ReadonlyArray<readonly [number, numbe
26
26
  * The figure's plan at a size (mm; null for its authored size). A body the asset does not show, or a shape with no
27
27
  * sample points, is left out.
28
28
  */
29
- export declare function figureTopView(figure: RegisteredV3Figure, size: {
29
+ export declare function figureTopView(figure: RegisteredFigureFigure, size: {
30
30
  x: number;
31
31
  y: number;
32
32
  z: number;
33
33
  } | null): FigureTopView;
34
- //# sourceMappingURL=figure-v3-top-view.d.ts.map
34
+ //# sourceMappingURL=figure-top-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"figure-top-view.d.ts","sourceRoot":"","sources":["../../src/figure/figure-top-view.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAElE,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,gHAAgH;IAChH,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAChC,mFAAmF;IACnF,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IACrC,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,gHAAgH;IAChH,IAAI,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD;AAED,wGAAwG;AACxG,wBAAgB,UAAU,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAgBpG;AAKD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,sBAAsB,EAAE,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,aAAa,CAoD7H"}