From 21c9c5d1a46397d2113793edc3a3ada54a5a4adf Mon Sep 17 00:00:00 2001 From: 0b5vr <0b5vr@0b5vr.com> Date: Tue, 12 Nov 2024 16:25:13 +0900 Subject: [PATCH] fix: VRM0 FirstPerson, Change default value of MeshAnnotation to `auto` instead of `both` The default value is 'Auto' even in VRM0 See: https://github.com/vrm-c/UniVRM/blob/07d98e2f1abc528d387f860d2224d0855b0d0b59/Assets/VRM/Runtime/FirstPerson/VRMFirstPerson.cs#L117-L119 The VRM1 side change: https://github.com/pixiv/three-vrm/pull/1515 --- .../src/firstPerson/VRMFirstPersonLoaderPlugin.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/three-vrm-core/src/firstPerson/VRMFirstPersonLoaderPlugin.ts b/packages/three-vrm-core/src/firstPerson/VRMFirstPersonLoaderPlugin.ts index e8394a6d5..c279b5450 100644 --- a/packages/three-vrm-core/src/firstPerson/VRMFirstPersonLoaderPlugin.ts +++ b/packages/three-vrm-core/src/firstPerson/VRMFirstPersonLoaderPlugin.ts @@ -142,10 +142,12 @@ export class VRMFirstPersonLoaderPlugin implements GLTFLoaderPlugin { return 'firstPersonOnly'; } else if (flag === 'ThirdPersonOnly') { return 'thirdPersonOnly'; - } else if (flag === 'Auto') { - return 'auto'; - } else { + } else if (flag === 'Both') { return 'both'; + } else { + // The default value is 'Auto' even in VRM0 + // See: https://github.com/vrm-c/UniVRM/blob/07d98e2f1abc528d387f860d2224d0855b0d0b59/Assets/VRM/Runtime/FirstPerson/VRMFirstPerson.cs#L117-L119 + return 'auto'; } } }