diff --git a/spine-godot/spine_godot/SpineSkeleton.cpp b/spine-godot/spine_godot/SpineSkeleton.cpp index 9685d34569..ffbcbb40a7 100644 --- a/spine-godot/spine_godot/SpineSkeleton.cpp +++ b/spine-godot/spine_godot/SpineSkeleton.cpp @@ -115,7 +115,7 @@ Ref SpineSkeleton::find_bone(const String &name) { if (EMPTY(name)) return nullptr; auto bone = skeleton->findBone(SPINE_STRING_TMP(name)); if (!bone) return nullptr; - if (_cached_bones.count(bone) > 0 ) { + if (_cached_bones.count(bone) > 0) { return _cached_bones[bone]; } Ref bone_ref(memnew(SpineBone)); @@ -129,7 +129,7 @@ Ref SpineSkeleton::find_slot(const String &name) { if (EMPTY(name)) return nullptr; auto slot = skeleton->findSlot(SPINE_STRING_TMP(name)); if (!slot) return nullptr; - if (_cached_slots.count(slot) > 0 ) { + if (_cached_slots.count(slot) > 0) { return _cached_slots[slot]; } Ref slot_ref(memnew(SpineSlot)); diff --git a/spine-godot/spine_godot/SpineSkeleton.h b/spine-godot/spine_godot/SpineSkeleton.h index 19256d5d56..2d479177e5 100644 --- a/spine-godot/spine_godot/SpineSkeleton.h +++ b/spine-godot/spine_godot/SpineSkeleton.h @@ -68,8 +68,8 @@ class SpineSkeleton : public REFCOUNTED { spine::Vector bounds_vertex_buffer; Ref last_skin; - std::unordered_map> _cached_bones; - std::unordered_map> _cached_slots; + std::unordered_map> _cached_bones; + std::unordered_map> _cached_slots; public: SpineSkeleton(); diff --git a/spine-godot/spine_godot/SpineSlot.cpp b/spine-godot/spine_godot/SpineSlot.cpp index 71c9fdfa43..067efe269c 100644 --- a/spine-godot/spine_godot/SpineSlot.cpp +++ b/spine-godot/spine_godot/SpineSlot.cpp @@ -59,10 +59,9 @@ void SpineSlot::set_to_setup_pose() { Ref SpineSlot::get_data() { SPINE_CHECK(get_spine_object(), nullptr) - if(_data.is_valid()) { + if (_data.is_valid()) { return _data; - } - else { + } else { auto &slot_data = get_spine_object()->getData(); Ref slot_data_ref(memnew(SpineSlotData)); slot_data_ref->set_spine_object(*get_spine_owner()->get_skeleton_data_res(), &slot_data); @@ -73,10 +72,9 @@ Ref SpineSlot::get_data() { Ref SpineSlot::get_bone() { SPINE_CHECK(get_spine_object(), nullptr) - if(_bone.is_valid()) { + if (_bone.is_valid()) { return _data; - } - else { + } else { auto &bone = get_spine_object()->getBone(); Ref bone_ref(memnew(SpineBone)); bone_ref->set_spine_object(get_spine_owner(), &bone); diff --git a/spine-ts/spine-phaser/example/arcade-physics-example.html b/spine-ts/spine-phaser/example/arcade-physics-example.html index 02f4f60d8e..4187dbfdb7 100644 --- a/spine-ts/spine-phaser/example/arcade-physics-example.html +++ b/spine-ts/spine-phaser/example/arcade-physics-example.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/basic-example.html b/spine-ts/spine-phaser/example/basic-example.html index 06f0d17a12..4a1de398f4 100644 --- a/spine-ts/spine-phaser/example/basic-example.html +++ b/spine-ts/spine-phaser/example/basic-example.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/basic-vanilla-js-example.html b/spine-ts/spine-phaser/example/basic-vanilla-js-example.html index 7ee5af4c98..8834eb835e 100644 --- a/spine-ts/spine-phaser/example/basic-vanilla-js-example.html +++ b/spine-ts/spine-phaser/example/basic-vanilla-js-example.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/batching-test.html b/spine-ts/spine-phaser/example/batching-test.html index dc9390d070..11aff8a091 100644 --- a/spine-ts/spine-phaser/example/batching-test.html +++ b/spine-ts/spine-phaser/example/batching-test.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/blend-test.html b/spine-ts/spine-phaser/example/blend-test.html index ed9784dc10..dc7e97be1c 100644 --- a/spine-ts/spine-phaser/example/blend-test.html +++ b/spine-ts/spine-phaser/example/blend-test.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/bounds-test.html b/spine-ts/spine-phaser/example/bounds-test.html index d514733684..2a7eaef6f3 100644 --- a/spine-ts/spine-phaser/example/bounds-test.html +++ b/spine-ts/spine-phaser/example/bounds-test.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/camera-pipeline-test.html b/spine-ts/spine-phaser/example/camera-pipeline-test.html index 9f05a328a0..f19d6710e4 100644 --- a/spine-ts/spine-phaser/example/camera-pipeline-test.html +++ b/spine-ts/spine-phaser/example/camera-pipeline-test.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/canvas-test.html b/spine-ts/spine-phaser/example/canvas-test.html index 2cd4f25081..86340c985a 100644 --- a/spine-ts/spine-phaser/example/canvas-test.html +++ b/spine-ts/spine-phaser/example/canvas-test.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/control-bones-example.html b/spine-ts/spine-phaser/example/control-bones-example.html index 48823c1cd5..d4772cc27a 100644 --- a/spine-ts/spine-phaser/example/control-bones-example.html +++ b/spine-ts/spine-phaser/example/control-bones-example.html @@ -5,14 +5,14 @@ - + Spine Phaser Example

Control bones

- diff --git a/spine-ts/spine-phaser/example/custom-spine-object-type.html b/spine-ts/spine-phaser/example/custom-spine-object-type.html index f20882e0a1..feccee4f85 100644 --- a/spine-ts/spine-phaser/example/custom-spine-object-type.html +++ b/spine-ts/spine-phaser/example/custom-spine-object-type.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/depth-test.html b/spine-ts/spine-phaser/example/depth-test.html index 4bb71d6f5d..91d18bdf63 100644 --- a/spine-ts/spine-phaser/example/depth-test.html +++ b/spine-ts/spine-phaser/example/depth-test.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/events-example.html b/spine-ts/spine-phaser/example/events-example.html index 99b3fb7409..5894e3d95a 100644 --- a/spine-ts/spine-phaser/example/events-example.html +++ b/spine-ts/spine-phaser/example/events-example.html @@ -5,7 +5,7 @@ - + Spine Phaser Example @@ -17,7 +17,7 @@

Events example

- + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/mix-and-match-example.html b/spine-ts/spine-phaser/example/mix-and-match-example.html index fd87dedb32..35533bcaa4 100644 --- a/spine-ts/spine-phaser/example/mix-and-match-example.html +++ b/spine-ts/spine-phaser/example/mix-and-match-example.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/multi-scene-test.html b/spine-ts/spine-phaser/example/multi-scene-test.html index cb43d932f9..c22d2355ef 100644 --- a/spine-ts/spine-phaser/example/multi-scene-test.html +++ b/spine-ts/spine-phaser/example/multi-scene-test.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/example/render-to-texture-test.html b/spine-ts/spine-phaser/example/render-to-texture-test.html index 2f3aa0057e..3867e0a155 100644 --- a/spine-ts/spine-phaser/example/render-to-texture-test.html +++ b/spine-ts/spine-phaser/example/render-to-texture-test.html @@ -5,7 +5,7 @@ - + Spine Phaser Example @@ -37,7 +37,7 @@

Render to texture

} function create() { - const renderTexture = this.add.renderTexture(0, 0, 800, 600); + const renderTexture = this.add.renderTexture(400, 300, 800, 600); const spineboy = this.add.spine(400, 300, 'spineboy-data', "spineboy-atlas"); spineboy.scale = 0.5; spineboy.animationState.setAnimation(0, "walk", true); diff --git a/spine-ts/spine-phaser/example/visibility-test.html b/spine-ts/spine-phaser/example/visibility-test.html index 118f6bc6fa..9b3eedd9e9 100644 --- a/spine-ts/spine-phaser/example/visibility-test.html +++ b/spine-ts/spine-phaser/example/visibility-test.html @@ -5,7 +5,7 @@ - + Spine Phaser Example diff --git a/spine-ts/spine-phaser/src/SpinePlugin.ts b/spine-ts/spine-phaser/src/SpinePlugin.ts index e9d5cbfb1c..951bc20211 100644 --- a/spine-ts/spine-phaser/src/SpinePlugin.ts +++ b/spine-ts/spine-phaser/src/SpinePlugin.ts @@ -76,7 +76,7 @@ export class SpinePlugin extends Phaser.Plugins.ScenePlugin { private isWebGL: boolean; gl: WebGLRenderingContext | null; static gameWebGLRenderer: SceneRenderer | null = null; - get webGLRenderer(): SceneRenderer | null { + get webGLRenderer (): SceneRenderer | null { return SpinePlugin.gameWebGLRenderer; } canvasRenderer: SkeletonRenderer | null; @@ -124,7 +124,7 @@ export class SpinePlugin extends Phaser.Plugins.ScenePlugin { let self = this; let addSpineGameObject = function (this: Phaser.GameObjects.GameObjectFactory, x: number, y: number, dataKey: string, atlasKey: string, boundsProvider: SpineGameObjectBoundsProvider) { - let gameObject = new SpineGameObject(scene, self, x, y, dataKey, atlasKey, boundsProvider); + let gameObject = new SpineGameObject(this.scene, self, x, y, dataKey, atlasKey, boundsProvider); this.displayList.add(gameObject); this.updateList.add(gameObject); return gameObject;