Skip to content

Commit 6293233

Browse files
committed
Implemented static tilemap layer scale and tilemap alpha
1 parent a218cd5 commit 6293233

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/tilemaps/staticlayer/StaticTilemapLayer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ var StaticTilemapLayer = new Class({
289289
var ty2 = tyh;
290290
var tx3 = txw;
291291
var ty3 = ty;
292-
var tint = Utils.getTintAppendFloatAlpha(0xffffff, tile.alpha);
292+
var tint = Utils.getTintAppendFloatAlpha(0xffffff, this.alpha * tile.alpha);
293293

294294
vertexViewF32[voffset + 0] = tx0;
295295
vertexViewF32[voffset + 1] = ty0;
@@ -343,6 +343,7 @@ var StaticTilemapLayer = new Class({
343343

344344
pipeline.modelIdentity();
345345
pipeline.modelTranslate(this.x - (camera.scrollX * this.scrollFactorX), this.y - (camera.scrollY * this.scrollFactorY), 0.0);
346+
pipeline.modelScale(this.scaleX, this.scaleY, 1.0);
346347
pipeline.viewLoad2D(camera.matrix.matrix);
347348
}
348349

0 commit comments

Comments
 (0)