mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
Formatting
This commit is contained in:
parent
77fe988169
commit
b22d1562a7
@ -940,26 +940,26 @@ export class SkeletonBinary {
|
|||||||
}
|
}
|
||||||
const bezierCount = input.readInt(true);
|
const bezierCount = input.readInt(true);
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case PHYSICS_INERTIA:
|
case PHYSICS_INERTIA:
|
||||||
timelines.push(readTimeline1(input, new PhysicsConstraintInertiaTimeline(frameCount, bezierCount, index), 1));
|
timelines.push(readTimeline1(input, new PhysicsConstraintInertiaTimeline(frameCount, bezierCount, index), 1));
|
||||||
break;
|
break;
|
||||||
case PHYSICS_STRENGTH:
|
case PHYSICS_STRENGTH:
|
||||||
timelines.push(readTimeline1(input, new PhysicsConstraintStrengthTimeline(frameCount, bezierCount, index), 1));
|
timelines.push(readTimeline1(input, new PhysicsConstraintStrengthTimeline(frameCount, bezierCount, index), 1));
|
||||||
break;
|
break;
|
||||||
case PHYSICS_DAMPING:
|
case PHYSICS_DAMPING:
|
||||||
timelines.push(readTimeline1(input, new PhysicsConstraintDampingTimeline(frameCount, bezierCount, index), 1));
|
timelines.push(readTimeline1(input, new PhysicsConstraintDampingTimeline(frameCount, bezierCount, index), 1));
|
||||||
break;
|
break;
|
||||||
case PHYSICS_MASS:
|
case PHYSICS_MASS:
|
||||||
timelines.push(readTimeline1(input, new PhysicsConstraintMassTimeline(frameCount, bezierCount, index), 1));
|
timelines.push(readTimeline1(input, new PhysicsConstraintMassTimeline(frameCount, bezierCount, index), 1));
|
||||||
break;
|
break;
|
||||||
case PHYSICS_WIND:
|
case PHYSICS_WIND:
|
||||||
timelines.push(readTimeline1(input, new PhysicsConstraintWindTimeline(frameCount, bezierCount, index), 1));
|
timelines.push(readTimeline1(input, new PhysicsConstraintWindTimeline(frameCount, bezierCount, index), 1));
|
||||||
break;
|
break;
|
||||||
case PHYSICS_GRAVITY:
|
case PHYSICS_GRAVITY:
|
||||||
timelines.push(readTimeline1(input, new PhysicsConstraintGravityTimeline(frameCount, bezierCount, index), 1));
|
timelines.push(readTimeline1(input, new PhysicsConstraintGravityTimeline(frameCount, bezierCount, index), 1));
|
||||||
break;
|
break;
|
||||||
case PHYSICS_MIX:
|
case PHYSICS_MIX:
|
||||||
timelines.push(readTimeline1(input, new PhysicsConstraintMixTimeline(frameCount, bezierCount, index), 1));
|
timelines.push(readTimeline1(input, new PhysicsConstraintMixTimeline(frameCount, bezierCount, index), 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,25 +29,25 @@
|
|||||||
|
|
||||||
declare function CodeMirror (el: Element, config: any): void;
|
declare function CodeMirror (el: Element, config: any): void;
|
||||||
|
|
||||||
function loadScript(url: string): Promise<void> {
|
function loadScript (url: string): Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const script = document.createElement('script');
|
const script = document.createElement('script');
|
||||||
script.src = url;
|
script.src = url;
|
||||||
script.onload = () => resolve();
|
script.onload = () => resolve();
|
||||||
script.onerror = () => reject(new Error(`Script load error for ${url}`));
|
script.onerror = () => reject(new Error(`Script load error for ${url}`));
|
||||||
document.head.appendChild(script);
|
document.head.appendChild(script);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadCss(url: string): Promise<void> {
|
function loadCss (url: string): Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const link = document.createElement('link');
|
const link = document.createElement('link');
|
||||||
link.href = url;
|
link.href = url;
|
||||||
link.rel = 'stylesheet';
|
link.rel = 'stylesheet';
|
||||||
link.onload = () => resolve();
|
link.onload = () => resolve();
|
||||||
link.onerror = () => reject(new Error(`CSS load error for ${url}`));
|
link.onerror = () => reject(new Error(`CSS load error for ${url}`));
|
||||||
document.head.appendChild(link);
|
document.head.appendChild(link);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SpinePlayerEditor {
|
export class SpinePlayerEditor {
|
||||||
@ -82,7 +82,7 @@ body { margin: 0px; }
|
|||||||
this.load();
|
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")]);
|
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);
|
this.render(this.parent);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user