MoonBit OTIO schemas, timeline semantics, algorithms, bundles and plugins
moon new moontimeline-demo
cd moontimeline-demo
moon add white-bear233/moontimeline@0.2.0import {
"white-bear233/moontimeline/time" @timeline_time,
"white-bear233/moontimeline/otio",
}
pkgtype(kind: "executable")///|
fn main {
let time = @timeline_time.RationalTime::new(48.0, 24.0).unwrap()
let converted = time.rescaled_to(30.0).unwrap()
println("48 帧 @ 24fps = \{time.to_seconds().unwrap()} 秒")
println("换算到 30fps = \{converted.value()} 帧")
}let result = @otio.read(json_text)
match result {
Ok(timeline) => println(@otio.write(timeline).unwrap())
Err(diagnostic) =>
println("读取失败 \{diagnostic.code} @ \{diagnostic.path}: \{diagnostic.message}")
}| 包 | 职责 |
|---|---|
| time / range / transform | 时间、区间关系、时码与坐标变换 |
| schema / graph | 标准对象、字段/媒体/标记 API、不可变对象图 |
| algorithms | 7 个上游公开算法入口 |
| otiojson | OTIO 数值方言、任意根、无损词法、深复制 |
| adapters / plugins | OTIOZ/OTIOD、媒体包、插件与版本清单 |
| model / otio | 兼容原有 Timeline 编辑入口 |
| timeline / validate | 布局、播放映射、转场和素材约束 |
| edit | 拆分、裁剪、Gap 与转场编辑 |
| cmd / demo | 文件命令行与浏览器演示 |
git clone https://github.com/white-bear233/MoonTimeline.git
cd MoonTimeline
git checkout v0.2.0
moon update
moon run examples/time --target js
node tools/build-js.mjs
node cmd/moontimeline.mjs inspect fixtures/valid/gap_clip.otio
node tools/serve.mjs # http://127.0.0.1:4173/demo/index.htmlnode tools/check_external_corpus.mjs # 显示支持项与拒绝项,不等同于完整兼容
node tools/bench.mjs # 1k / 5k / 10k / 20k 片段的解析、校验、导出耗时moon fmt --check
moon check --target js
moon build --target js
moon test --target js
moon test --target wasm-gc
node tools/build-js.mjs
node --test tests/cli.test.mjs tests/regression.test.mjs
python tools/oracle.py --check # 需要 .venv 中的 opentimelineio 0.18.1
python tools/check_review.py # 实际编辑输出与完整字段保留
python tools/check_published.py --version 0.2.0 # 在临时新项目中安装线上包并验证整改功能Install
Download zipMoonBit OTIO schemas, timeline semantics, algorithms, bundles and plugins