mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-14 11:01:36 +08:00
Updated c3 to r457 that introduces vertex colors also to editor SDK.
This commit is contained in:
parent
4c1263207b
commit
881449a60b
@ -27,6 +27,6 @@ declare class IFollowBehaviorInstance<InstType> extends IBehaviorInstance<InstTy
|
||||
|
||||
saveHistoryToJSON(maxDelay?: number): JSONValue;
|
||||
loadHistoryFromJSON(json: JSONValue): void;
|
||||
|
||||
|
||||
isEnabled: boolean;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ declare namespace SDK {
|
||||
class IBehaviorBase {
|
||||
|
||||
constructor(id: string);
|
||||
|
||||
|
||||
_info: SDK.IBehaviorInfo;
|
||||
|
||||
Release(): void;
|
||||
|
||||
@ -2,7 +2,7 @@ declare namespace SDK {
|
||||
class IInstanceBase {
|
||||
|
||||
constructor(sdkType: SDK.ITypeBase, iInstance: SDK.IObjectInstance);
|
||||
|
||||
|
||||
_sdkType: SDK.ITypeBase;
|
||||
_inst: SDK.IObjectInstance;
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
declare namespace SDK.Gfx {
|
||||
class IWebGLRenderer {
|
||||
SetAlphaBlend(): void;
|
||||
|
||||
|
||||
SetColorFillMode(): void;
|
||||
SetTextureFillMode(): void;
|
||||
SetSmoothLineFillMode(): void;
|
||||
@ -28,7 +28,7 @@ declare namespace SDK.Gfx {
|
||||
Quad3D(tlx: number, tly: number, tlz: number, trx: number, try_: number, trz: number, brx: number, bry: number, brz: number, blx: number, bly: number, blz: number, r: SDK.Rect): void;
|
||||
Quad3D2(tlx: number, tly: number, tlz: number, trx: number, try_: number, trz: number, brx: number, bry: number, brz: number, blx: number, bly: number, blz: number, uv: SDK.Quad): void;
|
||||
|
||||
DrawMesh(posArr: Float32Array, uvArr: Float32Array, indexArr: Uint16Array): void;
|
||||
DrawMesh(posArr: Float32Array, uvArr: Float32Array, indexArr: Uint16Array, colorArr?: Float32Array): void;
|
||||
|
||||
ConvexPoly(pts: number[]): void;
|
||||
Line(x1: number, y1: number, x2: number, y2: number): void;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
declare namespace SDK {
|
||||
class IZipFileEntry {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -15,7 +15,7 @@ declare namespace SDK {
|
||||
GetInstanceByUID(uid: number): SDK.IObjectInstance | null;
|
||||
|
||||
AddOrReplaceProjectFile(blob: Blob, filename: string, kind?: EditorProjectFileKind): void;
|
||||
|
||||
|
||||
GetProjectFileBySID(sid: number): SDK.IProjectFile | null;
|
||||
GetProjectFileByExportPath(path: string): SDK.IProjectFile | null;
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ declare namespace SDK {
|
||||
GetRepeatCount(): number;
|
||||
SetRepeatTo(f: number): void;
|
||||
GetRepeatTo(): number;
|
||||
|
||||
|
||||
Delete(): void;
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,7 @@ declare namespace SDK {
|
||||
|
||||
SetPropertyValue(id: string, value: EditorPropertyValueType): void;
|
||||
GetPropertyValue(id: string): EditorPropertyValueType;
|
||||
|
||||
|
||||
GetTimelinePropertyValue(id: string): EditorPropertyValueType;
|
||||
|
||||
GetExternalSdkInstance(): SDK.IInstanceBase | null;
|
||||
|
||||
@ -10,7 +10,7 @@ declare namespace SDK {
|
||||
|
||||
CreateWorldInstance(layer: SDK.ILayer): SDK.IWorldInstance;
|
||||
GetAllInstances(): SDK.IWorldInstance[];
|
||||
|
||||
|
||||
IsInContainer(): boolean;
|
||||
GetContainer(): SDK.IContainer | null;
|
||||
CreateContainer(initialObjectTypes: SDK.IObjectType[]): SDK.IContainer;
|
||||
|
||||
@ -6,6 +6,5 @@ declare namespace SDK {
|
||||
|
||||
type EditorPropertyValueType = number | string | boolean | SDK.Color;
|
||||
|
||||
type Vec2Arr = [number, number];
|
||||
type Vec3Arr = [number, number, number];
|
||||
type Vec4Arr = [number, number, number, number];
|
||||
// Relevant type is not defined for editor addons
|
||||
type TweenCustomEaseType = never;
|
||||
@ -8,7 +8,7 @@ declare namespace SDK.UI {
|
||||
|
||||
SetDeviceTransform(iRenderer: SDK.Gfx.IWebGLRenderer): void;
|
||||
SetDefaultTransform(iRenderer: SDK.Gfx.IWebGLRenderer): void;
|
||||
|
||||
|
||||
Refresh(): void;
|
||||
|
||||
GetLayout(): SDK.ILayout;
|
||||
|
||||
@ -54,7 +54,7 @@ interface CGSObjectTypeEventMap<InstanceType = IInstance> extends ObjectClassEve
|
||||
"signinpopupblocked": ConstructEvent
|
||||
}
|
||||
|
||||
declare class ICGSObjectType<InstType extends IInstance = IInstance> extends IObjectType<InstType, MultiplayerObjectEventMap<InstType>>
|
||||
declare class ICGSObjectType<InstType extends IInstance = IInstance> extends IObjectType<InstType, CGSObjectTypeEventMap<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;
|
||||
@ -65,7 +65,7 @@ declare class ICGSObjectType<InstType extends IInstance = IInstance> extends IOb
|
||||
readonly playerName: string;
|
||||
readonly gameId: string;
|
||||
readonly sessionKey: string;
|
||||
|
||||
|
||||
signInWithProvider(provider: CGSSignInProvider, gameId: string, opts?: CGSSignInOptions): Promise<void>;
|
||||
retryOpenSignInPopup(): void;
|
||||
signInPersistent(gameId: string): Promise<void>;
|
||||
|
||||
@ -68,7 +68,7 @@ declare class MultiplayerSignallingState extends ConstructEventTarget<Multiplaye
|
||||
joinRoom(game: string, instance: string, room: string, maxClients?: number): Promise<MultiplayerSignallingJoinResult>;
|
||||
autoJoinRoom(game: string, instance: string, room: string, maxClients?: number, isLocking?: boolean): Promise<MultiplayerSignallingAutoJoinResult>;
|
||||
leaveRoom(): Promise<void>;
|
||||
|
||||
|
||||
requestGameInstanceList(game: string): Promise<MultiplayerSignallingGameInstanceEntry[]>;
|
||||
requestRoomList(game: string, instance: string, type: MultiplayerRoomListType): Promise<MultiplayerSignallingRoomEntry[]>;
|
||||
}
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
|
||||
interface ProjectFileListEntry {
|
||||
name: string;
|
||||
size: number;
|
||||
}
|
||||
|
||||
/** Provides access to the project's assets.
|
||||
* @see {@link https://www.construct.net/make-games/manuals/construct-3/scripting/scripting-reference/interfaces/iassetmanager | IAssetManager documentation } */
|
||||
declare class IAssetManager
|
||||
@ -17,7 +22,7 @@ declare class IAssetManager
|
||||
getProjectFileUrl(url: string): Promise<string>;
|
||||
getMediaFileUrl(url: string): Promise<string>;
|
||||
readonly mediaFolder: string;
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated All supported platforms now support WebM Opus, so use the Web Audio API decodeAudioData() method instead.
|
||||
*/
|
||||
@ -26,4 +31,6 @@ declare class IAssetManager
|
||||
loadScripts(...urls: string[]): Promise<void>;
|
||||
compileWebAssembly(url: string): Promise<WebAssembly.Module>;
|
||||
loadStyleSheet(url: string): Promise<void>;
|
||||
|
||||
readonly projectFileList: ProjectFileListEntry[];
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ declare class BehaviorInstanceEvent<InstType, BehInstType> implements ConstructE
|
||||
}
|
||||
|
||||
interface BehaviorInstanceEventMap<InstType, BehInstType> {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** Represents an instance of a behavior associated with a specific object instance.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/** Represents a family in the project.
|
||||
* @see {@link https://www.construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/object-interfaces/ifamily | IFamily documentation } */
|
||||
declare class IFamily<InstanceType extends IInstance, EventMapType = ObjectClassEventMap<InstanceType>> extends IObjectClass<InstanceType, EventMapType>
|
||||
declare class IFamily<InstanceType extends IInstance = IInstance, EventMapType = ObjectClassEventMap<InstanceType>> extends IObjectClass<InstanceType, EventMapType>
|
||||
{
|
||||
/** Get an array with a list of object types that belong to this family. */
|
||||
getAllObjectTypes(): IObjectType<InstanceType>[];
|
||||
|
||||
@ -20,7 +20,7 @@ declare class IInstance
|
||||
addEventListener<K extends keyof InstanceEventMap<this>>(type: K, listener: (ev: InstanceEventMap<this>[K]) => any): void;
|
||||
removeEventListener<K extends keyof InstanceEventMap<this>>(type: K, listener: (ev: InstanceEventMap<this>[K]) => any): void;
|
||||
dispatchEvent(evt: ConstructEvent): void;
|
||||
|
||||
|
||||
readonly runtime: IRuntime;
|
||||
readonly objectType: IObjectType<this>;
|
||||
readonly plugin: IPlugin_;
|
||||
|
||||
@ -16,7 +16,7 @@ declare class ILayer extends ConstructEventTarget<LayerEventMap>
|
||||
readonly name: string;
|
||||
readonly layout: IAnyProjectLayout;
|
||||
readonly index: number;
|
||||
|
||||
|
||||
isVisible: boolean;
|
||||
readonly isSelfAndParentsVisible: boolean;
|
||||
isInteractive: boolean;
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
declare class ILoopingConditionContext
|
||||
{
|
||||
retrigger(): void;
|
||||
|
||||
|
||||
readonly isStopped: boolean;
|
||||
|
||||
|
||||
release(): void;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/** Represents an object type in the project.
|
||||
* @see {@link https://www.construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/object-interfaces/iobjecttype | IObjectType documentation } */
|
||||
declare class IObjectType<InstanceType extends IInstance, EventMapType = ObjectClassEventMap<InstanceType>> extends IObjectClass<InstanceType, EventMapType>
|
||||
declare class IObjectType<InstanceType extends IInstance = IInstance, EventMapType = ObjectClassEventMap<InstanceType>> extends IObjectClass<InstanceType, EventMapType>
|
||||
{
|
||||
/** Set the instance class for this object type. Used for subclassing.
|
||||
* @see {@link https://www.construct.net/en/make-games/manuals/construct-3/scripting/guides/subclassing-instances | Subclassing instances} */
|
||||
|
||||
@ -188,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;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* @see {@link https://www.construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/addon-sdk-interfaces/isdkbehaviorbase | ISDKBehaviorBase documentation } */
|
||||
declare class ISDKBehaviorBase_ extends IBehavior_
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
declare var ISDKBehaviorBase: typeof ISDKBehaviorBase_;
|
||||
|
||||
@ -5,5 +5,5 @@ declare class ISDKBehaviorTypeBase_ extends IBehaviorType
|
||||
{
|
||||
_onCreate(): void;
|
||||
}
|
||||
|
||||
|
||||
declare var ISDKBehaviorTypeBase: typeof ISDKBehaviorTypeBase_;
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
declare class ISDKDOMInstanceBase_ extends ISDKWorldInstanceBase
|
||||
{
|
||||
constructor(opts: { domComponentId: string });
|
||||
|
||||
|
||||
_postToDOMElement(handler: string, data: JSONValue): void;
|
||||
_postToDOMElementAsync(handler: string, data: JSONValue): Promise<JSONValue>;
|
||||
_postToDOMElementMaybeSync(handler: string, data: JSONValue): void;
|
||||
|
||||
@ -8,40 +8,40 @@
|
||||
declare class ISDKInstanceBase_ extends IInstance
|
||||
{
|
||||
constructor(opts?: { domComponentId?: string, wrapperComponentId?: string });
|
||||
|
||||
|
||||
readonly objectType: ISDKObjectTypeBase_<this>;
|
||||
|
||||
|
||||
_release(): void;
|
||||
_getInitProperties(): SDKPropertyType[];
|
||||
_trigger(method: Function): void;
|
||||
_triggerAsync(method: Function): Promise<void>;
|
||||
|
||||
|
||||
_setTicking(isTicking: boolean): void;
|
||||
_setTicking2(isTicking: boolean): void;
|
||||
_isTicking(): boolean;
|
||||
_isTicking2(): boolean;
|
||||
|
||||
|
||||
_tick(): void;
|
||||
_tick2(): void;
|
||||
|
||||
|
||||
_getDebuggerProperties(): any[];
|
||||
|
||||
|
||||
_saveToJson(): JSONValue;
|
||||
_loadFromJson(o: JSONValue): void;
|
||||
|
||||
|
||||
// DOM methods
|
||||
_addDOMMessageHandler(handler: string, callback: (e: JSONValue) => void): void;
|
||||
_addDOMMessageHandlers(arr: Array<[string, (e: JSONValue) => void]>): void;
|
||||
|
||||
|
||||
_postToDOM(handler: string, data?: JSONValue): void;
|
||||
_postToDOMAsync(handler: string, data?: JSONValue): Promise<JSONValue>;
|
||||
_postToDOMMaybeSync(handler: string, data?: JSONValue): void;
|
||||
|
||||
|
||||
// Wrapper extension methods
|
||||
_isWrapperExtensionAvailable(): boolean;
|
||||
_addWrapperExtensionMessageHandler(messageId: string, callback: (e: JSONValue) => void): void;
|
||||
_addWrapperMessageHandlers(arr: Array<[string, (e: JSONValue) => void]>): void;
|
||||
|
||||
|
||||
_sendWrapperExtensionMessage(messageId: string, params?: WrapperExtensionParameterType[]): void;
|
||||
_sendWrapperExtensionMessageAsync(messageId: string, params?: WrapperExtensionParameterType[]): Promise<JSONValue>;
|
||||
}
|
||||
@ -49,41 +49,40 @@ declare class ISDKInstanceBase_ extends IInstance
|
||||
declare class IWorldInstanceSDKBase_ extends IWorldInstance
|
||||
{
|
||||
readonly objectType: ISDKObjectTypeBase_<this>;
|
||||
|
||||
|
||||
_release(): void;
|
||||
_getInitProperties(): SDKPropertyType[];
|
||||
_trigger(method: Function): void;
|
||||
|
||||
|
||||
_setTicking(isTicking: boolean): void;
|
||||
_setTicking2(isTicking: boolean): void;
|
||||
_isTicking(): boolean;
|
||||
_isTicking2(): boolean;
|
||||
|
||||
|
||||
_tick(): void;
|
||||
_tick2(): void;
|
||||
|
||||
|
||||
_getDebuggerProperties(): any[];
|
||||
|
||||
|
||||
_saveToJson(): JSONValue;
|
||||
_loadFromJson(o: JSONValue): void;
|
||||
|
||||
|
||||
// DOM methods
|
||||
_addDOMMessageHandler(handler: string, callback: (e: JSONValue) => void): void;
|
||||
_addDOMMessageHandlers(arr: Array<[string, (e: JSONValue) => void]>): void;
|
||||
|
||||
|
||||
_postToDOM(handler: string, data: JSONValue): void;
|
||||
_postToDOMAsync(handler: string, data: JSONValue): Promise<JSONValue>;
|
||||
_postToDOMMaybeSync(handler: string, data: JSONValue): void;
|
||||
|
||||
|
||||
// Wrapper extension methods
|
||||
_isWrapperExtensionAvailable(): boolean;
|
||||
_addWrapperExtensionMessageHandler(messageId: string, callback: (e: JSONValue) => void): void;
|
||||
_addWrapperMessageHandlers(arr: Array<[string, (e: JSONValue) => void]>): void;
|
||||
|
||||
|
||||
_sendWrapperExtensionMessage(messageId: string, params?: WrapperExtensionParameterType[]): void;
|
||||
_sendWrapperExtensionMessageAsync(messageId: string, params?: WrapperExtensionParameterType[]): Promise<JSONValue>;
|
||||
}
|
||||
|
||||
declare var ISDKInstanceBase: typeof ISDKInstanceBase_;
|
||||
declare var IWorldInstanceSDKBase: typeof IWorldInstanceSDKBase_;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* @see {@link https://www.construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/addon-sdk-interfaces/isdkbehaviorbase | ISDKPluginBase documentation } */
|
||||
declare class ISDKPluginBase_ extends IPlugin_
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
declare var ISDKPluginBase: typeof ISDKPluginBase_;
|
||||
|
||||
@ -2,8 +2,10 @@
|
||||
/** Utility class for scripting APIs intended for the Addon SDK. */
|
||||
declare class ISDKUtils
|
||||
{
|
||||
readonly constructVersionCode: number;
|
||||
|
||||
updateRender(): void;
|
||||
|
||||
|
||||
addLoadPromise(promise: Promise<void>): void;
|
||||
|
||||
sendWrapperExtensionMessage(wrapperComponentId: string, messageId: string, params?: WrapperExtensionParameterType[]): void;
|
||||
|
||||
@ -12,7 +12,7 @@ declare class ITimelineStateBase
|
||||
isLooping: boolean;
|
||||
isPingPong: boolean;
|
||||
playbackRate: number;
|
||||
|
||||
|
||||
readonly progress: number;
|
||||
readonly tags: string;
|
||||
readonly finished: Promise<void>;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user