@hatiolab/things-scene 10.1.60 → 10.1.62
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-types/figure/figure-capability.d.ts +4 -4
- package/dist-types/figure/figure-capability.d.ts.map +1 -1
- package/dist-types/figure/{v3/figure-v3-compile-cache.d.ts → figure-compile-cache.d.ts} +14 -14
- package/dist-types/figure/figure-compile-cache.d.ts.map +1 -0
- package/dist-types/figure/figure-geometry.d.ts +11 -0
- package/dist-types/figure/figure-geometry.d.ts.map +1 -0
- package/dist-types/figure/figure-instance.d.ts +2 -2
- package/dist-types/figure/{v3/figure-v3-part-component.d.ts → figure-part-component.d.ts} +59 -59
- package/dist-types/figure/figure-part-component.d.ts.map +1 -0
- package/dist-types/figure/{v3/figure-v3-real-object.d.ts → figure-real-object.d.ts} +9 -9
- package/dist-types/figure/figure-real-object.d.ts.map +1 -0
- package/dist-types/figure/figure-registry.d.ts +13 -0
- package/dist-types/figure/figure-registry.d.ts.map +1 -0
- package/dist-types/figure/{v3/figure-v3-rig.d.ts → figure-rig.d.ts} +14 -14
- package/dist-types/figure/figure-rig.d.ts.map +1 -0
- package/dist-types/figure/figure-shape.d.ts +1 -1
- package/dist-types/figure/{v3/figure-v3-top-view.d.ts → figure-top-view.d.ts} +3 -3
- package/dist-types/figure/figure-top-view.d.ts.map +1 -0
- package/dist-types/figure/index.d.ts +4 -4
- package/dist-types/figure/index.d.ts.map +1 -1
- package/dist-types/threed/instanced-set.d.ts +1 -1
- package/dist-types/threed/managers/gizmo-operation-manager.d.ts +12 -0
- package/dist-types/threed/managers/gizmo-operation-manager.d.ts.map +1 -1
- package/package.json +3 -3
- package/things-scene-min.js +2 -2
- package/things-scene-min.js.map +1 -1
- package/things-scene.mjs +3 -3
- package/things-scene.mjs.map +1 -1
- package/dist-types/figure/v3/figure-v3-compile-cache.d.ts.map +0 -1
- package/dist-types/figure/v3/figure-v3-geometry.d.ts +0 -11
- package/dist-types/figure/v3/figure-v3-geometry.d.ts.map +0 -1
- package/dist-types/figure/v3/figure-v3-part-component.d.ts.map +0 -1
- package/dist-types/figure/v3/figure-v3-real-object.d.ts.map +0 -1
- package/dist-types/figure/v3/figure-v3-registry.d.ts +0 -13
- package/dist-types/figure/v3/figure-v3-registry.d.ts.map +0 -1
- package/dist-types/figure/v3/figure-v3-rig.d.ts.map +0 -1
- 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,
|
|
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
|
|
53
|
-
* always named
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
4
|
-
export interface
|
|
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 `
|
|
9
|
-
compiled:
|
|
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:
|
|
15
|
+
document: FigureCompiledCapabilities;
|
|
16
16
|
/** Appearance by placing node id (a `place@1` id or a repeated `member@1` id). */
|
|
17
|
-
looks: Map<string,
|
|
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:
|
|
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
|
|
25
|
-
/** The compiled asset for this content under this kernel, compiled once. Throws what `
|
|
26
|
-
export declare function
|
|
27
|
-
export declare function
|
|
28
|
-
export declare function
|
|
29
|
-
//# sourceMappingURL=figure-
|
|
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,EAA4F,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,KAAK,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAerO,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,CA2BnE;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. `
|
|
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,7 +262,7 @@ export declare class FigureInstance extends FigureInstance_base {
|
|
|
262
262
|
* `classFields` 로 보인다(`types/capability.ts`). 같은 낱말·같은 자리에 두어 그쪽이 읽을 수
|
|
263
263
|
* 있게 한다(ADR-0045).
|
|
264
264
|
*
|
|
265
|
-
* What draws uses `
|
|
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;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import Component from '
|
|
3
|
-
import Shape from '
|
|
4
|
-
import type { SceneRenderContext } from '
|
|
5
|
-
import type { IRealObject } from '
|
|
6
|
-
import type { ComponentNature, Properties } from '
|
|
7
|
-
import { RealObject } from '
|
|
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
|
|
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
|
|
19
|
-
shape?:
|
|
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
|
|
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
|
|
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
|
|
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("
|
|
89
|
-
removed(parent: import("
|
|
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("
|
|
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("
|
|
118
|
+
setState(props: Partial<import("../index.js").State> | string, propval?: any): any;
|
|
119
119
|
get model(): any;
|
|
120
|
-
get state(): import("
|
|
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("
|
|
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("
|
|
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("
|
|
140
|
-
set center(p: import("
|
|
141
|
-
get location(): import("
|
|
142
|
-
set location(l: import("
|
|
143
|
-
get rotate(): import("
|
|
144
|
-
set rotate(r: import("
|
|
145
|
-
get dimension(): import("
|
|
146
|
-
set dimension(d: import("
|
|
147
|
-
get drawPath(): import("
|
|
148
|
-
get rotatePoint(): import("
|
|
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("
|
|
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("
|
|
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("
|
|
204
|
+
get animation(): import("../index.js").AnimationController | undefined;
|
|
205
205
|
get started(): boolean;
|
|
206
206
|
set started(v: boolean);
|
|
207
|
-
get controls(): import("
|
|
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("
|
|
224
|
-
get app(): import("
|
|
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("
|
|
231
|
-
mutatePath(beforeLogic: ((path: import("
|
|
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("
|
|
241
|
-
transcoordP2S(x: number, y: number, rp?: import("
|
|
242
|
-
transcoordS2T(x: number, y: number, top?: Component): import("
|
|
243
|
-
transcoordT2P(x: number, y: number, top?: Component): import("
|
|
244
|
-
transcoordT2S(x: number, y: number, top?: Component): import("
|
|
245
|
-
transcoordS2TR(x: number, y: number, top?: Component): import("
|
|
246
|
-
transcoordS2O(x: number, y: number, target: Component): import("
|
|
247
|
-
transcoordC2S(x: number, y: number, top?: Component): import("
|
|
248
|
-
transcoordS2C(x: number, y: number, top?: Component): import("
|
|
249
|
-
toParent(x: number, y: number, rp?: import("
|
|
250
|
-
fromParent(x: number, y: number, rp?: import("
|
|
251
|
-
toScene(x: number, y: number, top?: Component): import("
|
|
252
|
-
fromScene(x: number, y: number, top?: Component): import("
|
|
253
|
-
toLocal(x: number, y: number, top?: Component): import("
|
|
254
|
-
toGlobal(x: number, y: number, top?: Component): import("
|
|
255
|
-
toOther(x: number, y: number, target: Component): import("
|
|
256
|
-
on<K extends keyof import("
|
|
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("
|
|
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("
|
|
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("
|
|
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
|
|
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-
|
|
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,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEzE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAkCrD,sDAAsD;AACtD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACvD;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE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@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { RealObject } from '
|
|
3
|
-
import type { Properties } from '
|
|
4
|
-
import { type
|
|
5
|
-
export declare class
|
|
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():
|
|
8
|
+
get figure(): RegisteredFigureFigure | null;
|
|
9
9
|
protected getObject3dInstance(): THREE.Group;
|
|
10
10
|
build(): void;
|
|
11
11
|
/** The instance's design values: \`state.designInputs\`, input → value, for the inputs the figure publishes (ADR-0096). */
|
|
@@ -25,7 +25,7 @@ export declare class FigureV3RealObject extends RealObject<THREE.Group> {
|
|
|
25
25
|
} | null;
|
|
26
26
|
get effectiveDepth(): number;
|
|
27
27
|
/**
|
|
28
|
-
* Where it stands when the board did not say: what the asset
|
|
28
|
+
* Where it stands when the board did not say: what the asset says it is authored from (`placement`). A
|
|
29
29
|
* ceiling figure hangs with its top at the site's ceiling; a written `zPos` wins (ADR-0045).
|
|
30
30
|
*/
|
|
31
31
|
get effectiveZPos(): number;
|
|
@@ -33,7 +33,7 @@ export declare class FigureV3RealObject extends RealObject<THREE.Group> {
|
|
|
33
33
|
/**
|
|
34
34
|
* The asset frame rises from the floor -- its y = 0 is the bottom of the instance (ADR-0065) -- while the object3d
|
|
35
35
|
* stands at the centre of the instance's box, as every real object does. The rig is lowered by half the instance's
|
|
36
|
-
* height so the figure stands on the box's bottom. Without it every
|
|
36
|
+
* height so the figure stands on the box's bottom. Without it every figure stood half its height in the air, on a
|
|
37
37
|
* board and in the modeller's preview (user, 2026-09-24: 「왜 공중에 떠있는거지? 바닥기반인데」).
|
|
38
38
|
*/
|
|
39
39
|
private seat;
|
|
@@ -41,7 +41,7 @@ export declare class FigureV3RealObject extends RealObject<THREE.Group> {
|
|
|
41
41
|
* Where the board asked for a size the figure does not declare, the size it is drawn at instead -- per axis, empty
|
|
42
42
|
* when it is drawn as asked. For a board to say so ("X 4000 → 2000, the largest it declares").
|
|
43
43
|
*/
|
|
44
|
-
get sizeClamps(): import("./figure-
|
|
44
|
+
get sizeClamps(): import("./figure-rig.js").FigureSizeClamp[];
|
|
45
45
|
/** Re-reads the design values: the instance is made again with them, once (ADR-0096). */
|
|
46
46
|
updateDesignInputs(): void;
|
|
47
47
|
/** Re-reads the external state values. Clip times are untouched: a value written or withdrawn does not restart a clip. */
|
|
@@ -80,4 +80,4 @@ export declare class FigureV3RealObject extends RealObject<THREE.Group> {
|
|
|
80
80
|
* coordinate mode (`zPos` means the bottom in floor mode, the centre in space mode, the top when inverted).
|
|
81
81
|
*/
|
|
82
82
|
export declare function ceilingZPos(mode: 'floor' | 'space' | 'inverted', ceiling: number, depth: number): number;
|
|
83
|
-
//# sourceMappingURL=figure-
|
|
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,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxD,OAAO,EAAa,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAG7E,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC;IAC3D,OAAO,CAAC,GAAG,CAAyB;IACpC,OAAO,CAAC,WAAW,CAAC,CAAa;IAEjC,IAAI,MAAM,IAAI,sBAAsB,GAAG,IAAI,CAE1C;cAEkB,mBAAmB,IAAI,KAAK,CAAC,KAAK;IAI5C,KAAK,IAA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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,EAA8C,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAErG,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
|
|
3
|
-
import { type
|
|
4
|
-
export interface
|
|
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
|
|
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
|
|
23
|
+
export declare class FigureRig {
|
|
24
24
|
readonly group: THREE.Group<THREE.Object3DEventMap>;
|
|
25
|
-
readonly compiled:
|
|
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;
|
|
@@ -56,9 +56,9 @@ export declare class FigureV3Rig {
|
|
|
56
56
|
*/
|
|
57
57
|
private planned?;
|
|
58
58
|
/** The last evaluation, for readers that want the numbers behind the meshes. */
|
|
59
|
-
last:
|
|
60
|
-
constructor(asset:
|
|
61
|
-
get asset():
|
|
59
|
+
last: FigureAssetEvaluation | null;
|
|
60
|
+
constructor(asset: FigureAsset, options?: FigureRigOptions);
|
|
61
|
+
get asset(): FigureAsset;
|
|
62
62
|
/** The size the asset was authored at: its stored `size.*` design inputs, or null when it is not resizable. */
|
|
63
63
|
get base(): Vec3Like | null;
|
|
64
64
|
/**
|
|
@@ -69,7 +69,7 @@ export declare class FigureV3Rig {
|
|
|
69
69
|
*/
|
|
70
70
|
setSize(size: Vec3Like | null): void;
|
|
71
71
|
/** The axes the last size was drawn at other than asked, empty when it was drawn as asked. */
|
|
72
|
-
clamped:
|
|
72
|
+
clamped: FigureSizeClamp[];
|
|
73
73
|
/** The size it is drawn at: the one asked, within what the figure declares. Null at the authored size. */
|
|
74
74
|
get drawnSize(): Vec3Like | null;
|
|
75
75
|
/**
|
|
@@ -83,7 +83,7 @@ export declare class FigureV3Rig {
|
|
|
83
83
|
/** External control sources: state values a connector or the board wrote. These win over drivers. */
|
|
84
84
|
setState(values: Record<string, number>): void;
|
|
85
85
|
/** The playback group a driver belongs to, as the asset declares it. The id is opaque; nothing is read out of it. */
|
|
86
|
-
static clipOf(driver:
|
|
86
|
+
static clipOf(driver: FigureDriver): string;
|
|
87
87
|
/** The asset's clip names, in driver order. */
|
|
88
88
|
get clips(): string[];
|
|
89
89
|
/** Playback time in seconds of one clip. Each driver is evaluated at its own clip's time. */
|
|
@@ -101,7 +101,7 @@ export declare class FigureV3Rig {
|
|
|
101
101
|
/** The external values as last set, for readers that want to know what masks the drivers. */
|
|
102
102
|
get externalState(): Record<string, number>;
|
|
103
103
|
/** Evaluate at the current size, state and time, and bring the meshes up to date. */
|
|
104
|
-
update():
|
|
104
|
+
update(): FigureAssetEvaluation;
|
|
105
105
|
/**
|
|
106
106
|
* The node a held thing hangs from at one place (`capabilities.bindings`). It is a child of the group that every
|
|
107
107
|
* update moves to the place's pose, so what hangs from it follows the part it sits on -- through the joints too --
|
|
@@ -130,7 +130,7 @@ export declare class FigureV3Rig {
|
|
|
130
130
|
*/
|
|
131
131
|
/** The inputs this rig evaluates at now: the figure's defaults, its drivers and external values, and its size. */
|
|
132
132
|
evaluationInputs(): Record<string, number>;
|
|
133
|
-
evaluate():
|
|
133
|
+
evaluate(): FigureAssetEvaluation;
|
|
134
134
|
private colourOf;
|
|
135
135
|
private materialFor;
|
|
136
136
|
/** Meshes by body id, for tests and for bindings that need a part's mesh. */
|
|
@@ -139,4 +139,4 @@ export declare class FigureV3Rig {
|
|
|
139
139
|
drawnIds(): string[];
|
|
140
140
|
dispose(): void;
|
|
141
141
|
}
|
|
142
|
-
//# sourceMappingURL=figure-
|
|
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,KAAK,qBAAqB,EAE1B,KAAK,YAAY,EAClB,MAAM,wBAAwB,CAAA;AAI/B,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAGjF,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED,iHAAiH;AACjH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,KAAK,GAAG,KAAK,CAAA;C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AE,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 (
|
|
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 {
|
|
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:
|
|
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-
|
|
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"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Authored figures in things-scene.
|
|
3
3
|
*
|
|
4
|
-
* Reading this module wires `
|
|
4
|
+
* Reading this module wires `registerFigure()` up: `figure-instance.ts` hands its component class to the registry
|
|
5
5
|
* seam as it loads, so the instance is read first.
|
|
6
6
|
*/
|
|
7
7
|
export * from './figure-instance.js';
|
|
8
8
|
export * from './figure-capability.js';
|
|
9
9
|
export * from './figure-palette.js';
|
|
10
10
|
export * from './figure-component.js';
|
|
11
|
-
export * from './
|
|
12
|
-
export {
|
|
13
|
-
export * from './
|
|
11
|
+
export * from './figure-registry.js';
|
|
12
|
+
export { acquireFigureGeometry, releaseFigureGeometry, buildFigureGeometry } from './figure-geometry.js';
|
|
13
|
+
export * from './figure-part-component.js';
|
|
14
14
|
export * from './figure-shape.js';
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/figure/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,cAAc,sBAAsB,CAAA;AAKpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAErC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/figure/index.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,cAAc,sBAAsB,CAAA;AAKpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AAErC,cAAc,sBAAsB,CAAA;AAKpC,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AACxG,cAAc,4BAA4B,CAAA;AAC1C,cAAc,mBAAmB,CAAA"}
|
|
@@ -137,7 +137,7 @@ export declare class InstancedSet {
|
|
|
137
137
|
*/
|
|
138
138
|
setCount(count: number): void;
|
|
139
139
|
/**
|
|
140
|
-
* 인스턴스 하나의 행렬을 그대로 쓴다 — 자리와 회전이 이미 행렬로 있는 곳(
|
|
140
|
+
* 인스턴스 하나의 행렬을 그대로 쓴다 — 자리와 회전이 이미 행렬로 있는 곳(Figure 의 줄 복제). 자리·회전·크기로
|
|
141
141
|
* 나눠 다시 짓지 않는다.
|
|
142
142
|
*/
|
|
143
143
|
setMatrix(index: number, matrix: THREE.Matrix4): void;
|