@codexo/exojs 0.6.7 → 0.6.8
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/CHANGELOG.md +51 -0
- package/README.md +0 -36
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/exo.esm.js +1 -470
- package/dist/exo.esm.js.map +1 -1
- package/package.json +1 -9
- package/dist/esm/physics/RapierPhysicsWorld.d.ts +0 -136
- package/dist/esm/physics/RapierPhysicsWorld.js +0 -475
- package/dist/esm/physics/RapierPhysicsWorld.js.map +0 -1
- package/dist/esm/physics/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codexo/exojs",
|
|
3
3
|
"description": "A TypeScript-first browser 2D runtime for games and interactive apps.",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist/esm/",
|
|
@@ -93,13 +93,5 @@
|
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
95
|
"earcut": "^3.0.2"
|
|
96
|
-
},
|
|
97
|
-
"peerDependencies": {
|
|
98
|
-
"@dimforge/rapier2d-compat": "*"
|
|
99
|
-
},
|
|
100
|
-
"peerDependenciesMeta": {
|
|
101
|
-
"@dimforge/rapier2d-compat": {
|
|
102
|
-
"optional": true
|
|
103
|
-
}
|
|
104
96
|
}
|
|
105
97
|
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { Color } from '@/core/Color';
|
|
2
|
-
import { Signal } from '@/core/Signal';
|
|
3
|
-
import type { SceneNode } from '@/core/SceneNode';
|
|
4
|
-
import { Graphics } from '@/rendering/primitives/Graphics';
|
|
5
|
-
export type PhysicsBodyType = 'dynamic' | 'static' | 'kinematic';
|
|
6
|
-
export type PhysicsSyncMode = 'physicsToNode' | 'manual';
|
|
7
|
-
export interface PhysicsCollisionFilter {
|
|
8
|
-
readonly membership?: number | ReadonlyArray<number>;
|
|
9
|
-
readonly collidesWith?: number | ReadonlyArray<number>;
|
|
10
|
-
}
|
|
11
|
-
export interface PhysicsBoxShape {
|
|
12
|
-
readonly type: 'box';
|
|
13
|
-
readonly width: number;
|
|
14
|
-
readonly height: number;
|
|
15
|
-
readonly offsetX?: number;
|
|
16
|
-
readonly offsetY?: number;
|
|
17
|
-
readonly offsetRotation?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface PhysicsCircleShape {
|
|
20
|
-
readonly type: 'circle';
|
|
21
|
-
readonly radius: number;
|
|
22
|
-
readonly offsetX?: number;
|
|
23
|
-
readonly offsetY?: number;
|
|
24
|
-
}
|
|
25
|
-
export type PhysicsColliderShape = PhysicsBoxShape | PhysicsCircleShape;
|
|
26
|
-
export interface PhysicsBodyOptions {
|
|
27
|
-
readonly type?: PhysicsBodyType;
|
|
28
|
-
readonly shape: PhysicsColliderShape;
|
|
29
|
-
readonly trigger?: boolean;
|
|
30
|
-
readonly syncMode?: PhysicsSyncMode;
|
|
31
|
-
readonly friction?: number;
|
|
32
|
-
readonly restitution?: number;
|
|
33
|
-
readonly density?: number;
|
|
34
|
-
readonly gravityScale?: number;
|
|
35
|
-
readonly linearDamping?: number;
|
|
36
|
-
readonly angularDamping?: number;
|
|
37
|
-
readonly lockRotation?: boolean;
|
|
38
|
-
readonly collisionFilter?: PhysicsCollisionFilter;
|
|
39
|
-
}
|
|
40
|
-
export interface RapierPhysicsDebugDrawOptions {
|
|
41
|
-
readonly lineWidth?: number;
|
|
42
|
-
readonly solidLineColor?: Color;
|
|
43
|
-
readonly solidFillColor?: Color;
|
|
44
|
-
readonly triggerLineColor?: Color;
|
|
45
|
-
readonly triggerFillColor?: Color;
|
|
46
|
-
}
|
|
47
|
-
export interface RapierPhysicsEvent {
|
|
48
|
-
readonly started: boolean;
|
|
49
|
-
readonly trigger: boolean;
|
|
50
|
-
readonly first: RapierPhysicsBinding;
|
|
51
|
-
readonly second: RapierPhysicsBinding;
|
|
52
|
-
}
|
|
53
|
-
interface RapierVectorLike {
|
|
54
|
-
x: number;
|
|
55
|
-
y: number;
|
|
56
|
-
}
|
|
57
|
-
interface RapierRigidBodyLike {
|
|
58
|
-
readonly handle: number;
|
|
59
|
-
translation(): RapierVectorLike;
|
|
60
|
-
rotation(): number;
|
|
61
|
-
setTranslation(translation: RapierVectorLike, wakeUp: boolean): void;
|
|
62
|
-
setRotation(rotation: number, wakeUp: boolean): void;
|
|
63
|
-
}
|
|
64
|
-
interface RapierColliderLike {
|
|
65
|
-
readonly handle: number;
|
|
66
|
-
setCollisionGroups(groups: number): void;
|
|
67
|
-
setSolverGroups(groups: number): void;
|
|
68
|
-
}
|
|
69
|
-
export type RapierModuleLoader = () => Promise<unknown>;
|
|
70
|
-
export interface RapierPhysicsWorldOptions {
|
|
71
|
-
readonly gravityX?: number;
|
|
72
|
-
readonly gravityY?: number;
|
|
73
|
-
readonly moduleLoader?: RapierModuleLoader;
|
|
74
|
-
}
|
|
75
|
-
export declare class RapierPhysicsBinding {
|
|
76
|
-
private readonly _world;
|
|
77
|
-
private readonly _body;
|
|
78
|
-
private readonly _collider;
|
|
79
|
-
private _syncMode;
|
|
80
|
-
readonly node: SceneNode;
|
|
81
|
-
readonly bodyType: PhysicsBodyType;
|
|
82
|
-
readonly shape: PhysicsColliderShape;
|
|
83
|
-
readonly trigger: boolean;
|
|
84
|
-
constructor(world: RapierPhysicsWorld, node: SceneNode, body: RapierRigidBodyLike, collider: RapierColliderLike, options: PhysicsBodyOptions);
|
|
85
|
-
get bodyHandle(): number;
|
|
86
|
-
get colliderHandle(): number;
|
|
87
|
-
getBody(): RapierRigidBodyLike;
|
|
88
|
-
get syncMode(): PhysicsSyncMode;
|
|
89
|
-
set syncMode(syncMode: PhysicsSyncMode);
|
|
90
|
-
get x(): number;
|
|
91
|
-
get y(): number;
|
|
92
|
-
get rotation(): number;
|
|
93
|
-
setSyncMode(syncMode: PhysicsSyncMode): this;
|
|
94
|
-
teleport(x: number, y: number, rotation?: number): this;
|
|
95
|
-
syncBodyFromNode(wakeUp?: boolean): this;
|
|
96
|
-
syncNodeFromBody(): this;
|
|
97
|
-
setCollisionFilter(filter?: PhysicsCollisionFilter): this;
|
|
98
|
-
destroy(): void;
|
|
99
|
-
}
|
|
100
|
-
export declare class RapierPhysicsWorld {
|
|
101
|
-
readonly onCollisionEnter: Signal<[RapierPhysicsEvent]>;
|
|
102
|
-
readonly onCollisionExit: Signal<[RapierPhysicsEvent]>;
|
|
103
|
-
readonly onTriggerEnter: Signal<[RapierPhysicsEvent]>;
|
|
104
|
-
readonly onTriggerExit: Signal<[RapierPhysicsEvent]>;
|
|
105
|
-
private readonly _rapier;
|
|
106
|
-
private readonly _world;
|
|
107
|
-
private readonly _eventQueue;
|
|
108
|
-
private readonly _bindings;
|
|
109
|
-
private readonly _nodeBindings;
|
|
110
|
-
private readonly _colliderBindings;
|
|
111
|
-
private constructor();
|
|
112
|
-
static create(options?: RapierPhysicsWorldOptions): Promise<RapierPhysicsWorld>;
|
|
113
|
-
get gravity(): {
|
|
114
|
-
x: number;
|
|
115
|
-
y: number;
|
|
116
|
-
};
|
|
117
|
-
setGravity(x: number, y: number): this;
|
|
118
|
-
hasNode(node: SceneNode): boolean;
|
|
119
|
-
getBinding(node: SceneNode): RapierPhysicsBinding | null;
|
|
120
|
-
attachNode(node: SceneNode, options: PhysicsBodyOptions): RapierPhysicsBinding;
|
|
121
|
-
detachNode(node: SceneNode): this;
|
|
122
|
-
step(deltaSeconds?: number): this;
|
|
123
|
-
syncNodeTransforms(): this;
|
|
124
|
-
createDebugGraphics(options?: RapierPhysicsDebugDrawOptions): Graphics;
|
|
125
|
-
updateDebugGraphics(graphics: Graphics, options?: RapierPhysicsDebugDrawOptions): Graphics;
|
|
126
|
-
destroy(): void;
|
|
127
|
-
writeBodyTransform(body: RapierRigidBodyLike, x: number, y: number, rotation: number, wakeUp: boolean): void;
|
|
128
|
-
removeBinding(binding: RapierPhysicsBinding): void;
|
|
129
|
-
private createBodyDescriptor;
|
|
130
|
-
private createColliderDescriptor;
|
|
131
|
-
private applyStepDelta;
|
|
132
|
-
private drainCollisionEvents;
|
|
133
|
-
private buildBoxPath;
|
|
134
|
-
}
|
|
135
|
-
export declare const createRapierPhysicsWorld: (options?: RapierPhysicsWorldOptions) => Promise<RapierPhysicsWorld>;
|
|
136
|
-
export {};
|
|
@@ -1,475 +0,0 @@
|
|
|
1
|
-
import { Color } from '../core/Color.js';
|
|
2
|
-
import { Signal } from '../core/Signal.js';
|
|
3
|
-
import { Graphics } from '../rendering/primitives/Graphics.js';
|
|
4
|
-
|
|
5
|
-
const rapierModuleName = '@dimforge/rapier2d-compat';
|
|
6
|
-
const maxCollisionGroup = 15;
|
|
7
|
-
const fullGroupMask = 0xFFFF;
|
|
8
|
-
const defaultDeltaSeconds = 1 / 60;
|
|
9
|
-
const defaultDebugDrawOptions = {
|
|
10
|
-
lineWidth: 1,
|
|
11
|
-
solidLineColor: new Color(64, 196, 255, 1),
|
|
12
|
-
solidFillColor: new Color(64, 196, 255, 0.12),
|
|
13
|
-
triggerLineColor: new Color(255, 180, 48, 1),
|
|
14
|
-
triggerFillColor: new Color(255, 180, 48, 0.08),
|
|
15
|
-
};
|
|
16
|
-
const resolveRapierModule = (module) => {
|
|
17
|
-
const rapier = module;
|
|
18
|
-
const vector2 = rapier.Vector2;
|
|
19
|
-
const worldConstructor = rapier.World;
|
|
20
|
-
const eventQueueConstructor = rapier.EventQueue;
|
|
21
|
-
const rigidBodyDescFactory = rapier.RigidBodyDesc;
|
|
22
|
-
const colliderDescFactory = rapier.ColliderDesc;
|
|
23
|
-
if (typeof vector2 !== 'function' || typeof worldConstructor !== 'function' || typeof eventQueueConstructor !== 'function') {
|
|
24
|
-
throw new Error('Invalid Rapier module loader result. Expected Vector2, World, and EventQueue exports.');
|
|
25
|
-
}
|
|
26
|
-
if (typeof rigidBodyDescFactory !== 'object'
|
|
27
|
-
|| rigidBodyDescFactory === null
|
|
28
|
-
|| typeof colliderDescFactory !== 'object'
|
|
29
|
-
|| colliderDescFactory === null) {
|
|
30
|
-
throw new Error('Invalid Rapier module loader result. Expected RigidBodyDesc and ColliderDesc exports.');
|
|
31
|
-
}
|
|
32
|
-
const activeEvents = rapier.ActiveEvents;
|
|
33
|
-
const activeCollisionEvents = typeof activeEvents?.COLLISION_EVENTS === 'number'
|
|
34
|
-
? activeEvents.COLLISION_EVENTS
|
|
35
|
-
: undefined;
|
|
36
|
-
return {
|
|
37
|
-
init: typeof rapier.init === 'function'
|
|
38
|
-
? rapier.init
|
|
39
|
-
: undefined,
|
|
40
|
-
vector2: vector2,
|
|
41
|
-
worldConstructor: worldConstructor,
|
|
42
|
-
eventQueueConstructor: eventQueueConstructor,
|
|
43
|
-
rigidBodyDescFactory: rigidBodyDescFactory,
|
|
44
|
-
colliderDescFactory: colliderDescFactory,
|
|
45
|
-
activeCollisionEvents,
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
const defaultRapierModuleLoader = async () => {
|
|
49
|
-
return await import(rapierModuleName);
|
|
50
|
-
};
|
|
51
|
-
const assertFiniteNumber = (value, label) => {
|
|
52
|
-
if (!Number.isFinite(value)) {
|
|
53
|
-
throw new Error(`${label} must be a finite number.`);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
const assertPositiveNumber = (value, label) => {
|
|
57
|
-
assertFiniteNumber(value, label);
|
|
58
|
-
if (value <= 0) {
|
|
59
|
-
throw new Error(`${label} must be greater than zero.`);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
const assertGroup = (group, label) => {
|
|
63
|
-
if (!Number.isInteger(group) || group < 0 || group > maxCollisionGroup) {
|
|
64
|
-
throw new Error(`${label} must be an integer between 0 and ${maxCollisionGroup}.`);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
const toGroupMask = (groups, fallback) => {
|
|
68
|
-
if (groups === undefined) {
|
|
69
|
-
return fallback;
|
|
70
|
-
}
|
|
71
|
-
if (typeof groups === 'number') {
|
|
72
|
-
assertGroup(groups, 'collision group');
|
|
73
|
-
return 1 << groups;
|
|
74
|
-
}
|
|
75
|
-
if (groups.length === 0) {
|
|
76
|
-
return 0;
|
|
77
|
-
}
|
|
78
|
-
return groups.reduce((mask, group, index) => {
|
|
79
|
-
assertGroup(group, `collision groups[${index}]`);
|
|
80
|
-
return mask | (1 << group);
|
|
81
|
-
}, 0);
|
|
82
|
-
};
|
|
83
|
-
const toPackedCollisionGroups = (filter) => {
|
|
84
|
-
const membershipMask = toGroupMask(filter?.membership, 1 << 0);
|
|
85
|
-
const collisionMask = toGroupMask(filter?.collidesWith, fullGroupMask);
|
|
86
|
-
return ((membershipMask & fullGroupMask) << 16) | (collisionMask & fullGroupMask);
|
|
87
|
-
};
|
|
88
|
-
const getOffset = (shape) => ({
|
|
89
|
-
x: shape.offsetX ?? 0,
|
|
90
|
-
y: shape.offsetY ?? 0,
|
|
91
|
-
});
|
|
92
|
-
const rotatePoint = (x, y, rotation) => {
|
|
93
|
-
const cos = Math.cos(rotation);
|
|
94
|
-
const sin = Math.sin(rotation);
|
|
95
|
-
return {
|
|
96
|
-
x: (x * cos) - (y * sin),
|
|
97
|
-
y: (x * sin) + (y * cos),
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
const assertShape = (shape) => {
|
|
101
|
-
if (shape.type === 'box') {
|
|
102
|
-
assertPositiveNumber(shape.width, 'Box width');
|
|
103
|
-
assertPositiveNumber(shape.height, 'Box height');
|
|
104
|
-
assertFiniteNumber(shape.offsetX ?? 0, 'Box offsetX');
|
|
105
|
-
assertFiniteNumber(shape.offsetY ?? 0, 'Box offsetY');
|
|
106
|
-
assertFiniteNumber(shape.offsetRotation ?? 0, 'Box offsetRotation');
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
assertPositiveNumber(shape.radius, 'Circle radius');
|
|
110
|
-
assertFiniteNumber(shape.offsetX ?? 0, 'Circle offsetX');
|
|
111
|
-
assertFiniteNumber(shape.offsetY ?? 0, 'Circle offsetY');
|
|
112
|
-
};
|
|
113
|
-
const assertBodyOptions = (options) => {
|
|
114
|
-
assertShape(options.shape);
|
|
115
|
-
assertFiniteNumber(options.friction ?? 0, 'friction');
|
|
116
|
-
assertFiniteNumber(options.restitution ?? 0, 'restitution');
|
|
117
|
-
assertFiniteNumber(options.density ?? 0, 'density');
|
|
118
|
-
assertFiniteNumber(options.gravityScale ?? 1, 'gravityScale');
|
|
119
|
-
assertFiniteNumber(options.linearDamping ?? 0, 'linearDamping');
|
|
120
|
-
assertFiniteNumber(options.angularDamping ?? 0, 'angularDamping');
|
|
121
|
-
toPackedCollisionGroups(options.collisionFilter);
|
|
122
|
-
};
|
|
123
|
-
class RapierPhysicsBinding {
|
|
124
|
-
_world;
|
|
125
|
-
_body;
|
|
126
|
-
_collider;
|
|
127
|
-
_syncMode;
|
|
128
|
-
node;
|
|
129
|
-
bodyType;
|
|
130
|
-
shape;
|
|
131
|
-
trigger;
|
|
132
|
-
constructor(world, node, body, collider, options) {
|
|
133
|
-
this._world = world;
|
|
134
|
-
this.node = node;
|
|
135
|
-
this._body = body;
|
|
136
|
-
this._collider = collider;
|
|
137
|
-
this.bodyType = options.type ?? 'dynamic';
|
|
138
|
-
this.shape = options.shape;
|
|
139
|
-
this.trigger = options.trigger ?? false;
|
|
140
|
-
this._syncMode = options.syncMode ?? 'physicsToNode';
|
|
141
|
-
}
|
|
142
|
-
get bodyHandle() {
|
|
143
|
-
return this._body.handle;
|
|
144
|
-
}
|
|
145
|
-
get colliderHandle() {
|
|
146
|
-
return this._collider.handle;
|
|
147
|
-
}
|
|
148
|
-
getBody() {
|
|
149
|
-
return this._body;
|
|
150
|
-
}
|
|
151
|
-
get syncMode() {
|
|
152
|
-
return this._syncMode;
|
|
153
|
-
}
|
|
154
|
-
set syncMode(syncMode) {
|
|
155
|
-
this._syncMode = syncMode;
|
|
156
|
-
}
|
|
157
|
-
get x() {
|
|
158
|
-
return this._body.translation().x;
|
|
159
|
-
}
|
|
160
|
-
get y() {
|
|
161
|
-
return this._body.translation().y;
|
|
162
|
-
}
|
|
163
|
-
get rotation() {
|
|
164
|
-
return this._body.rotation();
|
|
165
|
-
}
|
|
166
|
-
setSyncMode(syncMode) {
|
|
167
|
-
this._syncMode = syncMode;
|
|
168
|
-
return this;
|
|
169
|
-
}
|
|
170
|
-
teleport(x, y, rotation = this.node.rotation) {
|
|
171
|
-
this._world.writeBodyTransform(this._body, x, y, rotation, true);
|
|
172
|
-
this.node.setPosition(x, y);
|
|
173
|
-
this.node.setRotation(rotation);
|
|
174
|
-
return this;
|
|
175
|
-
}
|
|
176
|
-
syncBodyFromNode(wakeUp = true) {
|
|
177
|
-
this._world.writeBodyTransform(this._body, this.node.x, this.node.y, this.node.rotation, wakeUp);
|
|
178
|
-
return this;
|
|
179
|
-
}
|
|
180
|
-
syncNodeFromBody() {
|
|
181
|
-
const translation = this._body.translation();
|
|
182
|
-
this.node.setPosition(translation.x, translation.y);
|
|
183
|
-
this.node.setRotation(this._body.rotation());
|
|
184
|
-
return this;
|
|
185
|
-
}
|
|
186
|
-
setCollisionFilter(filter) {
|
|
187
|
-
const groups = toPackedCollisionGroups(filter);
|
|
188
|
-
this._collider.setCollisionGroups(groups);
|
|
189
|
-
this._collider.setSolverGroups(groups);
|
|
190
|
-
return this;
|
|
191
|
-
}
|
|
192
|
-
destroy() {
|
|
193
|
-
this._world.removeBinding(this);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
class RapierPhysicsWorld {
|
|
197
|
-
onCollisionEnter = new Signal();
|
|
198
|
-
onCollisionExit = new Signal();
|
|
199
|
-
onTriggerEnter = new Signal();
|
|
200
|
-
onTriggerExit = new Signal();
|
|
201
|
-
_rapier;
|
|
202
|
-
_world;
|
|
203
|
-
_eventQueue;
|
|
204
|
-
_bindings = new Set();
|
|
205
|
-
_nodeBindings = new Map();
|
|
206
|
-
_colliderBindings = new Map();
|
|
207
|
-
constructor(rapier, world, eventQueue) {
|
|
208
|
-
this._rapier = rapier;
|
|
209
|
-
this._world = world;
|
|
210
|
-
this._eventQueue = eventQueue;
|
|
211
|
-
}
|
|
212
|
-
static async create(options = {}) {
|
|
213
|
-
const moduleLoader = options.moduleLoader ?? defaultRapierModuleLoader;
|
|
214
|
-
let loadedModule = null;
|
|
215
|
-
try {
|
|
216
|
-
loadedModule = await moduleLoader();
|
|
217
|
-
}
|
|
218
|
-
catch (error) {
|
|
219
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
220
|
-
throw new Error(`Rapier physics module is unavailable. Install "${rapierModuleName}" or provide a custom module loader. Original error: ${message}`, { cause: error });
|
|
221
|
-
}
|
|
222
|
-
const rapier = resolveRapierModule(loadedModule);
|
|
223
|
-
if (typeof rapier.init === 'function') {
|
|
224
|
-
await rapier.init();
|
|
225
|
-
}
|
|
226
|
-
const gravityX = options.gravityX ?? 0;
|
|
227
|
-
const gravityY = options.gravityY ?? 9.81;
|
|
228
|
-
assertFiniteNumber(gravityX, 'gravityX');
|
|
229
|
-
assertFiniteNumber(gravityY, 'gravityY');
|
|
230
|
-
const world = new rapier.worldConstructor(new rapier.vector2(gravityX, gravityY));
|
|
231
|
-
const eventQueue = new rapier.eventQueueConstructor(true);
|
|
232
|
-
return new RapierPhysicsWorld(rapier, world, eventQueue);
|
|
233
|
-
}
|
|
234
|
-
get gravity() {
|
|
235
|
-
return {
|
|
236
|
-
x: this._world.gravity.x,
|
|
237
|
-
y: this._world.gravity.y,
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
setGravity(x, y) {
|
|
241
|
-
assertFiniteNumber(x, 'gravityX');
|
|
242
|
-
assertFiniteNumber(y, 'gravityY');
|
|
243
|
-
this._world.gravity.x = x;
|
|
244
|
-
this._world.gravity.y = y;
|
|
245
|
-
return this;
|
|
246
|
-
}
|
|
247
|
-
hasNode(node) {
|
|
248
|
-
return this._nodeBindings.has(node);
|
|
249
|
-
}
|
|
250
|
-
getBinding(node) {
|
|
251
|
-
return this._nodeBindings.get(node) ?? null;
|
|
252
|
-
}
|
|
253
|
-
attachNode(node, options) {
|
|
254
|
-
if (this._nodeBindings.has(node)) {
|
|
255
|
-
throw new Error('This SceneNode is already attached to a physics body.');
|
|
256
|
-
}
|
|
257
|
-
assertBodyOptions(options);
|
|
258
|
-
const bodyDescriptor = this.createBodyDescriptor(node, options);
|
|
259
|
-
const body = this._world.createRigidBody(bodyDescriptor);
|
|
260
|
-
const colliderDescriptor = this.createColliderDescriptor(options);
|
|
261
|
-
const collider = this._world.createCollider(colliderDescriptor, body);
|
|
262
|
-
const binding = new RapierPhysicsBinding(this, node, body, collider, options);
|
|
263
|
-
this._bindings.add(binding);
|
|
264
|
-
this._nodeBindings.set(node, binding);
|
|
265
|
-
this._colliderBindings.set(collider.handle, binding);
|
|
266
|
-
return binding;
|
|
267
|
-
}
|
|
268
|
-
detachNode(node) {
|
|
269
|
-
const binding = this._nodeBindings.get(node);
|
|
270
|
-
if (binding) {
|
|
271
|
-
this.removeBinding(binding);
|
|
272
|
-
}
|
|
273
|
-
return this;
|
|
274
|
-
}
|
|
275
|
-
step(deltaSeconds = defaultDeltaSeconds) {
|
|
276
|
-
assertFiniteNumber(deltaSeconds, 'deltaSeconds');
|
|
277
|
-
if (deltaSeconds < 0) {
|
|
278
|
-
throw new Error('deltaSeconds must be zero or greater.');
|
|
279
|
-
}
|
|
280
|
-
this.applyStepDelta(deltaSeconds);
|
|
281
|
-
this._world.step(this._eventQueue);
|
|
282
|
-
this.drainCollisionEvents();
|
|
283
|
-
this.syncNodeTransforms();
|
|
284
|
-
return this;
|
|
285
|
-
}
|
|
286
|
-
syncNodeTransforms() {
|
|
287
|
-
for (const binding of this._bindings) {
|
|
288
|
-
if (binding.syncMode === 'physicsToNode') {
|
|
289
|
-
binding.syncNodeFromBody();
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
return this;
|
|
293
|
-
}
|
|
294
|
-
createDebugGraphics(options = {}) {
|
|
295
|
-
const graphics = new Graphics();
|
|
296
|
-
graphics.setCullable(false);
|
|
297
|
-
this.updateDebugGraphics(graphics, options);
|
|
298
|
-
return graphics;
|
|
299
|
-
}
|
|
300
|
-
updateDebugGraphics(graphics, options = {}) {
|
|
301
|
-
const lineWidth = options.lineWidth ?? defaultDebugDrawOptions.lineWidth;
|
|
302
|
-
const solidLineColor = options.solidLineColor ?? defaultDebugDrawOptions.solidLineColor;
|
|
303
|
-
const solidFillColor = options.solidFillColor ?? defaultDebugDrawOptions.solidFillColor;
|
|
304
|
-
const triggerLineColor = options.triggerLineColor ?? defaultDebugDrawOptions.triggerLineColor;
|
|
305
|
-
const triggerFillColor = options.triggerFillColor ?? defaultDebugDrawOptions.triggerFillColor;
|
|
306
|
-
graphics.clear();
|
|
307
|
-
graphics.lineWidth = lineWidth;
|
|
308
|
-
for (const binding of this._bindings) {
|
|
309
|
-
const bodyTranslation = {
|
|
310
|
-
x: binding.x,
|
|
311
|
-
y: binding.y,
|
|
312
|
-
};
|
|
313
|
-
const rotation = binding.rotation;
|
|
314
|
-
const lineColor = binding.trigger ? triggerLineColor : solidLineColor;
|
|
315
|
-
const fillColor = binding.trigger ? triggerFillColor : solidFillColor;
|
|
316
|
-
graphics.lineColor = lineColor;
|
|
317
|
-
graphics.fillColor = fillColor;
|
|
318
|
-
if (binding.shape.type === 'box') {
|
|
319
|
-
const path = this.buildBoxPath(binding.shape, bodyTranslation.x, bodyTranslation.y, rotation);
|
|
320
|
-
graphics.drawPolygon(path);
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
const offset = getOffset(binding.shape);
|
|
324
|
-
const rotatedOffset = rotatePoint(offset.x, offset.y, rotation);
|
|
325
|
-
graphics.drawCircle(bodyTranslation.x + rotatedOffset.x, bodyTranslation.y + rotatedOffset.y, binding.shape.radius);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
return graphics;
|
|
329
|
-
}
|
|
330
|
-
destroy() {
|
|
331
|
-
for (const binding of Array.from(this._bindings)) {
|
|
332
|
-
this.removeBinding(binding);
|
|
333
|
-
}
|
|
334
|
-
this.onCollisionEnter.destroy();
|
|
335
|
-
this.onCollisionExit.destroy();
|
|
336
|
-
this.onTriggerEnter.destroy();
|
|
337
|
-
this.onTriggerExit.destroy();
|
|
338
|
-
}
|
|
339
|
-
writeBodyTransform(body, x, y, rotation, wakeUp) {
|
|
340
|
-
body.setTranslation(new this._rapier.vector2(x, y), wakeUp);
|
|
341
|
-
body.setRotation(rotation, wakeUp);
|
|
342
|
-
}
|
|
343
|
-
removeBinding(binding) {
|
|
344
|
-
if (!this._bindings.has(binding)) {
|
|
345
|
-
return;
|
|
346
|
-
}
|
|
347
|
-
this._bindings.delete(binding);
|
|
348
|
-
this._nodeBindings.delete(binding.node);
|
|
349
|
-
this._colliderBindings.delete(binding.colliderHandle);
|
|
350
|
-
this._world.removeRigidBody(binding.getBody());
|
|
351
|
-
}
|
|
352
|
-
createBodyDescriptor(node, options) {
|
|
353
|
-
const type = options.type ?? 'dynamic';
|
|
354
|
-
let descriptor = this._rapier.rigidBodyDescFactory.dynamic();
|
|
355
|
-
switch (type) {
|
|
356
|
-
case 'static':
|
|
357
|
-
descriptor = this._rapier.rigidBodyDescFactory.fixed();
|
|
358
|
-
break;
|
|
359
|
-
case 'kinematic':
|
|
360
|
-
if (typeof this._rapier.rigidBodyDescFactory.kinematicPositionBased === 'function') {
|
|
361
|
-
descriptor = this._rapier.rigidBodyDescFactory.kinematicPositionBased();
|
|
362
|
-
}
|
|
363
|
-
else if (typeof this._rapier.rigidBodyDescFactory.kinematicVelocityBased === 'function') {
|
|
364
|
-
descriptor = this._rapier.rigidBodyDescFactory.kinematicVelocityBased();
|
|
365
|
-
}
|
|
366
|
-
else {
|
|
367
|
-
throw new Error('Rapier module does not expose a kinematic rigid-body descriptor.');
|
|
368
|
-
}
|
|
369
|
-
break;
|
|
370
|
-
default:
|
|
371
|
-
descriptor = this._rapier.rigidBodyDescFactory.dynamic();
|
|
372
|
-
break;
|
|
373
|
-
}
|
|
374
|
-
descriptor
|
|
375
|
-
.setTranslation(node.x, node.y)
|
|
376
|
-
.setRotation(node.rotation)
|
|
377
|
-
.setLinearDamping(options.linearDamping ?? 0)
|
|
378
|
-
.setAngularDamping(options.angularDamping ?? 0)
|
|
379
|
-
.setGravityScale(options.gravityScale ?? 1)
|
|
380
|
-
.lockRotations(options.lockRotation ?? false);
|
|
381
|
-
return descriptor;
|
|
382
|
-
}
|
|
383
|
-
createColliderDescriptor(options) {
|
|
384
|
-
const shape = options.shape;
|
|
385
|
-
const descriptor = shape.type === 'box'
|
|
386
|
-
? this._rapier.colliderDescFactory.cuboid(shape.width / 2, shape.height / 2)
|
|
387
|
-
: this._rapier.colliderDescFactory.ball(shape.radius);
|
|
388
|
-
const offset = getOffset(shape);
|
|
389
|
-
const groups = toPackedCollisionGroups(options.collisionFilter);
|
|
390
|
-
descriptor
|
|
391
|
-
.setTranslation(offset.x, offset.y)
|
|
392
|
-
.setRotation(shape.type === 'box' ? (shape.offsetRotation ?? 0) : 0)
|
|
393
|
-
.setSensor(options.trigger ?? false)
|
|
394
|
-
.setFriction(options.friction ?? 0.5)
|
|
395
|
-
.setRestitution(options.restitution ?? 0)
|
|
396
|
-
.setDensity(options.density ?? 1)
|
|
397
|
-
.setCollisionGroups(groups)
|
|
398
|
-
.setSolverGroups(groups);
|
|
399
|
-
const collisionEvents = this._rapier.activeCollisionEvents;
|
|
400
|
-
if (typeof collisionEvents === 'number') {
|
|
401
|
-
descriptor.setActiveEvents(collisionEvents);
|
|
402
|
-
}
|
|
403
|
-
return descriptor;
|
|
404
|
-
}
|
|
405
|
-
applyStepDelta(deltaSeconds) {
|
|
406
|
-
const worldWithTimestep = this._world;
|
|
407
|
-
if (typeof worldWithTimestep.timestep === 'number') {
|
|
408
|
-
worldWithTimestep.timestep = deltaSeconds;
|
|
409
|
-
}
|
|
410
|
-
if (worldWithTimestep.integrationParameters
|
|
411
|
-
&& typeof worldWithTimestep.integrationParameters.dt === 'number') {
|
|
412
|
-
worldWithTimestep.integrationParameters.dt = deltaSeconds;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
drainCollisionEvents() {
|
|
416
|
-
this._eventQueue.drainCollisionEvents((handleA, handleB, started) => {
|
|
417
|
-
const first = this._colliderBindings.get(handleA);
|
|
418
|
-
const second = this._colliderBindings.get(handleB);
|
|
419
|
-
if (!first || !second) {
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
const trigger = first.trigger || second.trigger;
|
|
423
|
-
const event = {
|
|
424
|
-
started,
|
|
425
|
-
trigger,
|
|
426
|
-
first,
|
|
427
|
-
second,
|
|
428
|
-
};
|
|
429
|
-
if (trigger) {
|
|
430
|
-
if (started) {
|
|
431
|
-
this.onTriggerEnter.dispatch(event);
|
|
432
|
-
}
|
|
433
|
-
else {
|
|
434
|
-
this.onTriggerExit.dispatch(event);
|
|
435
|
-
}
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
if (started) {
|
|
439
|
-
this.onCollisionEnter.dispatch(event);
|
|
440
|
-
}
|
|
441
|
-
else {
|
|
442
|
-
this.onCollisionExit.dispatch(event);
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
buildBoxPath(shape, bodyX, bodyY, bodyRotation) {
|
|
447
|
-
const halfWidth = shape.width / 2;
|
|
448
|
-
const halfHeight = shape.height / 2;
|
|
449
|
-
const corners = [
|
|
450
|
-
{ x: -halfWidth, y: -halfHeight },
|
|
451
|
-
{ x: halfWidth, y: -halfHeight },
|
|
452
|
-
{ x: halfWidth, y: halfHeight },
|
|
453
|
-
{ x: -halfWidth, y: halfHeight },
|
|
454
|
-
];
|
|
455
|
-
const offset = getOffset(shape);
|
|
456
|
-
const offsetRotation = shape.offsetRotation ?? 0;
|
|
457
|
-
const path = [];
|
|
458
|
-
for (const corner of corners) {
|
|
459
|
-
const local = rotatePoint(corner.x, corner.y, offsetRotation);
|
|
460
|
-
const withOffset = {
|
|
461
|
-
x: local.x + offset.x,
|
|
462
|
-
y: local.y + offset.y,
|
|
463
|
-
};
|
|
464
|
-
const worldPoint = rotatePoint(withOffset.x, withOffset.y, bodyRotation);
|
|
465
|
-
path.push(bodyX + worldPoint.x, bodyY + worldPoint.y);
|
|
466
|
-
}
|
|
467
|
-
return path;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
const createRapierPhysicsWorld = async (options = {}) => {
|
|
471
|
-
return await RapierPhysicsWorld.create(options);
|
|
472
|
-
};
|
|
473
|
-
|
|
474
|
-
export { RapierPhysicsBinding, RapierPhysicsWorld, createRapierPhysicsWorld };
|
|
475
|
-
//# sourceMappingURL=RapierPhysicsWorld.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RapierPhysicsWorld.js","sources":["../../../../src/physics/RapierPhysicsWorld.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKA,MAAM,gBAAgB,GAAG,2BAA2B;AACpD,MAAM,iBAAiB,GAAG,EAAE;AAC5B,MAAM,aAAa,GAAG,MAAM;AAC5B,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE;AAwIlC,MAAM,uBAAuB,GAAG;AAC5B,IAAA,SAAS,EAAE,CAAC;IACZ,cAAc,EAAE,IAAI,KAAK,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IAC1C,cAAc,EAAE,IAAI,KAAK,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC;IAC7C,gBAAgB,EAAE,IAAI,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5C,gBAAgB,EAAE,IAAI,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC;CACzC;AAEV,MAAM,mBAAmB,GAAG,CAAC,MAAe,KAAsB;IAC9D,MAAM,MAAM,GAAG,MAA0C;AACzD,IAA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