@almadar/ui 6.13.0 → 6.15.0
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/{UserContext-g_LcDiGN.d.cts → CurrentPagePathContext-J1lqjvAq.d.cts} +2 -97
- package/dist/{UserContext-g_LcDiGN.d.ts → CurrentPagePathContext-J1lqjvAq.d.ts} +2 -97
- package/dist/{EntityBindingContext-D5lRu6p1.d.cts → EntityBindingContext-EJoTtuTR.d.cts} +9 -3
- package/dist/{EntityBindingContext-D5lRu6p1.d.ts → EntityBindingContext-EJoTtuTR.d.ts} +9 -3
- package/dist/{GameAudioProvider-D8GynTNq.d.cts → GameAudioProvider-Cpw_lMPY.d.cts} +1 -1
- package/dist/{GameAudioProvider-Dozqx4sL.d.ts → GameAudioProvider-DIjFiy70.d.ts} +1 -1
- package/dist/UserContext-D566nfWA.d.cts +99 -0
- package/dist/UserContext-D566nfWA.d.ts +99 -0
- package/dist/avl/index.cjs +373 -61
- package/dist/avl/index.d.cts +1 -1
- package/dist/avl/index.d.ts +1 -1
- package/dist/avl/index.js +375 -63
- package/dist/{avl-schema-parser-PVu8rgsy.d.cts → avl-schema-parser-B25PL-a8.d.cts} +1 -1
- package/dist/{avl-schema-parser-DX-aVCCm.d.ts → avl-schema-parser-CM0pQo8E.d.ts} +1 -1
- package/dist/components/index.cjs +360 -108
- package/dist/components/index.d.cts +8 -24
- package/dist/components/index.d.ts +8 -24
- package/dist/components/index.js +362 -109
- package/dist/context/index.d.cts +2 -1
- package/dist/context/index.d.ts +2 -1
- package/dist/lib/drawable/three/index.cjs +126 -3
- package/dist/lib/drawable/three/index.d.cts +3 -3
- package/dist/lib/drawable/three/index.d.ts +3 -3
- package/dist/lib/drawable/three/index.js +126 -3
- package/dist/lib/index.cjs +1 -4
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +1 -4
- package/dist/{offline-executor-QUdKOj7f.d.cts → offline-executor-DdV2o0Zu.d.cts} +4 -19
- package/dist/{offline-executor-QUdKOj7f.d.ts → offline-executor-DdV2o0Zu.d.ts} +4 -19
- package/dist/{paintDispatch-CK5uwYEq.d.cts → paintDispatch-Dh1pgljl.d.cts} +79 -1
- package/dist/{paintDispatch-CK5uwYEq.d.ts → paintDispatch-Dh1pgljl.d.ts} +79 -1
- package/dist/providers/index.cjs +366 -55
- package/dist/providers/index.d.cts +10 -9
- package/dist/providers/index.d.ts +10 -9
- package/dist/providers/index.js +367 -56
- package/dist/renderer/index.cjs +0 -15
- package/dist/renderer/index.d.cts +4 -9
- package/dist/renderer/index.d.ts +4 -9
- package/dist/renderer/index.js +1 -15
- package/dist/runtime/index.cjs +375 -72
- package/dist/runtime/index.d.cts +14 -11
- package/dist/runtime/index.d.ts +14 -11
- package/dist/runtime/index.js +377 -74
- package/dist/{verificationRegistry-D8bHWD8Q.d.ts → verificationRegistry-Cwa52VyK.d.ts} +1 -1
- package/dist/{verificationRegistry-BLsjb1oU.d.cts → verificationRegistry-DTrKDRoa.d.cts} +1 -1
- package/package.json +4 -4
|
@@ -540,6 +540,84 @@ interface DrawGroupProps extends DrawableBase {
|
|
|
540
540
|
items: DrawableNode[];
|
|
541
541
|
}
|
|
542
542
|
|
|
543
|
+
interface SkinWeight {
|
|
544
|
+
/** Index into the drawable's `bones` array. */
|
|
545
|
+
bone: number;
|
|
546
|
+
w: number;
|
|
547
|
+
}
|
|
548
|
+
interface SkinVertex {
|
|
549
|
+
x: number;
|
|
550
|
+
y: number;
|
|
551
|
+
/** Normalized 0..1 texture coordinates. */
|
|
552
|
+
u: number;
|
|
553
|
+
v: number;
|
|
554
|
+
weights: SkinWeight[];
|
|
555
|
+
}
|
|
556
|
+
interface SkinMesh {
|
|
557
|
+
vertices: SkinVertex[];
|
|
558
|
+
triangles: [number, number, number][];
|
|
559
|
+
}
|
|
560
|
+
interface BoneDef {
|
|
561
|
+
name: string;
|
|
562
|
+
parent: string | null;
|
|
563
|
+
/** Rotation pivot in local space (the joint the bone turns about). */
|
|
564
|
+
pivot: [number, number];
|
|
565
|
+
/** Bone end point in local space (render/inspect hint; no skinning role). */
|
|
566
|
+
tip: [number, number];
|
|
567
|
+
}
|
|
568
|
+
/** Bone name → rotation in degrees relative to the bind pose. */
|
|
569
|
+
type Pose = Record<string, number>;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* `draw-skinned-mesh` — the skeletal-mesh drawable atom: a bind-pose triangle
|
|
573
|
+
* mesh deformed by linear blend skinning and painted per-triangle from a texture.
|
|
574
|
+
*
|
|
575
|
+
* The general-purpose primitive for animated 2D characters (puppet rigs): a pose
|
|
576
|
+
* rotates each bone about its pivot (degrees, relative to bind), `lib/skinning`
|
|
577
|
+
* computes the deformed vertices, and each triangle is blit through the affine
|
|
578
|
+
* mapping its UV tri → its painted tri (clipped to the tri, so seams don't bleed).
|
|
579
|
+
* Mesh + bones + UVs come from the bundle exporter (inline `mesh` or a fetched
|
|
580
|
+
* `meshUrl`); animation is `clip.frames[frame % len]`, driven by the host like
|
|
581
|
+
* any other drawable frame counter. `weightsOverlay` swaps the texture for a
|
|
582
|
+
* per-bone categorical fill (rig inspection); `ghost` paints an onion-skin pass
|
|
583
|
+
* of another clip frame underneath. The React component renders `null` (the host
|
|
584
|
+
* paints it); it exists so the pattern pipeline registers a `draw-skinned-mesh`
|
|
585
|
+
* pattern and JSX children register through the drawable registry.
|
|
586
|
+
*/
|
|
587
|
+
|
|
588
|
+
interface DrawSkinnedMeshProps extends DrawableBase {
|
|
589
|
+
type: 'draw-skinned-mesh';
|
|
590
|
+
/** Logical scene position; mesh local coords are world units relative to its projected top-left. */
|
|
591
|
+
position: ScenePos;
|
|
592
|
+
/** The texture the mesh UVs cut into. */
|
|
593
|
+
asset: Asset;
|
|
594
|
+
/** Inline bind mesh; wins over `meshUrl`. */
|
|
595
|
+
mesh?: SkinMesh;
|
|
596
|
+
/** URL of a JSON `SkinMesh` (fetched + cached); used when `mesh` is absent. */
|
|
597
|
+
meshUrl?: string;
|
|
598
|
+
/** The skeleton (bind pose; FK chain via `parent` names). Falls back to the rigbundle's `bones` when empty. */
|
|
599
|
+
bones: BoneDef[];
|
|
600
|
+
/** Static pose (bone name → degrees relative to bind). Overridden by `clip` + `frame`. */
|
|
601
|
+
pose?: Pose;
|
|
602
|
+
/** Pose animation clip; with `frame`, pose = `frames[frame % frames.length]`. */
|
|
603
|
+
clip?: {
|
|
604
|
+
frames: Pose[];
|
|
605
|
+
};
|
|
606
|
+
/** Named clip inside the rigbundle at `meshUrl` (`clips[clipName].frames`); used when `clip` is absent. Empty/unknown = no clip. */
|
|
607
|
+
clipName?: string;
|
|
608
|
+
/** Clip frame counter (host-driven paint clock frame). */
|
|
609
|
+
frame?: number;
|
|
610
|
+
/** 0..1 opacity. */
|
|
611
|
+
opacity?: number;
|
|
612
|
+
/** Paint per-triangle dominant-bone colors instead of the texture (rig inspection). */
|
|
613
|
+
weightsOverlay?: boolean;
|
|
614
|
+
/** Onion skin: render the mesh at this clip frame underneath, at this opacity. */
|
|
615
|
+
ghost?: {
|
|
616
|
+
frame: number;
|
|
617
|
+
opacity: number;
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
|
|
543
621
|
/**
|
|
544
622
|
* `draw-sprite-layer` — batch multiple sprites in one descriptor for O(layers) rendering.
|
|
545
623
|
*
|
|
@@ -776,6 +854,6 @@ interface DrawFxLayerProps extends DrawableBase {
|
|
|
776
854
|
*/
|
|
777
855
|
|
|
778
856
|
/** Every drawable descriptor. The host's `children` are a `DrawableNode[]`. */
|
|
779
|
-
type DrawableNode = DrawSpriteProps | DrawShapeProps | DrawTextProps | DrawGroupProps | DrawMeshProps | DrawSpriteLayerProps | DrawShapeLayerProps | DrawTextLayerProps | DrawFxLayerProps;
|
|
857
|
+
type DrawableNode = DrawSpriteProps | DrawShapeProps | DrawTextProps | DrawGroupProps | DrawMeshProps | DrawSkinnedMeshProps | DrawSpriteLayerProps | DrawShapeLayerProps | DrawTextLayerProps | DrawFxLayerProps;
|
|
780
858
|
|
|
781
859
|
export type { ColorToken as C, DrawableNode as D, FxOverlayItem as F, ImageSource as I, LinkAction as L, MeshShapeKind as M, Point as P, Rect as R, UiError as U, Projector as a, MeshMaterial as b, DrawGroupProps as c, DrawTextProps as d, DrawMeshProps as e, FxOverlayKind as f };
|
|
@@ -540,6 +540,84 @@ interface DrawGroupProps extends DrawableBase {
|
|
|
540
540
|
items: DrawableNode[];
|
|
541
541
|
}
|
|
542
542
|
|
|
543
|
+
interface SkinWeight {
|
|
544
|
+
/** Index into the drawable's `bones` array. */
|
|
545
|
+
bone: number;
|
|
546
|
+
w: number;
|
|
547
|
+
}
|
|
548
|
+
interface SkinVertex {
|
|
549
|
+
x: number;
|
|
550
|
+
y: number;
|
|
551
|
+
/** Normalized 0..1 texture coordinates. */
|
|
552
|
+
u: number;
|
|
553
|
+
v: number;
|
|
554
|
+
weights: SkinWeight[];
|
|
555
|
+
}
|
|
556
|
+
interface SkinMesh {
|
|
557
|
+
vertices: SkinVertex[];
|
|
558
|
+
triangles: [number, number, number][];
|
|
559
|
+
}
|
|
560
|
+
interface BoneDef {
|
|
561
|
+
name: string;
|
|
562
|
+
parent: string | null;
|
|
563
|
+
/** Rotation pivot in local space (the joint the bone turns about). */
|
|
564
|
+
pivot: [number, number];
|
|
565
|
+
/** Bone end point in local space (render/inspect hint; no skinning role). */
|
|
566
|
+
tip: [number, number];
|
|
567
|
+
}
|
|
568
|
+
/** Bone name → rotation in degrees relative to the bind pose. */
|
|
569
|
+
type Pose = Record<string, number>;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* `draw-skinned-mesh` — the skeletal-mesh drawable atom: a bind-pose triangle
|
|
573
|
+
* mesh deformed by linear blend skinning and painted per-triangle from a texture.
|
|
574
|
+
*
|
|
575
|
+
* The general-purpose primitive for animated 2D characters (puppet rigs): a pose
|
|
576
|
+
* rotates each bone about its pivot (degrees, relative to bind), `lib/skinning`
|
|
577
|
+
* computes the deformed vertices, and each triangle is blit through the affine
|
|
578
|
+
* mapping its UV tri → its painted tri (clipped to the tri, so seams don't bleed).
|
|
579
|
+
* Mesh + bones + UVs come from the bundle exporter (inline `mesh` or a fetched
|
|
580
|
+
* `meshUrl`); animation is `clip.frames[frame % len]`, driven by the host like
|
|
581
|
+
* any other drawable frame counter. `weightsOverlay` swaps the texture for a
|
|
582
|
+
* per-bone categorical fill (rig inspection); `ghost` paints an onion-skin pass
|
|
583
|
+
* of another clip frame underneath. The React component renders `null` (the host
|
|
584
|
+
* paints it); it exists so the pattern pipeline registers a `draw-skinned-mesh`
|
|
585
|
+
* pattern and JSX children register through the drawable registry.
|
|
586
|
+
*/
|
|
587
|
+
|
|
588
|
+
interface DrawSkinnedMeshProps extends DrawableBase {
|
|
589
|
+
type: 'draw-skinned-mesh';
|
|
590
|
+
/** Logical scene position; mesh local coords are world units relative to its projected top-left. */
|
|
591
|
+
position: ScenePos;
|
|
592
|
+
/** The texture the mesh UVs cut into. */
|
|
593
|
+
asset: Asset;
|
|
594
|
+
/** Inline bind mesh; wins over `meshUrl`. */
|
|
595
|
+
mesh?: SkinMesh;
|
|
596
|
+
/** URL of a JSON `SkinMesh` (fetched + cached); used when `mesh` is absent. */
|
|
597
|
+
meshUrl?: string;
|
|
598
|
+
/** The skeleton (bind pose; FK chain via `parent` names). Falls back to the rigbundle's `bones` when empty. */
|
|
599
|
+
bones: BoneDef[];
|
|
600
|
+
/** Static pose (bone name → degrees relative to bind). Overridden by `clip` + `frame`. */
|
|
601
|
+
pose?: Pose;
|
|
602
|
+
/** Pose animation clip; with `frame`, pose = `frames[frame % frames.length]`. */
|
|
603
|
+
clip?: {
|
|
604
|
+
frames: Pose[];
|
|
605
|
+
};
|
|
606
|
+
/** Named clip inside the rigbundle at `meshUrl` (`clips[clipName].frames`); used when `clip` is absent. Empty/unknown = no clip. */
|
|
607
|
+
clipName?: string;
|
|
608
|
+
/** Clip frame counter (host-driven paint clock frame). */
|
|
609
|
+
frame?: number;
|
|
610
|
+
/** 0..1 opacity. */
|
|
611
|
+
opacity?: number;
|
|
612
|
+
/** Paint per-triangle dominant-bone colors instead of the texture (rig inspection). */
|
|
613
|
+
weightsOverlay?: boolean;
|
|
614
|
+
/** Onion skin: render the mesh at this clip frame underneath, at this opacity. */
|
|
615
|
+
ghost?: {
|
|
616
|
+
frame: number;
|
|
617
|
+
opacity: number;
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
|
|
543
621
|
/**
|
|
544
622
|
* `draw-sprite-layer` — batch multiple sprites in one descriptor for O(layers) rendering.
|
|
545
623
|
*
|
|
@@ -776,6 +854,6 @@ interface DrawFxLayerProps extends DrawableBase {
|
|
|
776
854
|
*/
|
|
777
855
|
|
|
778
856
|
/** Every drawable descriptor. The host's `children` are a `DrawableNode[]`. */
|
|
779
|
-
type DrawableNode = DrawSpriteProps | DrawShapeProps | DrawTextProps | DrawGroupProps | DrawMeshProps | DrawSpriteLayerProps | DrawShapeLayerProps | DrawTextLayerProps | DrawFxLayerProps;
|
|
857
|
+
type DrawableNode = DrawSpriteProps | DrawShapeProps | DrawTextProps | DrawGroupProps | DrawMeshProps | DrawSkinnedMeshProps | DrawSpriteLayerProps | DrawShapeLayerProps | DrawTextLayerProps | DrawFxLayerProps;
|
|
780
858
|
|
|
781
859
|
export type { ColorToken as C, DrawableNode as D, FxOverlayItem as F, ImageSource as I, LinkAction as L, MeshShapeKind as M, Point as P, Rect as R, UiError as U, Projector as a, MeshMaterial as b, DrawGroupProps as c, DrawTextProps as d, DrawMeshProps as e, FxOverlayKind as f };
|