Mario Zechner 1 жил өмнө
parent
commit
b22d1562a7

+ 20 - 20
spine-ts/spine-core/src/SkeletonBinary.ts

@@ -940,26 +940,26 @@ export class SkeletonBinary {
 				}
 				const bezierCount = input.readInt(true);
 				switch (type) {
-				case PHYSICS_INERTIA:
-					timelines.push(readTimeline1(input, new PhysicsConstraintInertiaTimeline(frameCount, bezierCount, index), 1));
-					break;
-				case PHYSICS_STRENGTH:
-					timelines.push(readTimeline1(input, new PhysicsConstraintStrengthTimeline(frameCount, bezierCount, index), 1));
-					break;
-				case PHYSICS_DAMPING:
-					timelines.push(readTimeline1(input, new PhysicsConstraintDampingTimeline(frameCount, bezierCount, index), 1));
-					break;
-				case PHYSICS_MASS:
-					timelines.push(readTimeline1(input, new PhysicsConstraintMassTimeline(frameCount, bezierCount, index), 1));
-					break;
-				case PHYSICS_WIND:
-					timelines.push(readTimeline1(input, new PhysicsConstraintWindTimeline(frameCount, bezierCount, index), 1));
-					break;
-				case PHYSICS_GRAVITY:
-					timelines.push(readTimeline1(input, new PhysicsConstraintGravityTimeline(frameCount, bezierCount, index), 1));
-					break;
-				case PHYSICS_MIX:
-					timelines.push(readTimeline1(input, new PhysicsConstraintMixTimeline(frameCount, bezierCount, index), 1));
+					case PHYSICS_INERTIA:
+						timelines.push(readTimeline1(input, new PhysicsConstraintInertiaTimeline(frameCount, bezierCount, index), 1));
+						break;
+					case PHYSICS_STRENGTH:
+						timelines.push(readTimeline1(input, new PhysicsConstraintStrengthTimeline(frameCount, bezierCount, index), 1));
+						break;
+					case PHYSICS_DAMPING:
+						timelines.push(readTimeline1(input, new PhysicsConstraintDampingTimeline(frameCount, bezierCount, index), 1));
+						break;
+					case PHYSICS_MASS:
+						timelines.push(readTimeline1(input, new PhysicsConstraintMassTimeline(frameCount, bezierCount, index), 1));
+						break;
+					case PHYSICS_WIND:
+						timelines.push(readTimeline1(input, new PhysicsConstraintWindTimeline(frameCount, bezierCount, index), 1));
+						break;
+					case PHYSICS_GRAVITY:
+						timelines.push(readTimeline1(input, new PhysicsConstraintGravityTimeline(frameCount, bezierCount, index), 1));
+						break;
+					case PHYSICS_MIX:
+						timelines.push(readTimeline1(input, new PhysicsConstraintMixTimeline(frameCount, bezierCount, index), 1));
 				}
 			}
 		}

+ 18 - 18
spine-ts/spine-player/src/PlayerEditor.ts

@@ -29,25 +29,25 @@
 
 declare function CodeMirror (el: Element, config: any): void;
 
-function loadScript(url: string): Promise<void> {
-    return new Promise((resolve, reject) => {
-        const script = document.createElement('script');
-        script.src = url;
-        script.onload = () => resolve();
-        script.onerror = () => reject(new Error(`Script load error for ${url}`));
-        document.head.appendChild(script);
-    });
+function loadScript (url: string): Promise<void> {
+	return new Promise((resolve, reject) => {
+		const script = document.createElement('script');
+		script.src = url;
+		script.onload = () => resolve();
+		script.onerror = () => reject(new Error(`Script load error for ${url}`));
+		document.head.appendChild(script);
+	});
 }
 
-function loadCss(url: string): Promise<void> {
-    return new Promise((resolve, reject) => {
-        const link = document.createElement('link');
-        link.href = url;
-        link.rel = 'stylesheet';
-        link.onload = () => resolve();
-        link.onerror = () => reject(new Error(`CSS load error for ${url}`));
-        document.head.appendChild(link);
-    });
+function loadCss (url: string): Promise<void> {
+	return new Promise((resolve, reject) => {
+		const link = document.createElement('link');
+		link.href = url;
+		link.rel = 'stylesheet';
+		link.onload = () => resolve();
+		link.onerror = () => reject(new Error(`CSS load error for ${url}`));
+		document.head.appendChild(link);
+	});
 }
 
 export class SpinePlayerEditor {
@@ -82,7 +82,7 @@ body { margin: 0px; }
 		this.load();
 	}
 
-	private async load() {
+	private async load () {
 		await Promise.all([loadScript("https://www.unpkg.com/[email protected]/lib/codemirror.js"), loadCss("https://www.unpkg.com/[email protected]/lib/codemirror.css")]);
 		this.render(this.parent);
 	}