浏览代码

[ts][player] Only accept background image bounds if fully specified.

badlogic 5 年之前
父节点
当前提交
c37916a731

+ 1 - 1
spine-ts/build/spine-all.js

@@ -11967,7 +11967,7 @@ var spine;
 				this.sceneRenderer.begin();
 				if (this.config.backgroundImage && this.config.backgroundImage.url) {
 					var bgImage = this.assetManager.get(this.config.backgroundImage.url);
-					if (!this.config.backgroundImage.x) {
+					if (!(this.config.backgroundImage.hasOwnProperty("x") && this.config.backgroundImage.hasOwnProperty("y") && this.config.backgroundImage.hasOwnProperty("width") && this.config.backgroundImage.hasOwnProperty("height"))) {
 						this.sceneRenderer.drawTexture(bgImage, viewport.x, viewport.y, viewport.width, viewport.height);
 					}
 					else {

文件差异内容过多而无法显示
+ 0 - 0
spine-ts/build/spine-all.js.map


+ 1 - 1
spine-ts/build/spine-player.js

@@ -11291,7 +11291,7 @@ var spine;
 				this.sceneRenderer.begin();
 				if (this.config.backgroundImage && this.config.backgroundImage.url) {
 					var bgImage = this.assetManager.get(this.config.backgroundImage.url);
-					if (!this.config.backgroundImage.x) {
+					if (!(this.config.backgroundImage.hasOwnProperty("x") && this.config.backgroundImage.hasOwnProperty("y") && this.config.backgroundImage.hasOwnProperty("width") && this.config.backgroundImage.hasOwnProperty("height"))) {
 						this.sceneRenderer.drawTexture(bgImage, viewport.x, viewport.y, viewport.width, viewport.height);
 					}
 					else {

文件差异内容过多而无法显示
+ 0 - 0
spine-ts/build/spine-player.js.map


+ 1 - 1
spine-ts/player/src/Player.ts

@@ -794,7 +794,7 @@ module spine {
 				// Draw background image if given
 				if (this.config.backgroundImage && this.config.backgroundImage.url) {
 					let bgImage = this.assetManager.get(this.config.backgroundImage.url);
-					if (!this.config.backgroundImage.x) {
+					if (!(this.config.backgroundImage.hasOwnProperty("x") && this.config.backgroundImage.hasOwnProperty("y") && this.config.backgroundImage.hasOwnProperty("width") && this.config.backgroundImage.hasOwnProperty("height"))) {
 						this.sceneRenderer.drawTexture(bgImage, viewport.x, viewport.y, viewport.width, viewport.height);
 					} else {
 						this.sceneRenderer.drawTexture(bgImage, this.config.backgroundImage.x, this.config.backgroundImage.y, this.config.backgroundImage.width, this.config.backgroundImage.height);

部分文件因为文件数量过多而无法显示