LayMeshDocs
中文

Timing

Full source
timing.lay
page = canvas(size=(120mm,65mm), stylesheet="@laymesh/animate.css", background="#ffffff")title = page.add(text("Title", font_size=6mm), target=page.top_left, offset=(12mm,8mm))chart = page.add(rect(size=(45mm,25mm), fill="#0d6efd"), target=title.bottom_left, offset=(0mm,9mm))note = page.add(text("Conclusion", font_size=4mm), target=chart.middle_right, anchor=middle_left, offset=(11mm,0mm))first = page.step(name="Title and chart", hold=500ms)first.animate(title, class="animate__animated animate__fadeInUp", duration=600ms)first.animate(chart, name="laymesh-reveal", duration=800ms, fill="both", start="with-previous")first.animate(note, class="animate__animated animate__fadeIn", duration=400ms, start="after-previous", delay=200ms)second = page.step(name="Emphasis", start="after-previous", hold=1s)second.animate(title, class="animate__animated animate__pulse", duration=800ms)

Preview

Background
Preparing animation…
Timing
Preparing preview…
Total —
Details

Not run yet

Measured in this browser; excludes debounce.

Edits stay on this page
Dependencies
  • examples/animation/timing.lay

Reproduce

sh
laymesh validate examples/animation/timing.laylaymesh render examples/animation/timing.lay -o figure.svglaymesh render examples/animation/timing.lay -o figure.pdflaymesh render examples/animation/timing.lay -o figure.png --dpi 300