@flighthq/types 0.5.1-next.1801.21234f6 → 0.5.1-next.1850.5adb645
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/README.md +2 -2
- package/dist/BitmapFontImportOptions.d.ts +6 -1
- package/dist/BitmapFontImportOptions.d.ts.map +1 -1
- package/dist/ColladaDecoding.d.ts +66 -0
- package/dist/ColladaDecoding.d.ts.map +1 -1
- package/dist/LottieDocumentImport.d.ts +2 -1
- package/dist/LottieDocumentImport.d.ts.map +1 -1
- package/dist/LottieRegistry.d.ts +67 -2
- package/dist/LottieRegistry.d.ts.map +1 -1
- package/dist/LottieRegistry.js +16 -0
- package/dist/LottieRegistry.js.map +1 -1
- package/dist/ParticleFormatDescriptor.d.ts +6 -1
- package/dist/ParticleFormatDescriptor.d.ts.map +1 -1
- package/dist/SpritesheetFormatDescriptor.d.ts +6 -1
- package/dist/SpritesheetFormatDescriptor.d.ts.map +1 -1
- package/dist/StlFeatures.d.ts +20 -0
- package/dist/StlFeatures.d.ts.map +1 -0
- package/dist/StlFeatures.js +2 -0
- package/dist/StlFeatures.js.map +1 -0
- package/dist/StlImportOptions.d.ts +30 -0
- package/dist/StlImportOptions.d.ts.map +1 -0
- package/dist/StlImportOptions.js +2 -0
- package/dist/StlImportOptions.js.map +1 -0
- package/dist/SvgDocumentImport.d.ts +2 -1
- package/dist/SvgDocumentImport.d.ts.map +1 -1
- package/dist/SvgRegistry.d.ts +25 -0
- package/dist/SvgRegistry.d.ts.map +1 -1
- package/dist/SvgRegistry.js +13 -0
- package/dist/SvgRegistry.js.map +1 -1
- package/dist/TextureAtlasFormatDescriptor.d.ts +6 -1
- package/dist/TextureAtlasFormatDescriptor.d.ts.map +1 -1
- package/dist/ThreeDsChunkHandler.d.ts +10 -8
- package/dist/ThreeDsChunkHandler.d.ts.map +1 -1
- package/dist/TilemapImportOptions.d.ts +6 -1
- package/dist/TilemapImportOptions.d.ts.map +1 -1
- package/dist/contract.d.ts +2 -0
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +2 -0
- package/dist/contract.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/LottieRegistry.test.ts +41 -0
package/README.md
CHANGED
|
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/types`. The `@flight
|
|
|
13
13
|
This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
|
|
14
14
|
|
|
15
15
|
- [Flight project](https://github.com/flighthq/flight)
|
|
16
|
-
- [Source for @flighthq/types@0.5.1-next.
|
|
17
|
-
- [License](https://github.com/flighthq/flight/blob/
|
|
16
|
+
- [Source for @flighthq/types@0.5.1-next.1850.5adb645](https://github.com/flighthq/flight/tree/5adb6452e4ef06da8814f178dbfa85856a092f4f/packages/types)
|
|
17
|
+
- [License](https://github.com/flighthq/flight/blob/5adb6452e4ef06da8814f178dbfa85856a092f4f/LICENSE.md)
|
|
@@ -31,7 +31,12 @@ export interface BitmapFontFormatDescriptor {
|
|
|
31
31
|
* (`readBitmapFontFormatKind`) and answers only for its own kind, so no font file is accepted by two; that is
|
|
32
32
|
* measured by reversing the preset, not asserted. A caller may reorder or subset this list.
|
|
33
33
|
*
|
|
34
|
-
*
|
|
34
|
+
* ★ PLAIN DATA A CALLER STATES, NOT SOMETHING A BUILD GENERATES. An earlier version of this comment promised a
|
|
35
|
+
* generated manifest module would name the one format a document needs. It cannot: installing any subset goes
|
|
36
|
+
* through the applier, the applier reaches the registry initializer, and the initializer seeds the FULL preset — so
|
|
37
|
+
* a build that named one format linked every sibling codec anyway. Measured on a real production bundle, the
|
|
38
|
+
* one-format route cost the same as the all-formats route. A caller who wants one codec imports that codec
|
|
39
|
+
* directly; this list is for a caller who wants the registry and accepts its cost knowingly.
|
|
35
40
|
* Applying it is a separate explicit step — nothing is registered by importing anything.
|
|
36
41
|
*
|
|
37
42
|
* Omitting `formats` installs nothing. The full preset is `bitmapFontAllFormats`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitmapFontImportOptions.d.ts","sourceRoot":"","sources":["../src/BitmapFontImportOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC;IACjD,KAAK,EAAE,CACL,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC3B,OAAO,CAAC,EAAE,QAAQ,CAAC,sBAAsB,CAAC,EAC1C,WAAW,CAAC,EAAE,gBAAgB,EAAE,KAC7B,UAAU,GAAG,IAAI,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;CACrC;AAED
|
|
1
|
+
{"version":3,"file":"BitmapFontImportOptions.d.ts","sourceRoot":"","sources":["../src/BitmapFontImportOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC;IACjD,KAAK,EAAE,CACL,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC3B,OAAO,CAAC,EAAE,QAAQ,CAAC,sBAAsB,CAAC,EAC1C,WAAW,CAAC,EAAE,gBAAgB,EAAE,KAC7B,UAAU,GAAG,IAAI,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,QAAQ,CAAC,0BAA0B,CAAC,EAAE,CAAC;CACpE"}
|
|
@@ -123,10 +123,76 @@ export interface ColladaParseContext {
|
|
|
123
123
|
* a decoder that returned state would invite two sources of truth for the same feature.
|
|
124
124
|
*/
|
|
125
125
|
export interface ColladaElementDecoder {
|
|
126
|
+
/**
|
|
127
|
+
* Turns what this decoder read into scene content, after the node walk.
|
|
128
|
+
*
|
|
129
|
+
* ★ WHY A SECOND STEP EXISTS AT ALL. Half of a COLLADA feature cannot run during `decode`: a camera is
|
|
130
|
+
* declared in a library and INSTANTIATED by a node, so binding one needs the node indices the walk has not
|
|
131
|
+
* produced yet. The parser used to hold that half itself, calling `resolveColladaCameras`,
|
|
132
|
+
* `resolveColladaLights`, `resolveColladaSkins` and `resolveColladaAnimations` by name — which made every
|
|
133
|
+
* caller link all four whatever family they asked for, because the orchestrator named them. Moving it here
|
|
134
|
+
* puts BOTH halves of a feature in the feature's own module, which is what makes omitting one omit its code.
|
|
135
|
+
*
|
|
136
|
+
* Optional: a feature whose whole job finishes during `decode` — materials index themselves and are read by
|
|
137
|
+
* the walk — declares none, and the builder skips it.
|
|
138
|
+
*/
|
|
139
|
+
build?(context: Readonly<ColladaBuildContext>): void;
|
|
140
|
+
/**
|
|
141
|
+
* Where this decoder's `build` runs relative to the others; lower runs first. Absent sorts last.
|
|
142
|
+
*
|
|
143
|
+
* The sequence is load-bearing and it is the one the single function ran inline: cameras and lights attach to
|
|
144
|
+
* nodes, skins then rewrite the meshes those nodes point at, and animations address nodes by the index map all
|
|
145
|
+
* three have finished populating. A number rather than an array position so a caller's family order cannot
|
|
146
|
+
* change the parse — the same reason AWD2's handlers carry `buildPhase`.
|
|
147
|
+
*/
|
|
148
|
+
readonly buildPhase?: number;
|
|
126
149
|
/** The COLLADA elements this decoder reads, by local name. */
|
|
127
150
|
readonly elements: readonly string[];
|
|
128
151
|
/** The features it provides, matching the analyzer's feature vocabulary. */
|
|
129
152
|
readonly features: readonly string[];
|
|
130
153
|
decode(context: Readonly<ColladaParseContext>): void;
|
|
131
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* What a decoder's `build` step is handed: the scene walk's results, plus the deferred instantiations it left.
|
|
157
|
+
*
|
|
158
|
+
* ★ THE DEFERRED LISTS ARE WHY THIS TYPE EXISTS. A COLLADA node says `<instance_camera url="#eye"/>`; the walk
|
|
159
|
+
* cannot resolve that until the camera library is indexed AND the node exists, so it records the pairing and
|
|
160
|
+
* moves on. Each list is OWNED BY ONE DECODER exactly as each map on `ColladaParseContext` is, and a decoder that
|
|
161
|
+
* is absent simply leaves its list unread — the same reason a missing decoder yields a smaller scene rather than
|
|
162
|
+
* a broken one.
|
|
163
|
+
*
|
|
164
|
+
* `parse` is the decode-phase context, carried through so a build step can read the maps it filled without the
|
|
165
|
+
* parser copying them into a second shape.
|
|
166
|
+
*/
|
|
167
|
+
export interface ColladaBuildContext {
|
|
168
|
+
/** Cameras a node instantiated, owned by the camera decoder. */
|
|
169
|
+
readonly deferredCameras: readonly ColladaDeferredCameraBinding[];
|
|
170
|
+
/** Controllers a node instantiated, owned by the controller decoder. */
|
|
171
|
+
readonly deferredControllers: readonly ColladaDeferredControllerBinding[];
|
|
172
|
+
/** Lights a node instantiated, owned by the light decoder. */
|
|
173
|
+
readonly deferredLights: readonly ColladaDeferredLightBinding[];
|
|
174
|
+
/** COLLADA node id to its index in `document.nodes`, filled by the walk and read by animations and skins. */
|
|
175
|
+
readonly nodeIdMap: ReadonlyMap<string, number>;
|
|
176
|
+
/** The decode-phase context, so a build step reads the maps its own decode filled. */
|
|
177
|
+
readonly parse: Readonly<ColladaParseContext>;
|
|
178
|
+
/** The indices of the scene's root nodes, in document order. */
|
|
179
|
+
readonly rootNodeIndices: readonly number[];
|
|
180
|
+
}
|
|
181
|
+
/** A controller a node instantiated, waiting for the node walk to finish. */
|
|
182
|
+
export interface ColladaDeferredControllerBinding {
|
|
183
|
+
controllerId: string;
|
|
184
|
+
materialOverrides: ReadonlyMap<string, number>;
|
|
185
|
+
nodeIndex: number;
|
|
186
|
+
skeletonRoot: string | null;
|
|
187
|
+
}
|
|
188
|
+
/** A camera a node instantiated, waiting for the node walk to finish. */
|
|
189
|
+
export interface ColladaDeferredCameraBinding {
|
|
190
|
+
cameraId: string;
|
|
191
|
+
nodeIndex: number;
|
|
192
|
+
}
|
|
193
|
+
/** A light a node instantiated, waiting for the node walk to finish. */
|
|
194
|
+
export interface ColladaDeferredLightBinding {
|
|
195
|
+
nodeIndex: number;
|
|
196
|
+
url: string;
|
|
197
|
+
}
|
|
132
198
|
//# sourceMappingURL=ColladaDecoding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColladaDecoding.d.ts","sourceRoot":"","sources":["../src/ColladaDecoding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAA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BAA4B;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wEAAwE;AACxE,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -3,9 +3,10 @@ import type { DisplayObject } from './DisplayObject.ts';
|
|
|
3
3
|
import type { Entity } from './Entity.ts';
|
|
4
4
|
import type { ImageResource } from './ImageResource.ts';
|
|
5
5
|
import type { LottieImageAsset } from './LottieDocument.ts';
|
|
6
|
-
import type { LottieAdvancedBlend, LottieLayerHandlerEntry, LottieShapeItemHandlerEntry } from './LottieRegistry.ts';
|
|
6
|
+
import type { LottieAdvancedBlend, LottieLayerHandlerEntry, LottieMaskHandlerEntry, LottieShapeItemHandlerEntry } from './LottieRegistry.ts';
|
|
7
7
|
export interface LottieDocumentImportOptions {
|
|
8
8
|
layerHandlers?: LottieLayerHandlerEntry[];
|
|
9
|
+
maskHandlers?: LottieMaskHandlerEntry[];
|
|
9
10
|
resolveImageResource?: (asset: Readonly<LottieImageAsset>) => ImageResource | null;
|
|
10
11
|
shapeItemHandlers?: LottieShapeItemHandlerEntry[];
|
|
11
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LottieDocumentImport.d.ts","sourceRoot":"","sources":["../src/LottieDocumentImport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"LottieDocumentImport.d.ts","sourceRoot":"","sources":["../src/LottieDocumentImport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC5B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,2BAA2B;IAC1C,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC1C,YAAY,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACxC,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,gBAAgB,CAAC,KAAK,aAAa,GAAG,IAAI,CAAC;IACnF,iBAAiB,CAAC,EAAE,2BAA2B,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,0BAA2B,SAAQ,MAAM;IACxD,cAAc,EAAE,mBAAmB,EAAE,CAAC;IACtC,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC;CACrB"}
|
package/dist/LottieRegistry.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import type { AnimationChannel } from './AnimationChannel.ts';
|
|
|
3
3
|
import type { DisplayObject } from './DisplayObject.ts';
|
|
4
4
|
import type { ImageResource } from './ImageResource.ts';
|
|
5
5
|
import type { ImportDiagnostic } from './ImportDiagnostic.ts';
|
|
6
|
-
import type { LottieAsset, LottieDocument, LottieImageAsset, LottieLayer, LottieShapeItem } from './LottieDocument.ts';
|
|
6
|
+
import type { LottieAsset, LottieDocument, LottieImageAsset, LottieLayer, LottieMask, LottieShapeItem } from './LottieDocument.ts';
|
|
7
|
+
import type { Node2D } from './Node2D.ts';
|
|
7
8
|
import type { Path } from './Path.ts';
|
|
8
9
|
import type { Shape } from './Shape.ts';
|
|
9
10
|
export declare const LottieLayerKind: {
|
|
@@ -27,6 +28,23 @@ export declare const LottieShapeItemKind: {
|
|
|
27
28
|
readonly TrimPath: "tm";
|
|
28
29
|
};
|
|
29
30
|
export type LottieShapeItemKind = string;
|
|
31
|
+
/**
|
|
32
|
+
* The mask composition modes the format declares.
|
|
33
|
+
*
|
|
34
|
+
* ★ A MASK BELONGS TO NO LAYER KIND, which is why it is a family of its own rather than part of one. A null, solid,
|
|
35
|
+
* image, text or shape layer may all carry masks, so the walk has to ask every layer — and while the reading lived in
|
|
36
|
+
* the document core, every build paid for the clip region and the bezier path reader even when nothing was masked.
|
|
37
|
+
*/
|
|
38
|
+
export declare const LottieMaskKind: {
|
|
39
|
+
readonly Additive: "a";
|
|
40
|
+
readonly Darken: "d";
|
|
41
|
+
readonly Difference: "f";
|
|
42
|
+
readonly Intersect: "i";
|
|
43
|
+
readonly Lighten: "l";
|
|
44
|
+
readonly None: "n";
|
|
45
|
+
readonly Subtract: "s";
|
|
46
|
+
};
|
|
47
|
+
export type LottieMaskKind = string;
|
|
30
48
|
export interface LottieAdvancedBlend {
|
|
31
49
|
mode: AdvancedBlendMode;
|
|
32
50
|
node: DisplayObject;
|
|
@@ -66,6 +84,27 @@ export interface LottieGradientPaint {
|
|
|
66
84
|
winding: 'evenOdd' | 'nonZero';
|
|
67
85
|
}
|
|
68
86
|
export type LottiePaint = LottieFillPaint | LottieGradientPaint | LottieStrokePaint;
|
|
87
|
+
/**
|
|
88
|
+
* How one paint draws the group's paths.
|
|
89
|
+
*
|
|
90
|
+
* ★ THE PAINTER IS THE ITEM'S, NOT THE SHAPE LAYER'S. The layer used to hold a `switch` over `paint.kind` with a branch
|
|
91
|
+
* per paint — solid fill, solid stroke, gradient fill, gradient stroke — which meant registering the fill item alone
|
|
92
|
+
* still linked the gradient builders, because the switch named them. Each item now pushes the closure that draws its
|
|
93
|
+
* own paint, so the layer calls painters in order and names none of them, and a paint nobody registered is a painter
|
|
94
|
+
* nobody wrote. `LottiePaint` stays the plain serializable description of what is drawn; this is the doing of it.
|
|
95
|
+
*/
|
|
96
|
+
export type LottieShapePainter = (shape: Shape, paths: readonly Path[]) => void;
|
|
97
|
+
/**
|
|
98
|
+
* How one item reshapes the group's paths once the whole group has been walked.
|
|
99
|
+
*
|
|
100
|
+
* ★ A MODIFIER CANNOT RUN WHEN ITS ITEM IS READ. Lottie's trim path reshapes every path in its group, including the ones
|
|
101
|
+
* declared after it, so the work has to happen after the walk — which is why it lived in the shape core and put
|
|
102
|
+
* `dashPath` into every build that read a shape layer, trim item registered or not. The item now pushes the closure and
|
|
103
|
+
* the core only runs them, in the order they were pushed.
|
|
104
|
+
*
|
|
105
|
+
* Modifiers mutate `paths` in place, because the paint painters and the animation rebindings already hold that array.
|
|
106
|
+
*/
|
|
107
|
+
export type LottieShapeModifier = (paths: Path[]) => void;
|
|
69
108
|
export interface LottieImportContext {
|
|
70
109
|
advancedBlends: LottieAdvancedBlend[];
|
|
71
110
|
assets: Map<string, LottieAsset>;
|
|
@@ -88,10 +127,35 @@ export interface LottieLayerHandlerEntry {
|
|
|
88
127
|
handle: LottieLayerHandler;
|
|
89
128
|
kind: LottieLayerKind;
|
|
90
129
|
}
|
|
130
|
+
export interface LottieMaskContext {
|
|
131
|
+
import: LottieImportContext;
|
|
132
|
+
/** The layer's masks with the disabled ones already dropped, in document order. */
|
|
133
|
+
masks: readonly Readonly<LottieMask>[];
|
|
134
|
+
target: Node2D;
|
|
135
|
+
}
|
|
136
|
+
export type LottieMaskHandler = (context: LottieMaskContext) => void;
|
|
137
|
+
export interface LottieMaskHandlerEntry {
|
|
138
|
+
handle: LottieMaskHandler;
|
|
139
|
+
kind: LottieMaskKind;
|
|
140
|
+
}
|
|
141
|
+
/** The seam a feature module binds a keyframed value through; the sample is owned by the track, never retained. */
|
|
142
|
+
export interface LottieMutableAnimationTarget {
|
|
143
|
+
lottieApply(sample: Readonly<number[] | Float32Array>, time: number): void;
|
|
144
|
+
}
|
|
91
145
|
export interface LottieShapeItemContext {
|
|
146
|
+
/**
|
|
147
|
+
* The keys item handlers have claimed for this group, so a handler can make itself once-per-group.
|
|
148
|
+
*
|
|
149
|
+
* ★ THE SET IS THE LAYER'S, THE KEYS ARE THE HANDLERS'. Lottie's trim path applies once per group — a second trim item
|
|
150
|
+
* is ignored rather than composed — and the shape layer must not be the thing that knows that, or the trim's rule
|
|
151
|
+
* moves back into the core the handler was extracted from. So the layer hands every item the same per-group set and
|
|
152
|
+
* reads none of it. Same shape as `LottieImportContext.resolvingPrecompositions`, one scope down.
|
|
153
|
+
*/
|
|
154
|
+
claims: Set<string>;
|
|
92
155
|
import: LottieImportContext;
|
|
93
156
|
item: Readonly<LottieShapeItem>;
|
|
94
|
-
|
|
157
|
+
modifiers: LottieShapeModifier[];
|
|
158
|
+
painters: LottieShapePainter[];
|
|
95
159
|
paths: Path[];
|
|
96
160
|
rerender: () => void;
|
|
97
161
|
shape: Shape;
|
|
@@ -103,6 +167,7 @@ export interface LottieShapeItemHandlerEntry {
|
|
|
103
167
|
}
|
|
104
168
|
export interface LottieRegistry {
|
|
105
169
|
layerHandlers: LottieLayerHandlerEntry[];
|
|
170
|
+
maskHandlers: LottieMaskHandlerEntry[];
|
|
106
171
|
shapeItemHandlers: LottieShapeItemHandlerEntry[];
|
|
107
172
|
}
|
|
108
173
|
//# sourceMappingURL=LottieRegistry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LottieRegistry.d.ts","sourceRoot":"","sources":["../src/LottieRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA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AED,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;AAErE,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,mHAAmH;AACnH,MAAM,WAAW,4BAA4B;IAC3C,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,GAAG,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5E;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;;;OAOG;IACH,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACpB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,IAAI,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAChC,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,sBAAsB,KAAK,IAAI,CAAC;AAE/E,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,sBAAsB,CAAC;IAC/B,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,uBAAuB,EAAE,CAAC;IACzC,YAAY,EAAE,sBAAsB,EAAE,CAAC;IACvC,iBAAiB,EAAE,2BAA2B,EAAE,CAAC;CAClD"}
|
package/dist/LottieRegistry.js
CHANGED
|
@@ -17,4 +17,20 @@ export const LottieShapeItemKind = {
|
|
|
17
17
|
Stroke: 'st',
|
|
18
18
|
TrimPath: 'tm',
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* The mask composition modes the format declares.
|
|
22
|
+
*
|
|
23
|
+
* ★ A MASK BELONGS TO NO LAYER KIND, which is why it is a family of its own rather than part of one. A null, solid,
|
|
24
|
+
* image, text or shape layer may all carry masks, so the walk has to ask every layer — and while the reading lived in
|
|
25
|
+
* the document core, every build paid for the clip region and the bezier path reader even when nothing was masked.
|
|
26
|
+
*/
|
|
27
|
+
export const LottieMaskKind = {
|
|
28
|
+
Additive: 'a',
|
|
29
|
+
Darken: 'd',
|
|
30
|
+
Difference: 'f',
|
|
31
|
+
Intersect: 'i',
|
|
32
|
+
Lighten: 'l',
|
|
33
|
+
None: 'n',
|
|
34
|
+
Subtract: 's',
|
|
35
|
+
};
|
|
20
36
|
//# sourceMappingURL=LottieRegistry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LottieRegistry.js","sourceRoot":"","sources":["../src/LottieRegistry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LottieRegistry.js","sourceRoot":"","sources":["../src/LottieRegistry.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,cAAc,EAAE,CAAC;IACjB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;CACC,CAAC;AAIX,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,IAAI;IAClB,cAAc,EAAE,IAAI;IACpB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;CACN,CAAC;AAIX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,GAAG;IACX,UAAU,EAAE,GAAG;IACf,SAAS,EAAE,GAAG;IACd,OAAO,EAAE,GAAG;IACZ,IAAI,EAAE,GAAG;IACT,QAAQ,EAAE,GAAG;CACL,CAAC"}
|
|
@@ -23,7 +23,12 @@ export interface ParticleFormatDescriptor {
|
|
|
23
23
|
* list is describing a different parse, not the same one rearranged, and a caller naming a subset is choosing
|
|
24
24
|
* which formats their build can read at all.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
26
|
+
* ★ PLAIN DATA A CALLER STATES, NOT SOMETHING A BUILD GENERATES. An earlier version of this comment promised a
|
|
27
|
+
* generated manifest module would name the one format a document needs. It cannot: installing any subset goes
|
|
28
|
+
* through the applier, the applier reaches the registry initializer, and the initializer seeds the FULL preset — so
|
|
29
|
+
* a build that named one format linked every sibling codec anyway. Measured on a real production bundle, the
|
|
30
|
+
* one-format route cost the same as the all-formats route. A caller who wants one codec imports that codec
|
|
31
|
+
* directly; this list is for a caller who wants the registry and accepts its cost knowingly.
|
|
27
32
|
* Applying it is a separate explicit step — nothing is registered by importing anything.
|
|
28
33
|
*
|
|
29
34
|
* Omitting `formats` installs nothing. The full preset is `particleAllFormats`, which reproduces what
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParticleFormatDescriptor.d.ts","sourceRoot":"","sources":["../src/ParticleFormatDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;;;;;;GASG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;CACnC;AAED
|
|
1
|
+
{"version":3,"file":"ParticleFormatDescriptor.d.ts","sourceRoot":"","sources":["../src/ParticleFormatDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;;;;;;GASG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,QAAQ,CAAC,wBAAwB,CAAC,EAAE,CAAC;CAClE"}
|
|
@@ -31,7 +31,12 @@ export interface SpritesheetFormatDescriptor {
|
|
|
31
31
|
* comes first. A caller who alphabetised this list would silently route every Aseprite file to the TexturePacker
|
|
32
32
|
* parser: the wrong parser, not an error. The narrower detector must precede the broader one it overlaps with.
|
|
33
33
|
*
|
|
34
|
-
*
|
|
34
|
+
* ★ PLAIN DATA A CALLER STATES, NOT SOMETHING A BUILD GENERATES. An earlier version of this comment promised a
|
|
35
|
+
* generated manifest module would name the one format a document needs. It cannot: installing any subset goes
|
|
36
|
+
* through the applier, the applier reaches the registry initializer, and the initializer seeds the FULL preset — so
|
|
37
|
+
* a build that named one format linked every sibling codec anyway. Measured on a real production bundle, the
|
|
38
|
+
* one-format route cost the same as the all-formats route. A caller who wants one codec imports that codec
|
|
39
|
+
* directly; this list is for a caller who wants the registry and accepts its cost knowingly.
|
|
35
40
|
* Applying it is a separate explicit step — nothing is registered by importing anything.
|
|
36
41
|
*
|
|
37
42
|
* Omitting `formats` installs nothing. The full preset is `spritesheetAllFormats`, which reproduces the built-in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpritesheetFormatDescriptor.d.ts","sourceRoot":"","sources":["../src/SpritesheetFormatDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,KAAK,eAAe,CAAC;CAC5E;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;CACtC;AAED
|
|
1
|
+
{"version":3,"file":"SpritesheetFormatDescriptor.d.ts","sourceRoot":"","sources":["../src/SpritesheetFormatDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,KAAK,eAAe,CAAC;CAC5E;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,QAAQ,CAAC,2BAA2B,CAAC,EAAE,CAAC;CACrE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which of STL's two encodings a file uses.
|
|
3
|
+
*
|
|
4
|
+
* The distinction is not cosmetic: the two are told apart by structure rather than by extension, because both
|
|
5
|
+
* are written as `.stl` and a binary file's 80-byte header is free to begin with the word `solid` — the exact
|
|
6
|
+
* text an ASCII file opens with.
|
|
7
|
+
*/
|
|
8
|
+
export type StlVariant = 'Ascii' | 'Binary';
|
|
9
|
+
/**
|
|
10
|
+
* What a census of one STL file found: which encoding it is, and how many triangles it carries.
|
|
11
|
+
*
|
|
12
|
+
* STL has exactly one feature — triangles — so there is nothing else a census could report. The triangle count
|
|
13
|
+
* is here because it is the number the binary bounds check already had to compute, and a caller deciding whether
|
|
14
|
+
* to load a file wants it.
|
|
15
|
+
*/
|
|
16
|
+
export interface StlFeatures {
|
|
17
|
+
triangleCount: number;
|
|
18
|
+
variant: StlVariant;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=StlFeatures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StlFeatures.d.ts","sourceRoot":"","sources":["../src/StlFeatures.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,UAAU,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StlFeatures.js","sourceRoot":"","sources":["../src/StlFeatures.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a facet's normal comes from.
|
|
3
|
+
*
|
|
4
|
+
* ★ STL STORES A NORMAL AND ALSO STORES THE WINDING, AND THEY DISAGREE IN REAL FILES. Every facet carries an
|
|
5
|
+
* explicit normal vector, and every facet also carries three vertices whose winding implies one. Exporters write
|
|
6
|
+
* zeros, write unnormalized vectors, and write normals that contradict their own winding; a loader that silently
|
|
7
|
+
* picks one source hides which.
|
|
8
|
+
*
|
|
9
|
+
* `RecomputeFromVertices` derives the normal from the vertex winding, so it can never disagree with the triangle
|
|
10
|
+
* it belongs to. `FileNormals` keeps the authored vector, for a caller who needs the file's own claim preserved.
|
|
11
|
+
*
|
|
12
|
+
* In BOTH policies a normal that cannot be used — zero-length or non-finite — falls back to the computed one.
|
|
13
|
+
* That is not a third policy: a zero vector is the absence of a normal, not a normal worth trusting, and a
|
|
14
|
+
* geometry carrying one would light as a black facet. The policy chooses between two real answers; it does not
|
|
15
|
+
* choose to emit a broken one.
|
|
16
|
+
*/
|
|
17
|
+
export type StlNormalPolicy = 'FileNormals' | 'RecomputeFromVertices';
|
|
18
|
+
/**
|
|
19
|
+
* How an STL import reads a file.
|
|
20
|
+
*
|
|
21
|
+
* One field, because STL has one decision in it. There is no handler family here and no registry: the format is
|
|
22
|
+
* a list of triangles, every one of which is read the same way, so a selectable family would be a shape invented
|
|
23
|
+
* for symmetry with richer formats rather than something a caller could use.
|
|
24
|
+
*
|
|
25
|
+
* Omitting `normals` takes the default (`RecomputeFromVertices`). `stlFullImportOptions` states it explicitly.
|
|
26
|
+
*/
|
|
27
|
+
export interface StlImportOptions {
|
|
28
|
+
readonly normals?: StlNormalPolicy;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=StlImportOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StlImportOptions.d.ts","sourceRoot":"","sources":["../src/StlImportOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,uBAAuB,CAAC;AAEtE;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StlImportOptions.js","sourceRoot":"","sources":["../src/StlImportOptions.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ImageResource } from './ImageResource.ts';
|
|
2
|
-
import type { SvgElementHandlerEntry } from './SvgRegistry.ts';
|
|
2
|
+
import type { SvgClipHandlerEntry, SvgElementHandlerEntry } from './SvgRegistry.ts';
|
|
3
3
|
export interface SvgDocumentImportOptions {
|
|
4
|
+
clipHandlers?: SvgClipHandlerEntry[];
|
|
4
5
|
elementHandlers?: SvgElementHandlerEntry[];
|
|
5
6
|
resolveImageResource?: (href: string) => ImageResource | null;
|
|
6
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SvgDocumentImport.d.ts","sourceRoot":"","sources":["../src/SvgDocumentImport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"SvgDocumentImport.d.ts","sourceRoot":"","sources":["../src/SvgDocumentImport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAEpF,MAAM,WAAW,wBAAwB;IACvC,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,eAAe,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAC3C,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,aAAa,GAAG,IAAI,CAAC;CAC/D"}
|
package/dist/SvgRegistry.d.ts
CHANGED
|
@@ -13,6 +13,30 @@ export declare const SvgElementKind: {
|
|
|
13
13
|
readonly Use: "use";
|
|
14
14
|
};
|
|
15
15
|
export type SvgElementKind = string;
|
|
16
|
+
/**
|
|
17
|
+
* The clipping features SVG defines, of which Flight carries `clip-path`.
|
|
18
|
+
*
|
|
19
|
+
* ★ CLIPPING IS A FAMILY BECAUSE IT IS NOT A LAYER OR AN ELEMENT. Every element may carry `clip-path`, so while the walk
|
|
20
|
+
* read it directly there was no configuration in which a caller could leave clipping out — and the clip reader brings
|
|
21
|
+
* `@flighthq/clip`, the bounding-box measurement, a second reading of the geometry elements and a second resolution of
|
|
22
|
+
* `use`. Declining the family means no clipping, which is the honest meaning of not registering a reader.
|
|
23
|
+
*
|
|
24
|
+
* `mask` lands here too, lowered onto the same hard region and reported as a recovery; `filter` has no reader at all.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SvgClipKind: {
|
|
27
|
+
readonly Path: "clip-path";
|
|
28
|
+
};
|
|
29
|
+
export type SvgClipKind = string;
|
|
30
|
+
export interface SvgClipContext {
|
|
31
|
+
element: Readonly<XmlElement>;
|
|
32
|
+
import: SvgImportContext;
|
|
33
|
+
target: Node2D;
|
|
34
|
+
}
|
|
35
|
+
export type SvgClipHandler = (context: SvgClipContext) => void;
|
|
36
|
+
export interface SvgClipHandlerEntry {
|
|
37
|
+
handle: SvgClipHandler;
|
|
38
|
+
kind: SvgClipKind;
|
|
39
|
+
}
|
|
16
40
|
export interface SvgColor {
|
|
17
41
|
alpha: number;
|
|
18
42
|
rgb: number;
|
|
@@ -70,6 +94,7 @@ export interface SvgImportContext {
|
|
|
70
94
|
resolvingUses: Set<string>;
|
|
71
95
|
}
|
|
72
96
|
export interface SvgRegistry {
|
|
97
|
+
clipHandlers: SvgClipHandlerEntry[];
|
|
73
98
|
elementHandlers: SvgElementHandlerEntry[];
|
|
74
99
|
}
|
|
75
100
|
export interface SvgStyle {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SvgRegistry.d.ts","sourceRoot":"","sources":["../src/SvgRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,E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WAAW,WAAW;IAC1B,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,eAAe,EAAE,sBAAsB,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
package/dist/SvgRegistry.js
CHANGED
|
@@ -5,4 +5,17 @@ export const SvgElementKind = {
|
|
|
5
5
|
Text: 'text',
|
|
6
6
|
Use: 'use',
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* The clipping features SVG defines, of which Flight carries `clip-path`.
|
|
10
|
+
*
|
|
11
|
+
* ★ CLIPPING IS A FAMILY BECAUSE IT IS NOT A LAYER OR AN ELEMENT. Every element may carry `clip-path`, so while the walk
|
|
12
|
+
* read it directly there was no configuration in which a caller could leave clipping out — and the clip reader brings
|
|
13
|
+
* `@flighthq/clip`, the bounding-box measurement, a second reading of the geometry elements and a second resolution of
|
|
14
|
+
* `use`. Declining the family means no clipping, which is the honest meaning of not registering a reader.
|
|
15
|
+
*
|
|
16
|
+
* `mask` lands here too, lowered onto the same hard region and reported as a recovery; `filter` has no reader at all.
|
|
17
|
+
*/
|
|
18
|
+
export const SvgClipKind = {
|
|
19
|
+
Path: 'clip-path',
|
|
20
|
+
};
|
|
8
21
|
//# sourceMappingURL=SvgRegistry.js.map
|
package/dist/SvgRegistry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SvgRegistry.js","sourceRoot":"","sources":["../src/SvgRegistry.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"SvgRegistry.js","sourceRoot":"","sources":["../src/SvgRegistry.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;CACF,CAAC;AAIX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,WAAW;CACT,CAAC"}
|
|
@@ -32,7 +32,12 @@ export interface TextureAtlasFormatDescriptor {
|
|
|
32
32
|
* directions. A caller may reorder or subset this list freely. That is the opposite of the sibling
|
|
33
33
|
* `SpritesheetImportOptions`, where Aseprite must precede TexturePacker.
|
|
34
34
|
*
|
|
35
|
-
*
|
|
35
|
+
* ★ PLAIN DATA A CALLER STATES, NOT SOMETHING A BUILD GENERATES. An earlier version of this comment promised a
|
|
36
|
+
* generated manifest module would name the one format a document needs. It cannot: installing any subset goes
|
|
37
|
+
* through the applier, the applier reaches the registry initializer, and the initializer seeds the FULL preset — so
|
|
38
|
+
* a build that named one format linked every sibling codec anyway. Measured on a real production bundle, the
|
|
39
|
+
* one-format route cost the same as the all-formats route. A caller who wants one codec imports that codec
|
|
40
|
+
* directly; this list is for a caller who wants the registry and accepts its cost knowingly.
|
|
36
41
|
* Applying it is a separate explicit step — nothing is registered by importing anything.
|
|
37
42
|
*
|
|
38
43
|
* Omitting `formats` installs nothing. The full preset is `textureAtlasAllFormats`, which reproduces the built-in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextureAtlasFormatDescriptor.d.ts","sourceRoot":"","sources":["../src/TextureAtlasFormatDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACrC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,wBAAwB,KAAK,YAAY,CAAC;CAClG;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;CACvC;AAED
|
|
1
|
+
{"version":3,"file":"TextureAtlasFormatDescriptor.d.ts","sourceRoot":"","sources":["../src/TextureAtlasFormatDescriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACrC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,wBAAwB,KAAK,YAAY,CAAC;CAClG;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,uBAAuB,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;CACvC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,QAAQ,CAAC,4BAA4B,CAAC,EAAE,CAAC;CACtE"}
|
|
@@ -10,22 +10,24 @@ import type { ThreeDsCamera, ThreeDsLight, ThreeDsMaterial, ThreeDsMesh } from '
|
|
|
10
10
|
* handler does not walk — a tree walker locates the chunk and calls the handler for its claimed IDs.
|
|
11
11
|
*
|
|
12
12
|
* A handler claims chunk IDs (the uint16 values at the start of each 3DS chunk) and provides a
|
|
13
|
-
* `collect` function that reads one chunk into the shared parse state
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* `collect` function that reads one chunk into the shared parse state, plus an optional `build`
|
|
14
|
+
* function that assembles the collected data into the document. The two-phase split follows the
|
|
15
|
+
* AWD2 handler pattern: `collect` runs once per chunk during the tree walk; `build` runs once
|
|
16
|
+
* after the walk completes, when every handler's data is in place and cross-family references
|
|
17
|
+
* (material names, keyframe pivots) can be resolved.
|
|
17
18
|
*/
|
|
18
19
|
export interface ThreeDsChunkHandler {
|
|
19
20
|
readonly chunkIds: readonly number[];
|
|
21
|
+
build?(state: ThreeDsParseState): void;
|
|
20
22
|
collect(state: ThreeDsParseState, view: Readonly<DataView>, offset: number, end: number, name: string): void;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Shared parse state for a 3DS import — the collectors every handler writes into.
|
|
24
26
|
*
|
|
25
|
-
* The tree walker locates feature chunks and calls
|
|
26
|
-
* collectors here. After the walk,
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* The tree walker locates feature chunks and calls each handler's `collect`; handlers populate the
|
|
28
|
+
* collectors here. After the walk, the dispatcher calls each handler's `build` (when present) to
|
|
29
|
+
* assemble the collected data into the document — resolving material references by name, applying
|
|
30
|
+
* keyframe pivots, and emitting cameras and lights.
|
|
29
31
|
*/
|
|
30
32
|
export interface ThreeDsParseState {
|
|
31
33
|
readonly cameras: ThreeDsCamera[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreeDsChunkHandler.d.ts","sourceRoot":"","sources":["../src/ThreeDsChunkHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEpG
|
|
1
|
+
{"version":3,"file":"ThreeDsChunkHandler.d.ts","sourceRoot":"","sources":["../src/ThreeDsChunkHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEpG;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,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measured by reversing the presets, not asserted. A caller may reorder or subset either list.
|
|
43
43
|
*
|
|
44
|
-
*
|
|
44
|
+
* ★ PLAIN DATA A CALLER STATES, NOT SOMETHING A BUILD GENERATES. An earlier version of this comment promised a
|
|
45
|
+
* generated manifest module would name the one format a document needs. It cannot: installing any subset goes
|
|
46
|
+
* through the applier, the applier reaches the registry initializer, and the initializer seeds the FULL preset — so
|
|
47
|
+
* a build that named one format linked every sibling codec anyway. Measured on a real production bundle, the
|
|
48
|
+
* one-format route cost the same as the all-formats route. A caller who wants one codec imports that codec
|
|
49
|
+
* directly; this list is for a caller who wants the registry and accepts its cost knowingly.
|
|
45
50
|
* Applying them is a separate explicit step — nothing is registered by importing anything.
|
|
46
51
|
*/
|
|
47
52
|
export interface TilemapImportOptions {
|