Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jestanoff
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
jestanoff
6y ago
May be it is something small as dividing the width by 2 and setting a lower milliseconds value for the setinterval so it runs the checks more often. Essentially this is the same solution as in the post, just stripped down to the bare minimu
2.
▲
by
jestanoff
6y ago
I don't like the length of their solution, quite the same logic can be shortened to just a few lines of code setInterval(() => { const { currentSpeed, horizon: { obstacles: [{ xPos, width, yPos } = {}] } } = Runner?.instance_;