xxxxxxxxxx
27
//p5.teach.js
function setup() {
createCanvas(400, 400);
background(220);
scene = new Scene();
reel();
}
function draw() {
background(220);
}
async function reel() {
let tex = createTeX('\\oint H\\cdot dl = \\iint {\\color\{blue\}\{(\\nabla \\times H)\}} dS');
tex.position(30,50);
tex.size(350);
let texty = createText("Ampere Circulation Law");
texty.position(25, 50);
texty.size(35);
play(tex, 'all-at-once');
await scene.delay(3000); //waiting for 4000 ms
play(texty);
}