Presentation
doc = document(name="LCSS animation presentation")doc.add(page(src="presentation.lay", name="入场与翻转"))doc.add(page(src="second.lay", name="区域揭示"))/* Original Animate.css 4.1.1, imported without rewriting. */@import "@laymesh/animate.css";.title-motion { --animate-duration: 800ms; }.draw-motion { animation: laymesh-draw 1200ms ease both; }.reveal-motion { animation: laymesh-reveal 1s ease both; }page = canvas(size=(160mm, 90mm), stylesheet="motion.lcss", background="#f4f5f9")title = page.add(text("研究结果 · Results", class="title-motion", font_size=24pt), offset=(12mm, 12mm))card = page.add(rect(size=(48mm, 30mm), fill="#3978d4", border_color="none"), offset=(12mm, 35mm))label = page.add(text("LCSS + Animate.css", font_size=13pt), offset=(74mm, 42mm))curve = page.add(line(length=69mm, line_color="#3978d4", line_width=2pt), offset=(74mm, 58mm))s1 = page.step(name="标题入场 · Title", hold=1s)s1.animate(title, class="animate__animated animate__fadeInUp")s2 = page.step(name="三维翻转 · Flip", hold=1s)s2.animate(card, class="animate__animated animate__flipInY")s2.animate(label, class="animate__animated animate__fadeInRight", delay=200ms)s3 = page.step(name="描线 · Draw", hold=1s)s3.animate(curve, class="draw-motion")s4 = page.step(name="强调 · Emphasis", hold=1s)s4.animate(title, class="animate__animated animate__pulse", duration=600ms)page = canvas(size=(100mm, 100mm), stylesheet="motion.lcss", background="#eef5f2")title = page.add(text("第二页 · Page 2", font_size=20pt), offset=(12mm, 18mm))card = page.add(rect(size=(55mm, 40mm), fill="#2e8b69", border_color="none"), offset=(20mm, 40mm))s1 = page.step(name="区域揭示 · Reveal", hold=1s)s1.animate(title, class="animate__animated animate__fadeIn")s1.animate(card, class="reveal-motion", delay=200ms)预览
背景
正在准备动画…
依赖文件
examples/animation/motion.lcssexamples/animation/presentation.layexamples/animation/presentation.laydocexamples/animation/second.lay
复现
laymesh validate examples/animation/presentation.laydoclaymesh render examples/animation/presentation.laydoc -o figure.svg --page 1laymesh render examples/animation/presentation.laydoc -o figure.pdflaymesh render examples/animation/presentation.laydoc -o figure.png --dpi 300 --page 1