Arbitrary Google Swiffy Canvas Size / Off Screen Rendering

后端 未结 3 411
隐瞒了意图╮
隐瞒了意图╮ 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: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.

提交回复
热议问题