airbnb / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
29.85k stars 2.85k forks source link

fix: canvas text empty shapes #3042

Open harperKKK opened 7 months ago

harperKKK commented 7 months ago

fix canvas render error when "\r" occur in text TypeError: Cannot read properties of undefined (reading 'it') at CVTextElement.buildNewText (http://127.0.0.1:5500/build/player/lottie.js:13949:55) at ITextElement.validateText (http://127.0.0.1:5500/build/player/lottie.js:11977:12) at CVTextElement.renderInnerContent (http://127.0.0.1:5500/build/player/lottie.js:13998:10) at CVTextElement.renderFrame (http://127.0.0.1:5500/build/player/lottie.js:13262:12) at CanvasRendererBase.renderFrame (http://127.0.0.1:5500/build/player/lottie.js:14459:28) at AnimationItem.renderFrame (http://127.0.0.1:5500/build/player/lottie.js:2059:21) at AnimationItem.gotoFrame (http://127.0.0.1:5500/build/player/lottie.js:2045:10) at AnimationItem.checkLoaded (http://127.0.0.1:5500/build/player/lottie.js:2016:12) at AnimationItem.waitForFontsLoaded (http://127.0.0.1:5500/build/player/lottie.js:1997:12) at AnimationItem.configAnimation (http://127.0.0.1:5500/build/player/lottie.js:1981:12)

harperKKK commented 7 months ago

data.json

harperKKK commented 7 months ago

line_break.aep.zip

lxrcan commented 4 months ago

not sure what youre asking.

it loads as a black rectangle so i dont knw if that is what its supposed to be or not. is that the render frame error you refer to?

there is a few Kanji characters in there that might be causing issues if its having trouble parsing the file?