Skip to content

Commit

Permalink
Added version 1.3.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
xam4lor committed Mar 21, 2020
1 parent 1e02bc0 commit c5e9b8e
Show file tree
Hide file tree
Showing 5 changed files with 1,025 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "physics-simulation-engine",
"version": "1.3.2",
"version": "1.3.4",
"description": "A Simulation Engine for Physics Simulation",
"main": "./build/pSEngine.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/core/Simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ class pSimulator {
x : 0,
y : 0
},
backgroundColor : { r : 0 , g : 0 , b : 0 },
backgroundColor : {
draw : true,
color : { r : 0 , g : 0 , b : 0 }
},
gridColor : { r : 255, g : 255, b : 255, a : 0.6 },
displayGrid : true // true : display graph on the screen
}
Expand Down
6 changes: 4 additions & 2 deletions src/drawer/Plotter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ class pSPlotter {

draw() {
let plConf = this.simulator.config.engine.plotter;
let bg = plConf.backgroundColor;
let bg = plConf.backgroundColor.color;

background(bg.r, bg.g, bg.b);
if(plConf.backgroundColor.draw) {
background(bg.r, bg.g, bg.b);
}

// Draw every object to the screen
for (let i = 0; i < this.objectsL.length; i++)
Expand Down
Loading

0 comments on commit c5e9b8e

Please sign in to comment.