MoonBit 原生高性能 Lottie 动画引擎 | High-performance Lottie animation engine in native MoonBit
| Document | Description |
|---|---|
| Architecture | Layered design and rendering strategy for Moon Lottie. |
| Completion Status | Fulfillment of the original project proposal. |
| Roadmap | Near-term priorities, develop strategy, and long-term directions. |
| Path | Description |
|---|---|
| lib/ | The Core: Parsing, modeling, and platform-agnostic rendering. |
| cmd/player_runtime | Wasm-GC and JS bridge for browser environments. |
| cmd/cli | Unified CLI for SVG export and console rendering. |
| packages/ | Official wrappers for Vanilla JS, React, and Web Components. |
| demo/ | The project site (Preview, Playground, and features). |
| packages/examples/ | Standalone integration examples to verify SDK behavior. |
moon update
npm install
moon testmoon update
npm install# Automatically builds MoonBit core and syncs products
npm run dev# Full build process (core compilation, package sync, site, and examples)
npm run build:deploymoon add cg-zhou/moon_lottieimport { MoonLottiePlayer } from '@moon-lottie/react'
function App() {
return (
<MoonLottiePlayer
src="/animation.json"
autoplay
wasmPath="/runtime/wasm/moon-lottie-runtime.wasm"
/>
)
}# Print basic animation info
moon run cmd/cli -- ./samples/5_fireworks.json
# Play the animation in the terminal
moon run cmd/cli -- play ./samples/5_fireworks.json
# Export frames as SVG files
moon run cmd/cli -- svg ./samples/5_fireworks.json -o ./output_framesInstall
Download zipMoonBit 原生高性能 Lottie 动画引擎 | High-performance Lottie animation engine in native MoonBit