Skip to content

Commit 9adde86

Browse files
committed
New plugin build
1 parent 8a934fe commit 9adde86

2 files changed

Lines changed: 45 additions & 8 deletions

File tree

plugins/spine/dist/SpinePlugin.js

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10655,6 +10655,8 @@ var SpineGameObject = new Class({
1065510655
this.state = null;
1065610656
this.stateData = null;
1065710657

10658+
this.bounds = null;
10659+
1065810660
this.drawDebug = false;
1065910661

1066010662
this.timeScale = 1;
@@ -10734,7 +10736,48 @@ var SpineGameObject = new Class({
1073410736
}
1073510737

1073610738
var renderer = this.scene.sys.renderer;
10737-
10739+
10740+
/*
10741+
var height = renderer.height;
10742+
10743+
var oldScaleX = this.scaleX;
10744+
var oldScaleY = this.scaleY;
10745+
10746+
skeleton.x = this.x;
10747+
skeleton.y = height - this.y;
10748+
skeleton.scaleX = 1;
10749+
skeleton.scaleY = 1;
10750+
10751+
skeleton.updateWorldTransform();
10752+
10753+
this.skeleton = skeleton;
10754+
10755+
this.root = this.getRootBone();
10756+
10757+
skeleton.updateWorldTransform();
10758+
10759+
var b = this.getBounds();
10760+
10761+
// this.width = b.size.x;
10762+
// this.height = b.size.y;
10763+
10764+
this.width = skeleton.data.width;
10765+
this.height = skeleton.data.height;
10766+
10767+
this.displayOriginX = this.x - b.offset.x;
10768+
this.displayOriginY = this.y - (height - (this.height + b.offset.y));
10769+
10770+
// console.log(this.width, this.height);
10771+
// console.log(b.size.x, b.size.y);
10772+
// console.log(b.offset.x, b.offset.y);
10773+
// console.log(this.displayOriginX, this.displayOriginY);
10774+
10775+
skeleton.scaleX = oldScaleX;
10776+
skeleton.scaleY = oldScaleY;
10777+
10778+
skeleton.updateWorldTransform();
10779+
*/
10780+
1073810781
var height = renderer.height;
1073910782

1074010783
var oldScaleX = this.scaleX;
@@ -10748,12 +10791,6 @@ var SpineGameObject = new Class({
1074810791
this.skeleton = skeleton;
1074910792

1075010793
this.root = this.getRootBone();
10751-
10752-
if (this.root)
10753-
{
10754-
// - 90 degrees to account for the difference in Spine vs. Phaser rotation
10755-
this.root.rotation = RadToDeg(CounterClockwise(this.rotation - 1.5707963267948966));
10756-
}
1075710794

1075810795
skeleton.updateWorldTransform();
1075910796

plugins/spine/dist/SpinePlugin.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)