mouseRow

Read-only property that retrieves the quadrille row under the current mouse position — computed against where this quadrille was last drawn.

Warning

  1. mouseRow is computed from the position and cellLength this quadrille was last drawn with — drawQuadrille captures them per call. Before any draw, origin defaults apply (0, 0, Quadrille.cellLength).
  2. It isn't constrained to lie in [0..height] — guard with isValid.
  3. To query positions other than the last-drawn one, use screenRow instead.

Example

edit, then run

Syntax

number = quadrille.mouseRow

What this page's examples use
p5.quadrille
drawQuadrille createQuadrille cellLength mouseRow
p5.js
createCanvas background text

Names the analysis can prove are called, and the line each one is documented on. Local variables and members of an unknown receiver are left out.