Hacker News new | ask | show | jobs
by Someone 4657 days ago
I don't see the need to treat water different from earlier placed markers.

Here's how I would hack this: whenever you place an icon, draw a slighty larger circular 'lake' on top of that hidden canvas. That added lake prevents you from placing another icon in the neighborhood of that icon.

1 comments

There is a performance hit for this. Rendering the 40 markers in the provided demo takes roughly 7ms on my machine vs 25ms for the fake lake method.