From 2a3b86adfdf48dd423f4ed56d20e5c3e24d55744 Mon Sep 17 00:00:00 2001 From: Abhinna Adhikari Date: Mon, 22 Mar 2021 10:29:47 -0400 Subject: [PATCH 1/2] Add run_server.sh for linux machines --- run_server.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 run_server.sh diff --git a/run_server.sh b/run_server.sh new file mode 100644 index 0000000..8711815 --- /dev/null +++ b/run_server.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +export FLASK_APP=pserver +export FLASK_ENV=development +mkdir logs +mkdir summaries +mkdir plots +flask run \ No newline at end of file From 63a30e258c096d7c96e2a22992a91eb2347f8364 Mon Sep 17 00:00:00 2001 From: Abhinna Adhikari Date: Mon, 22 Mar 2021 13:23:09 -0400 Subject: [PATCH 2/2] Clear the canvas everytime in drawEntities function --- static/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/index.js b/static/js/index.js index 04b6f78..b046663 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -70,7 +70,6 @@ function resumeSimulation(){ function animateLoop(){ animateFrameReqId = requestAnimationFrame(animateLoop); - ctx.clearRect(0,0,canvas.width, canvas.height); running = true; // Draw the entities @@ -167,6 +166,7 @@ function animateLoop(){ function drawEntities(entities){ // Draws a list of entities to the canvas + ctx.clearRect(0,0,canvas.width, canvas.height); for(let entity of entities){ entity.draw(); }