Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
memoryleak47 committed Oct 17, 2020
1 parent b0290f2 commit dca12ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/site/src/draw/mod.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export function init() {
window.onresize = update_canvas_size
update_canvas_size()

e2.gl.enable(e2.gl.BLEND);
e2.gl.blendFunc(e2.gl.SRC_ALPHA, e2.gl.ONE_MINUS_SRC_ALPHA);
e2.gl.clearColor(0.3, 0.0, 0.0, 1.0);

tilemapmod.init();
fluidmapmod.init();
playermod.init();
Expand All @@ -15,12 +19,8 @@ export function init() {
export function draw() {
const gl = e2.gl;

gl.clearColor(0.3, 0.0, 0.0, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT);

gl.enable(gl.BLEND);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);

tilemapmod.draw();
fluidmapmod.draw();
playermod.draw();
Expand Down

0 comments on commit dca12ac

Please sign in to comment.