mirror of
https://github.com/photonstorm/phaser
synced 2024-11-14 00:47:29 +00:00
New plugin build
This commit is contained in:
parent
8a934fe7c4
commit
9adde867d4
2 changed files with 45 additions and 8 deletions
49
plugins/spine/dist/SpinePlugin.js
vendored
49
plugins/spine/dist/SpinePlugin.js
vendored
|
@ -10655,6 +10655,8 @@ var SpineGameObject = new Class({
|
||||||
this.state = null;
|
this.state = null;
|
||||||
this.stateData = null;
|
this.stateData = null;
|
||||||
|
|
||||||
|
this.bounds = null;
|
||||||
|
|
||||||
this.drawDebug = false;
|
this.drawDebug = false;
|
||||||
|
|
||||||
this.timeScale = 1;
|
this.timeScale = 1;
|
||||||
|
@ -10735,6 +10737,47 @@ var SpineGameObject = new Class({
|
||||||
|
|
||||||
var renderer = this.scene.sys.renderer;
|
var renderer = this.scene.sys.renderer;
|
||||||
|
|
||||||
|
/*
|
||||||
|
var height = renderer.height;
|
||||||
|
|
||||||
|
var oldScaleX = this.scaleX;
|
||||||
|
var oldScaleY = this.scaleY;
|
||||||
|
|
||||||
|
skeleton.x = this.x;
|
||||||
|
skeleton.y = height - this.y;
|
||||||
|
skeleton.scaleX = 1;
|
||||||
|
skeleton.scaleY = 1;
|
||||||
|
|
||||||
|
skeleton.updateWorldTransform();
|
||||||
|
|
||||||
|
this.skeleton = skeleton;
|
||||||
|
|
||||||
|
this.root = this.getRootBone();
|
||||||
|
|
||||||
|
skeleton.updateWorldTransform();
|
||||||
|
|
||||||
|
var b = this.getBounds();
|
||||||
|
|
||||||
|
// this.width = b.size.x;
|
||||||
|
// this.height = b.size.y;
|
||||||
|
|
||||||
|
this.width = skeleton.data.width;
|
||||||
|
this.height = skeleton.data.height;
|
||||||
|
|
||||||
|
this.displayOriginX = this.x - b.offset.x;
|
||||||
|
this.displayOriginY = this.y - (height - (this.height + b.offset.y));
|
||||||
|
|
||||||
|
// console.log(this.width, this.height);
|
||||||
|
// console.log(b.size.x, b.size.y);
|
||||||
|
// console.log(b.offset.x, b.offset.y);
|
||||||
|
// console.log(this.displayOriginX, this.displayOriginY);
|
||||||
|
|
||||||
|
skeleton.scaleX = oldScaleX;
|
||||||
|
skeleton.scaleY = oldScaleY;
|
||||||
|
|
||||||
|
skeleton.updateWorldTransform();
|
||||||
|
*/
|
||||||
|
|
||||||
var height = renderer.height;
|
var height = renderer.height;
|
||||||
|
|
||||||
var oldScaleX = this.scaleX;
|
var oldScaleX = this.scaleX;
|
||||||
|
@ -10749,12 +10792,6 @@ var SpineGameObject = new Class({
|
||||||
|
|
||||||
this.root = this.getRootBone();
|
this.root = this.getRootBone();
|
||||||
|
|
||||||
if (this.root)
|
|
||||||
{
|
|
||||||
// - 90 degrees to account for the difference in Spine vs. Phaser rotation
|
|
||||||
this.root.rotation = RadToDeg(CounterClockwise(this.rotation - 1.5707963267948966));
|
|
||||||
}
|
|
||||||
|
|
||||||
skeleton.updateWorldTransform();
|
skeleton.updateWorldTransform();
|
||||||
|
|
||||||
var b = this.getBounds();
|
var b = this.getBounds();
|
||||||
|
|
2
plugins/spine/dist/SpinePlugin.js.map
vendored
2
plugins/spine/dist/SpinePlugin.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue