News for hackers. Stuff that matters.
Re:The Book of Shaders by erickhill on Friday June 12, 2020 @11:19AM (#23500112)
Whatever you do don’t try to zoom in on the text with your phone. I did that and the site had a virtual seizure - so bad I had to refresh the page and resign myself to tiny text.
Re:The Book of Shaders by YPCrumble on Friday June 12, 2020 @11:49AM (#23500418)
Can someone explain how they managed to do this? I've never seen anything like it!

Perhaps all the text is rendered via JS and re-rendering in an infinite loop where the CSS switches the padding of the div surrounding the text back and forth by ~5px at each point in the loop?

Re:The Book of Shaders by softfalcon on Friday June 12, 2020 @12:27PM (#23500830)
It could definitely be in an infinite loop if it's running a webgl context.

Many (including myself) have tied into window.requestAnimationFrame(...) recursively forever.

This lets the page breathe, but always call back into your main game loop to update the webgl render context/canvas.

Re:The Book of Shaders by bitshiffed on Friday June 12, 2020 @08:51PM (#23505605)
I can’t even scroll the page. Go to the bottom and back up, then it won’t stop shaking.
Re:The Book of Shaders by microcolonel on Friday June 12, 2020 @11:59AM (#23500513)
Guess you're on an iPhone? Seems to work fine in Brave on Android.
Re:The Book of Shaders by justwalt on Friday June 12, 2020 @12:11PM (#23500644)
I’m on an iPhone and it worked fine for me as well.