aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.html1
-rw-r--r--scattering.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/index.html b/index.html
index 6f4562d..3d1741f 100644
--- a/index.html
+++ b/index.html
@@ -28,6 +28,7 @@ Angle: <input type="number" value="-45" step="any" id="angleControl" />
<option value="putWave">Place Plane Wave</option>
<option value="putAtom">Place Atom</option>
</select>
+<canvas id="canvas" />
</p>
</body>
</html>
diff --git a/scattering.js b/scattering.js
index 14fbcad..792c818 100644
--- a/scattering.js
+++ b/scattering.js
@@ -589,7 +589,7 @@ var sim;
function setup() {
document.getElementById("speedControl").value=100;
frameRate(30);
- createCanvas(800, 600);
+ createCanvas(800, 600, document.getElementById("canvas"));
fill(0);
sim = new Simulation();
}