fabricjs

Difference between Fabric Canvas and StaticCanvas


Can anyone explain the difference and purpose of Canvas and Static Canvas in Fabric JS. I'm really confused with the both topic!


Solution

  • StaticCanvas has no interactive layer and no event handling. You can't drag objects around, draw, register clicks, etc.

    StaticCanvas is used when you only need to render a scene or when handling user interaction is impossible, e.g. rendering canvas on the server side.