Re: [go-nuts] Writing bitmap data to a canvas with WebAssembly

2023-11-07 Thread Kai O'Reilly
Apologies for any confusion I created. I was referring to the time spent transferring the image from Go to JS and placing it on the canvas, not the actual time it takes the browser to render the canvas, as the transfer and placing time is the only thing that can be easily controlled. On

Re: [go-nuts] Writing bitmap data to a canvas with WebAssembly

2023-11-07 Thread robert engels
Your numbers do not make sense. At 300 us a frame, it would be more than 3k frames a second - which would only be possible for an extremely tiny area. You need to include the time to produce the data when considering “render time” - otherwise you are talking apples and oranges. > On Nov 7,

[go-nuts] Writing bitmap data to a canvas with WebAssembly

2020-03-11 Thread Scott Pakin
I'm new to WebAssembly and am trying to get Go to generate a bitmapped image to display in the Web browser. Here's what I've come up with so far: func DrawPicture(this js.Value, args []js.Value) interface{} { // Create a canvas on the Web page. const width = 256 const