News for hackers. Stuff that matters.
Re:WebAssembly Studio by skrebbel on Thursday December 31, 2020 @11:33AM (#25594145)
Something similar but also totally different is https://makepad.nl/ - a graphics programming IDE in Rust, for Rust, targeting the browser.

It's a totally different use case but there's some similarities, somehow, anyway.

Unlike this app, its actually all WASM and the author frequently tweets about how he feels more productive building a web UI in Rust than he would HTML+CSS+JS. And you can say what you want, the thing is damn snappy.

Re:WebAssembly Studio by skrebbel on Thursday December 31, 2020 @06:55PM (#25598773)
EDIT-but-can't-edit-anymore:

I just noticed that https://makepad.dev/ hosts a different version that I think is newer. Skip the .nl one.

Re:WebAssembly Studio by bestinterest on Thursday December 31, 2020 @02:44PM (#25596322)
Is it just me that finds all the text rendering on this page really bad?
Re:WebAssembly Studio by asiachick on Thursday December 31, 2020 @09:29PM (#25600219)
It is, and it only supports ASCII so anyone who wants to write comments or text in Chinese, Japan, Korean, Thai, Arabic, etc can GTFO :(
Re:WebAssembly Studio by sgzfx on Thursday December 31, 2020 @03:46PM (#25596929)
Definitely not, it does not look pleasant to me either. At first I thought it was just the small font size, but I noticed it on the "Edit" page as well.
Re:WebAssembly Studio by Alexendoo on Thursday December 31, 2020 @05:26PM (#25597893)
Everything is rendered directly to a canvas, at the very least it lacks subpixel rendering
Re:WebAssembly Studio by ijiafiusdiuf87 on Friday January 01, 2021 @12:08AM (#25601034)
One can use the Freetype library to render beautifully sharp text directly to a canvas with gamma-correct subpixel alpha coverage. Why this Rust website uses such blurry fonts, I don't know, it reminds me of playing an OpenGL/DirectX video game where the text is rendered using cached texture-filtered quads: maybe good enough for game UI, but not for intensive reading.
Re:WebAssembly Studio by colejohnson66 on Thursday December 31, 2020 @10:13PM (#25600483)
For those wondering why: subpixel rendering requires knowing the subpixel layout of the display. It’s something your OS knows, but your web browser doesn’t tell the website.
Re:WebAssembly Studio by brianush1 on Friday January 01, 2021 @02:32PM (#25605992)
Also for those wondering how you can get subpixel AA on your canvases anyway: if you use a classic 2d rendering context (not WebGL), you can use canvas.getContext("2d", {alpha: false}) to create a canvas with a fully opaque background, which will also cause fillText to render with subpixel AA on most browsers.
Re:WebAssembly Studio by adamnemecek on Thursday December 31, 2020 @07:58PM (#25599424)
What has good text rendering?
Re:WebAssembly Studio by preommr on Thursday December 31, 2020 @06:44PM (#25598669)
> And you can say what you want, the thing is damn snappy.

It's horribly slow on my computer, animations and scrolling happen at like 5fps. It also sends my cpu usage through the roof.

Re:WebAssembly Studio by batmansmk on Thursday December 31, 2020 @09:11PM (#25600103)
You have to activate hardware acceleration. And it will be the snappiest you ever saw.
Re:WebAssembly Studio by preommr on Friday January 01, 2021 @05:42AM (#25602291)
ah, that did the trick. You're right, it really is snappy. Kind of crazy how smooth it is.
Re:WebAssembly Studio by skrebbel on Thursday December 31, 2020 @06:52PM (#25598740)
I think it's all WebGL UIs. Maybe somehow your WebGL gets simulated on the CPU?
Re:WebAssembly Studio by machello13 on Thursday December 31, 2020 @09:46PM (#25600329)
Uh, what about accessibility?
Re:WebAssembly Studio by pjmlp on Thursday December 31, 2020 @11:36AM (#25594177)
Interesting, thanks for sharing.
Re:WebAssembly Studio by cheapsteak on Thursday December 31, 2020 @06:03PM (#25598238)
Curious whether source maps and breakpoints still work?
Re:WebAssembly Studio by emteycz on Thursday December 31, 2020 @06:56PM (#25598776)
Yes that's a possibility actually the experience should be even better than with sourcemapped JS. There was a demo of Wasm debugger on HN frontpage not a long time ago.