You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moving the color boundary is slow (around 2 seconds) because each movement requires changing the style of 400-800 divs, and 202 of these are redrawing the boundary itself (a CSS border added to 102 divs and removed from 102 divs).
There are a lot of ways to improve the sluggishness; one easy fix could be making the boundary its own div that floats on top of or underneath the Astropaint screen.
Some day, it might make sense to move to HTML5 canvas, but having each pixel be a div has benefits as well (namely, easily recoloring by div class), and it'll be a lot of work to refactor just to improve the speed on this one feature. Open to suggestions and PRs!
The text was updated successfully, but these errors were encountered:
Moving the color boundary is slow (around 2 seconds) because each movement requires changing the style of 400-800 divs, and 202 of these are redrawing the boundary itself (a CSS border added to 102 divs and removed from 102 divs).
There are a lot of ways to improve the sluggishness; one easy fix could be making the boundary its own div that floats on top of or underneath the Astropaint screen.
Some day, it might make sense to move to HTML5 canvas, but having each pixel be a div has benefits as well (namely, easily recoloring by div class), and it'll be a lot of work to refactor just to improve the speed on this one feature. Open to suggestions and PRs!
The text was updated successfully, but these errors were encountered: