Thread
1y ago
Scaling Artboards in the low level web api
What is the proper way to scale artboards when using the low level web api?
I've tried calling renderer.transform
with a Mat2D
with xx
and yy
set to 0.5
, but that had no effect.
I've tried getting the root node of my artboard and setting the scale on that, but the result is blurry.
const root = artboard.node('Root'); root.scaleX = 0.5; root.scaleY = 0.5; // Scaled, but blurry.
I've also tried renderer.scale(0.5, 0.5)
which works even though "Property 'scale' does not exist on type 'WrappedRenderer'." The animation also appears blurry in this case.
1 reply
J
J
1y ago
I'm curious, have you tried using the align function in the example documentation and setting the artboard to be smaller?
https://rive.app/community/doc/low-level-api-usage/doctAfBY6v3P
For me, renderer.scale works but only on elements that are not bound to bones. The rest do nothing.