Skip to content

emisaPoapoeletso

Halts the tshwantsha loop so that it stops repeating.

By default p5.js calls tshwantsha about 60 times per second. Calling emisaPoapoeletso stops that repetition — whatever has already been drawn stays on the canvas, but the code inside tshwantsha no longer runs. Use simololaPoapoeletso to start the loop again, or tshwantshaGape to run tshwantsha just once. Useful for still images and for saving processing power.

When you call it inside setaLoeto, p5.js still draws exactly one frame afterwards — which is why you see a picture rather than an empty canvas.

emisaPoapoeletso()
Draw a still image once
tiro setaLoeto() {
  thalaKanefase(400, 400);
}
tiro tshwantsha() {
  bokamorago(220);
  tlatsaMmala(0, 120, 200);
  kgolokwe(200, 200, 150);
  emisaPoapoeletso();
}
Stop after ten circles
diri palo = 0;
tiro setaLoeto() {
  thalaKanefase(400, 400);
  bokamorago(220);
}
tiro tshwantsha() {
  tlatsaMmala(255, 0, 0);
  kgolokwe(palo * 40 + 20, 200, 30);
  palo = palo + 1;
  fa (palo > 9) {
    emisaPoapoeletso();
  }
}

simololaPoapoeletso, boemoJwaPoapoeletso, tshwantshaGape, tshwantsha