Demo editing tools with js bindings
  • Rust 94%
  • Nix 2.4%
  • JavaScript 2.2%
  • TypeScript 1.4%
Find a file
2025-05-18 18:58:31 +02:00
js add count_ticks method 2022-10-26 22:57:41 +02:00
wasm clippy fixes 2025-05-18 18:58:31 +02:00
.envrc init 2022-09-10 16:46:33 +02:00
.gitignore cargo updates 2025-05-02 19:24:58 +02:00
flake.lock flake update 2025-05-02 19:24:41 +02:00
flake.nix flake update 2025-05-02 19:24:41 +02:00
LICENSE_APACHE init 2022-09-10 16:46:33 +02:00
LICENSE_MIT init 2022-09-10 16:46:33 +02:00
out.txt init 2022-09-10 16:46:33 +02:00
package-lock.json js bindings 2022-10-23 17:01:34 +02:00
package.json packaging 2023-11-24 22:24:36 +01:00
README.md document rust api 2022-10-23 20:28:48 +02:00
tsconfig.json js bindings 2022-10-23 17:01:34 +02:00
webpack.config.js packaging 2023-11-24 22:24:36 +01:00

Demo editor

Rust api

use edit::{edit, EditOptions, TickRange};

fn main() {
    let options = EditOptions {
        unlock_pov: true,
        cut: Some(TickRange {
            from: 1000.into(),
            to: 2000.into(),
        }),
        ..EditOptions::default()
    };
    let input = fs::read("in.demo").unwrap();
    let output = edit(&input, options);
    fs::write("out.dem", output).unwrap();
}