How do I embed a bodymovin exported file to be responsive, yet keep the correct aspect ratio of logo and fonts, and fit to the boarders of my website? Any ideas?
Thank you in advance
You can play around with the preserveAspectRatio setting of the renderer. pass it as a param when you load the animation:
bodymovin.loadAnimation({
container: element,
renderer: 'svg',
loop: true,
autoplay: true,
path: 'path/to/the/json',
rendererSettings: {
preserveAspectRatio: 'xMidYMid meet'
}
});
I guess what you want here is preserveAspectRatio: 'xMidYMid slice'