Skip to content
ExamplesOpen editor ↗

emisaPoapoeletso

→ noLoop()

Halts the `tshwantsha` loop so that it stops repeating.

emisaPoapoeletso()

By default Bopa 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, exactly one frame is still drawn afterwards — which is why you see a picture rather than an empty canvas.

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

simololaPoapoeletso, boemoJwaPoapoeletso, tshwantshaGape, tshwantsha