summaryrefslogtreecommitdiff
path: root/2d/softbody/softbody_2.html.content
diff options
context:
space:
mode:
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>