summaryrefslogtreecommitdiff
path: root/2d/softbody/softbody_2.html.content
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-01-22 13:03:12 -0500
committermattkae <mattkae@protonmail.com>2022-01-22 13:03:12 -0500
commit19defa9be56588803bbae0f38e2f271a91b9d690 (patch)
tree92bd58290432c747b670883dbde7cbe5aed83fed /2d/softbody/softbody_2.html.content
parentdce6e971023d6c4bc849641c10db5d65ce5fad55 (diff)
Rendering the square for the spring rectangle
Diffstat (limited to '2d/softbody/softbody_2.html.content')
-rw-r--r--2d/softbody/softbody_2.html.content65
1 files changed, 65 insertions, 0 deletions
diff --git a/2d/softbody/softbody_2.html.content b/2d/softbody/softbody_2.html.content
new file mode 100644
index 0000000..ecbdf67
--- /dev/null
+++ b/2d/softbody/softbody_2.html.content
@@ -0,0 +1,65 @@
+<script src="./softbody_2/dist/output.js"></script>
+<script>
+ window.onload = function() {
+ // -- Play/Stop Logic
+ function addButtonListener(pPlay, pStop, pDisableElementList) {
+ var lPlayElement = document.getElementById(pPlay),
+ lStopElement = document.getElementById(pStop);
+ lPlayElement.addEventListener('click', function() {
+ lPlayElement.style.display = 'none';
+ lStopElement.style.display = 'block';
+
+ pDisableElementList.forEach(function(element) {
+ element.disabled = true;
+ });
+ });
+ lStopElement.addEventListener('click', function() {
+ lStopElement.style.display = 'none';
+ lPlayElement.style.display = 'block';
+
+ pDisableElementList.forEach(function(element) {
+ element.disabled = false;
+ });
+ });
+ }
+
+ addButtonListener('gl_canvas_play', 'gl_canvas_stop', [
+
+ ]);
+
+ // -- Add callbacks for sliders
+ Module.onRuntimeInitialized = function() {
+ };
+ }
+
+</script>
+<article>
+ <h1></h1>
+ <section>
+ <p>
+
+ </p>
+ </section>
+ <section>
+ <h2>
+ Live Example
+ </h2>
+ <p>
+ <div class="opengl_canvas_container">
+ <canvas id="gl_canvas" width="800" height="600"></canvas>
+ <button id="gl_canvas_play" class="play_button">
+ Play
+ </button>
+ <button id="gl_canvas_stop" class="stop_button">
+ Stop
+ </button>
+ </div>
+ </section>
+
+ <footer id='references'>
+ <h2>References</h2>
+ <ul>
+ <li></li>
+ </ul>
+ </footer>
+</article>