exodeui 6.3.21 → 6.3.23

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.
@@ -94,6 +94,8 @@ export declare class ExodeUIEngine {
94
94
  private debug_objectsTotal;
95
95
  private lastRenderTime;
96
96
  debugMode: boolean;
97
+ private log;
98
+ private warn;
97
99
  constructor();
98
100
  private setInternalInput;
99
101
  setLayout(fit: Fit, alignment: Alignment): void;
@@ -143,6 +145,7 @@ export declare class ExodeUIEngine {
143
145
  private activeTriggers;
144
146
  seek(time: number): void;
145
147
  advance(dt: number): void;
148
+ private evaluateLogicProperties;
146
149
  private evaluateContinuousInteractions;
147
150
  private solveConstraints;
148
151
  private getGlobalTransform;
@@ -214,6 +217,7 @@ export declare class ExodeUIEngine {
214
217
  private createCanvasFill;
215
218
  private drawRoundRect;
216
219
  private renderListView;
220
+ private drawCustomShape;
217
221
  private updateListViewScrollFromPointer;
218
222
  private updateListViewHoverFromPointer;
219
223
  private getListViewItemIndexAtPointer;
@@ -3,4 +3,5 @@ export * from './types';
3
3
  export * from './engine';
4
4
  export * from './useExodeUI';
5
5
  export * from './ExodeSEO';
6
+ export * from './physics';
6
7
  export declare const VERSION: string;
@@ -14,14 +14,37 @@ export interface BodyOptions {
14
14
  density?: number;
15
15
  isSensor?: boolean;
16
16
  }
17
+ export interface JointOptions {
18
+ id: string;
19
+ type: 'Distance' | 'Revolute';
20
+ bodyA: string;
21
+ bodyB: string;
22
+ anchorA: {
23
+ x: number;
24
+ y: number;
25
+ };
26
+ anchorB: {
27
+ x: number;
28
+ y: number;
29
+ };
30
+ length?: number;
31
+ stiffness?: number;
32
+ damping?: number;
33
+ }
17
34
  export interface PhysicsEngine {
18
35
  init(gravity: {
19
36
  x: number;
20
37
  y: number;
21
38
  }): Promise<void>;
22
39
  destroy(): void;
40
+ setGravity(gravity: {
41
+ x: number;
42
+ y: number;
43
+ }): void;
23
44
  createBody(options: BodyOptions): void;
24
45
  removeBody(id: string): void;
46
+ createJoint(options: JointOptions): void;
47
+ removeJoint(id: string): void;
25
48
  step(dt: number): void;
26
49
  getPosition(id: string): {
27
50
  x: number;
@@ -35,6 +58,8 @@ export interface PhysicsEngine {
35
58
  setPosition(id: string, x: number, y: number): void;
36
59
  setRotation(id: string, angle: number): void;
37
60
  setVelocity(id: string, vx: number, vy: number): void;
61
+ setAngularVelocity(id: string, omega: number): void;
38
62
  applyForce(id: string, fx: number, fy: number): void;
39
63
  applyImpulse(id: string, ix: number, iy: number): void;
64
+ setCollisionCallback?(cb: (a: string, b: string, started: boolean) => void): void;
40
65
  }
@@ -1,15 +1,25 @@
1
- import { PhysicsEngine, BodyOptions } from './PhysicsEngine';
1
+ import { PhysicsEngine, BodyOptions, JointOptions } from './PhysicsEngine';
2
2
 
3
+ type CollisionCallback = (a: string, b: string, started: boolean) => void;
3
4
  export declare class RapierPhysics implements PhysicsEngine {
4
5
  private world;
5
6
  private bodies;
6
7
  private colliders;
8
+ private joints;
7
9
  private initialized;
10
+ private bodyIdByCollider;
11
+ private onCollisionCB;
12
+ private eventQueue;
13
+ setCollisionCallback(cb: CollisionCallback): void;
8
14
  init(gravity: {
9
15
  x: number;
10
16
  y: number;
11
17
  }): Promise<void>;
12
18
  destroy(): void;
19
+ setGravity(gravity: {
20
+ x: number;
21
+ y: number;
22
+ }): void;
13
23
  createBody(options: BodyOptions): void;
14
24
  removeBody(id: string): void;
15
25
  step(_dt: number): void;
@@ -25,6 +35,10 @@ export declare class RapierPhysics implements PhysicsEngine {
25
35
  setPosition(id: string, x: number, y: number): void;
26
36
  setRotation(id: string, angle: number): void;
27
37
  setVelocity(id: string, vx: number, vy: number): void;
38
+ setAngularVelocity(id: string, omega: number): void;
28
39
  applyForce(id: string, fx: number, fy: number): void;
29
40
  applyImpulse(id: string, ix: number, iy: number): void;
41
+ createJoint(options: JointOptions): void;
42
+ removeJoint(id: string): void;
30
43
  }
44
+ export {};
@@ -454,7 +454,11 @@ export declare enum BehaviorType {
454
454
  ParticleEmitter = "ParticleEmitter",
455
455
  StateReactive = "StateReactive",
456
456
  Fold = "Fold",
457
- Crumple = "Crumple"
457
+ Crumple = "Crumple",
458
+ GraphPathDraw = "GraphPathDraw",
459
+ GraphWipeReveal = "GraphWipeReveal",
460
+ GraphPointPop = "GraphPointPop",
461
+ GraphGradientFlow = "GraphGradientFlow"
458
462
  }
459
463
  export declare enum BehaviorSensor {
460
464
  Scale = "Scale",
@@ -640,6 +644,8 @@ export interface ShapeObject {
640
644
  bindMatrices?: {
641
645
  [boneId: string]: number[];
642
646
  };
647
+ masterObjectId?: string;
648
+ isInstance?: boolean;
643
649
  }
644
650
  export interface Keyframe {
645
651
  time: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exodeui",
3
- "version": "6.3.21",
3
+ "version": "6.3.23",
4
4
  "description": "React Runtime for ExodeUI Animation Engine",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "react": "^18.2.0",
36
36
  "react-dom": "^18.2.0",
37
37
  "typescript": "^5.0.0",
38
- "vite": "^5.0.0",
38
+ "vite": "^6.0.0",
39
39
  "vite-plugin-dts": "^3.0.0",
40
40
  "vitest": "^4.0.17"
41
41
  },