From 817487af9f9031adc83973795f204444110eef4b Mon Sep 17 00:00:00 2001 From: KPal <48248865+kpal81xd@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:58:26 +0100 Subject: [PATCH] getAnimationAsset returns Asset (#6864) * fixed getAnimationAsset return to be asset * reverts change as breaking and updates type to match * Update src/framework/components/anim/component-layer.js Co-authored-by: Will Eastcott * Update src/framework/components/anim/component-layer.js Co-authored-by: Will Eastcott --------- Co-authored-by: Will Eastcott --- src/framework/components/anim/component-layer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/framework/components/anim/component-layer.js b/src/framework/components/anim/component-layer.js index bb232e3c274..d606fc08f7b 100644 --- a/src/framework/components/anim/component-layer.js +++ b/src/framework/components/anim/component-layer.js @@ -402,10 +402,10 @@ class AnimComponentLayer { } /** - * Returns the asset that is associated with the given state. + * Returns an object holding the animation asset id that is associated with the given state. * * @param {string} stateName - The name of the state to get the asset for. - * @returns {import('../../asset/asset.js').Asset} The asset associated with the given state. + * @returns {{ asset: number }} An object containing the animation asset id associated with the given state. */ getAnimationAsset(stateName) { return this._component.animationAssets[`${this.name}:${stateName}`];