summaryrefslogtreecommitdiff
path: root/frontend/rigidbody.html
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-02-07 19:22:56 -0500
committerMatthew Kosarek <mattkae@protonmail.com>2021-02-07 19:22:56 -0500
commitcc6d3871008a89fcf48814596d7bfec05f2706e4 (patch)
tree993ce66cc5a3c96841dc52fea60df873ff2f3469 /frontend/rigidbody.html
parent376e1a7f9207fffb1ec3027ac1e7f32db5de4922 (diff)
Added rotational dynamics to the examples
Diffstat (limited to 'frontend/rigidbody.html')
-rw-r--r--frontend/rigidbody.html25
1 files changed, 22 insertions, 3 deletions
diff --git a/frontend/rigidbody.html b/frontend/rigidbody.html
index 510c667..2cc32b7 100644
--- a/frontend/rigidbody.html
+++ b/frontend/rigidbody.html
@@ -113,8 +113,9 @@
</ul>
<form id="rigidbody_1_force_submit_button" style="text-align: right; padding: 0.5rem;">
<div class="vec2_input_group">
- <input class="vec2_x_input" type="number" value="0"/>
- <input class="vec2_y_input" type="number" value="5000"/>
+ <label>Force Vector</label>
+ <input class="vec2_x_input" type="number" placeholder="X (Default 0)"/>
+ <input class="vec2_y_input" type="number" placeholder="Y (Default 5000 N)"/>
</div>
<input type="submit" value="Apply Force"></input>
</form>
@@ -135,7 +136,25 @@
<div id="rigidbody_2" class="opengl_canvas_container">
<canvas width="640" height="480"></canvas>
<div class="opengl_canvas_sidebar">
-
+ <ul class="opengl_value_tracker">
+ <li><b>Force:</b><span id="rigidbody_1_force_field">N/A</span></li>
+ <li><b>Acceleration:</b><span id="rigidbody_2_acceleration_field">N/A</span></li>
+ <li><b>Velocity:</b><span id="rigidbody_2_velocity_field">N/A</span></li>
+ <li><b>Position:</b><span id="rigidbody_2_position_field">N/A</span></li>
+ </ul>
+ <form id="rigidbody_2_force_submit_button" style="text-align: right; padding: 0.5rem;">
+ <div id="rigidbody_2_force_input" class="vec2_input_group">
+ <label>Force Vector</label>
+ <input class="vec2_x_input" type="number" placeholder="X (Default 0)"/>
+ <input class="vec2_y_input" type="number" placeholder="Y (Default 5000 N)"/>
+ </div>
+ <div id="rigidbody_2_position_input" class="vec2_input_group">
+ <label>Point of Application (Unit Vector)</label>
+ <input class="vec2_x_input" type="number" placeholder="X (Default 2 Root 2)"/>
+ <input class="vec2_y_input" type="number" placeholder="Y (Default 2 Root 2)"/>
+ </div>
+ <input type="submit" value="Apply Force"></input>
+ </form>
</div>
<button class="play_button">
Play