Formatting.

This commit is contained in:
Mario Zechner 2023-04-24 10:11:14 +02:00
parent 4ca219668e
commit cf68a9fd07
4 changed files with 20 additions and 20 deletions

View File

@ -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. */

View File

@ -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
}

View File

@ -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) {

View File

@ -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;
}
}
}