exodeui 6.3.18 → 6.3.19

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.
@@ -553,6 +553,45 @@ export interface Constraint {
553
553
  damping?: number;
554
554
  mass?: number;
555
555
  }
556
+ export interface BoneIKConfig {
557
+ boneCount: number;
558
+ solver: 'analytic-2bone' | 'ccd';
559
+ }
560
+ export interface BoneSplineConfig {
561
+ points: {
562
+ x: number;
563
+ y: number;
564
+ }[];
565
+ tension: number;
566
+ }
567
+ export type BoneMode = 'fk' | 'ik' | 'spline';
568
+ export interface BoneObject {
569
+ type: 'Bone';
570
+ id: string;
571
+ name: string;
572
+ transform: Transform;
573
+ geometry: {
574
+ type: 'Bone';
575
+ length: number;
576
+ isTip?: boolean;
577
+ };
578
+ style: Style;
579
+ mode?: BoneMode;
580
+ ikConfig?: BoneIKConfig;
581
+ splineConfig?: BoneSplineConfig;
582
+ opacity?: number;
583
+ visible?: boolean;
584
+ isVisible?: boolean;
585
+ parentId?: string;
586
+ children?: string[];
587
+ options?: any;
588
+ triggers?: Trigger[];
589
+ interactions?: Interaction[];
590
+ constraints?: Constraint[];
591
+ physics?: Physics;
592
+ behaviors?: Behavior[];
593
+ masks?: any[];
594
+ }
556
595
  export interface ShapeObject {
557
596
  type: 'Shape' | 'Group' | 'Component' | 'Frame' | 'Button' | 'Bone' | 'Toggle' | 'Slider' | 'Dropdown' | 'ListView' | 'Checkbox' | 'RadioGroup' | 'BarChart' | 'PieChart';
558
597
  id: string;
@@ -592,6 +631,15 @@ export interface ShapeObject {
592
631
  layoutProps?: LayoutProps;
593
632
  altText?: string;
594
633
  repeaterConfig?: RepeaterConfig;
634
+ weights?: {
635
+ [vertexIndex: number]: {
636
+ boneId: string;
637
+ amount: number;
638
+ }[];
639
+ };
640
+ bindMatrices?: {
641
+ [boneId: string]: number[];
642
+ };
595
643
  }
596
644
  export interface Keyframe {
597
645
  time: number;
@@ -0,0 +1,27 @@
1
+ export interface Transform {
2
+ x: number;
3
+ y: number;
4
+ rotation: number;
5
+ scale_x?: number;
6
+ scale_y?: number;
7
+ }
8
+ export interface WeightData {
9
+ boneId: string;
10
+ amount: number;
11
+ }
12
+ /**
13
+ * Deforms an array of points (including bezier handles) based on their vertex weights,
14
+ * the inverse bind matrices of the bones, and the current world transforms of the shape and bones.
15
+ *
16
+ * @param points The original rest-pose points (e.g. from geometry.points).
17
+ * @param weights A map from vertex index to an array of bone weights.
18
+ * @param bindMatrices A map from boneId to its inverse bind matrix [a, b, c, d, tx, ty].
19
+ * @param shapeWorld The current world transform of the shape being deformed.
20
+ * @param getGlobalTransform A callback to fetch the current world transform of a bone by ID.
21
+ * @returns A new array of deformed points.
22
+ */
23
+ export declare const deformPathPoints: (points: any[], weights: {
24
+ [vertexIndex: number]: WeightData[];
25
+ }, bindMatrices: {
26
+ [boneId: string]: number[];
27
+ }, shapeWorld: Transform, getGlobalTransform: (id: string) => Transform | null) => any[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exodeui",
3
- "version": "6.3.18",
3
+ "version": "6.3.19",
4
4
  "description": "React Runtime for ExodeUI Animation Engine",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",