When I inspected code behind beautiful graphics there was canvas and I wondered what they are. Now it’s clearer and I want to learn more to use it in my project.
While I'd love to use offscreencanvas and I'm thankful that chrome team is so fast to implement new features (notice this is available since v69) the browser compatibility is very poor and it's not polyfillable
@@shilangyu and the flag only enables WebGL, not 2d context, according to caniuse.com. But it looks 'polyfillable' to me. If OffscreenCanvas does not exist on the global scope, create a normal canvas element. It doesn't even need to be added to the DOM. Am i missing something?
A prime use case for what's described seems to be dynamic font fitting. Get a fonts width in the background if doesn't *fill* an area's width change the font size instead of scaling.
Great was making a personal project to get image and edit it using canvas, now i can use offscreenCanvas to improve its performance,. One doubt as I am new to canvas, if I download image the css filter applied to it is not present on time of download, have read documents and understood that it's just layer above canvas wich gets css properties and to change in canvas itself need to change each pixel at a time. Can anyone suggest any other way to achieve this? As it's slow
When I inspected code behind beautiful graphics there was canvas and I wondered what they are. Now it’s clearer and I want to learn more to use it in my project.
While I'd love to use offscreencanvas and I'm thankful that chrome team is so fast to implement new features (notice this is available since v69) the browser compatibility is very poor and it's not polyfillable
Apparently firefox has offscreencanvas too, but the user has to manually enable it, so it's almost as good as not having it at all
@@ZoranRavic yeah exactly, it's under a flag for devs not average users
@@shilangyu and the flag only enables WebGL, not 2d context, according to caniuse.com. But it looks 'polyfillable' to me. If OffscreenCanvas does not exist on the global scope, create a normal canvas element. It doesn't even need to be added to the DOM. Am i missing something?
It is fully available on firefox today, since the v 105. I made a test, it works
A prime use case for what's described seems to be dynamic font fitting. Get a fonts width in the background if doesn't *fill* an area's width change the font size instead of scaling.
Now we have to wait for module imports in workers. And this thing will finally become usable.
And I mean support not only from chrome...
@@the-old-channel would be better if there was a better standard that all browsers would get together and use. Frontend is such an annoyance.
I heard that input to the canvas is more complex since it's offscreen. Would like to see a video on how to do that.
one of the more interesting soundbites
Great was making a personal project to get image and edit it using canvas, now i can use offscreenCanvas to improve its performance,.
One doubt as I am new to canvas, if I download image the css filter applied to it is not present on time of download, have read documents and understood that it's just layer above canvas wich gets css properties and to change in canvas itself need to change each pixel at a time. Can anyone suggest any other way to achieve this? As it's slow
Update method "messureText" already available with 4 properties everywhere? Or only in Chrome? Example WebView android?!
It's good to know these features are coming. Will canvas eventually become competitive with webgl?
web 3D is da future
please bring back the flag: #try-supported-channel-layouts
Video starts at 01:55