aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2023-10-13 20:57:02 +0000
committerGravatar Peter McGoron 2023-10-13 20:57:02 +0000
commit136d554738104aa7fe5abc83f36cf4be1dafe1d7 (patch)
tree26fcee1d469518f24200da627d6cd78183c0230f
parentchange wording (diff)
use set canvasHEADmaster
-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();
}