Skip to content

Commit c5e9b8e

Browse files
committed
Added version 1.3.4.
1 parent 1e02bc0 commit c5e9b8e

File tree

5 files changed

+1025
-4
lines changed

5 files changed

+1025
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "physics-simulation-engine",
3-
"version": "1.3.2",
3+
"version": "1.3.4",
44
"description": "A Simulation Engine for Physics Simulation",
55
"main": "./build/pSEngine.js",
66
"scripts": {

src/core/Simulator.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ class pSimulator {
162162
x : 0,
163163
y : 0
164164
},
165-
backgroundColor : { r : 0 , g : 0 , b : 0 },
165+
backgroundColor : {
166+
draw : true,
167+
color : { r : 0 , g : 0 , b : 0 }
168+
},
166169
gridColor : { r : 255, g : 255, b : 255, a : 0.6 },
167170
displayGrid : true // true : display graph on the screen
168171
}

src/drawer/Plotter.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ class pSPlotter {
1515

1616
draw() {
1717
let plConf = this.simulator.config.engine.plotter;
18-
let bg = plConf.backgroundColor;
18+
let bg = plConf.backgroundColor.color;
1919

20-
background(bg.r, bg.g, bg.b);
20+
if(plConf.backgroundColor.draw) {
21+
background(bg.r, bg.g, bg.b);
22+
}
2123

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

0 commit comments

Comments
 (0)