Is it possible to change ratio dynamically?
danielcampagne opened this issue · 1 comments
In order to reach a better performance on retina I would like to set the ratio only on certain points of my animation. Could anybody tell me if it is possible? Just using blotter.ratio = 1
after the blotter setup doesn't seem to work.
Thank you again!
unfortunately I dont think you could do that in a performant way. To get the ratio change to go into effect, you can do blotter.needsUpdate = true
(see the docs), but it is unadvisable that you do this very often, as it literally means rebuilding all the objects required by the blotter instance.
There is potentially a performance hack you can use, but it totally depends on your application, and is definitely a hack, but in some cases looks nice: you can scale down your text by some ratio (say half size) by setting the font size to something smaller, and then scale up the blotter canvas by the same ratio you scaled it down using css (something like width: auto; height: <whatever>
or vice versa).
Sorry that's probably your best option for now. GPU stuff can make a big load on the browser.