From a9e143793bc314a2fe68d73ea9bb91d4f14b3b83 Mon Sep 17 00:00:00 2001 From: undefined303 <54739035+undefined303@users.noreply.github.com> Date: Mon, 23 Feb 2026 21:27:47 +0800 Subject: [PATCH 1/2] small improvement of crouch animation with elytra equipped --- src/animation.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/animation.ts b/src/animation.ts index b8a3017d..6e89f573 100644 --- a/src/animation.ts +++ b/src/animation.ts @@ -316,17 +316,20 @@ export class CrouchAnimation extends PlayerAnimation { player.elytra.position.z = player.cape.position.z; player.elytra.rotation.x = player.cape.rotation.x - (10.8 * Math.PI) / 180; const pr1 = this.progress / this.speed; - if (Math.abs(Math.sin((pr * Math.PI) / 2)) === 1) { + if (Math.abs(Math.sin((pr * Math.PI) / 2)) === 1 || (this.showProgress && Math.floor(Math.abs(pr)) % 2 === 0)) { this.erp = !this.isCrouched ? pr1 : this.erp; this.isCrouched = true; player.elytra.leftWing.rotation.z = 0.26179944 + 0.4582006 * Math.abs(Math.sin((Math.min(pr1 - this.erp, 1) * Math.PI) / 2)); + player.elytra.leftWing.rotation.y = 0.3 * Math.abs(Math.sin((Math.min(pr1 - this.erp, 1) * Math.PI) / 2)); player.elytra.updateRightWing(); } else if (this.isCrouched !== undefined) { this.erp = this.isCrouched ? pr1 : this.erp; player.elytra.leftWing.rotation.z = 0.72 - 0.4582006 * Math.abs(Math.sin((Math.min(pr1 - this.erp, 1) * Math.PI) / 2)); + player.elytra.leftWing.rotation.y = 0.3 - 0.3 * Math.abs(Math.sin((Math.min(pr1 - this.erp, 1) * Math.PI) / 2)); player.elytra.updateRightWing(); + this.isCrouched = false; } player.skin.head.position.y = -3.618325234674 * Math.abs(Math.sin((pr * Math.PI) / 2)); From b5a37aa619dce3592ae15564753d062250762a61 Mon Sep 17 00:00:00 2001 From: undefined303 <54739035+undefined303@users.noreply.github.com> Date: Mon, 23 Feb 2026 21:29:03 +0800 Subject: [PATCH 2/2] Update animation.ts --- src/animation.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/animation.ts b/src/animation.ts index 6e89f573..aa1e59b6 100644 --- a/src/animation.ts +++ b/src/animation.ts @@ -329,7 +329,6 @@ export class CrouchAnimation extends PlayerAnimation { 0.72 - 0.4582006 * Math.abs(Math.sin((Math.min(pr1 - this.erp, 1) * Math.PI) / 2)); player.elytra.leftWing.rotation.y = 0.3 - 0.3 * Math.abs(Math.sin((Math.min(pr1 - this.erp, 1) * Math.PI) / 2)); player.elytra.updateRightWing(); - this.isCrouched = false; } player.skin.head.position.y = -3.618325234674 * Math.abs(Math.sin((pr * Math.PI) / 2));