mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-19 00:06:42 +08:00
Small type fixes.
This commit is contained in:
parent
281d36e634
commit
abbd63013b
@ -47,7 +47,6 @@ class SpineC3Instance extends globalThis.ISDKWorldInstanceBase {
|
|||||||
this.propOffsetAngle = properties[9] as number;
|
this.propOffsetAngle = properties[9] as number;
|
||||||
this.propScaleX = properties[10] as number;
|
this.propScaleX = properties[10] as number;
|
||||||
this.propScaleY = properties[11] as number;
|
this.propScaleY = properties[11] as number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.assetLoader = new spine.AssetLoader();
|
this.assetLoader = new spine.AssetLoader();
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// / <reference types="editor/sdk" />
|
// / <reference types="editor/sdk" />
|
||||||
|
|
||||||
import type { AnimationState, AssetLoader, Skeleton, SkeletonRendererCore, SpineBoundsProvider, TextureAtlas } from "@esotericsoftware/spine-construct3-lib";
|
import type { AnimationState, AssetLoader, Skeleton, SkeletonRendererCore, SpineBoundsProvider, TextureAtlas } from "@esotericsoftware/spine-construct3-lib";
|
||||||
|
import type { SpineC3PluginType } from "./type";
|
||||||
|
|
||||||
const SDK = globalThis.SDK;
|
const SDK = globalThis.SDK;
|
||||||
|
|
||||||
@ -22,6 +23,8 @@ class SpineC3PluginInstance extends SDK.IWorldInstanceBase {
|
|||||||
skins: string[] = [];
|
skins: string[] = [];
|
||||||
animation?: string;
|
animation?: string;
|
||||||
|
|
||||||
|
_inst!: SDK.IWorldInstance & { errors: Record<string, string> };
|
||||||
|
|
||||||
private assetLoader: AssetLoader;
|
private assetLoader: AssetLoader;
|
||||||
private skeletonRenderer: SkeletonRendererCore;
|
private skeletonRenderer: SkeletonRendererCore;
|
||||||
|
|
||||||
@ -53,7 +56,7 @@ class SpineC3PluginInstance extends SDK.IWorldInstanceBase {
|
|||||||
this.assetLoader = new spine.AssetLoader();
|
this.assetLoader = new spine.AssetLoader();
|
||||||
this.skeletonRenderer = new spine.SkeletonRendererCore();
|
this.skeletonRenderer = new spine.SkeletonRendererCore();
|
||||||
|
|
||||||
(this._inst as any).errors = this.errors;
|
this._inst.errors = this.errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
Release () {
|
Release () {
|
||||||
@ -169,8 +172,7 @@ class SpineC3PluginInstance extends SDK.IWorldInstanceBase {
|
|||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const sdkType = (this._sdkType as any);
|
const sdkType = this._sdkType as SpineC3PluginType;
|
||||||
|
|
||||||
|
|
||||||
const logo = sdkType.getSpineLogo(iRenderer);
|
const logo = sdkType.getSpineLogo(iRenderer);
|
||||||
if (logo) {
|
if (logo) {
|
||||||
|
|||||||
@ -107,3 +107,4 @@ const PLUGIN_CLASS = class SpineC3Plugin extends SDK.IPluginBase {
|
|||||||
SDK.Plugins.EsotericSoftware_SpineConstruct3 = PLUGIN_CLASS;
|
SDK.Plugins.EsotericSoftware_SpineConstruct3 = PLUGIN_CLASS;
|
||||||
|
|
||||||
PLUGIN_CLASS.Register(PLUGIN_ID, PLUGIN_CLASS);
|
PLUGIN_CLASS.Register(PLUGIN_ID, PLUGIN_CLASS);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user