Hacker News new | ask | show | jobs
by Andrew_nenakhov 1659 days ago
The other day I was running a web version of Townscapes on my smartphone, and it worked beautifully and smooth. But this one is so laggy and slow that I barely could scroll to Laptop (24cm), and then just stopped.

How come a real-time 3D rendering is faster then just displaying a few 2D pictures side by side on a screen? Tech these days is weird.

3 comments

Because the page is mutating the CSS "left" property which is known to be extremely slow (should have used translate), and also creating/removing the dom elements, which is also slow. That Townscapes you saw was probably running over WebGL, you can use 2D over WebGL for the speed benefits with libraries like PixiJS (or from scratch but that's not recommended)
I had the opposite experience with both of those. Can’t run townscapes beyond the first frame render, but this site is perfectly smooth on iOS.
It seems to run with native framerate in firefox while chromium gets maybe 20fps on my laptop