Fix empty prop animation.

This commit is contained in:
Davide Tantillo 2026-03-05 10:57:50 +01:00
parent 3f099d6b87
commit 921fc1dad9
2 changed files with 3 additions and 2 deletions

View File

@ -119,7 +119,7 @@ export class SkinsAndAnimationBoundsProvider implements SpineBoundsProvider {
}
skeleton.setupPose();
const animation = this.animation != null ? data.findAnimation(this.animation) : null;
const animation = this.animation ? data.findAnimation(this.animation) : null;
if (animation == null) {
skeleton.updateWorldTransform(Physics.update);

View File

@ -113,7 +113,8 @@ class SpineC3Instance extends globalThis.ISDKWorldInstanceBase {
this.propLoaderScale = properties[2] as number;
const skinProp = properties[3] as string;
this.propSkin = skinProp === "" ? [] : skinProp.split(",");
this.propAnimation = properties[4] as string;
const animationProp = properties[4] as string;
this.propAnimation = animationProp === "" ? undefined : animationProp;
this.propDebugSkeleton = properties[5] as boolean;
this.propEnableCollision = properties[6] as boolean;
const boundsProviderIndex = properties[7] as number;