File tree Expand file tree Collapse file tree
plugins/spine/src/gameobject Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,10 +138,13 @@ var SpineGameObject = new Class({
138138
139139 var height = renderer . height ;
140140
141+ var oldScaleX = this . scaleX ;
142+ var oldScaleY = this . scaleY ;
143+
141144 skeleton . x = this . x ;
142145 skeleton . y = height - this . y ;
143- skeleton . scaleX = this . scaleX ;
144- skeleton . scaleY = this . scaleY ;
146+ skeleton . scaleX = 1 ;
147+ skeleton . scaleY = 1 ;
145148
146149 this . skeleton = skeleton ;
147150
@@ -157,15 +160,17 @@ var SpineGameObject = new Class({
157160
158161 var b = this . getBounds ( ) ;
159162
160- var sx = 1 / this . scaleX ;
161- var sy = 1 / this . scaleY ;
162-
163- this . width = b . size . x * sx ;
164- this . height = b . size . y * sy ;
163+ this . width = b . size . x ;
164+ this . height = b . size . y ;
165165
166- this . displayOriginX = ( this . x - b . offset . x ) * sx ;
166+ this . displayOriginX = this . x - b . offset . x ;
167167 this . displayOriginY = this . y - ( height - ( this . height + b . offset . y ) ) ;
168168
169+ skeleton . scaleX = oldScaleX ;
170+ skeleton . scaleY = oldScaleY ;
171+
172+ skeleton . updateWorldTransform ( ) ;
173+
169174 return this ;
170175 } ,
171176
You can’t perform that action at this time.
0 commit comments