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
What this system aims is to provide a performant way to iterate through stars for hovering animations;
The idea is the following:
Create a grid of chunks of 64 x 64 pixels.
Assign stars to a chunk depending on its position grid[(star.x / 64) | 0][(star.y / 64) | 0] .
For star finding algorithm look on the chunk on which the pointer is on grid[(p.x / 64) | 0][(p.y / 64) | 0] and look on nearby chunks depending on if the look-up distance is outside of the main chunk bounds.
The text was updated successfully, but these errors were encountered:
What this system aims is to provide a performant way to iterate through stars for hovering animations;
The idea is the following:
64 x 64
pixels.grid[(star.x / 64) | 0][(star.y / 64) | 0]
.grid[(p.x / 64) | 0][(p.y / 64) | 0]
and look on nearby chunks depending on if the look-up distance is outside of the main chunk bounds.The text was updated successfully, but these errors were encountered: