Skip to content

Commit

Permalink
[melonjs#915] fix internal reference to me.pool
Browse files Browse the repository at this point in the history
  • Loading branch information
obiot committed Sep 3, 2020
1 parent 3c636f5 commit 6447986
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/level/tiled/TMXTileMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ export default class TMXTileMap {
}
// convert to melonJS renderable argument name
if (typeof (settings.tintcolor) !== "undefined") {
settings.tint = me.pool.pull("me.Color");
settings.tint = pool.pull("me.Color");
settings.tint.parseHex(settings.tintcolor, true);
}

Expand Down
4 changes: 2 additions & 2 deletions src/video/texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class Texture {
var height = image.height;

// calculate the sprite count (line, col)
var spritecount = me.pool.pull("me.Vector2d",
var spritecount = pool.pull("me.Vector2d",
~~((width - margin + spacing) / (data.framewidth + spacing)),
~~((height - margin + spacing) / (data.frameheight + spacing))
);
Expand Down Expand Up @@ -264,7 +264,7 @@ export class Texture {
this.addUvsMap(atlas, name, width, height);
}

me.pool.push(spritecount);
pool.push(spritecount);

return atlas;
}
Expand Down
7 changes: 4 additions & 3 deletions src/video/webgl/webgl_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import TextureCache from "./../texture_cache.js";
import {Texture, createAtlas } from "./../texture.js";
import video from "./../video.js";
import event from "./../../system/event.js";
import pool from "./../../system/pooling.js";
import { isPowerOfTwo, nextPowerOfTwo, TAU } from "./../../math/math.js";


Expand Down Expand Up @@ -342,7 +343,7 @@ class WebGLRenderer extends Renderer {
this.currentColor.copy("#000000");
this.fillRect(x, y, width, height);
this.currentColor.copy(color);
me.pool.push(color);
pool.push(color);
}

/**
Expand Down Expand Up @@ -581,8 +582,8 @@ class WebGLRenderer extends Renderer {
this.currentTransform.copy(matrix);

// recycle objects
me.pool.push(color);
me.pool.push(matrix);
pool.push(color);
pool.push(matrix);
}

if (this._scissorStack.length !== 0) {
Expand Down

0 comments on commit 6447986

Please sign in to comment.