Live data from Hacker News

Skia Canvas: Browserless implementation of the HTML Canvas drawing API for node

skia-canvas.org

11–20 of 91 posts

Re: Skia Canvas: Browserless implementation of the HTML Canvas drawing API for node

#11
post #8

Kind of strange to call it browserless as though Skia requires one to begin with. Been using the .NET Skia library in CLI and desktop applications for a while.

They're not saying Skia itself is browserless; they're saying that "Skia Canvas" is a non-browser-based implementation of what people would normally call the browser Canvas API.

Automattic created node-canvas a long time ago which was based around Cairo.

Re: Skia Canvas: Browserless implementation of the HTML Canvas drawing API for node

#13
post #5

Huh, it's more than just a rendering API: "can render to windows using an OS-native graphics pipeline and provides a browser-like UI event framework". They could add wgpu to get WebGPU support and ANGLE to get WebGL support.

That's very similar to what Qt already provides (QPainter, for raw image/windows, more sophisticated widgets with event support. Further- and this is something I've been looking for a while- they have a graphicsview that allows resolution-independent rendering of millions of objects, with events, in an larger-than-window graphics plane.

Re: Skia Canvas: Browserless implementation of the HTML Canvas drawing API for node

#15
post #7

Earlier quoted context omitted.

Node is a browserless JS engine. I don’t see why saying browserless is weird.

I don’t think anyone ever thought Node was a browser thing though

Thinking Node is related to the browser is not uncommon. They're both javascript and javascript means "browser" to a lot of (if not most) people.

Re: Skia Canvas: Browserless implementation of the HTML Canvas drawing API for node

#16
post #8

Earlier quoted context omitted.

They're not saying Skia itself is browserless; they're saying that "Skia Canvas" is a non-browser-based implementation of what people would normally call the browser Canvas API.

Automattic created node-canvas a long time ago which was based around Cairo.

Yeah that's been around for a while - I used node-canvas to generate frames to render to mp4 for my HTML canvas animation site:

https://www.superanimo.com

Looks like it would have been a lot easier if this existed back then. (haven't worked on the site for 5+ years)

Re: Skia Canvas: Browserless implementation of the HTML Canvas drawing API for node

#17
post #8

Kind of strange to call it browserless as though Skia requires one to begin with. Been using the .NET Skia library in CLI and desktop applications for a while.

They're not saying Skia itself is browserless; they're saying that "Skia Canvas" is a non-browser-based implementation of what people would normally call the browser Canvas API.

Canvas is one of the easiest browser APIs to implement because most of it maps 1:1 to PostScript-style 2D APIs.

It was created by Apple as a wrapper for CoreGraphics back around Mac OS X Tiger 10.4. (IIRC, Canvas even debuted in Apple's Dashboard widgets rather than Safari? I'm not 100% sure.)

I remember writing my own Canvas implementation around 2008-2009 using JavaScriptCore and CoreGraphics. It took maybe two days. I used it for a video application where JS plugins needed to render 2D graphics but I couldn't provide a browser engine because that would have been too slow and unpredictable for render functions that get called in the video render loop.

Re: Skia Canvas: Browserless implementation of the HTML Canvas drawing API for node

#20
Super excited to see this, it'll make writing web-compatible graphics that can also run standalone so much nicer (and without needing a compile things from source using a second scripting language to generate the code needed to compile the library for the first scripting language).

It'll also be interesting to see how well this slots into things like VS Code for live-rendering canvas code (or code that has a translation layer for running on a web canvas)

Post reply on HN