From 5afd3fc57807f033e2b85d618e785e9fd985733f Mon Sep 17 00:00:00 2001 From: 0b5vr <0b5vr@0b5vr.com> Date: Mon, 21 Oct 2024 17:31:04 +0900 Subject: [PATCH] fix: expressions, update isBinary behavior according to the spec I will update test cases in the next commit See: https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/expressions.md#expression-specification The suggestion: https://github.com/pixiv/three-vrm/pull/1489 Co-authored-by: ke456-png <108649297+ke456-png@users.noreply.github.com> --- packages/three-vrm-core/src/expressions/VRMExpression.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/three-vrm-core/src/expressions/VRMExpression.ts b/packages/three-vrm-core/src/expressions/VRMExpression.ts index 66302813b..4dfbd5706 100644 --- a/packages/three-vrm-core/src/expressions/VRMExpression.ts +++ b/packages/three-vrm-core/src/expressions/VRMExpression.ts @@ -92,7 +92,7 @@ export class VRMExpression extends THREE.Object3D { */ public get outputWeight(): number { if (this.isBinary) { - return this.weight >= 0.5 ? 1.0 : 0.0; + return this.weight > 0.5 ? 1.0 : 0.0; } return this.weight;