summaryrefslogtreecommitdiff
path: root/2d/softbody/softbody_2.html.content
blob: ecbdf67215e8b385c703d1be9019f7460ede3092 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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>