reze-engine 0.3.5 → 0.3.7
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/README.md +0 -1
- package/dist/engine.d.ts +10 -26
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +261 -670
- package/dist/engine_r.d.ts +132 -0
- package/dist/engine_r.d.ts.map +1 -0
- package/dist/engine_r.js +1489 -0
- package/dist/engine_ts.d.ts +143 -0
- package/dist/engine_ts.d.ts.map +1 -0
- package/dist/engine_ts.js +1575 -0
- package/dist/ik-solver.d.ts +6 -0
- package/dist/ik-solver.d.ts.map +1 -1
- package/dist/ik-solver.js +98 -101
- package/dist/math.d.ts +0 -5
- package/dist/math.d.ts.map +1 -1
- package/dist/math.js +0 -55
- package/dist/model.d.ts +59 -13
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +415 -141
- package/dist/player.d.ts +6 -20
- package/dist/player.d.ts.map +1 -1
- package/dist/player.js +88 -191
- package/package.json +1 -1
- package/src/engine.ts +299 -729
- package/src/ik-solver.ts +106 -124
- package/src/math.ts +0 -74
- package/src/model.ts +516 -186
- package/src/player.ts +115 -210
package/dist/ik-solver.d.ts
CHANGED
|
@@ -17,7 +17,13 @@ export declare class IKSolverSystem {
|
|
|
17
17
|
private static solveIK;
|
|
18
18
|
private static solveChain;
|
|
19
19
|
private static limitAngle;
|
|
20
|
+
private static getDistance;
|
|
20
21
|
private static getWorldTranslation;
|
|
22
|
+
private static getQuatFromArray;
|
|
23
|
+
private static setQuatToArray;
|
|
24
|
+
private static extractEulerAngles;
|
|
25
|
+
private static limitEulerAngles;
|
|
26
|
+
private static reconstructQuatFromEuler;
|
|
21
27
|
private static getParentWorldRotationMatrix;
|
|
22
28
|
private static transformNormal;
|
|
23
29
|
private static updateWorldMatrix;
|
package/dist/ik-solver.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ik-solver.d.ts","sourceRoot":"","sources":["../src/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MAAM,CAAC,gBAAgB;IAI/B,OAAO,CAAC,MAAM,CAAC,cAAc;IAO7B,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAmCjC,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAQ/B,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAqBvC,OAAO,CAAC,MAAM,CAAC,4BAA4B;IAe3C,OAAO,CAAC,MAAM,CAAC,eAAe;IAS9B,OAAO,CAAC,MAAM,CAAC,iBAAiB;CA2CjC"}
|
package/dist/ik-solver.js
CHANGED
|
@@ -91,10 +91,7 @@ export class IKSolverSystem {
|
|
|
91
91
|
chainInfo.ikRotation = new Quat(0, 0, 0, 1);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
const ikPosition = this.getWorldTranslation(ikBoneIndex, worldMatrices);
|
|
96
|
-
const targetPosition = this.getWorldTranslation(targetBoneIndex, worldMatrices);
|
|
97
|
-
if (ikPosition.subtract(targetPosition).length() < this.EPSILON)
|
|
94
|
+
if (this.getDistance(ikBoneIndex, targetBoneIndex, worldMatrices) < this.EPSILON)
|
|
98
95
|
return;
|
|
99
96
|
// Build IK chains
|
|
100
97
|
const chains = [];
|
|
@@ -106,10 +103,7 @@ export class IKSolverSystem {
|
|
|
106
103
|
this.updateWorldMatrix(chains[i].boneIndex, bones, localRotations, localTranslations, worldMatrices, undefined);
|
|
107
104
|
}
|
|
108
105
|
this.updateWorldMatrix(targetBoneIndex, bones, localRotations, localTranslations, worldMatrices, undefined);
|
|
109
|
-
|
|
110
|
-
const updatedIkPosition = this.getWorldTranslation(ikBoneIndex, worldMatrices);
|
|
111
|
-
const updatedTargetPosition = this.getWorldTranslation(targetBoneIndex, worldMatrices);
|
|
112
|
-
if (updatedIkPosition.subtract(updatedTargetPosition).length() < this.EPSILON)
|
|
106
|
+
if (this.getDistance(ikBoneIndex, targetBoneIndex, worldMatrices) < this.EPSILON)
|
|
113
107
|
return;
|
|
114
108
|
// Solve iteratively
|
|
115
109
|
const iteration = Math.min(solver.iterationCount, 256);
|
|
@@ -121,24 +115,17 @@ export class IKSolverSystem {
|
|
|
121
115
|
this.solveChain(chain, chainIndex, solver, ikBoneIndex, targetBoneIndex, bones, localRotations, localTranslations, worldMatrices, ikChainInfo, i < halfIteration);
|
|
122
116
|
}
|
|
123
117
|
}
|
|
124
|
-
|
|
125
|
-
const currentIkPosition = this.getWorldTranslation(ikBoneIndex, worldMatrices);
|
|
126
|
-
const currentTargetPosition = this.getWorldTranslation(targetBoneIndex, worldMatrices);
|
|
127
|
-
const distance = currentIkPosition.subtract(currentTargetPosition).length();
|
|
128
|
-
if (distance < this.EPSILON)
|
|
118
|
+
if (this.getDistance(ikBoneIndex, targetBoneIndex, worldMatrices) < this.EPSILON)
|
|
129
119
|
break;
|
|
130
120
|
}
|
|
131
121
|
// Apply IK rotations to local rotations
|
|
132
122
|
for (const link of solver.links) {
|
|
133
123
|
const chainInfo = ikChainInfo[link.boneIndex];
|
|
134
|
-
if (chainInfo
|
|
124
|
+
if (chainInfo?.ikRotation) {
|
|
135
125
|
const qi = link.boneIndex * 4;
|
|
136
|
-
const localRot =
|
|
126
|
+
const localRot = this.getQuatFromArray(localRotations, qi);
|
|
137
127
|
const finalRot = chainInfo.ikRotation.multiply(localRot).normalize();
|
|
138
|
-
localRotations
|
|
139
|
-
localRotations[qi + 1] = finalRot.y;
|
|
140
|
-
localRotations[qi + 2] = finalRot.z;
|
|
141
|
-
localRotations[qi + 3] = finalRot.w;
|
|
128
|
+
this.setQuatToArray(localRotations, qi, finalRot);
|
|
142
129
|
}
|
|
143
130
|
}
|
|
144
131
|
}
|
|
@@ -162,25 +149,20 @@ export class IKSolverSystem {
|
|
|
162
149
|
finalRotationAxis = this.transformNormal(chainRotationAxis, invParentRot).normalize();
|
|
163
150
|
break;
|
|
164
151
|
}
|
|
165
|
-
case InternalSolveAxis.X:
|
|
166
|
-
|
|
167
|
-
const axisX = new Vec3(m[0], m[1], m[2]);
|
|
168
|
-
const dot = chainRotationAxis.dot(axisX);
|
|
169
|
-
finalRotationAxis = new Vec3(dot >= 0 ? 1 : -1, 0, 0);
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
case InternalSolveAxis.Y: {
|
|
173
|
-
const m = parentWorldRotMatrix.values;
|
|
174
|
-
const axisY = new Vec3(m[4], m[5], m[6]);
|
|
175
|
-
const dot = chainRotationAxis.dot(axisY);
|
|
176
|
-
finalRotationAxis = new Vec3(0, dot >= 0 ? 1 : -1, 0);
|
|
177
|
-
break;
|
|
178
|
-
}
|
|
152
|
+
case InternalSolveAxis.X:
|
|
153
|
+
case InternalSolveAxis.Y:
|
|
179
154
|
case InternalSolveAxis.Z: {
|
|
180
155
|
const m = parentWorldRotMatrix.values;
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
|
|
156
|
+
const axisOffset = (chain.solveAxis - InternalSolveAxis.X) * 4;
|
|
157
|
+
const axis = new Vec3(m[axisOffset], m[axisOffset + 1], m[axisOffset + 2]);
|
|
158
|
+
const dot = chainRotationAxis.dot(axis);
|
|
159
|
+
const sign = dot >= 0 ? 1 : -1;
|
|
160
|
+
finalRotationAxis =
|
|
161
|
+
chain.solveAxis === InternalSolveAxis.X
|
|
162
|
+
? new Vec3(sign, 0, 0)
|
|
163
|
+
: chain.solveAxis === InternalSolveAxis.Y
|
|
164
|
+
? new Vec3(0, sign, 0)
|
|
165
|
+
: new Vec3(0, 0, sign);
|
|
184
166
|
break;
|
|
185
167
|
}
|
|
186
168
|
default:
|
|
@@ -199,72 +181,15 @@ export class IKSolverSystem {
|
|
|
199
181
|
if (chainInfo) {
|
|
200
182
|
chainInfo.ikRotation = ikRotation.multiply(chainInfo.ikRotation);
|
|
201
183
|
// Apply angle constraints if present
|
|
202
|
-
if (chain.minimumAngle
|
|
184
|
+
if (chain.minimumAngle && chain.maximumAngle) {
|
|
203
185
|
const qi = chainBoneIndex * 4;
|
|
204
|
-
const localRot =
|
|
186
|
+
const localRot = this.getQuatFromArray(localRotations, qi);
|
|
205
187
|
chainInfo.localRotation = localRot.clone();
|
|
206
188
|
const combinedRot = chainInfo.ikRotation.multiply(localRot);
|
|
207
|
-
const
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
case InternalEulerRotationOrder.YXZ: {
|
|
212
|
-
rX = Math.asin(-m[9]); // m32
|
|
213
|
-
if (Math.abs(rX) > this.THRESHOLD) {
|
|
214
|
-
rX = rX < 0 ? -this.THRESHOLD : this.THRESHOLD;
|
|
215
|
-
}
|
|
216
|
-
let cosX = Math.cos(rX);
|
|
217
|
-
if (cosX !== 0)
|
|
218
|
-
cosX = 1 / cosX;
|
|
219
|
-
rY = Math.atan2(m[8] * cosX, m[10] * cosX); // m31, m33
|
|
220
|
-
rZ = Math.atan2(m[1] * cosX, m[5] * cosX); // m12, m22
|
|
221
|
-
rX = this.limitAngle(rX, chain.minimumAngle.x, chain.maximumAngle.x, useAxis);
|
|
222
|
-
rY = this.limitAngle(rY, chain.minimumAngle.y, chain.maximumAngle.y, useAxis);
|
|
223
|
-
rZ = this.limitAngle(rZ, chain.minimumAngle.z, chain.maximumAngle.z, useAxis);
|
|
224
|
-
chainInfo.ikRotation = Quat.fromAxisAngle(new Vec3(0, 1, 0), rY);
|
|
225
|
-
chainInfo.ikRotation = chainInfo.ikRotation.multiply(Quat.fromAxisAngle(new Vec3(1, 0, 0), rX));
|
|
226
|
-
chainInfo.ikRotation = chainInfo.ikRotation.multiply(Quat.fromAxisAngle(new Vec3(0, 0, 1), rZ));
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
case InternalEulerRotationOrder.ZYX: {
|
|
230
|
-
rY = Math.asin(-m[2]); // m13
|
|
231
|
-
if (Math.abs(rY) > this.THRESHOLD) {
|
|
232
|
-
rY = rY < 0 ? -this.THRESHOLD : this.THRESHOLD;
|
|
233
|
-
}
|
|
234
|
-
let cosY = Math.cos(rY);
|
|
235
|
-
if (cosY !== 0)
|
|
236
|
-
cosY = 1 / cosY;
|
|
237
|
-
rX = Math.atan2(m[6] * cosY, m[10] * cosY); // m23, m33
|
|
238
|
-
rZ = Math.atan2(m[1] * cosY, m[0] * cosY); // m12, m11
|
|
239
|
-
rX = this.limitAngle(rX, chain.minimumAngle.x, chain.maximumAngle.x, useAxis);
|
|
240
|
-
rY = this.limitAngle(rY, chain.minimumAngle.y, chain.maximumAngle.y, useAxis);
|
|
241
|
-
rZ = this.limitAngle(rZ, chain.minimumAngle.z, chain.maximumAngle.z, useAxis);
|
|
242
|
-
chainInfo.ikRotation = Quat.fromAxisAngle(new Vec3(0, 0, 1), rZ);
|
|
243
|
-
chainInfo.ikRotation = chainInfo.ikRotation.multiply(Quat.fromAxisAngle(new Vec3(0, 1, 0), rY));
|
|
244
|
-
chainInfo.ikRotation = chainInfo.ikRotation.multiply(Quat.fromAxisAngle(new Vec3(1, 0, 0), rX));
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
case InternalEulerRotationOrder.XZY: {
|
|
248
|
-
rZ = Math.asin(-m[4]); // m21
|
|
249
|
-
if (Math.abs(rZ) > this.THRESHOLD) {
|
|
250
|
-
rZ = rZ < 0 ? -this.THRESHOLD : this.THRESHOLD;
|
|
251
|
-
}
|
|
252
|
-
let cosZ = Math.cos(rZ);
|
|
253
|
-
if (cosZ !== 0)
|
|
254
|
-
cosZ = 1 / cosZ;
|
|
255
|
-
rX = Math.atan2(m[6] * cosZ, m[5] * cosZ); // m23, m22
|
|
256
|
-
rY = Math.atan2(m[8] * cosZ, m[0] * cosZ); // m31, m11
|
|
257
|
-
rX = this.limitAngle(rX, chain.minimumAngle.x, chain.maximumAngle.x, useAxis);
|
|
258
|
-
rY = this.limitAngle(rY, chain.minimumAngle.y, chain.maximumAngle.y, useAxis);
|
|
259
|
-
rZ = this.limitAngle(rZ, chain.minimumAngle.z, chain.maximumAngle.z, useAxis);
|
|
260
|
-
chainInfo.ikRotation = Quat.fromAxisAngle(new Vec3(1, 0, 0), rX);
|
|
261
|
-
chainInfo.ikRotation = chainInfo.ikRotation.multiply(Quat.fromAxisAngle(new Vec3(0, 0, 1), rZ));
|
|
262
|
-
chainInfo.ikRotation = chainInfo.ikRotation.multiply(Quat.fromAxisAngle(new Vec3(0, 1, 0), rY));
|
|
263
|
-
break;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
const invertedLocalRotation = localRot.conjugate().normalize();
|
|
267
|
-
chainInfo.ikRotation = chainInfo.ikRotation.multiply(invertedLocalRotation);
|
|
189
|
+
const euler = this.extractEulerAngles(combinedRot, chain.rotationOrder);
|
|
190
|
+
const limited = this.limitEulerAngles(euler, chain.minimumAngle, chain.maximumAngle, useAxis);
|
|
191
|
+
chainInfo.ikRotation = this.reconstructQuatFromEuler(limited, chain.rotationOrder);
|
|
192
|
+
chainInfo.ikRotation = chainInfo.ikRotation.multiply(localRot.conjugate().normalize());
|
|
268
193
|
}
|
|
269
194
|
}
|
|
270
195
|
// Update world matrices for affected bones (using IK-modified rotations)
|
|
@@ -287,10 +212,83 @@ export class IKSolverSystem {
|
|
|
287
212
|
return angle;
|
|
288
213
|
}
|
|
289
214
|
}
|
|
215
|
+
static getDistance(boneIndex1, boneIndex2, worldMatrices) {
|
|
216
|
+
const pos1 = this.getWorldTranslation(boneIndex1, worldMatrices);
|
|
217
|
+
const pos2 = this.getWorldTranslation(boneIndex2, worldMatrices);
|
|
218
|
+
return pos1.subtract(pos2).length();
|
|
219
|
+
}
|
|
290
220
|
static getWorldTranslation(boneIndex, worldMatrices) {
|
|
291
221
|
const offset = boneIndex * 16;
|
|
292
222
|
return new Vec3(worldMatrices[offset + 12], worldMatrices[offset + 13], worldMatrices[offset + 14]);
|
|
293
223
|
}
|
|
224
|
+
static getQuatFromArray(array, offset) {
|
|
225
|
+
return new Quat(array[offset], array[offset + 1], array[offset + 2], array[offset + 3]);
|
|
226
|
+
}
|
|
227
|
+
static setQuatToArray(array, offset, quat) {
|
|
228
|
+
array[offset] = quat.x;
|
|
229
|
+
array[offset + 1] = quat.y;
|
|
230
|
+
array[offset + 2] = quat.z;
|
|
231
|
+
array[offset + 3] = quat.w;
|
|
232
|
+
}
|
|
233
|
+
static extractEulerAngles(quat, order) {
|
|
234
|
+
const rotMatrix = Mat4.fromQuat(quat.x, quat.y, quat.z, quat.w);
|
|
235
|
+
const m = rotMatrix.values;
|
|
236
|
+
switch (order) {
|
|
237
|
+
case InternalEulerRotationOrder.YXZ: {
|
|
238
|
+
let rX = Math.asin(-m[9]);
|
|
239
|
+
if (Math.abs(rX) > this.THRESHOLD)
|
|
240
|
+
rX = rX < 0 ? -this.THRESHOLD : this.THRESHOLD;
|
|
241
|
+
let cosX = Math.cos(rX);
|
|
242
|
+
if (cosX !== 0)
|
|
243
|
+
cosX = 1 / cosX;
|
|
244
|
+
const rY = Math.atan2(m[8] * cosX, m[10] * cosX);
|
|
245
|
+
const rZ = Math.atan2(m[1] * cosX, m[5] * cosX);
|
|
246
|
+
return new Vec3(rX, rY, rZ);
|
|
247
|
+
}
|
|
248
|
+
case InternalEulerRotationOrder.ZYX: {
|
|
249
|
+
let rY = Math.asin(-m[2]);
|
|
250
|
+
if (Math.abs(rY) > this.THRESHOLD)
|
|
251
|
+
rY = rY < 0 ? -this.THRESHOLD : this.THRESHOLD;
|
|
252
|
+
let cosY = Math.cos(rY);
|
|
253
|
+
if (cosY !== 0)
|
|
254
|
+
cosY = 1 / cosY;
|
|
255
|
+
const rX = Math.atan2(m[6] * cosY, m[10] * cosY);
|
|
256
|
+
const rZ = Math.atan2(m[1] * cosY, m[0] * cosY);
|
|
257
|
+
return new Vec3(rX, rY, rZ);
|
|
258
|
+
}
|
|
259
|
+
case InternalEulerRotationOrder.XZY: {
|
|
260
|
+
let rZ = Math.asin(-m[4]);
|
|
261
|
+
if (Math.abs(rZ) > this.THRESHOLD)
|
|
262
|
+
rZ = rZ < 0 ? -this.THRESHOLD : this.THRESHOLD;
|
|
263
|
+
let cosZ = Math.cos(rZ);
|
|
264
|
+
if (cosZ !== 0)
|
|
265
|
+
cosZ = 1 / cosZ;
|
|
266
|
+
const rX = Math.atan2(m[6] * cosZ, m[5] * cosZ);
|
|
267
|
+
const rY = Math.atan2(m[8] * cosZ, m[0] * cosZ);
|
|
268
|
+
return new Vec3(rX, rY, rZ);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
static limitEulerAngles(euler, min, max, useAxis) {
|
|
273
|
+
return new Vec3(this.limitAngle(euler.x, min.x, max.x, useAxis), this.limitAngle(euler.y, min.y, max.y, useAxis), this.limitAngle(euler.z, min.z, max.z, useAxis));
|
|
274
|
+
}
|
|
275
|
+
static reconstructQuatFromEuler(euler, order) {
|
|
276
|
+
const axes = [
|
|
277
|
+
[new Vec3(1, 0, 0), new Vec3(0, 1, 0), new Vec3(0, 0, 1)],
|
|
278
|
+
[new Vec3(0, 0, 1), new Vec3(0, 1, 0), new Vec3(1, 0, 0)],
|
|
279
|
+
[new Vec3(0, 1, 0), new Vec3(1, 0, 0), new Vec3(0, 0, 1)],
|
|
280
|
+
];
|
|
281
|
+
const [axis1, axis2, axis3] = axes[order];
|
|
282
|
+
const [angle1, angle2, angle3] = order === InternalEulerRotationOrder.YXZ
|
|
283
|
+
? [euler.y, euler.x, euler.z]
|
|
284
|
+
: order === InternalEulerRotationOrder.ZYX
|
|
285
|
+
? [euler.z, euler.y, euler.x]
|
|
286
|
+
: [euler.x, euler.z, euler.y];
|
|
287
|
+
let result = Quat.fromAxisAngle(axis1, angle1);
|
|
288
|
+
result = result.multiply(Quat.fromAxisAngle(axis2, angle2));
|
|
289
|
+
result = result.multiply(Quat.fromAxisAngle(axis3, angle3));
|
|
290
|
+
return result;
|
|
291
|
+
}
|
|
294
292
|
static getParentWorldRotationMatrix(boneIndex, bones, worldMatrices) {
|
|
295
293
|
const bone = bones[boneIndex];
|
|
296
294
|
if (bone.parentIndex >= 0) {
|
|
@@ -314,8 +312,7 @@ export class IKSolverSystem {
|
|
|
314
312
|
const bone = bones[boneIndex];
|
|
315
313
|
const qi = boneIndex * 4;
|
|
316
314
|
const ti = boneIndex * 3;
|
|
317
|
-
|
|
318
|
-
const localRot = new Quat(localRotations[qi], localRotations[qi + 1], localRotations[qi + 2], localRotations[qi + 3]);
|
|
315
|
+
const localRot = this.getQuatFromArray(localRotations, qi);
|
|
319
316
|
// Apply IK rotation if available
|
|
320
317
|
let finalRot = localRot;
|
|
321
318
|
if (ikChainInfo) {
|
package/dist/math.d.ts
CHANGED
|
@@ -7,12 +7,10 @@ export declare class Vec3 {
|
|
|
7
7
|
add(other: Vec3): Vec3;
|
|
8
8
|
subtract(other: Vec3): Vec3;
|
|
9
9
|
length(): number;
|
|
10
|
-
lengthSquared(): number;
|
|
11
10
|
normalize(): Vec3;
|
|
12
11
|
cross(other: Vec3): Vec3;
|
|
13
12
|
dot(other: Vec3): number;
|
|
14
13
|
scale(scalar: number): Vec3;
|
|
15
|
-
clone(): Vec3;
|
|
16
14
|
}
|
|
17
15
|
export declare class Quat {
|
|
18
16
|
x: number;
|
|
@@ -26,13 +24,10 @@ export declare class Quat {
|
|
|
26
24
|
conjugate(): Quat;
|
|
27
25
|
length(): number;
|
|
28
26
|
normalize(): Quat;
|
|
29
|
-
rotateVec(v: Vec3): Vec3;
|
|
30
|
-
static fromTo(from: Vec3, to: Vec3): Quat;
|
|
31
27
|
static fromAxisAngle(axis: Vec3, angle: number): Quat;
|
|
32
28
|
toArray(): [number, number, number, number];
|
|
33
29
|
static slerp(a: Quat, b: Quat, t: number): Quat;
|
|
34
30
|
static fromEuler(rotX: number, rotY: number, rotZ: number): Quat;
|
|
35
|
-
toEuler(): Vec3;
|
|
36
31
|
}
|
|
37
32
|
export declare class Mat4 {
|
|
38
33
|
values: Float32Array;
|
package/dist/math.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../src/math.ts"],"names":[],"mappings":"AACA,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,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AC,EAAE,MAAM,GAAG,IAAI;IAmCjE,MAAM,CAAC,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAG,IAAI;IASjE,WAAW,IAAI,IAAI;IAKnB,MAAM,IAAI,IAAI;IAKd,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IA6C7D,WAAW,IAAI,IAAI;IAqBnB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAY1D,OAAO,IAAI,IAAI;CA8DhB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAgCnG"}
|
package/dist/math.js
CHANGED
|
@@ -17,9 +17,6 @@ export class Vec3 {
|
|
|
17
17
|
length() {
|
|
18
18
|
return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);
|
|
19
19
|
}
|
|
20
|
-
lengthSquared() {
|
|
21
|
-
return this.x * this.x + this.y * this.y + this.z * this.z;
|
|
22
|
-
}
|
|
23
20
|
normalize() {
|
|
24
21
|
const len = this.length();
|
|
25
22
|
if (len === 0)
|
|
@@ -35,9 +32,6 @@ export class Vec3 {
|
|
|
35
32
|
scale(scalar) {
|
|
36
33
|
return new Vec3(this.x * scalar, this.y * scalar, this.z * scalar);
|
|
37
34
|
}
|
|
38
|
-
clone() {
|
|
39
|
-
return new Vec3(this.x, this.y, this.z);
|
|
40
|
-
}
|
|
41
35
|
}
|
|
42
36
|
export class Quat {
|
|
43
37
|
constructor(x, y, z, w) {
|
|
@@ -69,35 +63,6 @@ export class Quat {
|
|
|
69
63
|
return new Quat(0, 0, 0, 1);
|
|
70
64
|
return new Quat(this.x / len, this.y / len, this.z / len, this.w / len);
|
|
71
65
|
}
|
|
72
|
-
// Rotate a vector by this quaternion: result = q * v * q^-1
|
|
73
|
-
rotateVec(v) {
|
|
74
|
-
// Treat v as pure quaternion (x, y, z, 0)
|
|
75
|
-
const qx = this.x, qy = this.y, qz = this.z, qw = this.w;
|
|
76
|
-
const vx = v.x, vy = v.y, vz = v.z;
|
|
77
|
-
// t = 2 * cross(q.xyz, v)
|
|
78
|
-
const tx = 2 * (qy * vz - qz * vy);
|
|
79
|
-
const ty = 2 * (qz * vx - qx * vz);
|
|
80
|
-
const tz = 2 * (qx * vy - qy * vx);
|
|
81
|
-
// result = v + q.w * t + cross(q.xyz, t)
|
|
82
|
-
return new Vec3(vx + qw * tx + (qy * tz - qz * ty), vy + qw * ty + (qz * tx - qx * tz), vz + qw * tz + (qx * ty - qy * tx));
|
|
83
|
-
}
|
|
84
|
-
// Static method: create quaternion that rotates from one direction to another
|
|
85
|
-
static fromTo(from, to) {
|
|
86
|
-
const dot = from.dot(to);
|
|
87
|
-
if (dot > 0.999999)
|
|
88
|
-
return new Quat(0, 0, 0, 1); // Already aligned
|
|
89
|
-
if (dot < -0.999999) {
|
|
90
|
-
// 180 degrees
|
|
91
|
-
let axis = from.cross(new Vec3(1, 0, 0));
|
|
92
|
-
if (axis.length() < 0.001)
|
|
93
|
-
axis = from.cross(new Vec3(0, 1, 0));
|
|
94
|
-
return new Quat(axis.x, axis.y, axis.z, 0).normalize();
|
|
95
|
-
}
|
|
96
|
-
const axis = from.cross(to);
|
|
97
|
-
const w = Math.sqrt((1 + dot) * 2);
|
|
98
|
-
const invW = 1 / w;
|
|
99
|
-
return new Quat(axis.x * invW, axis.y * invW, axis.z * invW, w * 0.5).normalize();
|
|
100
|
-
}
|
|
101
66
|
// Static method: create quaternion from rotation axis and angle
|
|
102
67
|
static fromAxisAngle(axis, angle) {
|
|
103
68
|
const normalizedAxis = axis.normalize();
|
|
@@ -152,26 +117,6 @@ export class Quat {
|
|
|
152
117
|
const z = cy * cx * sz - sy * sx * cz;
|
|
153
118
|
return new Quat(x, y, z, w).normalize();
|
|
154
119
|
}
|
|
155
|
-
// Convert quaternion to Euler angles (ZXY order, inverse of fromEuler)
|
|
156
|
-
toEuler() {
|
|
157
|
-
const qx = this.x;
|
|
158
|
-
const qy = this.y;
|
|
159
|
-
const qz = this.z;
|
|
160
|
-
const qw = this.w;
|
|
161
|
-
// ZXY order (left-handed)
|
|
162
|
-
// Roll (X): rotation around X axis
|
|
163
|
-
const sinr_cosp = 2 * (qw * qx + qy * qz);
|
|
164
|
-
const cosr_cosp = 1 - 2 * (qx * qx + qy * qy);
|
|
165
|
-
const rotX = Math.atan2(sinr_cosp, cosr_cosp);
|
|
166
|
-
// Pitch (Y): rotation around Y axis
|
|
167
|
-
const sinp = 2 * (qw * qy - qz * qx);
|
|
168
|
-
const rotY = Math.abs(sinp) >= 1 ? (sinp >= 0 ? Math.PI / 2 : -Math.PI / 2) : Math.asin(sinp);
|
|
169
|
-
// Yaw (Z): rotation around Z axis
|
|
170
|
-
const siny_cosp = 2 * (qw * qz + qx * qy);
|
|
171
|
-
const cosy_cosp = 1 - 2 * (qy * qy + qz * qz);
|
|
172
|
-
const rotZ = Math.atan2(siny_cosp, cosy_cosp);
|
|
173
|
-
return new Vec3(rotX, rotY, rotZ);
|
|
174
|
-
}
|
|
175
120
|
}
|
|
176
121
|
export class Mat4 {
|
|
177
122
|
constructor(values) {
|
package/dist/model.d.ts
CHANGED
|
@@ -107,25 +107,29 @@ export declare class Model {
|
|
|
107
107
|
private joints;
|
|
108
108
|
private runtimeSkeleton;
|
|
109
109
|
private runtimeMorph;
|
|
110
|
+
private morphsDirty;
|
|
110
111
|
private cachedIdentityMat1;
|
|
111
112
|
private cachedIdentityMat2;
|
|
112
|
-
private
|
|
113
|
-
private
|
|
114
|
-
private
|
|
113
|
+
private cachedSkinMatrices?;
|
|
114
|
+
private tweenState;
|
|
115
|
+
private tweenTimeMs;
|
|
116
|
+
private animationData;
|
|
117
|
+
private boneTracks;
|
|
118
|
+
private morphTracks;
|
|
119
|
+
private animationDuration;
|
|
120
|
+
private isPlaying;
|
|
121
|
+
private isPaused;
|
|
122
|
+
private animationTime;
|
|
123
|
+
private physics;
|
|
115
124
|
constructor(vertexData: Float32Array<ArrayBuffer>, indexData: Uint32Array<ArrayBuffer>, textures: Texture[], materials: Material[], skeleton: Skeleton, skinning: Skinning, morphing: Morphing, rigidbodies?: Rigidbody[], joints?: Joint[]);
|
|
116
125
|
private initializeRuntimeSkeleton;
|
|
117
126
|
private initializeIKRuntime;
|
|
118
|
-
private
|
|
119
|
-
private initializeTransTweenBuffers;
|
|
120
|
-
private initializeMorphTweenBuffers;
|
|
127
|
+
private initializeTweenBuffers;
|
|
121
128
|
private initializeRuntimeMorph;
|
|
122
|
-
private
|
|
123
|
-
private updateTranslationTweens;
|
|
124
|
-
private updateMorphWeightTweens;
|
|
129
|
+
private updateTweens;
|
|
125
130
|
getVertices(): Float32Array<ArrayBuffer>;
|
|
126
131
|
getTextures(): Texture[];
|
|
127
132
|
getMaterials(): Material[];
|
|
128
|
-
getVertexCount(): number;
|
|
129
133
|
getIndices(): Uint32Array<ArrayBuffer>;
|
|
130
134
|
getSkeleton(): Skeleton;
|
|
131
135
|
getSkinning(): Skinning;
|
|
@@ -133,15 +137,57 @@ export declare class Model {
|
|
|
133
137
|
getJoints(): Joint[];
|
|
134
138
|
getMorphing(): Morphing;
|
|
135
139
|
getMorphWeights(): Float32Array;
|
|
136
|
-
getBoneNames(): string[];
|
|
137
140
|
rotateBones(names: string[], quats: Quat[], durationMs?: number): void;
|
|
138
141
|
moveBones(names: string[], relativeTranslations: Vec3[], durationMs?: number): void;
|
|
139
142
|
getBoneWorldMatrices(): Float32Array;
|
|
140
143
|
getBoneInverseBindMatrices(): Float32Array;
|
|
141
|
-
|
|
144
|
+
getSkinMatrices(): Float32Array;
|
|
142
145
|
setMorphWeight(name: string, weight: number, durationMs?: number): void;
|
|
143
146
|
private applyMorphs;
|
|
144
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Load VMD animation file
|
|
149
|
+
*/
|
|
150
|
+
loadVmd(vmdUrl: string): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* Process frames into tracks
|
|
153
|
+
*/
|
|
154
|
+
private processFrames;
|
|
155
|
+
/**
|
|
156
|
+
* Start or resume playback
|
|
157
|
+
*/
|
|
158
|
+
playAnimation(): void;
|
|
159
|
+
/**
|
|
160
|
+
* Pause playback
|
|
161
|
+
*/
|
|
162
|
+
pauseAnimation(): void;
|
|
163
|
+
/**
|
|
164
|
+
* Stop playback and reset to beginning
|
|
165
|
+
*/
|
|
166
|
+
stopAnimation(): void;
|
|
167
|
+
/**
|
|
168
|
+
* Seek to specific time
|
|
169
|
+
* Immediately applies pose at the seeked time
|
|
170
|
+
*/
|
|
171
|
+
seekAnimation(time: number): void;
|
|
172
|
+
/**
|
|
173
|
+
* Get current animation progress
|
|
174
|
+
*/
|
|
175
|
+
getAnimationProgress(): {
|
|
176
|
+
current: number;
|
|
177
|
+
duration: number;
|
|
178
|
+
percentage: number;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Get pose at specific time (internal helper)
|
|
182
|
+
*/
|
|
183
|
+
private getPoseAtTime;
|
|
184
|
+
/**
|
|
185
|
+
* Updates the model pose by recomputing all matrices.
|
|
186
|
+
* If animation is playing, applies animation pose first.
|
|
187
|
+
* deltaTime: Time elapsed since last update in seconds
|
|
188
|
+
* Returns true if vertices were modified (morphs changed)
|
|
189
|
+
*/
|
|
190
|
+
update(deltaTime: number): boolean;
|
|
145
191
|
private solveIKChains;
|
|
146
192
|
private computeWorldMatrices;
|
|
147
193
|
}
|
package/dist/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"model.d.ts","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