INNER CODE UNIT · Python
renderLottie
OpenVGLab/OmniLottie · app.py:544
function renderLottie() {{
try {{
if (typeof lottie === 'undefined') {{
setTimeout(renderLottie, 100);
return;
}}
var animationData = JSON.parse('{animation_json_escaped}');
lottie.loadAnimation({{
container: document.getElementById('lottie-animation'),
renderer: 'svg',
loop: true,
autoplay: true,
animationData: animationData
}});
}} catch (e) {{
console.error('Lottie render error:', e);
document.getElementById('lottie-container').innerHTML =
'<p class="error">Failed: ' + e.message + '</p>';