holywyvern / mv-pixi-upgrade

A base project than uses PIXI V3 and not V2.
Creative Commons Zero v1.0 Universal
13 stars 3 forks source link

Shader Tilemap Plugin - Change Tileset Event Command #13

Open caladier opened 8 years ago

caladier commented 8 years ago

Not certain if this should be here or with PIXI Tilemap, but the shader tilemap plugin does not currently render an updated map when the Change Tileset Event command is issued. I found a working solution, unless there is a better way, I added a boolean parameter to force refresh of the shader tilemap.

ShaderTilemap.prototype.refresh = function(force){
 var force = force || false;
 if (this._lastBitmapLength != this.bitmaps.length || force)

Also added the Spriteset_Map.prototype.loadTileset function utilizing the forced refresh. This way the plugin responds to the RPG Maker event command as a developer would expect.