<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> <a href='http://www.ctaps.yu.edu.jo/physics/Courses/Phys207/Supplements/Phys207_Suppl1_SHO_Springs.pdf'> Springs in Series and Parallel </a> </li> </ul> </footer> </article>