Skip to content

Commit

Permalink
adds the restitution coefficient to the debugging panel
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagombp committed Apr 12, 2024
1 parent 493843d commit ea9ac09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ cv.addEventListener('mouseout', mouseout);
const sensitivity = 10;
let particle_being_dragged;

let mode = "dragging"

function mousedown(e) {

//console.log(e);
Expand Down Expand Up @@ -211,6 +213,7 @@ class VectorMainToggle extends Toggle {
const slider_stiffness = new Slider("STIFFNESS", 'k');
const slider_damping = new Slider("DAMPING", 'damping');
const slider_vel_damping = new Slider("VEL_DAMPING");
const slider_restitution_coefficient = new Slider("RESTITUTION_COEFFICIENT");
const slider_timestep = new Slider("TIMESTEP");
const slider_gravity = new Slider("GRAVITY");
const slider_mass = new Slider("MASS");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
<span class="input-VEL_DAMPING-value">0</span>
</div>

<div class="wrapper-input">
<label for="input-RESTITUTION_COEFFICIENT">Collision Restitution Coefficient</label>
<input type="range" name="input-RESTITUTION_COEFFICIENT" id="input-RESTITUTION_COEFFICIENT" min="0" step="0.1" max="1">
<span class="input-RESTITUTION_COEFFICIENT-value">0</span>
</div>

<div class="wrapper-input">
<label for="input-MASS">Particle mass</label>
<input type="range" name="input-MASS" id="input-MASS" min="0.1" step="0.1" max="5">
Expand Down

0 comments on commit ea9ac09

Please sign in to comment.