@flighthq/physics2d 0.3.0-next.1032.e2b99fc → 0.3.0-next.1220.6982c21
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/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 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/jointRegistry.d.ts +6 -0
- package/dist/jointRegistry.d.ts.map +1 -0
- package/dist/jointRegistry.js +61 -0
- package/dist/jointRegistry.js.map +1 -0
- package/dist/joints.d.ts +39 -0
- package/dist/joints.d.ts.map +1 -0
- package/dist/joints.js +488 -0
- package/dist/joints.js.map +1 -0
- package/dist/solver.d.ts +1 -0
- package/dist/solver.d.ts.map +1 -1
- package/dist/solver.js +15 -10
- package/dist/solver.js.map +1 -1
- package/dist/step.d.ts.map +1 -1
- package/dist/step.js +111 -8
- package/dist/step.js.map +1 -1
- package/dist/world.d.ts.map +1 -1
- package/dist/world.js +10 -0
- package/dist/world.js.map +1 -1
- package/package.json +5 -5
- package/src/jointRegistry.test.ts +145 -0
- package/src/joints.test.ts +648 -0
- package/src/solver.test.ts +19 -0
- package/src/step.test.ts +298 -0
package/dist/contract.d.ts
CHANGED
package/dist/contract.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
package/dist/contract.js
CHANGED
package/dist/contract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { createPhysics2DColliderWorldShape, updatePhysics2DColliderWorldShape, writePhysics2DColliderBounds, } from './colliderTransform';
|
|
2
|
+
export { Physics2DDistanceJointKind, Physics2DMouseJointKind, Physics2DRevoluteJointKind, Physics2DRopeJointKind, Physics2DWeldJointKind, physics2DDistanceJointSolver, physics2DMouseJointSolver, physics2DRevoluteJointSolver, physics2DRopeJointSolver, physics2DWeldJointSolver, } from './joints';
|
|
3
|
+
export { addPhysics2DJoint, getPhysics2DJointSolver, registerPhysics2DJointSolver, removePhysics2DJoint, } from './jointRegistry';
|
|
2
4
|
export { computePhysics2DColliderMassData, updateRigidBody2DMassData } from './massProperties';
|
|
3
|
-
export { applyPhysics2DImpulse, relativeNormalVelocity, solvePhysics2DContacts, warmStartPhysics2DContacts, } from './solver';
|
|
5
|
+
export { applyPhysics2DImpulse, relativeNormalVelocity, solvePhysics2DContacts, solvePhysics2DContactsOnce, warmStartPhysics2DContacts, } from './solver';
|
|
4
6
|
export { stepPhysics2D } from './step';
|
|
5
7
|
export { addPhysics2DBody, findPhysics2DBody, createPhysics2DCollider, createPhysics2DSolverConfig, createPhysics2DWorld, createRigidBody2D, isPhysics2DPairOrdered, removePhysics2DBody, } from './world';
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gCAAgC,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,4BAA4B,EAC5B,yBAAyB,EACzB,4BAA4B,EAC5B,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gCAAgC,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { createPhysics2DColliderWorldShape, updatePhysics2DColliderWorldShape, writePhysics2DColliderBounds, } from './colliderTransform';
|
|
2
|
+
export { Physics2DDistanceJointKind, Physics2DMouseJointKind, Physics2DRevoluteJointKind, Physics2DRopeJointKind, Physics2DWeldJointKind, physics2DDistanceJointSolver, physics2DMouseJointSolver, physics2DRevoluteJointSolver, physics2DRopeJointSolver, physics2DWeldJointSolver, } from './joints';
|
|
3
|
+
export { addPhysics2DJoint, getPhysics2DJointSolver, registerPhysics2DJointSolver, removePhysics2DJoint, } from './jointRegistry';
|
|
2
4
|
export { computePhysics2DColliderMassData, updateRigidBody2DMassData } from './massProperties';
|
|
3
|
-
export { applyPhysics2DImpulse, relativeNormalVelocity, solvePhysics2DContacts, warmStartPhysics2DContacts, } from './solver';
|
|
5
|
+
export { applyPhysics2DImpulse, relativeNormalVelocity, solvePhysics2DContacts, solvePhysics2DContactsOnce, warmStartPhysics2DContacts, } from './solver';
|
|
4
6
|
export { stepPhysics2D } from './step';
|
|
5
7
|
export { addPhysics2DBody, findPhysics2DBody, createPhysics2DCollider, createPhysics2DSolverConfig, createPhysics2DWorld, createRigidBody2D, isPhysics2DPairOrdered, removePhysics2DBody, } from './world';
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gCAAgC,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,4BAA4B,EAC5B,yBAAyB,EACzB,4BAA4B,EAC5B,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gCAAgC,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Physics2DJoint, Physics2DJointKind, Physics2DJointSolver, Physics2DWorld } from '@flighthq/types/contract';
|
|
2
|
+
export declare function addPhysics2DJoint(world: Physics2DWorld, joint: Physics2DJoint): Physics2DJoint;
|
|
3
|
+
export declare function getPhysics2DJointSolver(world: Readonly<Physics2DWorld>, kind: Physics2DJointKind): Physics2DJointSolver | null;
|
|
4
|
+
export declare function registerPhysics2DJointSolver(world: Physics2DWorld, kind: Physics2DJointKind, solver: Physics2DJointSolver): void;
|
|
5
|
+
export declare function removePhysics2DJoint(world: Physics2DWorld, joint: Readonly<Physics2DJoint>): boolean;
|
|
6
|
+
//# sourceMappingURL=jointRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jointRegistry.d.ts","sourceRoot":"","sources":["../src/jointRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACf,MAAM,0BAA0B,CAAC;AAalC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,GAAG,cAAc,CAyB9F;AAKD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,EAC/B,IAAI,EAAE,kBAAkB,GACvB,oBAAoB,GAAG,IAAI,CAE7B;AASD,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,cAAc,EACrB,IAAI,EAAE,kBAAkB,EACxB,MAAM,EAAE,oBAAoB,GAC3B,IAAI,CAEN;AAGD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,OAAO,CAKpG"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { findPhysics2DBody, isPhysics2DPairOrdered } from './world';
|
|
2
|
+
// Adds `joint` to `world` under the same canonical body ordering contacts use, swapping its two ends when
|
|
3
|
+
// the caller supplied them the other way round.
|
|
4
|
+
//
|
|
5
|
+
// A joint is a constraint in the SAME sequential solve list as a contact, so it inherits the same
|
|
6
|
+
// obligation: each impulse lands on the velocities the previous one left, and an ordering that varied
|
|
7
|
+
// with construction history would make the result vary with it. Contacts get this from the broadphase
|
|
8
|
+
// pair sort; joints have no broadphase, so it is enforced here, at the one place a joint enters the
|
|
9
|
+
// world. The anchors and lever arms swap with the bodies — a joint whose ends were exchanged without its
|
|
10
|
+
// anchors would attach to the wrong points and hold the pair in a pose nobody asked for.
|
|
11
|
+
export function addPhysics2DJoint(world, joint) {
|
|
12
|
+
const first = findPhysics2DBody(world, joint.bodyA);
|
|
13
|
+
const second = findPhysics2DBody(world, joint.bodyB);
|
|
14
|
+
// Ask the kind before exchanging anything. The swap below moves only what every joint has — two
|
|
15
|
+
// body indices and two anchors — so a kind holding state measured from bodyA toward bodyB has to
|
|
16
|
+
// reverse it, and a kind whose second end is not a body at all must refuse outright. Making that
|
|
17
|
+
// the kind's decision is the only place it can be correct: the registry cannot know which fields
|
|
18
|
+
// carry a direction.
|
|
19
|
+
// Decide whether a swap is pending BEFORE asking the kind: swapEnds both vetoes and transforms, so
|
|
20
|
+
// calling it when nothing is being exchanged would apply a kind's reversal to ends that never moved.
|
|
21
|
+
const swapPending = first !== null && second !== null && !isPhysics2DPairOrdered(first, second);
|
|
22
|
+
const solver = getPhysics2DJointSolver(world, joint.kind);
|
|
23
|
+
if (swapPending && (solver?.swapEnds?.(joint) ?? true)) {
|
|
24
|
+
const bodyA = joint.bodyA;
|
|
25
|
+
joint.bodyA = joint.bodyB;
|
|
26
|
+
joint.bodyB = bodyA;
|
|
27
|
+
const anchorX = joint.localAnchorAX;
|
|
28
|
+
const anchorY = joint.localAnchorAY;
|
|
29
|
+
joint.localAnchorAX = joint.localAnchorBX;
|
|
30
|
+
joint.localAnchorAY = joint.localAnchorBY;
|
|
31
|
+
joint.localAnchorBX = anchorX;
|
|
32
|
+
joint.localAnchorBY = anchorY;
|
|
33
|
+
}
|
|
34
|
+
world.joints.push(joint);
|
|
35
|
+
return joint;
|
|
36
|
+
}
|
|
37
|
+
// The solver registered for `kind`, or null when none is. A missing solver is an expected condition, not
|
|
38
|
+
// an error: a scene deserialized with a joint kind the running build does not know about should import
|
|
39
|
+
// and simply not constrain, rather than refuse to load.
|
|
40
|
+
export function getPhysics2DJointSolver(world, kind) {
|
|
41
|
+
return world.jointSolvers.get(kind) ?? null;
|
|
42
|
+
}
|
|
43
|
+
// Registers `solver` for `kind` on this world. Last write wins, so a caller may replace a built-in with
|
|
44
|
+
// its own — collisions are avoided by the vendor-prefix convention (bare names reserved for built-ins),
|
|
45
|
+
// not by a guard that would make overriding impossible.
|
|
46
|
+
//
|
|
47
|
+
// Registration is per-world and explicit rather than a module-level table populated on import, so a
|
|
48
|
+
// bundle that never registers a joint never links one: nine solvers are nine chunks of constraint math,
|
|
49
|
+
// and a game using none of them should pay for none of them.
|
|
50
|
+
export function registerPhysics2DJointSolver(world, kind, solver) {
|
|
51
|
+
world.jointSolvers.set(kind, solver);
|
|
52
|
+
}
|
|
53
|
+
// Removes `joint` from `world`. Returns false when the world does not hold it.
|
|
54
|
+
export function removePhysics2DJoint(world, joint) {
|
|
55
|
+
const at = world.joints.indexOf(joint);
|
|
56
|
+
if (at < 0)
|
|
57
|
+
return false;
|
|
58
|
+
world.joints.splice(at, 1);
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=jointRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jointRegistry.js","sourceRoot":"","sources":["../src/jointRegistry.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,M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CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzB,OAAO,KAAK,CAAC;AACf,CAAC;AAED,yGAAyG;AACzG,uGAAuG;AACvG,wDAAwD;AACxD,MAAM,UAAU,uBAAuB,CACrC,KAA+B,EAC/B,IAAwB;IAExB,OAAO,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AAC9C,CAAC;AAED,wGAAwG;AACxG,wGAAwG;AACxG,wDAAwD;AACxD,EAAE;AACF,oGAAoG;AACpG,wGAAwG;AACxG,6DAA6D;AAC7D,MAAM,UAAU,4BAA4B,CAC1C,KAAqB,EACrB,IAAwB,EACxB,MAA4B;IAE5B,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACvC,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,oBAAoB,CAAC,KAAqB,EAAE,KAA+B;IACzF,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,KAAuB,CAAC,CAAC;IACzD,IAAI,EAAE,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACzB,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3B,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/joints.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Physics2DJoint, Physics2DWorld } from '@flighthq/types/contract';
|
|
2
|
+
export declare const Physics2DDistanceJointKind = "Distance";
|
|
3
|
+
export declare const Physics2DMouseJointKind = "Mouse";
|
|
4
|
+
export declare const Physics2DRevoluteJointKind = "Revolute";
|
|
5
|
+
export declare const Physics2DRopeJointKind = "Rope";
|
|
6
|
+
export declare const Physics2DWeldJointKind = "Weld";
|
|
7
|
+
export declare const physics2DDistanceJointSolver: {
|
|
8
|
+
warmStart(world: Physics2DWorld, joint: Physics2DJoint): void;
|
|
9
|
+
clearAccumulatedImpulses(joint: Physics2DJoint): void;
|
|
10
|
+
prepare(world: Physics2DWorld, joint: Physics2DJoint, dt: number): void;
|
|
11
|
+
solve(world: Physics2DWorld, joint: Physics2DJoint): void;
|
|
12
|
+
};
|
|
13
|
+
export declare const physics2DMouseJointSolver: {
|
|
14
|
+
swapEnds(): boolean;
|
|
15
|
+
clearAccumulatedImpulses(joint: Physics2DJoint): void;
|
|
16
|
+
prepare(world: Physics2DWorld, joint: Physics2DJoint, dt: number): void;
|
|
17
|
+
solve(world: Physics2DWorld, joint: Physics2DJoint): void;
|
|
18
|
+
};
|
|
19
|
+
export declare const physics2DRevoluteJointSolver: {
|
|
20
|
+
warmStart(world: Physics2DWorld, joint: Physics2DJoint): void;
|
|
21
|
+
clearAccumulatedImpulses(joint: Physics2DJoint): void;
|
|
22
|
+
swapEnds(joint: Physics2DJoint): boolean;
|
|
23
|
+
prepare(world: Physics2DWorld, joint: Physics2DJoint, dt: number): void;
|
|
24
|
+
solve(world: Physics2DWorld, joint: Physics2DJoint): void;
|
|
25
|
+
};
|
|
26
|
+
export declare const physics2DRopeJointSolver: {
|
|
27
|
+
warmStart(world: Physics2DWorld, joint: Physics2DJoint): void;
|
|
28
|
+
clearAccumulatedImpulses(joint: Physics2DJoint): void;
|
|
29
|
+
prepare(world: Physics2DWorld, joint: Physics2DJoint, dt: number): void;
|
|
30
|
+
solve(world: Physics2DWorld, joint: Physics2DJoint): void;
|
|
31
|
+
};
|
|
32
|
+
export declare const physics2DWeldJointSolver: {
|
|
33
|
+
warmStart(world: Physics2DWorld, joint: Physics2DJoint): void;
|
|
34
|
+
clearAccumulatedImpulses(joint: Physics2DJoint): void;
|
|
35
|
+
swapEnds(joint: Physics2DJoint): boolean;
|
|
36
|
+
prepare(world: Physics2DWorld, joint: Physics2DJoint, dt: number): void;
|
|
37
|
+
solve(world: Physics2DWorld, joint: Physics2DJoint): void;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=joints.d.ts.map
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