You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got tripped up when I tried adding a VRMLookAtQuaternionProxy to my VRM scene without manually setting its .name. I didn't see a warning message indicating what went wrong.
// if found but name is not set, set the name automatically
console.warn(
'createVRMAnimationClip: VRMLookAtQuaternionProxy is found but its name is not set. Setting the name automatically. To suppress this warning, set the name manually',
);
proxy.name='VRMLookAtQuaternionProxy';
}
The above logic attempts to set a default name if one is not manually set and warn the user to set it themselves.
However the logic here checks for a null name, when an unset name actually contains an empty string ''. This is reflected in the type of proxy.name which is string. This means the fallback logic and helpful warning message don't execute.
I suggest changing this to check for empty string instead of null.
The text was updated successfully, but these errors were encountered:
I got tripped up when I tried adding a
VRMLookAtQuaternionProxy
to my VRM scene without manually setting its.name
. I didn't see a warning message indicating what went wrong.three-vrm/packages/three-vrm-animation/src/createVRMAnimationClip.ts
Lines 133 to 140 in 6e5a70a
The above logic attempts to set a default name if one is not manually set and warn the user to set it themselves.
However the logic here checks for a
null
name, when an unset name actually contains an empty string''
. This is reflected in the type ofproxy.name
which isstring
. This means the fallback logic and helpful warning message don't execute.I suggest changing this to check for empty string instead of null.
The text was updated successfully, but these errors were encountered: