roamwright 0.61.8 → 0.61.9
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/motion/biped-stride.js
CHANGED
|
@@ -199,8 +199,14 @@ export function createBipedStride({ rig, foot, pace, ground }) {
|
|
|
199
199
|
sinL = Math.sin(lean),
|
|
200
200
|
cosL = Math.cos(lean),
|
|
201
201
|
hipAt = rig.hipHeight * sinL + hipZ, // the hips forward of the point between the feet; a stride is taken under them
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
// a walker's foot is planted as far ahead of the hips as it will leave the ground behind them; a runner's lands nearer
|
|
203
|
+
// under them, the knee still bent, and pushes off further behind (`runLanding`: the share of the foot's time on the ground
|
|
204
|
+
// spent ahead of the hips at a full run), so the leg never reaches out straight before the foot comes down
|
|
205
|
+
plantAhead = lerp(0.5, pace.runLanding ?? 0.5, run),
|
|
206
|
+
landing = hipAt * go + (v < 0 ? -sweep : sweep) * plantAhead,
|
|
207
|
+
// the swinging foot is drawn back to meet the ground moving as the ground does; over a run's long flight that pull, at
|
|
208
|
+
// full strength, first throws the foot far out ahead of where it lands (`runRetract`: the share of it kept at a full run)
|
|
209
|
+
drift = (((v < 0 ? sweep : -sweep) * (1 - duty)) / duty) * lerp(1, pace.runRetract ?? 1, run),
|
|
204
210
|
gone = (actor.fwd * deltaSeconds) / h,
|
|
205
211
|
leftFirst = Math.abs(stanceL - feet[0]) >= Math.abs(stanceR - feet[1]); // of two feet out of place, the one further out steps first
|
|
206
212
|
footAt(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "roamwright",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.9",
|
|
4
4
|
"description": "A procedural worldbuilding engine built on top of Three.js. Generate landscapes with rivers and changing weather, animate crowds, and explore on foot or in flight.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"threejs",
|