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
I have a lottie JSON file animation created with AE + BodyMovin.
I am using lottie-web, see the "demo" folder in the attached zip file.
The animation works fine with the svg renderer.
However, it doesn't work with the canvas renderer, resulting in a blank canvas created on the page without any console errors or other useful information.
Possible Solution
Using the plain "demo" version of the animation in the zip file and turning on Pause on uncaught exceptions & Pause on caught exceptions:
revealed the following errors thrown but not reported anywhere in console:
TypeError: Cannot read properties of null (reading 'length')
This error is thrown within the getCharData: function (e, r, i) {... function. See here:
I don't have enough knowledge about lottie to conclude what the issue here is. Although, changing the function to just return emptyChar eliminate these errors and make the animation render fine with canvas renderer, but all texts layers are omitted.
How to reproduce:
Please just use the attached zip, demo folder, html file, change the line renderer: 'svg', to renderer: 'canvas',.
Expected Behavior
The animation should work with the canvas renderer the same way it works for svg. Text are not special layers, should be supported well by both renderers. If it fails to render with one of the renderers, it should not fail silently but with some error logging or other error-catching mechanisms for developers to investigate further. Eg: I feel that the JSON here has some fonts issue with canvas, but again, it is only assumption and having some error data from lottie would be much helpful to conclude.
Actual Behavior
A blank empty canvas element is created in HTML, and the animation doesn't work.
Environment
Browser Versions
After Effects Version
Description
I have a lottie JSON file animation created with AE + BodyMovin.
I am using lottie-web, see the "demo" folder in the attached zip file.
The animation works fine with the
svg
renderer.However, it doesn't work with the
canvas
renderer, resulting in a blank canvas created on the page without any console errors or other useful information.Possible Solution
Using the plain "demo" version of the animation in the zip file and turning on
Pause on uncaught exceptions
&Pause on caught exceptions
:revealed the following errors thrown but not reported anywhere in console:
This error is thrown within the
getCharData: function (e, r, i) {...
function. See here:I don't have enough knowledge about lottie to conclude what the issue here is. Although, changing the function to just return
emptyChar
eliminate these errors and make the animation render fine withcanvas
renderer, but all texts layers are omitted.How to reproduce:
Please just use the attached zip,
demo
folder, html file, change the linerenderer: 'svg',
torenderer: 'canvas',
.Expected Behavior
The animation should work with the canvas renderer the same way it works for svg. Text are not special layers, should be supported well by both renderers. If it fails to render with one of the renderers, it should not fail silently but with some error logging or other error-catching mechanisms for developers to investigate further. Eg: I feel that the JSON here has some fonts issue with canvas, but again, it is only assumption and having some error data from lottie would be much helpful to conclude.
Actual Behavior
A blank empty canvas element is created in HTML, and the animation doesn't work.
After Effects File
animation zip
The text was updated successfully, but these errors were encountered: