Skip to content

Commit

Permalink
Merge pull request #13 from ben9583/0.4.1
Browse files Browse the repository at this point in the history
Release 0.4.1
  • Loading branch information
ben9583 authored Jun 18, 2022
2 parents 481325a + 370a595 commit 15c6016
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "solar-sim"
version = "0.4.0"
version = "0.4.1"
authors = ["Ben Plate <bplate9583@gmail.com>"]
edition = "2018"
description = "Physics simulator written in Rust WASM for use in Solar Sim website"
Expand Down
60 changes: 31 additions & 29 deletions website-src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,40 @@
<button id="spawn">Spawn</button>
</div>

<p>Settings:</p>
<div style="color:white;float:left;padding-right:25px">
<p>Trail quality:</p>
<div>
<input type="radio" id="highTrailQuality" name="trailQuality" value="high" checked="checked"/>
<label for="highTrailQuality">High</label><br />
<input type="radio" id="mediumTrailQuality" name="trailQuality" value="medium" />
<label for="mediumTrailQuality">Medium</label><br />
<input type="radio" id="lowTrailQuality" name="trailQuality" value="low" />
<label for="lowTrailQuality">Low</label><br />
<input type="radio" id="noneTrailQuality" name="trailQuality" value="none" />
<label for="noneTrailQuality">None</label><br />
<div style="color:white;">
<p style="margin-bottom:0">Settings:</p>
<div style="float:left;padding-right:25px">
<p>Trail quality:</p>
<div>
<input type="radio" id="highTrailQuality" name="trailQuality" value="high" checked="checked"/>
<label for="highTrailQuality">High</label><br />
<input type="radio" id="mediumTrailQuality" name="trailQuality" value="medium" />
<label for="mediumTrailQuality">Medium</label><br />
<input type="radio" id="lowTrailQuality" name="trailQuality" value="low" />
<label for="lowTrailQuality">Low</label><br />
<input type="radio" id="noneTrailQuality" name="trailQuality" value="none" />
<label for="noneTrailQuality">None</label><br />
</div>
</div>
</div>
<div style="color:white;float:left;padding-right:25px">
<p>Simulation Accuracy:</p>
<div>
<input type="radio" id="highSimAccuracy" name="simAccuracy" value="high" />
<label for="highSimAccuracy">High</label><br />
<input type="radio" id="mediumSimAccuracy" name="simAccuracy" value="medium" checked="checked" />
<label for="mediumSimAccuracy">Medium</label><br />
<input type="radio" id="lowSimAccuracy" name="simAccuracy" value="low" />
<label for="lowSimAccuracy">Low</label><br />
<div style="color:white;float:left;padding-right:25px">
<p>Simulation Accuracy:</p>
<div>
<input type="radio" id="highSimAccuracy" name="simAccuracy" value="high" />
<label for="highSimAccuracy">High</label><br />
<input type="radio" id="mediumSimAccuracy" name="simAccuracy" value="medium" checked="checked" />
<label for="mediumSimAccuracy">Medium</label><br />
<input type="radio" id="lowSimAccuracy" name="simAccuracy" value="low" />
<label for="lowSimAccuracy">Low</label><br />
</div>
</div>
</div>
<div style="clear:left;height:50px"></div>
<div style="clear:left;height:50px"></div>

<input type="checkbox" id="debug" /><span style="color:white">Enable Debug (slightly lowers performance)</span>
<div id="debugSection" style="color:white">
<p># of bodies: <span id="numBodies">6</span></p>
<p>Simulation tick time: <span id="simTickTime">10</span><span>μs</span></p>
<p>Draw tick time: <span id="drawTickTime">10</span><span>μs</span></p>
<input type="checkbox" id="debug" /><span style="color:white">Enable Debug (slightly lowers performance)</span>
<div id="debugSection" style="color:white">
<p># of bodies: <span id="numBodies">6</span></p>
<p>Simulation tick time: <span id="simTickTime">10</span><span>μs</span></p>
<p>Draw tick time: <span id="drawTickTime">10</span><span>μs</span></p>
</div>
</div>

<script src="./bootstrap.js"></script>
Expand Down
2 changes: 2 additions & 0 deletions website-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ highSimAccuracyElem.addEventListener("click", (elem, e) => { SolarSim.set_simula
mediumSimAccuracyElem.addEventListener("click", (elem, e) => { SolarSim.set_simulation_accuracy(0.2, 5) })
lowSimAccuracyElem.addEventListener("click", (elem, e) => { SolarSim.set_simulation_accuracy(1.0, 1) })

highSimAccuracyElem.checked ? SolarSim.set_simulation_accuracy(0.05, 20) : lowSimAccuracyElem.checked ? SolarSim.set_simulation_accuracy(1.0, 1) : "";

let playing = true;
let tickTime = performance.now();

Expand Down
4 changes: 2 additions & 2 deletions website-src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion website-src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solar-sim-app",
"version": "0.4.0",
"version": "0.4.1",
"description": "Creates the Solar Sim website.",
"main": "index.js",
"scripts": {
Expand Down
5 changes: 5 additions & 0 deletions website-src/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ div#canvasContainer {
position: relative;
width: 1280px;
height: 720px;
margin-top: 10px;
margin-bottom: 10px;
border-width: 1px;
border-style: solid;
border-color: #454545;
}

canvas#scene {
Expand Down

0 comments on commit 15c6016

Please sign in to comment.