T
12d ago

How to detect device viewport size? (Responsive breakpoints)

Is there a way to detect the device viewport size in Rive? For example, if its less then 560 wide then show a mobile version of animation. Thanks.

2 replies
T
12d ago

Is not possible to detect the size in Rive at this moment.

T
11d ago

OK is it possible to pass an input value from Javascript to Rive and do it that way... for example, in Javascript I check if browser width is less than 560, if it is I send an input with the number '2'. In Rive, if it receives an input of 2 then show a different animation. I am not exactly sure how to code this but that would be the idea. Any ideas?