Skip to content
ExamplesOpen editor ↗

phetogoYaPebaY

→ movedY

How far the mouse moved up or down since the previous frame.

phetogoYaPebaY

The twin of phetogoYaPebaX. It is negative when the mouse went up and positive when it went down — because on a canvas pebaY grows downwards.

Like its twin, it is not pebaY - pebaYEFetileng — it comes from the browser’s movementY, measured in screen pixels rather than canvas pixels, and it is reset to zero at the end of every frame. phetogoYaPebaX’s page carries the measurement.

Drag upwards to thicken the line
diri bokete = 8;

tiro setaLoeto() {
  thalaKanefase(400, 240);
  tlhalosa('Mothalo o o tsepameng mo bogareng o bokete jwa ona bo fetolwang ka go goga peba kwa godimo le kwa tlase.');
}

tiro tshwantsha() {
  bokamorago(240);
  mothaloMmala(190, 90, 70);
  boketeMothalo(bokete);
  thalaMothalo(80, 120, 320, 120);
}

tiro pebaEGogilwe() {
  bokete = thibela(bokete - phetogoYaPebaY, 1, 60);
}

phetogoYaPebaX, pebaYEFetileng, pebaY, pebaEGogilwe