Skip to content

Commit 9a131e1

Browse files
build
1 parent 68faa95 commit 9a131e1

6 files changed

Lines changed: 26 additions & 10 deletions

File tree

dist/littlejs.esm.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4094,9 +4094,13 @@ function drawTile(pos, size=vec2(1), tileInfo, color=WHITE,
40944094
}
40954095
else
40964096
{
4097-
// if no tile info, force untextured (white 1x1 fallback texture)
4097+
// if no tile info, force untextured by zeroing rgba (so whatever
4098+
// texture is bound doesn't leak in) and folding color+additive
4099+
// into the additive slot — matches the Canvas2D path's
4100+
// color.add(additiveColor) on line ~337.
4101+
const combined = additiveColor ? color.add(additiveColor) : color;
40984102
glDraw(pos.x, pos.y, size.x, size.y, angle, 0, 0, 0, 0,
4099-
color.rgbaInt(), additiveColor && additiveColor.rgbaInt());
4103+
0, combined.rgbaInt());
41004104
}
41014105
}
41024106
else

dist/littlejs.esm.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/littlejs.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4094,9 +4094,13 @@ function drawTile(pos, size=vec2(1), tileInfo, color=WHITE,
40944094
}
40954095
else
40964096
{
4097-
// if no tile info, force untextured (white 1x1 fallback texture)
4097+
// if no tile info, force untextured by zeroing rgba (so whatever
4098+
// texture is bound doesn't leak in) and folding color+additive
4099+
// into the additive slot — matches the Canvas2D path's
4100+
// color.add(additiveColor) on line ~337.
4101+
const combined = additiveColor ? color.add(additiveColor) : color;
40984102
glDraw(pos.x, pos.y, size.x, size.y, angle, 0, 0, 0, 0,
4099-
color.rgbaInt(), additiveColor && additiveColor.rgbaInt());
4103+
0, combined.rgbaInt());
41004104
}
41014105
}
41024106
else

dist/littlejs.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/littlejs.release.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3414,9 +3414,13 @@ function drawTile(pos, size=vec2(1), tileInfo, color=WHITE,
34143414
}
34153415
else
34163416
{
3417-
// if no tile info, force untextured (white 1x1 fallback texture)
3417+
// if no tile info, force untextured by zeroing rgba (so whatever
3418+
// texture is bound doesn't leak in) and folding color+additive
3419+
// into the additive slot — matches the Canvas2D path's
3420+
// color.add(additiveColor) on line ~337.
3421+
const combined = additiveColor ? color.add(additiveColor) : color;
34183422
glDraw(pos.x, pos.y, size.x, size.y, angle, 0, 0, 0, 0,
3419-
color.rgbaInt(), additiveColor && additiveColor.rgbaInt());
3423+
0, combined.rgbaInt());
34203424
}
34213425
}
34223426
else

src/engineDraw.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,13 @@ function drawTile(pos, size=vec2(1), tileInfo, color=WHITE,
312312
}
313313
else
314314
{
315-
// if no tile info, force untextured (white 1x1 fallback texture)
315+
// if no tile info, force untextured by zeroing rgba (so whatever
316+
// texture is bound doesn't leak in) and folding color+additive
317+
// into the additive slot — matches the Canvas2D path's
318+
// color.add(additiveColor) on line ~337.
319+
const combined = additiveColor ? color.add(additiveColor) : color;
316320
glDraw(pos.x, pos.y, size.x, size.y, angle, 0, 0, 0, 0,
317-
color.rgbaInt(), additiveColor && additiveColor.rgbaInt());
321+
0, combined.rgbaInt());
318322
}
319323
}
320324
else

0 commit comments

Comments
 (0)