emisaPoapoeletso
Halts the
tshwantshaloop 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.
Syntax
Section titled “Syntax”emisaPoapoeletso()Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 400);
}
tiro tshwantsha() {
bokamorago(220);
tlatsaMmala(0, 120, 200);
kgolokwe(200, 200, 150);
emisaPoapoeletso();
}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();
}
}See also
Section titled “See also”simololaPoapoeletso, boemoJwaPoapoeletso, tshwantshaGape, tshwantsha