From cf68a9fd07ae01921426f4fc3263460e24b57c63 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Mon, 24 Apr 2023 10:11:14 +0200 Subject: [PATCH] Formatting. --- spine-c/spine-c/src/spine/SkeletonBinary.c | 2 +- spine-ts/spine-phaser/src/SpineGameObject.ts | 6 ++-- spine-ts/spine-phaser/src/SpinePlugin.ts | 2 +- spine-ts/spine-phaser/src/index.ts | 30 ++++++++++---------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/spine-c/spine-c/src/spine/SkeletonBinary.c b/spine-c/spine-c/src/spine/SkeletonBinary.c index 9bf744ee1..bb54e375d 100644 --- a/spine-c/spine-c/src/spine/SkeletonBinary.c +++ b/spine-c/spine-c/src/spine/SkeletonBinary.c @@ -1547,7 +1547,7 @@ spSkeletonData *spSkeletonBinary_readSkeletonData(spSkeletonBinary *self, const _spSkeletonBinary_setError(self, self->attachmentLoader->error1, self->attachmentLoader->error2); return NULL; } - skeletonData->skins[i] =skin; + skeletonData->skins[i] = skin; } /* Linked meshes. */ diff --git a/spine-ts/spine-phaser/src/SpineGameObject.ts b/spine-ts/spine-phaser/src/SpineGameObject.ts index 50234010d..babdd6161 100644 --- a/spine-ts/spine-phaser/src/SpineGameObject.ts +++ b/spine-ts/spine-phaser/src/SpineGameObject.ts @@ -89,12 +89,12 @@ export class SpineGameObject extends ComputedSizeMixin(DepthMixin(FlipMixin(Scro constructor (scene: Phaser.Scene, private plugin: SpinePlugin, x: number, y: number, dataKey: string, atlasKey: string, public boundsProvider: SpineGameObjectBoundsProvider = new SetupPoseBoundsProvider()) { super(scene, SPINE_GAME_OBJECT_TYPE); this.setPosition(x, y); - + this.premultipliedAlpha = this.plugin.isAtlasPremultiplied(atlasKey); this.skeleton = this.plugin.createSkeleton(dataKey, atlasKey); this.animationStateData = new AnimationStateData(this.skeleton.data); this.animationState = new AnimationState(this.animationStateData); - this.updateSize(); + this.updateSize(); } public get displayOriginX () { @@ -178,7 +178,7 @@ export class SpineGameObject extends ComputedSizeMixin(DepthMixin(FlipMixin(Scro this.skeleton.updateWorldTransform(); } - preDestroy () { + preDestroy () { // FIXME tear down any event emitters } diff --git a/spine-ts/spine-phaser/src/SpinePlugin.ts b/spine-ts/spine-phaser/src/SpinePlugin.ts index 43fad4add..2bd43ed28 100644 --- a/spine-ts/spine-phaser/src/SpinePlugin.ts +++ b/spine-ts/spine-phaser/src/SpinePlugin.ts @@ -115,7 +115,7 @@ export class SpinePlugin extends Phaser.Plugins.ScenePlugin { let makeSpineGameObject = function (this: Phaser.GameObjects.GameObjectFactory, config: SpineGameObjectConfig, addToScene: boolean) { let x = config.x ? config.x : 0; - let y = config.y ? config.y : 0; + let y = config.y ? config.y : 0; let boundsProvider = config.boundsProvider ? config.boundsProvider : undefined; let gameObject = new SpineGameObject(this.scene, self, x, y, config.dataKey, config.atlasKey, boundsProvider); if (addToScene !== undefined) { diff --git a/spine-ts/spine-phaser/src/index.ts b/spine-ts/spine-phaser/src/index.ts index e7a2f8713..8e9f26c48 100644 --- a/spine-ts/spine-phaser/src/index.ts +++ b/spine-ts/spine-phaser/src/index.ts @@ -11,21 +11,21 @@ import { SpineGameObjectConfig, SpinePlugin } from "./SpinePlugin"; import { SpineGameObject, SpineGameObjectBoundsProvider } from "./SpineGameObject"; declare global { - namespace Phaser.Loader { - export interface LoaderPlugin { - spineJson(key: string, url: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): LoaderPlugin; - spineBinary(key: string, url: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): LoaderPlugin; - spineAtlas(key: string, url: string, premultipliedAlpha?: boolean, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): LoaderPlugin; - } - } + namespace Phaser.Loader { + export interface LoaderPlugin { + spineJson (key: string, url: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): LoaderPlugin; + spineBinary (key: string, url: string, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): LoaderPlugin; + spineAtlas (key: string, url: string, premultipliedAlpha?: boolean, xhrSettings?: Phaser.Types.Loader.XHRSettingsObject): LoaderPlugin; + } + } - namespace Phaser.GameObjects { - export interface GameObjectFactory { - spine(x: number, y: number, dataKey: string, atlasKey: string, boundsProvider?: SpineGameObjectBoundsProvider): SpineGameObject; - } + namespace Phaser.GameObjects { + export interface GameObjectFactory { + spine (x: number, y: number, dataKey: string, atlasKey: string, boundsProvider?: SpineGameObjectBoundsProvider): SpineGameObject; + } - export interface GameObjectCreator { - spine(config: SpineGameObjectConfig, addToScene?: boolean): SpineGameObject; - } - } + export interface GameObjectCreator { + spine (config: SpineGameObjectConfig, addToScene?: boolean): SpineGameObject; + } + } }