소스 검색

[ts] Fixed compilation error.

Nathan Sweet 4 년 전
부모
커밋
4742c0d987
5개의 변경된 파일43개의 추가작업 그리고 33개의 파일을 삭제
  1. 21 16
      spine-ts/build/spine-all.js
  2. 0 0
      spine-ts/build/spine-all.js.map
  3. 21 16
      spine-ts/build/spine-player.js
  4. 0 0
      spine-ts/build/spine-player.js.map
  5. 1 1
      spine-ts/player/src/Player.ts

+ 21 - 16
spine-ts/build/spine-all.js

@@ -12561,15 +12561,18 @@ var spine;
 			this.play();
 			if (config.success)
 				config.success(this);
-			if (!this.animationState.getCurrent(0)) {
+			var entry = this.animationState.getCurrent(0);
+			if (!entry) {
 				if (this.config.animation)
 					this.setAnimation(this.config.animation);
 				else {
-					var entry = this.animationState.setEmptyAnimation(0);
+					entry = this.animationState.setEmptyAnimation(0);
 					entry.trackEnd = 100000000;
 					this.setViewport(entry.animation);
 				}
 			}
+			else if (!this.currentViewport)
+				this.setViewport(entry.animation);
 		};
 		SpinePlayer.prototype.setupInput = function () {
 			var _this = this;
@@ -12816,20 +12819,22 @@ var spine;
 						width: this.currentViewport.width + this.currentViewport.padLeft + this.currentViewport.padRight,
 						height: this.currentViewport.height + this.currentViewport.padBottom + this.currentViewport.padTop
 					};
-					var transitionAlpha = ((performance.now() - this.viewportTransitionStart) / 1000) / config.viewport.transitionTime;
-					if (this.previousViewport && transitionAlpha < 1) {
-						var oldViewport = {
-							x: this.previousViewport.x - this.previousViewport.padLeft,
-							y: this.previousViewport.y - this.previousViewport.padBottom,
-							width: this.previousViewport.width + this.previousViewport.padLeft + this.previousViewport.padRight,
-							height: this.previousViewport.height + this.previousViewport.padBottom + this.previousViewport.padTop
-						};
-						viewport = {
-							x: oldViewport.x + (viewport.x - oldViewport.x) * transitionAlpha,
-							y: oldViewport.y + (viewport.y - oldViewport.y) * transitionAlpha,
-							width: oldViewport.width + (viewport.width - oldViewport.width) * transitionAlpha,
-							height: oldViewport.height + (viewport.height - oldViewport.height) * transitionAlpha
-						};
+					if (this.previousViewport) {
+						var transitionAlpha = ((performance.now() - this.viewportTransitionStart) / 1000) / config.viewport.transitionTime;
+						if (transitionAlpha < 1) {
+							var oldViewport = {
+								x: this.previousViewport.x - this.previousViewport.padLeft,
+								y: this.previousViewport.y - this.previousViewport.padBottom,
+								width: this.previousViewport.width + this.previousViewport.padLeft + this.previousViewport.padRight,
+								height: this.previousViewport.height + this.previousViewport.padBottom + this.previousViewport.padTop
+							};
+							viewport = {
+								x: oldViewport.x + (viewport.x - oldViewport.x) * transitionAlpha,
+								y: oldViewport.y + (viewport.y - oldViewport.y) * transitionAlpha,
+								width: oldViewport.width + (viewport.width - oldViewport.width) * transitionAlpha,
+								height: oldViewport.height + (viewport.height - oldViewport.height) * transitionAlpha
+							};
+						}
 					}
 					var viewportSize = this.scale(viewport.width, viewport.height, this.canvas.width, this.canvas.height);
 					var gl = this.context.gl;

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
spine-ts/build/spine-all.js.map


+ 21 - 16
spine-ts/build/spine-player.js

@@ -11884,15 +11884,18 @@ var spine;
 			this.play();
 			if (config.success)
 				config.success(this);
-			if (!this.animationState.getCurrent(0)) {
+			var entry = this.animationState.getCurrent(0);
+			if (!entry) {
 				if (this.config.animation)
 					this.setAnimation(this.config.animation);
 				else {
-					var entry = this.animationState.setEmptyAnimation(0);
+					entry = this.animationState.setEmptyAnimation(0);
 					entry.trackEnd = 100000000;
 					this.setViewport(entry.animation);
 				}
 			}
+			else if (!this.currentViewport)
+				this.setViewport(entry.animation);
 		};
 		SpinePlayer.prototype.setupInput = function () {
 			var _this = this;
@@ -12139,20 +12142,22 @@ var spine;
 						width: this.currentViewport.width + this.currentViewport.padLeft + this.currentViewport.padRight,
 						height: this.currentViewport.height + this.currentViewport.padBottom + this.currentViewport.padTop
 					};
-					var transitionAlpha = ((performance.now() - this.viewportTransitionStart) / 1000) / config.viewport.transitionTime;
-					if (this.previousViewport && transitionAlpha < 1) {
-						var oldViewport = {
-							x: this.previousViewport.x - this.previousViewport.padLeft,
-							y: this.previousViewport.y - this.previousViewport.padBottom,
-							width: this.previousViewport.width + this.previousViewport.padLeft + this.previousViewport.padRight,
-							height: this.previousViewport.height + this.previousViewport.padBottom + this.previousViewport.padTop
-						};
-						viewport = {
-							x: oldViewport.x + (viewport.x - oldViewport.x) * transitionAlpha,
-							y: oldViewport.y + (viewport.y - oldViewport.y) * transitionAlpha,
-							width: oldViewport.width + (viewport.width - oldViewport.width) * transitionAlpha,
-							height: oldViewport.height + (viewport.height - oldViewport.height) * transitionAlpha
-						};
+					if (this.previousViewport) {
+						var transitionAlpha = ((performance.now() - this.viewportTransitionStart) / 1000) / config.viewport.transitionTime;
+						if (transitionAlpha < 1) {
+							var oldViewport = {
+								x: this.previousViewport.x - this.previousViewport.padLeft,
+								y: this.previousViewport.y - this.previousViewport.padBottom,
+								width: this.previousViewport.width + this.previousViewport.padLeft + this.previousViewport.padRight,
+								height: this.previousViewport.height + this.previousViewport.padBottom + this.previousViewport.padTop
+							};
+							viewport = {
+								x: oldViewport.x + (viewport.x - oldViewport.x) * transitionAlpha,
+								y: oldViewport.y + (viewport.y - oldViewport.y) * transitionAlpha,
+								width: oldViewport.width + (viewport.width - oldViewport.width) * transitionAlpha,
+								height: oldViewport.height + (viewport.height - oldViewport.height) * transitionAlpha
+							};
+						}
 					}
 					var viewportSize = this.scale(viewport.width, viewport.height, this.canvas.width, this.canvas.height);
 					var gl = this.context.gl;

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
spine-ts/build/spine-player.js.map


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

@@ -459,7 +459,7 @@ module spine {
 				if (this.config.animation)
 					this.setAnimation(this.config.animation);
 				else {
-					var entry = this.animationState.setEmptyAnimation(0);
+					entry = this.animationState.setEmptyAnimation(0);
 					entry.trackEnd = 100000000;
 					this.setViewport(entry.animation);
 				}

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.