Skip to content
This repository has been archived by the owner on Mar 25, 2019. It is now read-only.

Draw to Tiled Canvas #27

Open
karai17 opened this issue Mar 23, 2015 · 3 comments
Open

Draw to Tiled Canvas #27

karai17 opened this issue Mar 23, 2015 · 3 comments

Comments

@karai17
Copy link
Member

karai17 commented Mar 23, 2015

Okay so here is the basic idea:

  • Divide canvas into a grid
  • Determine which cell(s) an element belongs to at any given time
  • If any changes occur to an element, declare the cell(s) invalid
  • Redraw any invalid cells

Anything that could affect the visual status of a cell would make it invalid, such as an animation, an element moving, an element scrolling, etc etc etc.

@s-ol
Copy link

s-ol commented Apr 4, 2015

You should maybe call this "Spatial Dirty-Flagging" or something, I confused this with Tiled/mapeditor at first.

@Bobbyjoness
Copy link

Doesn't have a potential to make all cells be marked as invalid any way do to a resize or something similar?

@karai17
Copy link
Member Author

karai17 commented May 2, 2015

I haven't quite decided how I will do this yet, but I will have an option to flag the whole DOM for redrawing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants