Hi again, i broke couple of walls banging my head, trying to figure out this one.
In example below, initial animation works fine, than after it ends, you can click dark area and from that event wave spreads out on all squares, thats ok, but i wan't to limit spread area to only (x) squares from square that was at epicenter of this wave, so i can't figure out how to limit animation to portion of whole array, array is drawn on canvas in this sequence
[0,5,10,20,etc
1,6,11,21,etc
2,7,12,22,etc
3,8,13,23,etc
4,9,14,24,etc]
array named 'tiles' hold all objects, function 'reanim' is called to start onClick animation.
x_elem is an number telling us how many squares are in x axis.
y_elem is an number telling us how many squares are in y axis
i did try, slicing array, limiting grid to numbers, i eaven did endArray which slowed down browser to crawl.
Best option was clearing array and making new one that consisted of selected squares, but any onther square outside of selected range was not shown.
All of this is inside 'reanim' function