What’s new in Canvas - Offscreen Canvas and Text Metric use cases (Chrome Dev Summit 2019)

Поділитися
Вставка
  • Опубліковано 23 сер 2024

КОМЕНТАРІ • 18

  • @shintanishino720
    @shintanishino720 4 роки тому +5

    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.

  • @shilangyu
    @shilangyu 4 роки тому +15

    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

    • @ZoranRavic
      @ZoranRavic 4 роки тому +1

      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

    • @shilangyu
      @shilangyu 4 роки тому

      @@ZoranRavic yeah exactly, it's under a flag for devs not average users

    • @MacoveiVlad
      @MacoveiVlad 4 роки тому

      @@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?

    • @chougaghil
      @chougaghil Рік тому

      It is fully available on firefox today, since the v 105. I made a test, it works

  • @TheNewton
    @TheNewton 4 роки тому

    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.

  • @the-old-channel
    @the-old-channel 4 роки тому +3

    Now we have to wait for module imports in workers. And this thing will finally become usable.

    • @the-old-channel
      @the-old-channel 4 роки тому

      And I mean support not only from chrome...

    • @GameFuMaster
      @GameFuMaster 4 роки тому

      @@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.

  • @AdamsTaiwan
    @AdamsTaiwan 4 роки тому

    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.

  • @joebazooks
    @joebazooks 4 роки тому +1

    one of the more interesting soundbites

  • @abhishekpratap05
    @abhishekpratap05 3 роки тому

    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

  • @hagwe
    @hagwe 4 роки тому

    Update method "messureText" already available with 4 properties everywhere? Or only in Chrome? Example WebView android?!

  • @davidjournot1741
    @davidjournot1741 4 роки тому

    It's good to know these features are coming. Will canvas eventually become competitive with webgl?

  • @kirklayer2023
    @kirklayer2023 4 роки тому

    web 3D is da future

  • @mebusvang6892
    @mebusvang6892 4 роки тому

    please bring back the flag: #try-supported-channel-layouts

  •  4 роки тому

    Video starts at 01:55