mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Updated ts-def to r452.
This commit is contained in:
parent
da12c23c73
commit
45d94a3201
@ -19,7 +19,7 @@ interface StartTweenOpts {
|
||||
* @see {@link https://www.construct.net/make-games/manuals/construct-3/scripting/scripting-reference/behavior-interfaces/tween | ITweenBehaviorInstance documentation } */
|
||||
declare class ITweenBehaviorInstance<InstType> extends IBehaviorInstance<InstType>
|
||||
{
|
||||
startTween(prop: TweenPropertyType, endValue: TweenEndValueType, time: number, ease: TweenBuiltInEaseType, opts?: StartTweenOpts): ITweenState;
|
||||
startTween(prop: TweenPropertyType, endValue: TweenEndValueType, time: number, ease: TweenBuiltInEaseType | TweenCustomEaseType, opts?: StartTweenOpts): ITweenState;
|
||||
|
||||
allTweens(): Generator<ITweenState>;
|
||||
tweensByTags(tags: string | string[]): Generator<ITweenState>;
|
||||
|
||||
@ -22,7 +22,7 @@ interface PluginInfoFileDependency {
|
||||
fileType?: string,
|
||||
scriptType?: PluginInfoScriptType,
|
||||
type: "copy-to-output" | "external-dom-script" | "external-runtime-script" | "external-css" | "wrapper-extension",
|
||||
platform?: "all" | "windows-x86" | "windows-x64" | "windows-arm64" | "xbox-uwp-x64" | "macos-universal" | "linux-x64" | "linux-arm" | "linux-arm64"
|
||||
platform?: "all" | "windows-x64" | "windows-arm64" | "xbox-uwp-x64" | "macos-universal" | "linux-x64" | "linux-arm64"
|
||||
}
|
||||
|
||||
declare namespace SDK {
|
||||
|
||||
@ -15,9 +15,15 @@ declare namespace SDK {
|
||||
GetInstanceByUID(uid: number): SDK.IObjectInstance | null;
|
||||
|
||||
AddOrReplaceProjectFile(blob: Blob, filename: string, kind?: EditorProjectFileKind): void;
|
||||
GetProjectFileByName(name: string): SDK.IProjectFile | null;
|
||||
|
||||
GetProjectFileBySID(sid: number): SDK.IProjectFile | null;
|
||||
GetProjectFileByExportPath(path: string): SDK.IProjectFile | null;
|
||||
|
||||
/**
|
||||
* @deprecated Use GetProjectFileByExportPath() instead of GetProjectFileByName() as it supports files with the same name in different folders.
|
||||
*/
|
||||
GetProjectFileByName(name: string): SDK.IProjectFile | null;
|
||||
|
||||
ShowImportAudioDialog(fileList: Blob[]): void;
|
||||
EnsureFontLoaded(fontName: string): Promise<void>;
|
||||
|
||||
|
||||
22
spine-ts/spine-construct3/ts-defs/plugins/9-patch/I9PatchInstance.d.ts
vendored
Normal file
22
spine-ts/spine-construct3/ts-defs/plugins/9-patch/I9PatchInstance.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
type NinePatchEdgeType = "tile" | "stretch";
|
||||
type NinePatchFillType = "tile" | "stretch" | "transparent";
|
||||
type NinePatchSeamsType = "exact" | "overlap";
|
||||
|
||||
/** Represents the 9-patch object.
|
||||
* @see {@link https://www.construct.net/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/9-patch | I9PatchInstance documentation } */
|
||||
declare class I9PatchInstance extends IWorldInstance
|
||||
{
|
||||
leftMargin: number;
|
||||
rightMargin: number;
|
||||
topMargin: number;
|
||||
bottomMargin: number;
|
||||
|
||||
edges: NinePatchEdgeType;
|
||||
fill: NinePatchFillType;
|
||||
imageScaleX: number;
|
||||
imageScaleY: number;
|
||||
seams: NinePatchSeamsType;
|
||||
|
||||
replaceImage(blob: Blob): Promise<void>;
|
||||
}
|
||||
@ -2,9 +2,10 @@
|
||||
/** Represents the Construct Game Services object.
|
||||
* @see {@link https://www.construct.net/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/construct-game-services | ICGSObjectType documentation } */
|
||||
|
||||
type CGSSignInProvider = "Apple" | "BattleNet" | "BattleNetChina" | "Discord" | "Facebook" | "Github" | "Google" | "ItchIO" | "Microsoft" | "Reddit" | "Steam" | "X" | "Yandex";
|
||||
type CGSSignInProvider = "Apple" | "BattleNet" | "Discord" | "Facebook" | "Github" | "Google" | "ItchIO" | "Microsoft" | "Reddit" | "Steam" | "Twitch" | "X" | "Yandex";
|
||||
|
||||
interface CGSSignInOptions {
|
||||
allowPersisting?: boolean;
|
||||
expiryMins?: number;
|
||||
popupWindowWidth?: number;
|
||||
popupWindowHeight?: number;
|
||||
@ -36,8 +37,28 @@ interface CGSLeaderboardScoreResults {
|
||||
scores: CGSLeaderboardScoreResult[];
|
||||
}
|
||||
|
||||
interface CGSCreateCloudSaveOptions {
|
||||
key: string;
|
||||
bucketId?: string;
|
||||
name?: string;
|
||||
data: string | Blob
|
||||
}
|
||||
|
||||
interface CGSGetCloudSaveOptions {
|
||||
key: string;
|
||||
bucketId: string;
|
||||
type?: "text" | "blob";
|
||||
}
|
||||
|
||||
interface CGSObjectTypeEventMap<InstanceType = IInstance> extends ObjectClassEventMap<InstanceType> {
|
||||
"signinpopupblocked": ConstructEvent
|
||||
}
|
||||
|
||||
declare class ICGSObjectType<InstType extends IInstance = IInstance> extends IObjectType<InstType, MultiplayerObjectEventMap<InstType>>
|
||||
{
|
||||
addEventListener<K extends keyof CGSObjectTypeEventMap<InstType>>(type: K, listener: (ev: CGSObjectTypeEventMap<InstType>[K]) => any): void;
|
||||
removeEventListener<K extends keyof CGSObjectTypeEventMap<InstType>>(type: K, listener: (ev: CGSObjectTypeEventMap<InstType>[K]) => any): void;
|
||||
|
||||
readonly isSignedIn: boolean;
|
||||
readonly canSignInPersistent: boolean;
|
||||
readonly playerId: string;
|
||||
@ -46,9 +67,14 @@ declare class ICGSObjectType<InstType extends IInstance = IInstance> extends IOb
|
||||
readonly sessionKey: string;
|
||||
|
||||
signInWithProvider(provider: CGSSignInProvider, gameId: string, opts?: CGSSignInOptions): Promise<void>;
|
||||
retryOpenSignInPopup(): void;
|
||||
signInPersistent(gameId: string): Promise<void>;
|
||||
signOut(): Promise<void>;
|
||||
setPlayerName(name: string): Promise<void>;
|
||||
|
||||
submitScore(score: number, leaderboardId?: string): Promise<void>;
|
||||
getLeaderboardScores(leaderboardId: string, opts?: CGSGetLeaderboardScoresOptions): Promise<CGSLeaderboardScoreResults>;
|
||||
|
||||
createCloudSave(opts: CGSCreateCloudSaveOptions): Promise<void>;
|
||||
getCloudSave(opts: CGSGetCloudSaveOptions): Promise<string>;
|
||||
}
|
||||
|
||||
@ -9,5 +9,5 @@ declare class IFamily<InstanceType extends IInstance, EventMapType = ObjectClass
|
||||
objectTypes(): Generator<IObjectType<InstanceType>>;
|
||||
|
||||
/** Check if a given object type belongs to this family. */
|
||||
hasObjectType(objectType: IObjectType<InstanceType>): boolean;
|
||||
hasObjectType(objectType: IObjectType): boolean;
|
||||
}
|
||||
@ -16,5 +16,5 @@ declare class IObjectType<InstanceType extends IInstance, EventMapType = ObjectC
|
||||
families(): Generator<IFamily<InstanceType>>;
|
||||
|
||||
/** Check if this object type belongs to a specified family. */
|
||||
isInFamily(family: IFamily<InstanceType>): boolean;
|
||||
isInFamily(family: IFamily): boolean;
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
type PlatformInfoExportType = "preview" | "html5" | "scirra-arcade" | "cordova-android" | "cordova-ios" | "nwjs" | "windows-webview2" | "macos-wkwebview" | "xbox-uwp-webview2" | "instant-games" | "playable-ad" | "linux-cef";
|
||||
type PlatformInfoExportType = "preview" | "html5" | "scirra-arcade" | "cordova-android" | "cordova-ios" | "windows-webview2" | "macos-wkwebview" | "xbox-uwp-webview2" | "instant-games" | "playable-ad" | "linux-cef";
|
||||
type PlatformInfoOSType = "windows" | "macos" | "linux" | "chrome-os" | "android" | "ios" | "unknown";
|
||||
type PlatformInfoBrowserType = "chrome" | "chromium" | "edge" | "opera" | "nwjs" | "firefox" | "safari" | "unknown";
|
||||
type PlatformInfoBrowserType = "chrome" | "chromium" | "edge" | "opera" | "firefox" | "safari" | "unknown";
|
||||
type PlatformInfoBrowserEngineType = "chromium" | "gecko" | "webkit";
|
||||
|
||||
/** Provides details about the current platform, such as browser, operating system and environment. */
|
||||
|
||||
@ -35,7 +35,7 @@ declare class IRenderer
|
||||
resetColor(): void;
|
||||
|
||||
setCurrentZ(z: number): void;
|
||||
getCurrentZ(): void;
|
||||
getCurrentZ(): number;
|
||||
|
||||
setCullFaceMode(m: RendererCullFaceMode): void;
|
||||
getCullFaceMode(): RendererCullFaceMode;
|
||||
|
||||
@ -31,6 +31,10 @@ interface TextFragmentPositionAndSize {
|
||||
height: number
|
||||
}
|
||||
|
||||
type Vec2Arr = [number, number];
|
||||
type Vec3Arr = [number, number, number];
|
||||
type Vec4Arr = [number, number, number, number];
|
||||
|
||||
type SDKPropertyType = number | string | boolean;
|
||||
type WrapperExtensionParameterType = number | string | boolean;
|
||||
|
||||
@ -79,6 +83,8 @@ interface RuntimeEventMap {
|
||||
"suspend": ConstructEvent;
|
||||
"resume": ConstructEvent;
|
||||
"resize": ConstructResizeEvent;
|
||||
"windowmaximize": ConstructEvent,
|
||||
"windowminimize": ConstructEvent,
|
||||
"pretick": ConstructEvent;
|
||||
"tick": ConstructEvent;
|
||||
"tick2": ConstructEvent;
|
||||
@ -144,7 +150,7 @@ declare class IRuntime extends ConstructEventTarget<RuntimeEventMap>
|
||||
getViewportSize(): Vec2Arr;
|
||||
|
||||
readonly sampling: SamplingModeType;
|
||||
readonly isPixelRoundingEnabled: boolean;
|
||||
isPixelRoundingEnabled: boolean;
|
||||
|
||||
get dt(): number;
|
||||
get dtRaw(): number;
|
||||
@ -182,7 +188,7 @@ declare class IRuntime extends ConstructEventTarget<RuntimeEventMap>
|
||||
|
||||
signal(tag: string): void;
|
||||
waitForSignal(tag: string): Promise<void>;
|
||||
|
||||
|
||||
/** When called from an event sheet, sets the current function return value,
|
||||
* much like the 'Set return value' action. */
|
||||
setReturnValue(value: number | string): void;
|
||||
|
||||
@ -8,4 +8,6 @@ declare class ITweenState extends ITimelineStateBase
|
||||
readonly instance: IWorldInstance;
|
||||
isDestroyOnComplete: boolean;
|
||||
readonly value: number;
|
||||
readonly finished: Promise<void>;
|
||||
readonly released: Promise<void>;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user