MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / poseCrouching

Method poseCrouching

web/observatory/js/pose-system.js:531–566  ·  view source on GitHub ↗
(px, pz, elapsed, bp)

Source from the content-addressed store, hash-verified

529 // Stealth-crawl option, weight transfer between legs
530
531 poseCrouching(px, pz, elapsed, bp) {
532 const sway = Math.sin(elapsed * 1.5) * 0.005;
533
534 // Weight transfer between legs (slow rocking)
535 const weightTransfer = Math.sin(elapsed * 0.8) * 0.025;
536 const leftDown = Math.max(0, weightTransfer) * 0.03;
537 const rightDown = Math.max(0, -weightTransfer) * 0.03;
538
539 // Stealth-crawl micro-movement (slow forward creep every ~4s)
540 const crawlCycle = elapsed % 4.0;
541 const crawlActive = crawlCycle > 3.0;
542 const crawlAmt = crawlActive ? Math.sin((crawlCycle - 3.0) * Math.PI) * 0.02 : 0;
543
544 // Arms adjust for balance during weight transfer
545 const armBalance = weightTransfer * 0.3;
546
547 return [
548 [px + sway, 1.05 + bp, pz + 0.15 + crawlAmt], // 0 nose
549 [px - 0.03, 1.07 + bp, pz + 0.13 + crawlAmt], // 1 left eye
550 [px + 0.03, 1.07 + bp, pz + 0.13 + crawlAmt], // 2 right eye
551 [px - 0.07, 1.05 + bp, pz + 0.12 + crawlAmt], // 3 left ear
552 [px + 0.07, 1.05 + bp, pz + 0.12 + crawlAmt], // 4 right ear
553 [px - 0.22, 0.88 + bp, pz + 0.05], // 5 left shoulder
554 [px + 0.22, 0.88 + bp, pz + 0.05], // 6 right shoulder
555 [px - 0.28 - armBalance, 0.65 + bp, pz + 0.15 + crawlAmt * 0.5], // 7 left elbow
556 [px + 0.28 + armBalance, 0.65 + bp, pz + 0.15 + crawlAmt * 0.5], // 8 right elbow
557 [px - 0.22 - armBalance * 0.5, 0.48, pz + 0.2 + crawlAmt], // 9 left wrist
558 [px + 0.22 + armBalance * 0.5, 0.48, pz + 0.2 + crawlAmt], // 10 right wrist
559 [px - 0.12 + weightTransfer, 0.42, pz - 0.05], // 11 left hip
560 [px + 0.12 + weightTransfer, 0.42, pz - 0.05], // 12 right hip
561 [px - 0.15 + weightTransfer * 0.5, 0.35 - leftDown, pz + 0.25], // 13 left knee
562 [px + 0.15 + weightTransfer * 0.5, 0.35 - rightDown, pz + 0.25], // 14 right knee
563 [px - 0.13, 0.04, pz + 0.1], // 15 left ankle
564 [px + 0.13, 0.04, pz + 0.1], // 16 right ankle
565 ];
566 }
567}

Callers 1

generateKeypointsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected