From b22d1562a74f5738be9ed47a471e83d3c6b190bc Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 6 Dec 2023 04:03:29 +0100 Subject: [PATCH] Formatting --- spine-ts/spine-core/src/SkeletonBinary.ts | 40 +++++++++++------------ spine-ts/spine-player/src/PlayerEditor.ts | 36 ++++++++++---------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/spine-ts/spine-core/src/SkeletonBinary.ts b/spine-ts/spine-core/src/SkeletonBinary.ts index 8b1961fbf1..cda72a3c8d 100644 --- a/spine-ts/spine-core/src/SkeletonBinary.ts +++ b/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)); } } } diff --git a/spine-ts/spine-player/src/PlayerEditor.ts b/spine-ts/spine-player/src/PlayerEditor.ts index c9b1d8fc29..ef513677ef 100644 --- a/spine-ts/spine-player/src/PlayerEditor.ts +++ b/spine-ts/spine-player/src/PlayerEditor.ts @@ -29,25 +29,25 @@ declare function CodeMirror (el: Element, config: any): void; -function loadScript(url: string): Promise { - 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 { + 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 { - 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 { + 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/codemirror@5.51.0/lib/codemirror.js"), loadCss("https://www.unpkg.com/codemirror@5.51.0/lib/codemirror.css")]); this.render(this.parent); }