Arbitrary Google Swiffy Canvas Size / Off Screen Rendering

后端 未结 3 400
隐瞒了意图╮
隐瞒了意图╮ 2020-12-11 11:31

I\'m using Swiffy to render onto a hidden canvas so that I can take the result and use it elsewhere. The problem I\'m running into is that when I resize the container div fo

相关标签:
3条回答
  • 2020-12-11 11:44

    If i get the problem correctly, for rendering larger than the original swiffy you can put swiffy in a div and scale it

    To have swiffy restrict to its original output scale as from flash, you can place it in an iframe

    0 讨论(0)
  • 2020-12-11 11:46

    If your swiffy runtime version is 7.3, you can hack the js directly.

    Just remove or comment "b.xj(c);" in g.Tp() function. I don't care any advantage of offscreen rendering. At least, it works now.

    I think it's a serious bug.

    Note that it's good in iframe, no need to hack.

    0 讨论(0)
  • 2020-12-11 11:51

    The only way I could figure out how to do it is to edit the Swiffy runtime and replace all instances of window.innerWidth and window.innerHeight with whatever size I wanted.

    No ill side affects that I could see, though this is obliviously less than ideal.

    If someone comes up with a better solution I'll absolutely accept it.

    0 讨论(0)
提交回复
热议问题