mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Merge branch '3.6' into 3.7-beta
This commit is contained in:
commit
12162b7fee
1
spine-ts/build/spine-all.d.ts
vendored
1
spine-ts/build/spine-all.d.ts
vendored
@ -1493,6 +1493,7 @@ declare module spine.webgl {
|
|||||||
drawSkeleton(skeleton: Skeleton, premultipliedAlpha?: boolean): void;
|
drawSkeleton(skeleton: Skeleton, premultipliedAlpha?: boolean): void;
|
||||||
drawSkeletonDebug(skeleton: Skeleton, premultipliedAlpha?: boolean, ignoredBones?: Array<string>): void;
|
drawSkeletonDebug(skeleton: Skeleton, premultipliedAlpha?: boolean, ignoredBones?: Array<string>): void;
|
||||||
drawTexture(texture: GLTexture, x: number, y: number, width: number, height: number, color?: Color): void;
|
drawTexture(texture: GLTexture, x: number, y: number, width: number, height: number, color?: Color): void;
|
||||||
|
drawTextureUV(texture: GLTexture, x: number, y: number, width: number, height: number, u: number, v: number, u2: number, v2: number, color?: Color): void;
|
||||||
drawTextureRotated(texture: GLTexture, x: number, y: number, width: number, height: number, pivotX: number, pivotY: number, angle: number, color?: Color, premultipliedAlpha?: boolean): void;
|
drawTextureRotated(texture: GLTexture, x: number, y: number, width: number, height: number, pivotX: number, pivotY: number, angle: number, color?: Color, premultipliedAlpha?: boolean): void;
|
||||||
drawRegion(region: TextureAtlasRegion, x: number, y: number, width: number, height: number, color?: Color, premultipliedAlpha?: boolean): void;
|
drawRegion(region: TextureAtlasRegion, x: number, y: number, width: number, height: number, color?: Color, premultipliedAlpha?: boolean): void;
|
||||||
line(x: number, y: number, x2: number, y2: number, color?: Color, color2?: Color): void;
|
line(x: number, y: number, x2: number, y2: number, color?: Color, color2?: Color): void;
|
||||||
|
|||||||
@ -7947,6 +7947,71 @@ var spine;
|
|||||||
}
|
}
|
||||||
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
||||||
};
|
};
|
||||||
|
SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {
|
||||||
|
if (color === void 0) { color = null; }
|
||||||
|
this.enableRenderer(this.batcher);
|
||||||
|
if (color === null)
|
||||||
|
color = this.WHITE;
|
||||||
|
var quad = this.QUAD;
|
||||||
|
var i = 0;
|
||||||
|
quad[i++] = x;
|
||||||
|
quad[i++] = y;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u;
|
||||||
|
quad[i++] = v;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x + width;
|
||||||
|
quad[i++] = y;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u2;
|
||||||
|
quad[i++] = v;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x + width;
|
||||||
|
quad[i++] = y + height;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u2;
|
||||||
|
quad[i++] = v2;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x;
|
||||||
|
quad[i++] = y + height;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u;
|
||||||
|
quad[i++] = v2;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
||||||
|
};
|
||||||
SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {
|
SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {
|
||||||
if (color === void 0) { color = null; }
|
if (color === void 0) { color = null; }
|
||||||
if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }
|
if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
1
spine-ts/build/spine-webgl.d.ts
vendored
1
spine-ts/build/spine-webgl.d.ts
vendored
@ -1464,6 +1464,7 @@ declare module spine.webgl {
|
|||||||
drawSkeleton(skeleton: Skeleton, premultipliedAlpha?: boolean): void;
|
drawSkeleton(skeleton: Skeleton, premultipliedAlpha?: boolean): void;
|
||||||
drawSkeletonDebug(skeleton: Skeleton, premultipliedAlpha?: boolean, ignoredBones?: Array<string>): void;
|
drawSkeletonDebug(skeleton: Skeleton, premultipliedAlpha?: boolean, ignoredBones?: Array<string>): void;
|
||||||
drawTexture(texture: GLTexture, x: number, y: number, width: number, height: number, color?: Color): void;
|
drawTexture(texture: GLTexture, x: number, y: number, width: number, height: number, color?: Color): void;
|
||||||
|
drawTextureUV(texture: GLTexture, x: number, y: number, width: number, height: number, u: number, v: number, u2: number, v2: number, color?: Color): void;
|
||||||
drawTextureRotated(texture: GLTexture, x: number, y: number, width: number, height: number, pivotX: number, pivotY: number, angle: number, color?: Color, premultipliedAlpha?: boolean): void;
|
drawTextureRotated(texture: GLTexture, x: number, y: number, width: number, height: number, pivotX: number, pivotY: number, angle: number, color?: Color, premultipliedAlpha?: boolean): void;
|
||||||
drawRegion(region: TextureAtlasRegion, x: number, y: number, width: number, height: number, color?: Color, premultipliedAlpha?: boolean): void;
|
drawRegion(region: TextureAtlasRegion, x: number, y: number, width: number, height: number, color?: Color, premultipliedAlpha?: boolean): void;
|
||||||
line(x: number, y: number, x2: number, y2: number, color?: Color, color2?: Color): void;
|
line(x: number, y: number, x2: number, y2: number, color?: Color, color2?: Color): void;
|
||||||
|
|||||||
@ -7692,6 +7692,71 @@ var spine;
|
|||||||
}
|
}
|
||||||
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
||||||
};
|
};
|
||||||
|
SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {
|
||||||
|
if (color === void 0) { color = null; }
|
||||||
|
this.enableRenderer(this.batcher);
|
||||||
|
if (color === null)
|
||||||
|
color = this.WHITE;
|
||||||
|
var quad = this.QUAD;
|
||||||
|
var i = 0;
|
||||||
|
quad[i++] = x;
|
||||||
|
quad[i++] = y;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u;
|
||||||
|
quad[i++] = v;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x + width;
|
||||||
|
quad[i++] = y;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u2;
|
||||||
|
quad[i++] = v;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x + width;
|
||||||
|
quad[i++] = y + height;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u2;
|
||||||
|
quad[i++] = v2;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x;
|
||||||
|
quad[i++] = y + height;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u;
|
||||||
|
quad[i++] = v2;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
||||||
|
};
|
||||||
SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {
|
SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {
|
||||||
if (color === void 0) { color = null; }
|
if (color === void 0) { color = null; }
|
||||||
if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }
|
if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
1
spine-ts/build/spine-widget.d.ts
vendored
1
spine-ts/build/spine-widget.d.ts
vendored
@ -1464,6 +1464,7 @@ declare module spine.webgl {
|
|||||||
drawSkeleton(skeleton: Skeleton, premultipliedAlpha?: boolean): void;
|
drawSkeleton(skeleton: Skeleton, premultipliedAlpha?: boolean): void;
|
||||||
drawSkeletonDebug(skeleton: Skeleton, premultipliedAlpha?: boolean, ignoredBones?: Array<string>): void;
|
drawSkeletonDebug(skeleton: Skeleton, premultipliedAlpha?: boolean, ignoredBones?: Array<string>): void;
|
||||||
drawTexture(texture: GLTexture, x: number, y: number, width: number, height: number, color?: Color): void;
|
drawTexture(texture: GLTexture, x: number, y: number, width: number, height: number, color?: Color): void;
|
||||||
|
drawTextureUV(texture: GLTexture, x: number, y: number, width: number, height: number, u: number, v: number, u2: number, v2: number, color?: Color): void;
|
||||||
drawTextureRotated(texture: GLTexture, x: number, y: number, width: number, height: number, pivotX: number, pivotY: number, angle: number, color?: Color, premultipliedAlpha?: boolean): void;
|
drawTextureRotated(texture: GLTexture, x: number, y: number, width: number, height: number, pivotX: number, pivotY: number, angle: number, color?: Color, premultipliedAlpha?: boolean): void;
|
||||||
drawRegion(region: TextureAtlasRegion, x: number, y: number, width: number, height: number, color?: Color, premultipliedAlpha?: boolean): void;
|
drawRegion(region: TextureAtlasRegion, x: number, y: number, width: number, height: number, color?: Color, premultipliedAlpha?: boolean): void;
|
||||||
line(x: number, y: number, x2: number, y2: number, color?: Color, color2?: Color): void;
|
line(x: number, y: number, x2: number, y2: number, color?: Color, color2?: Color): void;
|
||||||
|
|||||||
@ -7692,6 +7692,71 @@ var spine;
|
|||||||
}
|
}
|
||||||
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
||||||
};
|
};
|
||||||
|
SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {
|
||||||
|
if (color === void 0) { color = null; }
|
||||||
|
this.enableRenderer(this.batcher);
|
||||||
|
if (color === null)
|
||||||
|
color = this.WHITE;
|
||||||
|
var quad = this.QUAD;
|
||||||
|
var i = 0;
|
||||||
|
quad[i++] = x;
|
||||||
|
quad[i++] = y;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u;
|
||||||
|
quad[i++] = v;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x + width;
|
||||||
|
quad[i++] = y;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u2;
|
||||||
|
quad[i++] = v;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x + width;
|
||||||
|
quad[i++] = y + height;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u2;
|
||||||
|
quad[i++] = v2;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x;
|
||||||
|
quad[i++] = y + height;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u;
|
||||||
|
quad[i++] = v2;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
||||||
|
};
|
||||||
SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {
|
SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {
|
||||||
if (color === void 0) { color = null; }
|
if (color === void 0) { color = null; }
|
||||||
if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }
|
if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -144,6 +144,70 @@ module spine.webgl {
|
|||||||
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
drawTextureUV (texture: GLTexture, x: number, y: number, width: number, height: number, u: number, v: number, u2: number, v2: number, color: Color = null) {
|
||||||
|
this.enableRenderer(this.batcher);
|
||||||
|
if (color === null) color = this.WHITE;
|
||||||
|
let quad = this.QUAD;
|
||||||
|
var i = 0;
|
||||||
|
quad[i++] = x;
|
||||||
|
quad[i++] = y;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u;
|
||||||
|
quad[i++] = v;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x + width;
|
||||||
|
quad[i++] = y;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u2;
|
||||||
|
quad[i++] = v;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x + width;
|
||||||
|
quad[i++] = y + height;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u2;
|
||||||
|
quad[i++] = v2;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
quad[i++] = x;
|
||||||
|
quad[i++] = y + height;
|
||||||
|
quad[i++] = color.r;
|
||||||
|
quad[i++] = color.g;
|
||||||
|
quad[i++] = color.b;
|
||||||
|
quad[i++] = color.a;
|
||||||
|
quad[i++] = u;
|
||||||
|
quad[i++] = v2;
|
||||||
|
if (this.twoColorTint) {
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
quad[i++] = 0;
|
||||||
|
}
|
||||||
|
this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);
|
||||||
|
}
|
||||||
|
|
||||||
drawTextureRotated (texture: GLTexture, x: number, y: number, width: number, height: number, pivotX: number, pivotY: number, angle: number, color: Color = null, premultipliedAlpha: boolean = false) {
|
drawTextureRotated (texture: GLTexture, x: number, y: number, width: number, height: number, pivotX: number, pivotY: number, angle: number, color: Color = null, premultipliedAlpha: boolean = false) {
|
||||||
this.enableRenderer(this.batcher);
|
this.enableRenderer(this.batcher);
|
||||||
if (color === null) color = this.WHITE;
|
if (color === null) color = this.WHITE;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user