Skip to content

Commit 84bf2e5

Browse files
committed
lint fix
1 parent c3524b3 commit 84bf2e5

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

src/textures/CanvasTexture.js

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,17 +242,25 @@ var CanvasTexture = new Class({
242242
if (x === undefined) { x = 0; }
243243
if (y === undefined) { y = 0; }
244244

245-
var frame = this.manager.getFrame(key, frame);
245+
var textureFrame = this.manager.getFrame(key, frame);
246246

247-
if (frame)
247+
if (textureFrame)
248248
{
249-
var cd = frame.canvasData;
250-
251-
var frameWidth = frame.cutWidth;
252-
var frameHeight = frame.cutHeight;
253-
var res = frame.source.resolution;
254-
255-
this.context.drawImage(frame.source.image, cd.x, cd.y, frameWidth, frameHeight, x, y, frameWidth / res, frameHeight / res);
249+
var cd = textureFrame.canvasData;
250+
251+
var width = textureFrame.cutWidth;
252+
var height = textureFrame.cutHeight;
253+
var res = textureFrame.source.resolution;
254+
255+
this.context.drawImage(
256+
textureFrame.source.image,
257+
cd.x, cd.y,
258+
width,
259+
height,
260+
x, y,
261+
width / res,
262+
height / res
263+
);
256264

257265
return this.update();
258266
}

0 commit comments

Comments
 (0)