File tree Expand file tree Collapse file tree
v3/src/renderer/webgl/batches Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,6 +144,8 @@ BlitterBatch.prototype = {
144144 var uvs = frame . uvs ;
145145 var width = frame . width ;
146146 var height = frame . height ;
147+ x += frame . x
148+ y += frame . y
147149
148150 vertexBuffer [ vertexOffset ++ ] = x ;
149151 vertexBuffer [ vertexOffset ++ ] = y ;
Original file line number Diff line number Diff line change @@ -146,8 +146,8 @@ SpriteBatch.prototype = {
146146 var uvs = frame . uvs ;
147147 var width = frame . width ;
148148 var height = frame . height ;
149- var x = width * - anchorX ;
150- var y = height * - anchorY ;
149+ var x = width * - anchorX + frame . x ;
150+ var y = height * - anchorY + frame . y ;
151151
152152 vertexBufferF32 [ vertexOffset ++ ] = x ;
153153 vertexBufferF32 [ vertexOffset ++ ] = y ;
Original file line number Diff line number Diff line change @@ -150,8 +150,8 @@ SpriteBatch32.prototype = {
150150 var uvs = frame . uvs ;
151151 var width = frame . width ;
152152 var height = frame . height ;
153- var x = width * - anchorX ;
154- var y = height * - anchorY ;
153+ var x = width * - anchorX + frame . x ;
154+ var y = height * - anchorY + frame . y ;
155155
156156 vertexBufferF32 [ vertexOffset ++ ] = x ;
157157 vertexBufferF32 [ vertexOffset ++ ] = y ;
You can’t perform that action at this time.
0 commit comments