[ts] Allow setSkin to accept null to unset skins.

This commit is contained in:
Davide Tantillo 2026-01-27 10:18:20 +01:00
parent c681ab4ef4
commit 609c07c365

View File

@ -510,7 +510,7 @@ export class Skeleton {
* {@link #setSlotsToSetupPose()}. Also, often {@link AnimationState#apply()} is called before the next time the
* skeleton is rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin.
* @param newSkin May be null. */
setSkin (newSkin: Skin) {
setSkin (newSkin: Skin | null) {
if (newSkin == this.skin) return;
if (newSkin) {
if (this.skin)