mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-18 04:51:47 +08:00
[ts] Fix parsing of spacing mode proportional for JSON files.
This commit is contained in:
parent
1211c2a345
commit
6d7f29718b
4
spine-ts/build/spine-all.d.ts
vendored
4
spine-ts/build/spine-all.d.ts
vendored
@ -889,7 +889,7 @@ declare module spine {
|
||||
getValue(map: any, prop: string, defaultValue: any): any;
|
||||
static blendModeFromString(str: string): BlendMode;
|
||||
static positionModeFromString(str: string): PositionMode;
|
||||
static spacingModeFromString(str: string): SpacingMode.Length | SpacingMode.Fixed | SpacingMode.Percent;
|
||||
static spacingModeFromString(str: string): SpacingMode;
|
||||
static rotateModeFromString(str: string): RotateMode;
|
||||
static transformModeFromString(str: string): TransformMode;
|
||||
}
|
||||
@ -1487,7 +1487,7 @@ declare module spine.webgl {
|
||||
static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean;
|
||||
constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement | ImageBitmap, useMipMaps?: boolean);
|
||||
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear | TextureFilter.Linear;
|
||||
static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear;
|
||||
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
update(useMipMaps: boolean): void;
|
||||
restore(): void;
|
||||
|
||||
@ -6,6 +6,8 @@ var __extends = (this && this.__extends) || (function () {
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
@ -7423,7 +7425,9 @@ var spine;
|
||||
return spine.SpacingMode.Fixed;
|
||||
if (str == "percent")
|
||||
return spine.SpacingMode.Percent;
|
||||
throw new Error("Unknown position mode: " + str);
|
||||
if (str == "proportional")
|
||||
return spine.SpacingMode.Proportional;
|
||||
throw new Error("Unknown spacing mode: " + str);
|
||||
};
|
||||
SkeletonJson.rotateModeFromString = function (str) {
|
||||
str = str.toLowerCase();
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
spine-ts/build/spine-canvas.d.ts
vendored
2
spine-ts/build/spine-canvas.d.ts
vendored
@ -889,7 +889,7 @@ declare module spine {
|
||||
getValue(map: any, prop: string, defaultValue: any): any;
|
||||
static blendModeFromString(str: string): BlendMode;
|
||||
static positionModeFromString(str: string): PositionMode;
|
||||
static spacingModeFromString(str: string): SpacingMode.Length | SpacingMode.Fixed | SpacingMode.Percent;
|
||||
static spacingModeFromString(str: string): SpacingMode;
|
||||
static rotateModeFromString(str: string): RotateMode;
|
||||
static transformModeFromString(str: string): TransformMode;
|
||||
}
|
||||
|
||||
@ -6,6 +6,8 @@ var __extends = (this && this.__extends) || (function () {
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
@ -7423,7 +7425,9 @@ var spine;
|
||||
return spine.SpacingMode.Fixed;
|
||||
if (str == "percent")
|
||||
return spine.SpacingMode.Percent;
|
||||
throw new Error("Unknown position mode: " + str);
|
||||
if (str == "proportional")
|
||||
return spine.SpacingMode.Proportional;
|
||||
throw new Error("Unknown spacing mode: " + str);
|
||||
};
|
||||
SkeletonJson.rotateModeFromString = function (str) {
|
||||
str = str.toLowerCase();
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
spine-ts/build/spine-core.d.ts
vendored
2
spine-ts/build/spine-core.d.ts
vendored
@ -889,7 +889,7 @@ declare module spine {
|
||||
getValue(map: any, prop: string, defaultValue: any): any;
|
||||
static blendModeFromString(str: string): BlendMode;
|
||||
static positionModeFromString(str: string): PositionMode;
|
||||
static spacingModeFromString(str: string): SpacingMode.Length | SpacingMode.Fixed | SpacingMode.Percent;
|
||||
static spacingModeFromString(str: string): SpacingMode;
|
||||
static rotateModeFromString(str: string): RotateMode;
|
||||
static transformModeFromString(str: string): TransformMode;
|
||||
}
|
||||
|
||||
@ -6,6 +6,8 @@ var __extends = (this && this.__extends) || (function () {
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
@ -7423,7 +7425,9 @@ var spine;
|
||||
return spine.SpacingMode.Fixed;
|
||||
if (str == "percent")
|
||||
return spine.SpacingMode.Percent;
|
||||
throw new Error("Unknown position mode: " + str);
|
||||
if (str == "proportional")
|
||||
return spine.SpacingMode.Proportional;
|
||||
throw new Error("Unknown spacing mode: " + str);
|
||||
};
|
||||
SkeletonJson.rotateModeFromString = function (str) {
|
||||
str = str.toLowerCase();
|
||||
|
||||
File diff suppressed because one or more lines are too long
4
spine-ts/build/spine-player.d.ts
vendored
4
spine-ts/build/spine-player.d.ts
vendored
@ -889,7 +889,7 @@ declare module spine {
|
||||
getValue(map: any, prop: string, defaultValue: any): any;
|
||||
static blendModeFromString(str: string): BlendMode;
|
||||
static positionModeFromString(str: string): PositionMode;
|
||||
static spacingModeFromString(str: string): SpacingMode.Length | SpacingMode.Fixed | SpacingMode.Percent;
|
||||
static spacingModeFromString(str: string): SpacingMode;
|
||||
static rotateModeFromString(str: string): RotateMode;
|
||||
static transformModeFromString(str: string): TransformMode;
|
||||
}
|
||||
@ -1456,7 +1456,7 @@ declare module spine.webgl {
|
||||
static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean;
|
||||
constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement | ImageBitmap, useMipMaps?: boolean);
|
||||
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear | TextureFilter.Linear;
|
||||
static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear;
|
||||
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
update(useMipMaps: boolean): void;
|
||||
restore(): void;
|
||||
|
||||
@ -6,6 +6,8 @@ var __extends = (this && this.__extends) || (function () {
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
@ -7423,7 +7425,9 @@ var spine;
|
||||
return spine.SpacingMode.Fixed;
|
||||
if (str == "percent")
|
||||
return spine.SpacingMode.Percent;
|
||||
throw new Error("Unknown position mode: " + str);
|
||||
if (str == "proportional")
|
||||
return spine.SpacingMode.Proportional;
|
||||
throw new Error("Unknown spacing mode: " + str);
|
||||
};
|
||||
SkeletonJson.rotateModeFromString = function (str) {
|
||||
str = str.toLowerCase();
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
spine-ts/build/spine-threejs.d.ts
vendored
2
spine-ts/build/spine-threejs.d.ts
vendored
@ -889,7 +889,7 @@ declare module spine {
|
||||
getValue(map: any, prop: string, defaultValue: any): any;
|
||||
static blendModeFromString(str: string): BlendMode;
|
||||
static positionModeFromString(str: string): PositionMode;
|
||||
static spacingModeFromString(str: string): SpacingMode.Length | SpacingMode.Fixed | SpacingMode.Percent;
|
||||
static spacingModeFromString(str: string): SpacingMode;
|
||||
static rotateModeFromString(str: string): RotateMode;
|
||||
static transformModeFromString(str: string): TransformMode;
|
||||
}
|
||||
|
||||
@ -6,6 +6,8 @@ var __extends = (this && this.__extends) || (function () {
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
@ -7423,7 +7425,9 @@ var spine;
|
||||
return spine.SpacingMode.Fixed;
|
||||
if (str == "percent")
|
||||
return spine.SpacingMode.Percent;
|
||||
throw new Error("Unknown position mode: " + str);
|
||||
if (str == "proportional")
|
||||
return spine.SpacingMode.Proportional;
|
||||
throw new Error("Unknown spacing mode: " + str);
|
||||
};
|
||||
SkeletonJson.rotateModeFromString = function (str) {
|
||||
str = str.toLowerCase();
|
||||
|
||||
File diff suppressed because one or more lines are too long
4
spine-ts/build/spine-webgl.d.ts
vendored
4
spine-ts/build/spine-webgl.d.ts
vendored
@ -889,7 +889,7 @@ declare module spine {
|
||||
getValue(map: any, prop: string, defaultValue: any): any;
|
||||
static blendModeFromString(str: string): BlendMode;
|
||||
static positionModeFromString(str: string): PositionMode;
|
||||
static spacingModeFromString(str: string): SpacingMode.Length | SpacingMode.Fixed | SpacingMode.Percent;
|
||||
static spacingModeFromString(str: string): SpacingMode;
|
||||
static rotateModeFromString(str: string): RotateMode;
|
||||
static transformModeFromString(str: string): TransformMode;
|
||||
}
|
||||
@ -1456,7 +1456,7 @@ declare module spine.webgl {
|
||||
static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean;
|
||||
constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement | ImageBitmap, useMipMaps?: boolean);
|
||||
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear | TextureFilter.Linear;
|
||||
static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear;
|
||||
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
update(useMipMaps: boolean): void;
|
||||
restore(): void;
|
||||
|
||||
@ -6,6 +6,8 @@ var __extends = (this && this.__extends) || (function () {
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
@ -7423,7 +7425,9 @@ var spine;
|
||||
return spine.SpacingMode.Fixed;
|
||||
if (str == "percent")
|
||||
return spine.SpacingMode.Percent;
|
||||
throw new Error("Unknown position mode: " + str);
|
||||
if (str == "proportional")
|
||||
return spine.SpacingMode.Proportional;
|
||||
throw new Error("Unknown spacing mode: " + str);
|
||||
};
|
||||
SkeletonJson.rotateModeFromString = function (str) {
|
||||
str = str.toLowerCase();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1028,7 +1028,8 @@ module spine {
|
||||
if (str == "length") return SpacingMode.Length;
|
||||
if (str == "fixed") return SpacingMode.Fixed;
|
||||
if (str == "percent") return SpacingMode.Percent;
|
||||
throw new Error(`Unknown position mode: ${str}`);
|
||||
if (str == "proportional") return SpacingMode.Proportional;
|
||||
throw new Error(`Unknown spacing mode: ${str}`);
|
||||
}
|
||||
|
||||
static rotateModeFromString (str: string) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user