You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the dotlottie-web package allows users to control the devicePixelRatio (DPR) through the renderConfig option. By default, it uses the machine's full DPR, which can lead to unnecessary resource usage without any noticeable improvement in animation quality, especially on high-DPI screens.
To provide better default rendering performance out-of-the-box, it is recommended to set the default DPR to 75% of the machine's DPR. This change will offer a balanced trade-off between rendering quality and performance, ensuring smoother animations.
Proposed Changes:
Adjust the default devicePixelRatio in RenderConfig to window.devicePixelRatio * 0.75 or 0.75, whichever is lower.
Adjust the default devicePixelRatio in RenderConfig to window.devicePixelRatio * 0.7 or 0.7, whichever is lower.
@theashraf Leaving this, Just in case. The result will be 0.7 when the DPR is 1. The main idea is to adjust the resolution when the DPR is higher (for more effective on smaller LED diodes).
Please check where the ThorVG player’s default DPR is set for guaranting dpr is 1 or higher than it.
dpr = 1 + ((window.devicePixelRatio - 1) * 0.75x; //assume window dpr is 1 or higher than it.
theashraf
changed the title
perf(web): set default DPR to 70% of machine's DPR
perf(web): set default DPR to 75% of machine's DPR
Aug 20, 2024
Currently, the dotlottie-web package allows users to control the devicePixelRatio (DPR) through the
renderConfig
option. By default, it uses the machine's full DPR, which can lead to unnecessary resource usage without any noticeable improvement in animation quality, especially on high-DPI screens.To provide better default rendering performance out-of-the-box, it is recommended to set the default DPR to 75% of the machine's DPR. This change will offer a balanced trade-off between rendering quality and performance, ensuring smoother animations.
Proposed Changes:
Adjust the default devicePixelRatio in RenderConfig to window.devicePixelRatio * 0.75 or 0.75, whichever is lower.
cc @hermet
The text was updated successfully, but these errors were encountered: