Skip to content

Commit cf6d216

Browse files
author
bungcip
committed
use pull request rpgtkoolmv/corescript#112
1 parent 2e53a06 commit cf6d216

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ts/rpg_core/ShaderTilemap.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
// we need this constant for some platforms (Samsung S4, S5, Tab4, HTC One H8)
44
PIXI.glCore.VertexArrayObject.FORCE_NATIVE = true;
5-
6-
/// bungcip: di pixijs 4.5 default udah nggak ada...
7-
(PIXI.GC_MODES as any).DEFAULT = PIXI.GC_MODES.AUTO;
8-
5+
PIXI.settings.GC_MODE = PIXI.GC_MODES.AUTO; //btw, this is default setting
96
PIXI.tilemap.TileRenderer.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;
7+
PIXI.tilemap.TileRenderer.DO_CLEAR = true;
108

119
/**
1210
* The tilemap which displays 2D tile-based game map using shaders
@@ -36,8 +34,8 @@ class ShaderTilemap extends Tilemap {
3634
protected _hackRenderer(renderer: PIXI.WebGLRenderer) {
3735
var af = this.animationFrame % 4;
3836
if (af == 3) af = 1;
39-
(renderer.plugins as any).tile.tileAnim[0] = af * this._tileWidth;
40-
(renderer.plugins as any).tile.tileAnim[1] = (this.animationFrame % 3) * this._tileHeight;
37+
(renderer.plugins as any).tilemap.tileAnim[0] = af * this._tileWidth;
38+
(renderer.plugins as any).tilemap.tileAnim[1] = (this.animationFrame % 3) * this._tileHeight;
4139
return renderer;
4240
};
4341

0 commit comments

Comments
 (0)