@margoengine/ragdoll 0.1.0 → 1.0.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/LICENSE +201 -201
- package/NOTICE +4 -4
- package/README.md +431 -381
- package/dist/balance.d.ts +57 -0
- package/dist/balance.js +272 -152
- package/dist/character.d.ts +200 -0
- package/dist/character.js +325 -0
- package/dist/errors-CDwcEs-j.js +5 -0
- package/dist/errors.d.ts +3 -0
- package/dist/getup.js +57 -56
- package/dist/hulls.js +85 -82
- package/dist/index.d.ts +1 -1
- package/dist/index.js +559 -302
- package/dist/powered.js +79 -78
- package/dist/profile.js +100 -99
- package/dist/ragdoll.d.ts +17 -1
- package/package.json +86 -82
package/dist/getup.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "./errors-CDwcEs-j.js";
|
|
2
|
+
import { MargoError as t } from "@margoengine/math/errors";
|
|
3
|
+
import { conjugateQuaternion as n, multiplyQuaternions as r, normalizeQuaternion as i, rotateByQuaternion as a, rotationToQuaternion as o } from "@margoengine/math/quat";
|
|
3
4
|
//#region src/getup.ts
|
|
4
|
-
var
|
|
5
|
-
let t = Math.hypot(e[0], e[1], e[2]), n = Math.hypot(e[4], e[5], e[6]),
|
|
6
|
-
return
|
|
5
|
+
var s = (e) => {
|
|
6
|
+
let t = Math.hypot(e[0], e[1], e[2]), n = Math.hypot(e[4], e[5], e[6]), r = Math.hypot(e[8], e[9], e[10]);
|
|
7
|
+
return i(o(e, [
|
|
7
8
|
0,
|
|
8
9
|
0,
|
|
9
10
|
0,
|
|
10
11
|
1
|
|
11
|
-
], t, n,
|
|
12
|
-
},
|
|
13
|
-
function
|
|
12
|
+
], t, n, r));
|
|
13
|
+
}, c = (e) => 2 * Math.atan2(Math.hypot(e[0], e[1], e[2]), Math.abs(e[3]));
|
|
14
|
+
function l(e, t) {
|
|
14
15
|
let n = e[0] * t[0] + e[1] * t[1] + e[2] * t[2], r = Math.hypot(n, e[3]);
|
|
15
16
|
return r < 1e-9 ? [
|
|
16
17
|
0,
|
|
@@ -24,51 +25,51 @@ function c(e, t) {
|
|
|
24
25
|
e[3] / r
|
|
25
26
|
];
|
|
26
27
|
}
|
|
27
|
-
var
|
|
28
|
-
constructor(
|
|
29
|
-
this.ragdoll =
|
|
30
|
-
faceUp:
|
|
31
|
-
faceDown:
|
|
28
|
+
var u = class {
|
|
29
|
+
constructor(t, n, r) {
|
|
30
|
+
this.ragdoll = t, this.animator = n, this.disposed = !1, this.states = {
|
|
31
|
+
faceUp: r.faceUp,
|
|
32
|
+
faceDown: r.faceDown
|
|
32
33
|
};
|
|
33
|
-
for (let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
]) if (!Object.hasOwn(
|
|
38
|
-
if (this.root =
|
|
39
|
-
let
|
|
34
|
+
for (let t of [
|
|
35
|
+
r.faceUp,
|
|
36
|
+
r.faceDown,
|
|
37
|
+
r.then ?? n.state
|
|
38
|
+
]) if (!Object.hasOwn(n.options.states, t)) throw e(`Unknown animator state "${t}"; pass a state name from the Animator's options.`);
|
|
39
|
+
if (this.root = r.root ?? n.animation.model.root, this.then = r.then ?? n.state, this.blend = r.blend ?? .4, this.fade = r.fade ?? .2, !(this.blend >= 0) || this.blend === Infinity || !(this.fade >= 0) || this.fade === Infinity) throw e("Get-up blend and fade must be finite numbers of seconds, 0 or more.");
|
|
40
|
+
let i = r.up ?? [
|
|
40
41
|
0,
|
|
41
42
|
1,
|
|
42
43
|
0
|
|
43
|
-
],
|
|
44
|
-
if (!(
|
|
44
|
+
], a = Math.hypot(i[0], i[1], i[2]);
|
|
45
|
+
if (!(a > 0) || a === Infinity) throw e("Get-up up must be a nonzero finite [x, y, z]; pass the world up, e.g. [0, 1, 0].");
|
|
45
46
|
this.up = [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
i[0] / a,
|
|
48
|
+
i[1] / a,
|
|
49
|
+
i[2] / a
|
|
49
50
|
], this.first = {
|
|
50
51
|
faceUp: this.sample("faceUp"),
|
|
51
52
|
faceDown: this.sample("faceDown")
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
sample(e) {
|
|
55
|
-
let { animator:
|
|
56
|
-
|
|
57
|
-
let d = this.root.matrix, f = l.matrix, p =
|
|
58
|
-
rotation:
|
|
59
|
-
position:
|
|
56
|
+
let { animator: t } = this, i = t.state, o = t.time, c = t.entryTime, l = this.ragdoll.bones[0].node, u = l.engine.store;
|
|
57
|
+
t.cancelFade(), t.transition(this.states[e], 0), t.onPreUpdate(0), u.tick(!1);
|
|
58
|
+
let d = this.root.matrix, f = l.matrix, p = n(s(d)), m = {
|
|
59
|
+
rotation: r(p, s(f)),
|
|
60
|
+
position: a([
|
|
60
61
|
f[12] - d[12],
|
|
61
62
|
f[13] - d[13],
|
|
62
63
|
f[14] - d[14]
|
|
63
64
|
], p)
|
|
64
65
|
};
|
|
65
|
-
return
|
|
66
|
+
return t.transition(i, 0), t.enterAt(c), t.time = o, t.onPreUpdate(0), u.tick(!1), m;
|
|
66
67
|
}
|
|
67
68
|
fit(e) {
|
|
68
|
-
let
|
|
69
|
+
let t = this.ragdoll.bones[0].body.rotation, i = r(s(this.root.matrix), this.first[e].rotation), a = l(r(t, n(i)), this.up);
|
|
69
70
|
return {
|
|
70
71
|
turn: a,
|
|
71
|
-
mismatch:
|
|
72
|
+
mismatch: c(r(n(t), r(a, i)))
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
mismatch(e) {
|
|
@@ -77,15 +78,15 @@ var l = class {
|
|
|
77
78
|
pick() {
|
|
78
79
|
return this.live(), this.fit("faceUp").mismatch <= this.fit("faceDown").mismatch ? "faceUp" : "faceDown";
|
|
79
80
|
}
|
|
80
|
-
start(
|
|
81
|
-
if (this.live(), !this.ragdoll.active) throw new
|
|
82
|
-
if (this.watching) throw new
|
|
83
|
-
|
|
84
|
-
let
|
|
81
|
+
start(e = {}) {
|
|
82
|
+
if (this.live(), !this.ragdoll.active) throw new t("state", "The ragdoll is not limp, so there is nothing to get up from; call activate first.");
|
|
83
|
+
if (this.watching) throw new t("state", "A get-up is already running; wait for its promise.");
|
|
84
|
+
e.signal?.throwIfAborted();
|
|
85
|
+
let n = e.side ?? this.pick(), { turn: i, mismatch: o } = this.fit(n), { animator: c, ragdoll: l, root: u } = this, d = l.bones[0], f = u.engine.store, p = d.body.position, m = u.matrix, h = [
|
|
85
86
|
m[12],
|
|
86
87
|
m[13],
|
|
87
88
|
m[14]
|
|
88
|
-
], g = this.first[
|
|
89
|
+
], g = this.first[n].position, _ = r(i, s(m)), v = a(g, _), y = this.up.map((e) => -e), b = l.physics.raycast(p, y, {
|
|
89
90
|
maxDistance: 100,
|
|
90
91
|
excludeDynamic: !0,
|
|
91
92
|
excludeKinematic: !0
|
|
@@ -98,27 +99,27 @@ var l = class {
|
|
|
98
99
|
C[0] + this.up[0] * w,
|
|
99
100
|
C[1] + this.up[1] * w,
|
|
100
101
|
C[2] + this.up[2] * w
|
|
101
|
-
]), f.tick(!1), c.cancelFade(), c.transition(this.states[
|
|
102
|
+
]), f.tick(!1), c.cancelFade(), c.transition(this.states[n], 0), l.deactivate(this.blend), new Promise((t, r) => {
|
|
102
103
|
let i = () => {
|
|
103
|
-
this.watching?.(), this.watching = void 0,
|
|
104
|
+
this.watching?.(), this.watching = void 0, e.signal?.removeEventListener("abort", a);
|
|
104
105
|
}, a = () => {
|
|
105
|
-
i(),
|
|
106
|
+
i(), r(e.signal.reason);
|
|
106
107
|
};
|
|
107
|
-
|
|
108
|
-
let
|
|
109
|
-
c.state === this.states[
|
|
110
|
-
side:
|
|
111
|
-
mismatch:
|
|
112
|
-
})) : (i(),
|
|
113
|
-
side:
|
|
114
|
-
mismatch:
|
|
108
|
+
e.signal?.addEventListener("abort", a, { once: !0 });
|
|
109
|
+
let s = c.addLateStep(() => {
|
|
110
|
+
c.state === this.states[n] ? c.normalizedTime >= 1 && (c.transition(this.then, this.fade), i(), t({
|
|
111
|
+
side: n,
|
|
112
|
+
mismatch: o
|
|
113
|
+
})) : (i(), t({
|
|
114
|
+
side: n,
|
|
115
|
+
mismatch: o
|
|
115
116
|
}));
|
|
116
117
|
});
|
|
117
|
-
this.watching =
|
|
118
|
+
this.watching = s;
|
|
118
119
|
});
|
|
119
120
|
}
|
|
120
121
|
live() {
|
|
121
|
-
if (this.disposed) throw new
|
|
122
|
+
if (this.disposed) throw new t("disposed", "This get-up is disposed; call addGetUp again.");
|
|
122
123
|
}
|
|
123
124
|
dispose() {
|
|
124
125
|
this.disposed = !0, this.watching?.(), this.watching = void 0;
|
|
@@ -127,9 +128,9 @@ var l = class {
|
|
|
127
128
|
this.dispose();
|
|
128
129
|
}
|
|
129
130
|
};
|
|
130
|
-
function
|
|
131
|
-
if (!
|
|
132
|
-
return new
|
|
131
|
+
function d(t, n, r) {
|
|
132
|
+
if (!t?.bones || typeof n?.transition != "function" || !r) throw e("addGetUp needs a Ragdoll, an Animator and options: addGetUp(ragdoll, animator, {faceUp, faceDown}).");
|
|
133
|
+
return new u(t, n, r);
|
|
133
134
|
}
|
|
134
135
|
//#endregion
|
|
135
|
-
export {
|
|
136
|
+
export { u as GetUp, d as addGetUp };
|
package/dist/hulls.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "./errors-CDwcEs-j.js";
|
|
2
|
+
import { normalizeQuaternion as t, rotateByQuaternion as n } from "@margoengine/math/quat";
|
|
3
|
+
import { jointHulls as r } from "@margoengine/rigging/hulls";
|
|
3
4
|
//#region src/hulls.ts
|
|
4
|
-
var
|
|
5
|
+
var i = [
|
|
5
6
|
1,
|
|
6
7
|
0,
|
|
7
8
|
0,
|
|
@@ -18,39 +19,39 @@ var r = [
|
|
|
18
19
|
0,
|
|
19
20
|
0,
|
|
20
21
|
1
|
|
21
|
-
],
|
|
22
|
-
function
|
|
23
|
-
let { doc:
|
|
24
|
-
if (
|
|
25
|
-
let
|
|
26
|
-
if (!
|
|
27
|
-
let { joints:
|
|
28
|
-
|
|
29
|
-
let r =
|
|
30
|
-
|
|
31
|
-
for (let n = 0; n <
|
|
32
|
-
let i =
|
|
22
|
+
], a = 18;
|
|
23
|
+
function o(t, n) {
|
|
24
|
+
let { doc: r } = t.asset, a = (r.skins ?? []).findIndex((e) => e.joints.some((e) => t.nodes[e] === n));
|
|
25
|
+
if (a < 0) throw e("No skin of this model holds the ragdoll's root bone; pass the model the skeleton belongs to.");
|
|
26
|
+
let o = t.primitives.filter((e) => r.nodes?.[e.nodeIndex]?.skin === a);
|
|
27
|
+
if (!o.length) throw e("No mesh of this model uses the skin; there is nothing to fit shapes to.");
|
|
28
|
+
let { joints: s, inverseBindMatrices: c } = r.skins[a], l = o.some((e) => e.definition.attributes?.JOINTS_1 !== void 0) ? 2 : 1, u = l * 4, d = o.map((e) => t.asset.accessor(e.definition.attributes.POSITION, "VEC3")), f = d.reduce((e, t) => e + t.length / 3, 0), p = new Uint16Array(f * u), m = new Float32Array(f * u), h = new Float32Array(f * 3), g = 0;
|
|
29
|
+
o.forEach((e, n) => {
|
|
30
|
+
let r = d[n].length / 3;
|
|
31
|
+
h.set(d[n], g * 3);
|
|
32
|
+
for (let n = 0; n < l; n++) {
|
|
33
|
+
let i = e.definition.attributes, a = i["JOINTS_" + n], o = i["WEIGHTS_" + n];
|
|
33
34
|
if (a === void 0 || o === void 0) continue;
|
|
34
|
-
let s =
|
|
35
|
-
for (let e = 0; e < r; e++) for (let t = 0; t < 4; t++)
|
|
35
|
+
let s = t.asset.accessor(a, "VEC4"), c = t.asset.accessor(o, "VEC4");
|
|
36
|
+
for (let e = 0; e < r; e++) for (let t = 0; t < 4; t++) p[(g + e) * u + n * 4 + t] = s[e * 4 + t], m[(g + e) * u + n * 4 + t] = c[e * 4 + t];
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
+
g += r;
|
|
38
39
|
});
|
|
39
|
-
for (let e = 0; e <
|
|
40
|
+
for (let e = 0; e < f; e++) {
|
|
40
41
|
let t = 0;
|
|
41
|
-
for (let n = 0; n <
|
|
42
|
-
if (t > 0) for (let n = 0; n <
|
|
42
|
+
for (let n = 0; n < u; n++) t += m[e * u + n];
|
|
43
|
+
if (t > 0) for (let n = 0; n < u; n++) m[e * u + n] /= t;
|
|
43
44
|
}
|
|
44
45
|
return {
|
|
45
|
-
positions:
|
|
46
|
-
joints:
|
|
47
|
-
weights:
|
|
48
|
-
influences:
|
|
49
|
-
nodes:
|
|
50
|
-
inverseBindMatrices:
|
|
46
|
+
positions: h,
|
|
47
|
+
joints: p,
|
|
48
|
+
weights: m,
|
|
49
|
+
influences: u,
|
|
50
|
+
nodes: s.map((e) => t.nodes[e]),
|
|
51
|
+
inverseBindMatrices: c === void 0 ? Float32Array.from(s.flatMap(() => i)) : t.asset.accessor(c, "MAT4")
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function s(e, t) {
|
|
54
55
|
let { parents: n } = e.engine.store;
|
|
55
56
|
for (let r = e.id; r !== -1; r = n[r]) {
|
|
56
57
|
let e = t.get(r);
|
|
@@ -58,38 +59,38 @@ function o(e, t) {
|
|
|
58
59
|
}
|
|
59
60
|
return -1;
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
62
|
+
function c(e) {
|
|
63
|
+
return e[1] < -.999999 ? [
|
|
63
64
|
1,
|
|
64
65
|
0,
|
|
65
66
|
0,
|
|
66
67
|
0
|
|
67
|
-
] :
|
|
68
|
-
|
|
68
|
+
] : t([
|
|
69
|
+
e[2],
|
|
69
70
|
0,
|
|
70
|
-
-
|
|
71
|
-
1 +
|
|
71
|
+
-e[0],
|
|
72
|
+
1 + e[1]
|
|
72
73
|
]);
|
|
73
74
|
}
|
|
74
|
-
var
|
|
75
|
+
var l = (e, t) => [
|
|
75
76
|
e[3] * t[0] + e[0] * t[3] + e[1] * t[2] - e[2] * t[1],
|
|
76
77
|
e[3] * t[1] - e[0] * t[2] + e[1] * t[3] + e[2] * t[0],
|
|
77
78
|
e[3] * t[2] + e[0] * t[1] - e[1] * t[0] + e[2] * t[3],
|
|
78
79
|
e[3] * t[3] - e[0] * t[0] - e[1] * t[1] - e[2] * t[2]
|
|
79
80
|
];
|
|
80
|
-
function
|
|
81
|
-
let r =
|
|
82
|
-
for (let
|
|
83
|
-
let s =
|
|
81
|
+
function u(e, t) {
|
|
82
|
+
let r = c(t), i, o = Infinity;
|
|
83
|
+
for (let t = 0; t < a; t++) {
|
|
84
|
+
let s = t / a * Math.PI / 4, c = l(r, [
|
|
84
85
|
0,
|
|
85
86
|
Math.sin(s),
|
|
86
87
|
0,
|
|
87
88
|
Math.cos(s)
|
|
88
89
|
]), u = [
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
|
|
90
|
+
-c[0],
|
|
91
|
+
-c[1],
|
|
92
|
+
-c[2],
|
|
93
|
+
c[3]
|
|
93
94
|
], d = [
|
|
94
95
|
Infinity,
|
|
95
96
|
Infinity,
|
|
@@ -99,75 +100,77 @@ function l(e, n) {
|
|
|
99
100
|
-Infinity,
|
|
100
101
|
-Infinity
|
|
101
102
|
];
|
|
102
|
-
for (let
|
|
103
|
-
let r =
|
|
104
|
-
e[
|
|
105
|
-
e[
|
|
106
|
-
e[
|
|
103
|
+
for (let t = 0; t < e.length; t += 3) {
|
|
104
|
+
let r = n([
|
|
105
|
+
e[t],
|
|
106
|
+
e[t + 1],
|
|
107
|
+
e[t + 2]
|
|
107
108
|
], u);
|
|
108
109
|
for (let e = 0; e < 3; e++) d[e] = Math.min(d[e], r[e]), f[e] = Math.max(f[e], r[e]);
|
|
109
110
|
}
|
|
110
111
|
let p = (f[0] - d[0]) * (f[1] - d[1]) * (f[2] - d[2]);
|
|
111
|
-
p >= o || (o = p,
|
|
112
|
+
p >= o || (o = p, i = {
|
|
112
113
|
type: "box",
|
|
113
|
-
center:
|
|
114
|
+
center: n([
|
|
114
115
|
0,
|
|
115
116
|
1,
|
|
116
117
|
2
|
|
117
|
-
].map((e) => (d[e] + f[e]) / 2),
|
|
118
|
+
].map((e) => (d[e] + f[e]) / 2), c),
|
|
118
119
|
halfExtents: [
|
|
119
120
|
(f[0] - d[0]) / 2,
|
|
120
121
|
(f[1] - d[1]) / 2,
|
|
121
122
|
(f[2] - d[2]) / 2
|
|
122
123
|
],
|
|
123
|
-
rotation:
|
|
124
|
+
rotation: c
|
|
124
125
|
});
|
|
125
126
|
}
|
|
126
|
-
return
|
|
127
|
+
return i;
|
|
127
128
|
}
|
|
128
|
-
function
|
|
129
|
-
if (!
|
|
130
|
-
let { shape:
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
if (!
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
function d(t, n, a = {}) {
|
|
130
|
+
if (!t?.bones || !n) throw e("fitRagdollShapes needs a Ragdoll and a model: fitRagdollShapes(ragdoll, model).");
|
|
131
|
+
let { shape: c = "hull", minWeight: l, maxPoints: d } = a;
|
|
132
|
+
if (c !== "hull" && c !== "box") throw e("fitRagdollShapes shape must be 'hull' or 'box'.");
|
|
133
|
+
if (l !== void 0 && !(l > 0 && l <= 1)) throw e("fitRagdollShapes minWeight must be above 0 and at most 1; pass a share, e.g. 0.5.");
|
|
134
|
+
if (d !== void 0 && !(Number.isInteger(d) && d >= 8 && d <= 1024)) throw e("fitRagdollShapes maxPoints must be an integer from 8 to 1024, e.g. 64.");
|
|
135
|
+
let f = "primitives" in n ? o(n, t.bones[0].node) : n, { nodes: p, inverseBindMatrices: m } = f, h = new Map(t.bones.map((e, t) => [e.node.id, t])), g = new Map(p.flatMap((e) => h.has(e.id) ? [[e.id, h.get(e.id)]] : [])), _ = new Float32Array(t.bones.length * 16);
|
|
136
|
+
if (!g.size) throw e("The skin holds none of the ragdoll bones; pass the model the skeleton belongs to.");
|
|
137
|
+
for (let e = 0; e < t.bones.length; e++) _.set(i, e * 16);
|
|
138
|
+
p.forEach((e, t) => {
|
|
139
|
+
let n = g.get(e.id);
|
|
140
|
+
if (n !== void 0) for (let e = 0; e < 16; e++) _[n * 16 + e] = m[t * 16 + e];
|
|
138
141
|
});
|
|
139
|
-
let
|
|
140
|
-
for (let
|
|
141
|
-
let
|
|
142
|
-
if (
|
|
143
|
-
|
|
142
|
+
let v = p.map((e) => s(e, g)), y = new Uint16Array(f.joints.length), b = Float32Array.from(f.weights);
|
|
143
|
+
for (let t = 0; t < y.length; t++) {
|
|
144
|
+
let n = v[f.joints[t]];
|
|
145
|
+
if (n === void 0) throw e(`Skin joint ${f.joints[t]} has no node; pass one node per joint.`);
|
|
146
|
+
n < 0 ? b[t] = 0 : y[t] = n;
|
|
144
147
|
}
|
|
145
|
-
return
|
|
146
|
-
positions:
|
|
148
|
+
return r({
|
|
149
|
+
positions: f.positions,
|
|
147
150
|
skin: {
|
|
148
|
-
joints:
|
|
149
|
-
weights:
|
|
150
|
-
influences:
|
|
151
|
+
joints: y,
|
|
152
|
+
weights: b,
|
|
153
|
+
influences: f.influences ?? 4
|
|
151
154
|
}
|
|
152
155
|
}, {
|
|
153
|
-
minWeight:
|
|
154
|
-
maxPoints:
|
|
155
|
-
inverseBindMatrices:
|
|
156
|
-
}).map((
|
|
157
|
-
let n =
|
|
156
|
+
minWeight: l,
|
|
157
|
+
maxPoints: d,
|
|
158
|
+
inverseBindMatrices: _
|
|
159
|
+
}).map((e) => {
|
|
160
|
+
let n = t.bones[e.joint], r = n.node.matrix, i = [
|
|
158
161
|
Math.hypot(r[0], r[1], r[2]),
|
|
159
162
|
Math.hypot(r[4], r[5], r[6]),
|
|
160
163
|
Math.hypot(r[8], r[9], r[10])
|
|
161
|
-
], a =
|
|
164
|
+
], a = e.points.map((e, t) => e * i[t % 3]), o = c === "box" ? u(a, n.axis) : {
|
|
162
165
|
type: "hull",
|
|
163
166
|
points: a
|
|
164
167
|
};
|
|
165
|
-
return
|
|
168
|
+
return t.setShape(n, o), {
|
|
166
169
|
part: n,
|
|
167
170
|
shape: o,
|
|
168
|
-
vertexCount:
|
|
171
|
+
vertexCount: e.vertexCount
|
|
169
172
|
};
|
|
170
173
|
});
|
|
171
174
|
}
|
|
172
175
|
//#endregion
|
|
173
|
-
export {
|
|
176
|
+
export { d as fitRagdollShapes };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Ragdoll } from './ragdoll.js';
|
|
2
|
-
export type { RagdollBone, RagdollJoint, RagdollLimb, RagdollOptions, RagdollPart, RagdollSettings, RagdollShape, } from './ragdoll.js';
|
|
2
|
+
export type { RagdollBone, RagdollDebugOptions, RagdollJoint, RagdollLimb, RagdollOptions, RagdollPart, RagdollSettings, RagdollShape, } from './ragdoll.js';
|