├── .github └── workflows │ ├── pages.yml │ ├── rust.yml │ └── typos.yml ├── .gitignore ├── .typos.toml ├── Cargo.lock ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── Trunk.toml ├── assets ├── card.png ├── favicon.ico ├── icon-1024.png ├── icon-256.png ├── icon_ios_touch_192.png ├── manifest.json ├── maskable_icon_x512.png └── sw.js ├── check.sh ├── fill_template.ps1 ├── fill_template.sh ├── flake.nix ├── images └── graph-editor-demo-v3.gif ├── index.html ├── memo ├── graph_visualization.md └── intersection_of_bezier_and_circle.py ├── rust-toolchain └── src ├── app.rs ├── components ├── central_panel.rs ├── edit_menu.rs ├── error_modal.rs ├── footer.rs ├── graph_io.rs ├── mod.rs ├── top_panel.rs └── transition_and_scale.rs ├── config.rs ├── graph ├── base.rs ├── mod.rs ├── structures.rs └── visualize.rs ├── lib.rs ├── main.rs ├── math ├── affine.rs ├── bezier.rs ├── mod.rs └── newton.rs ├── mode.rs └── update.rs /.github/workflows/pages.yml: -------------------------------------------------------------------------------- 1 | name: Github Pages 2 | 3 | # By default, runs if you push to main. keeps your deployed app in sync with main branch. 4 | on: 5 | push: 6 | branches: 7 | - main 8 | # to only run when you do a new github release, comment out above part and uncomment the below trigger. 9 | # on: 10 | # release: 11 | # types: 12 | # - published 13 | 14 | permissions: 15 | contents: write # for committing to gh-pages branch. 16 | 17 | jobs: 18 | build-github-pages: 19 | runs-on: ubuntu-latest 20 | steps: 21 | - uses: actions/checkout@v4 # repo checkout 22 | - name: Setup toolchain for wasm 23 | run: | 24 | rustup update stable 25 | rustup default stable 26 | rustup set profile minimal 27 | rustup target add wasm32-unknown-unknown 28 | - name: Rust Cache # cache the rust build artefacts 29 | uses: Swatinem/rust-cache@v2 30 | - name: Download and install Trunk binary 31 | run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- 32 | - name: Build # build 33 | # Environment $public_url resolves to the github project page. 34 | # If using a user/organization page, remove the `${{ github.event.repository.name }}` part. 35 | # using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico . 36 | # this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested 37 | # relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which 38 | # will obviously return error 404 not found. 39 | run: ./trunk build --release --public-url $public_url 40 | env: 41 | public_url: "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}" 42 | - name: Deploy 43 | uses: JamesIves/github-pages-deploy-action@v4 44 | with: 45 | folder: dist 46 | # this option will not maintain any history of your previous pages deployment 47 | # set to false if you want all page build to be committed to your gh-pages branch history 48 | single-commit: true 49 | -------------------------------------------------------------------------------- /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | paths: 4 | - "src/**" 5 | - "Cargo.toml" 6 | - "Cargo.lock" 7 | pull_request: 8 | paths: 9 | - "src/**" 10 | - "Cargo.toml" 11 | - "Cargo.lock" 12 | workflow_dispatch: 13 | 14 | name: CI 15 | 16 | env: 17 | RUSTFLAGS: -D warnings 18 | RUSTDOCFLAGS: -D warnings 19 | 20 | jobs: 21 | check: 22 | name: Check 23 | runs-on: ubuntu-latest 24 | steps: 25 | - uses: actions/checkout@v4 26 | - uses: actions-rs/toolchain@v1 27 | with: 28 | profile: minimal 29 | toolchain: stable 30 | override: true 31 | - uses: actions-rs/cargo@v1 32 | with: 33 | command: check 34 | args: --all-features 35 | 36 | check_wasm: 37 | name: Check wasm32 38 | runs-on: ubuntu-latest 39 | steps: 40 | - uses: actions/checkout@v4 41 | - uses: actions-rs/toolchain@v1 42 | with: 43 | profile: minimal 44 | toolchain: stable 45 | target: wasm32-unknown-unknown 46 | override: true 47 | - uses: actions-rs/cargo@v1 48 | with: 49 | command: check 50 | args: --all-features --lib --target wasm32-unknown-unknown 51 | 52 | test: 53 | name: Test Suite 54 | runs-on: ubuntu-latest 55 | steps: 56 | - uses: actions/checkout@v4 57 | - uses: actions-rs/toolchain@v1 58 | with: 59 | profile: minimal 60 | toolchain: stable 61 | override: true 62 | - run: sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev 63 | - uses: actions-rs/cargo@v1 64 | with: 65 | command: test 66 | args: --lib 67 | 68 | fmt: 69 | name: Rustfmt 70 | runs-on: ubuntu-latest 71 | steps: 72 | - uses: actions/checkout@v4 73 | - uses: actions-rs/toolchain@v1 74 | with: 75 | profile: minimal 76 | toolchain: stable 77 | override: true 78 | components: rustfmt 79 | - uses: actions-rs/cargo@v1 80 | with: 81 | command: fmt 82 | args: --all -- --check 83 | 84 | clippy: 85 | name: Clippy 86 | runs-on: ubuntu-latest 87 | steps: 88 | - uses: actions/checkout@v4 89 | - uses: actions-rs/toolchain@v1 90 | with: 91 | profile: minimal 92 | toolchain: stable 93 | override: true 94 | components: clippy 95 | - uses: actions-rs/cargo@v1 96 | with: 97 | command: clippy 98 | args: -- -D warnings 99 | 100 | trunk: 101 | name: trunk 102 | runs-on: ubuntu-latest 103 | steps: 104 | - uses: actions/checkout@v4 105 | - uses: actions-rs/toolchain@v1 106 | with: 107 | profile: minimal 108 | toolchain: 1.82.0 109 | target: wasm32-unknown-unknown 110 | override: true 111 | - name: Download and install Trunk binary 112 | run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- 113 | - name: Build 114 | run: ./trunk build 115 | 116 | build: 117 | runs-on: ${{ matrix.os }} 118 | strategy: 119 | fail-fast: false 120 | matrix: 121 | include: 122 | - os: macos-latest 123 | TARGET: aarch64-apple-darwin 124 | 125 | - os: ubuntu-latest 126 | TARGET: aarch64-unknown-linux-gnu 127 | 128 | - os: ubuntu-latest 129 | TARGET: armv7-unknown-linux-gnueabihf 130 | 131 | - os: ubuntu-latest 132 | TARGET: x86_64-unknown-linux-gnu 133 | 134 | - os: windows-latest 135 | TARGET: x86_64-pc-windows-msvc 136 | EXTENSION: .exe 137 | 138 | steps: 139 | - name: Building ${{ matrix.TARGET }} 140 | run: echo "${{ matrix.TARGET }}" 141 | 142 | - uses: actions/checkout@master 143 | - name: Install build dependencies - Rustup 144 | run: | 145 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable --profile default --target ${{ matrix.TARGET }} -y 146 | echo "$HOME/.cargo/bin" >> $GITHUB_PATH 147 | 148 | # For linux, it's necessary to use cross from the git repository to avoid glibc problems 149 | # Ref: https://github.com/cross-rs/cross/issues/1510 150 | - name: Install cross for linux 151 | if: contains(matrix.TARGET, 'linux') 152 | run: | 153 | cargo install cross --git https://github.com/cross-rs/cross --rev 1b8cf50d20180c1a394099e608141480f934b7f7 154 | 155 | - name: Install cross for mac and windows 156 | if: ${{ !contains(matrix.TARGET, 'linux') }} 157 | run: | 158 | cargo install cross 159 | 160 | - name: Build 161 | run: | 162 | cross build --verbose --release --target=${{ matrix.TARGET }} 163 | 164 | - name: Rename 165 | run: cp target/${{ matrix.TARGET }}/release/graph-editor${{ matrix.EXTENSION }} graph-editor-${{ matrix.TARGET }}${{ matrix.EXTENSION }} 166 | 167 | - uses: actions/upload-artifact@master 168 | with: 169 | name: graph-editor-${{ matrix.TARGET }}${{ matrix.EXTENSION }} 170 | path: graph-editor-${{ matrix.TARGET }}${{ matrix.EXTENSION }} 171 | 172 | - uses: svenstaro/upload-release-action@v2 173 | name: Upload binaries to release 174 | if: ${{ github.event_name == 'push' }} 175 | with: 176 | repo_token: ${{ secrets.GITHUB_TOKEN }} 177 | file: graph-editor-${{ matrix.TARGET }}${{ matrix.EXTENSION }} 178 | asset_name: graph-editor-${{ matrix.TARGET }}${{ matrix.EXTENSION }} 179 | tag: ${{ github.ref }} 180 | prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }} 181 | overwrite: true 182 | -------------------------------------------------------------------------------- /.github/workflows/typos.yml: -------------------------------------------------------------------------------- 1 | # Copied from https://github.com/rerun-io/rerun_template 2 | 3 | # https://github.com/crate-ci/typos 4 | # Add exceptions to `.typos.toml` 5 | # install and run locally: cargo install typos-cli && typos 6 | 7 | name: Spell Check 8 | on: [pull_request] 9 | 10 | jobs: 11 | run: 12 | name: Spell Check 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout Actions Repository 16 | uses: actions/checkout@v4 17 | 18 | - name: Check spelling of entire workspace 19 | uses: crate-ci/typos@master 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac stuff: 2 | .DS_Store 3 | 4 | # trunk output folder 5 | dist 6 | 7 | # Rust compile target directories: 8 | target 9 | target_ra 10 | target_wasm 11 | 12 | # https://github.com/lycheeverse/lychee 13 | .lycheecache 14 | -------------------------------------------------------------------------------- /.typos.toml: -------------------------------------------------------------------------------- 1 | # https://github.com/crate-ci/typos 2 | # install: cargo install typos-cli 3 | # run: typos 4 | 5 | [default.extend-words] 6 | egui = "egui" # Example for how to ignore a false positive 7 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ab_glyph" 7 | version = "0.2.23" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "80179d7dd5d7e8c285d67c4a1e652972a92de7475beddfb92028c76463b13225" 10 | dependencies = [ 11 | "ab_glyph_rasterizer", 12 | "owned_ttf_parser", 13 | ] 14 | 15 | [[package]] 16 | name = "ab_glyph_rasterizer" 17 | version = "0.1.8" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" 20 | 21 | [[package]] 22 | name = "accesskit" 23 | version = "0.17.1" 24 | source = "registry+https://github.com/rust-lang/crates.io-index" 25 | checksum = "d3d3b8f9bae46a948369bc4a03e815d4ed6d616bd00de4051133a5019dc31c5a" 26 | dependencies = [ 27 | "enumn", 28 | "serde", 29 | ] 30 | 31 | [[package]] 32 | name = "accesskit_atspi_common" 33 | version = "0.10.1" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "7c5dd55e6e94949498698daf4d48fb5659e824d7abec0d394089656ceaf99d4f" 36 | dependencies = [ 37 | "accesskit", 38 | "accesskit_consumer", 39 | "atspi-common", 40 | "serde", 41 | "thiserror 1.0.69", 42 | "zvariant", 43 | ] 44 | 45 | [[package]] 46 | name = "accesskit_consumer" 47 | version = "0.26.0" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | checksum = "f47983a1084940ba9a39c077a8c63e55c619388be5476ac04c804cfbd1e63459" 50 | dependencies = [ 51 | "accesskit", 52 | "hashbrown 0.15.2", 53 | "immutable-chunkmap", 54 | ] 55 | 56 | [[package]] 57 | name = "accesskit_macos" 58 | version = "0.18.1" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "7329821f3bd1101e03a7d2e03bd339e3ac0dc64c70b4c9f9ae1949e3ba8dece1" 61 | dependencies = [ 62 | "accesskit", 63 | "accesskit_consumer", 64 | "hashbrown 0.15.2", 65 | "objc2", 66 | "objc2-app-kit", 67 | "objc2-foundation", 68 | ] 69 | 70 | [[package]] 71 | name = "accesskit_unix" 72 | version = "0.13.1" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "fcee751cc20d88678c33edaf9c07e8b693cd02819fe89053776f5313492273f5" 75 | dependencies = [ 76 | "accesskit", 77 | "accesskit_atspi_common", 78 | "async-channel", 79 | "async-executor", 80 | "async-task", 81 | "atspi", 82 | "futures-lite", 83 | "futures-util", 84 | "serde", 85 | "zbus", 86 | ] 87 | 88 | [[package]] 89 | name = "accesskit_windows" 90 | version = "0.24.1" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | checksum = "24fcd5d23d70670992b823e735e859374d694a3d12bfd8dd32bd3bd8bedb5d81" 93 | dependencies = [ 94 | "accesskit", 95 | "accesskit_consumer", 96 | "hashbrown 0.15.2", 97 | "paste", 98 | "static_assertions", 99 | "windows", 100 | "windows-core", 101 | ] 102 | 103 | [[package]] 104 | name = "accesskit_winit" 105 | version = "0.23.1" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "6a6a48dad5530b6deb9fc7a52cc6c3bf72cdd9eb8157ac9d32d69f2427a5e879" 108 | dependencies = [ 109 | "accesskit", 110 | "accesskit_macos", 111 | "accesskit_unix", 112 | "accesskit_windows", 113 | "raw-window-handle", 114 | "winit", 115 | ] 116 | 117 | [[package]] 118 | name = "adler" 119 | version = "1.0.2" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 122 | 123 | [[package]] 124 | name = "ahash" 125 | version = "0.8.11" 126 | source = "registry+https://github.com/rust-lang/crates.io-index" 127 | checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" 128 | dependencies = [ 129 | "cfg-if", 130 | "getrandom", 131 | "once_cell", 132 | "serde", 133 | "version_check", 134 | "zerocopy", 135 | ] 136 | 137 | [[package]] 138 | name = "aho-corasick" 139 | version = "1.1.2" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" 142 | dependencies = [ 143 | "memchr", 144 | ] 145 | 146 | [[package]] 147 | name = "allocator-api2" 148 | version = "0.2.21" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" 151 | 152 | [[package]] 153 | name = "android-activity" 154 | version = "0.6.0" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" 157 | dependencies = [ 158 | "android-properties", 159 | "bitflags 2.9.0", 160 | "cc", 161 | "cesu8", 162 | "jni", 163 | "jni-sys", 164 | "libc", 165 | "log", 166 | "ndk", 167 | "ndk-context", 168 | "ndk-sys 0.6.0+11769913", 169 | "num_enum", 170 | "thiserror 1.0.69", 171 | ] 172 | 173 | [[package]] 174 | name = "android-properties" 175 | version = "0.2.2" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" 178 | 179 | [[package]] 180 | name = "android_system_properties" 181 | version = "0.1.5" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 184 | dependencies = [ 185 | "libc", 186 | ] 187 | 188 | [[package]] 189 | name = "anstream" 190 | version = "0.6.15" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" 193 | dependencies = [ 194 | "anstyle", 195 | "anstyle-parse", 196 | "anstyle-query", 197 | "anstyle-wincon", 198 | "colorchoice", 199 | "is_terminal_polyfill", 200 | "utf8parse", 201 | ] 202 | 203 | [[package]] 204 | name = "anstyle" 205 | version = "1.0.8" 206 | source = "registry+https://github.com/rust-lang/crates.io-index" 207 | checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" 208 | 209 | [[package]] 210 | name = "anstyle-parse" 211 | version = "0.2.5" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" 214 | dependencies = [ 215 | "utf8parse", 216 | ] 217 | 218 | [[package]] 219 | name = "anstyle-query" 220 | version = "1.1.1" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" 223 | dependencies = [ 224 | "windows-sys 0.52.0", 225 | ] 226 | 227 | [[package]] 228 | name = "anstyle-wincon" 229 | version = "3.0.4" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" 232 | dependencies = [ 233 | "anstyle", 234 | "windows-sys 0.52.0", 235 | ] 236 | 237 | [[package]] 238 | name = "anyhow" 239 | version = "1.0.97" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" 242 | 243 | [[package]] 244 | name = "arboard" 245 | version = "3.3.0" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "aafb29b107435aa276664c1db8954ac27a6e105cdad3c88287a199eb0e313c08" 248 | dependencies = [ 249 | "clipboard-win", 250 | "core-graphics 0.22.3", 251 | "image 0.24.9", 252 | "log", 253 | "objc", 254 | "objc-foundation", 255 | "objc_id", 256 | "parking_lot", 257 | "thiserror 1.0.69", 258 | "winapi", 259 | "x11rb", 260 | ] 261 | 262 | [[package]] 263 | name = "arrayvec" 264 | version = "0.7.6" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 267 | 268 | [[package]] 269 | name = "ash" 270 | version = "0.38.0+1.3.281" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" 273 | dependencies = [ 274 | "libloading", 275 | ] 276 | 277 | [[package]] 278 | name = "async-broadcast" 279 | version = "0.7.1" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" 282 | dependencies = [ 283 | "event-listener 5.3.1", 284 | "event-listener-strategy 0.5.3", 285 | "futures-core", 286 | "pin-project-lite", 287 | ] 288 | 289 | [[package]] 290 | name = "async-channel" 291 | version = "2.1.1" 292 | source = "registry+https://github.com/rust-lang/crates.io-index" 293 | checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" 294 | dependencies = [ 295 | "concurrent-queue", 296 | "event-listener 4.0.3", 297 | "event-listener-strategy 0.4.0", 298 | "futures-core", 299 | "pin-project-lite", 300 | ] 301 | 302 | [[package]] 303 | name = "async-executor" 304 | version = "1.11.0" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" 307 | dependencies = [ 308 | "async-task", 309 | "concurrent-queue", 310 | "fastrand", 311 | "futures-lite", 312 | "slab", 313 | ] 314 | 315 | [[package]] 316 | name = "async-fs" 317 | version = "2.1.2" 318 | source = "registry+https://github.com/rust-lang/crates.io-index" 319 | checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" 320 | dependencies = [ 321 | "async-lock 3.4.0", 322 | "blocking", 323 | "futures-lite", 324 | ] 325 | 326 | [[package]] 327 | name = "async-io" 328 | version = "2.4.0" 329 | source = "registry+https://github.com/rust-lang/crates.io-index" 330 | checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" 331 | dependencies = [ 332 | "async-lock 3.4.0", 333 | "cfg-if", 334 | "concurrent-queue", 335 | "futures-io", 336 | "futures-lite", 337 | "parking", 338 | "polling", 339 | "rustix", 340 | "slab", 341 | "tracing", 342 | "windows-sys 0.59.0", 343 | ] 344 | 345 | [[package]] 346 | name = "async-lock" 347 | version = "2.8.0" 348 | source = "registry+https://github.com/rust-lang/crates.io-index" 349 | checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" 350 | dependencies = [ 351 | "event-listener 2.5.3", 352 | ] 353 | 354 | [[package]] 355 | name = "async-lock" 356 | version = "3.4.0" 357 | source = "registry+https://github.com/rust-lang/crates.io-index" 358 | checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" 359 | dependencies = [ 360 | "event-listener 5.3.1", 361 | "event-listener-strategy 0.5.3", 362 | "pin-project-lite", 363 | ] 364 | 365 | [[package]] 366 | name = "async-process" 367 | version = "2.3.0" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" 370 | dependencies = [ 371 | "async-channel", 372 | "async-io", 373 | "async-lock 3.4.0", 374 | "async-signal", 375 | "async-task", 376 | "blocking", 377 | "cfg-if", 378 | "event-listener 5.3.1", 379 | "futures-lite", 380 | "rustix", 381 | "tracing", 382 | ] 383 | 384 | [[package]] 385 | name = "async-recursion" 386 | version = "1.1.1" 387 | source = "registry+https://github.com/rust-lang/crates.io-index" 388 | checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" 389 | dependencies = [ 390 | "proc-macro2", 391 | "quote", 392 | "syn", 393 | ] 394 | 395 | [[package]] 396 | name = "async-signal" 397 | version = "0.2.5" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" 400 | dependencies = [ 401 | "async-io", 402 | "async-lock 2.8.0", 403 | "atomic-waker", 404 | "cfg-if", 405 | "futures-core", 406 | "futures-io", 407 | "rustix", 408 | "signal-hook-registry", 409 | "slab", 410 | "windows-sys 0.48.0", 411 | ] 412 | 413 | [[package]] 414 | name = "async-task" 415 | version = "4.7.1" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" 418 | 419 | [[package]] 420 | name = "async-trait" 421 | version = "0.1.83" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" 424 | dependencies = [ 425 | "proc-macro2", 426 | "quote", 427 | "syn", 428 | ] 429 | 430 | [[package]] 431 | name = "atomic-waker" 432 | version = "1.1.2" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 435 | 436 | [[package]] 437 | name = "atspi" 438 | version = "0.22.0" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | checksum = "be534b16650e35237bb1ed189ba2aab86ce65e88cc84c66f4935ba38575cecbf" 441 | dependencies = [ 442 | "atspi-common", 443 | "atspi-connection", 444 | "atspi-proxies", 445 | ] 446 | 447 | [[package]] 448 | name = "atspi-common" 449 | version = "0.6.0" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | checksum = "1909ed2dc01d0a17505d89311d192518507e8a056a48148e3598fef5e7bb6ba7" 452 | dependencies = [ 453 | "enumflags2", 454 | "serde", 455 | "static_assertions", 456 | "zbus", 457 | "zbus-lockstep", 458 | "zbus-lockstep-macros", 459 | "zbus_names", 460 | "zvariant", 461 | ] 462 | 463 | [[package]] 464 | name = "atspi-connection" 465 | version = "0.6.0" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | checksum = "430c5960624a4baaa511c9c0fcc2218e3b58f5dbcc47e6190cafee344b873333" 468 | dependencies = [ 469 | "atspi-common", 470 | "atspi-proxies", 471 | "futures-lite", 472 | "zbus", 473 | ] 474 | 475 | [[package]] 476 | name = "atspi-proxies" 477 | version = "0.6.0" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "a5e6c5de3e524cf967569722446bcd458d5032348554d9a17d7d72b041ab7496" 480 | dependencies = [ 481 | "atspi-common", 482 | "serde", 483 | "zbus", 484 | "zvariant", 485 | ] 486 | 487 | [[package]] 488 | name = "autocfg" 489 | version = "1.1.0" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 492 | 493 | [[package]] 494 | name = "base64" 495 | version = "0.21.5" 496 | source = "registry+https://github.com/rust-lang/crates.io-index" 497 | checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" 498 | 499 | [[package]] 500 | name = "bit-set" 501 | version = "0.8.0" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" 504 | dependencies = [ 505 | "bit-vec", 506 | ] 507 | 508 | [[package]] 509 | name = "bit-vec" 510 | version = "0.8.0" 511 | source = "registry+https://github.com/rust-lang/crates.io-index" 512 | checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" 513 | 514 | [[package]] 515 | name = "bitflags" 516 | version = "1.3.2" 517 | source = "registry+https://github.com/rust-lang/crates.io-index" 518 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 519 | 520 | [[package]] 521 | name = "bitflags" 522 | version = "2.9.0" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 525 | dependencies = [ 526 | "serde", 527 | ] 528 | 529 | [[package]] 530 | name = "block" 531 | version = "0.1.6" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 534 | 535 | [[package]] 536 | name = "block-buffer" 537 | version = "0.10.4" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 540 | dependencies = [ 541 | "generic-array", 542 | ] 543 | 544 | [[package]] 545 | name = "block2" 546 | version = "0.5.1" 547 | source = "registry+https://github.com/rust-lang/crates.io-index" 548 | checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" 549 | dependencies = [ 550 | "objc2", 551 | ] 552 | 553 | [[package]] 554 | name = "blocking" 555 | version = "1.6.1" 556 | source = "registry+https://github.com/rust-lang/crates.io-index" 557 | checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" 558 | dependencies = [ 559 | "async-channel", 560 | "async-task", 561 | "futures-io", 562 | "futures-lite", 563 | "piper", 564 | ] 565 | 566 | [[package]] 567 | name = "bumpalo" 568 | version = "3.14.0" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" 571 | 572 | [[package]] 573 | name = "bytemuck" 574 | version = "1.22.0" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" 577 | dependencies = [ 578 | "bytemuck_derive", 579 | ] 580 | 581 | [[package]] 582 | name = "bytemuck_derive" 583 | version = "1.5.0" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" 586 | dependencies = [ 587 | "proc-macro2", 588 | "quote", 589 | "syn", 590 | ] 591 | 592 | [[package]] 593 | name = "byteorder" 594 | version = "1.5.0" 595 | source = "registry+https://github.com/rust-lang/crates.io-index" 596 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 597 | 598 | [[package]] 599 | name = "bytes" 600 | version = "1.5.0" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" 603 | 604 | [[package]] 605 | name = "calloop" 606 | version = "0.13.0" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" 609 | dependencies = [ 610 | "bitflags 2.9.0", 611 | "log", 612 | "polling", 613 | "rustix", 614 | "slab", 615 | "thiserror 1.0.69", 616 | ] 617 | 618 | [[package]] 619 | name = "calloop-wayland-source" 620 | version = "0.3.0" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" 623 | dependencies = [ 624 | "calloop", 625 | "rustix", 626 | "wayland-backend", 627 | "wayland-client", 628 | ] 629 | 630 | [[package]] 631 | name = "cc" 632 | version = "1.0.83" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" 635 | dependencies = [ 636 | "jobserver", 637 | "libc", 638 | ] 639 | 640 | [[package]] 641 | name = "cesu8" 642 | version = "1.1.0" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 645 | 646 | [[package]] 647 | name = "cfg-if" 648 | version = "1.0.0" 649 | source = "registry+https://github.com/rust-lang/crates.io-index" 650 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 651 | 652 | [[package]] 653 | name = "cfg_aliases" 654 | version = "0.2.1" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 657 | 658 | [[package]] 659 | name = "cgl" 660 | version = "0.3.2" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" 663 | dependencies = [ 664 | "libc", 665 | ] 666 | 667 | [[package]] 668 | name = "clipboard-win" 669 | version = "4.5.0" 670 | source = "registry+https://github.com/rust-lang/crates.io-index" 671 | checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" 672 | dependencies = [ 673 | "error-code", 674 | "str-buf", 675 | "winapi", 676 | ] 677 | 678 | [[package]] 679 | name = "codespan-reporting" 680 | version = "0.11.1" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 683 | dependencies = [ 684 | "termcolor", 685 | "unicode-width", 686 | ] 687 | 688 | [[package]] 689 | name = "color_quant" 690 | version = "1.1.0" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" 693 | 694 | [[package]] 695 | name = "colorchoice" 696 | version = "1.0.2" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" 699 | 700 | [[package]] 701 | name = "combine" 702 | version = "4.6.6" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" 705 | dependencies = [ 706 | "bytes", 707 | "memchr", 708 | ] 709 | 710 | [[package]] 711 | name = "concurrent-queue" 712 | version = "2.4.0" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" 715 | dependencies = [ 716 | "crossbeam-utils", 717 | ] 718 | 719 | [[package]] 720 | name = "core-foundation" 721 | version = "0.9.4" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 724 | dependencies = [ 725 | "core-foundation-sys", 726 | "libc", 727 | ] 728 | 729 | [[package]] 730 | name = "core-foundation-sys" 731 | version = "0.8.6" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 734 | 735 | [[package]] 736 | name = "core-graphics" 737 | version = "0.22.3" 738 | source = "registry+https://github.com/rust-lang/crates.io-index" 739 | checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" 740 | dependencies = [ 741 | "bitflags 1.3.2", 742 | "core-foundation", 743 | "core-graphics-types", 744 | "foreign-types 0.3.2", 745 | "libc", 746 | ] 747 | 748 | [[package]] 749 | name = "core-graphics" 750 | version = "0.23.1" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" 753 | dependencies = [ 754 | "bitflags 1.3.2", 755 | "core-foundation", 756 | "core-graphics-types", 757 | "foreign-types 0.5.0", 758 | "libc", 759 | ] 760 | 761 | [[package]] 762 | name = "core-graphics-types" 763 | version = "0.1.3" 764 | source = "registry+https://github.com/rust-lang/crates.io-index" 765 | checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" 766 | dependencies = [ 767 | "bitflags 1.3.2", 768 | "core-foundation", 769 | "libc", 770 | ] 771 | 772 | [[package]] 773 | name = "cpufeatures" 774 | version = "0.2.12" 775 | source = "registry+https://github.com/rust-lang/crates.io-index" 776 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 777 | dependencies = [ 778 | "libc", 779 | ] 780 | 781 | [[package]] 782 | name = "crc32fast" 783 | version = "1.3.2" 784 | source = "registry+https://github.com/rust-lang/crates.io-index" 785 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 786 | dependencies = [ 787 | "cfg-if", 788 | ] 789 | 790 | [[package]] 791 | name = "crossbeam-utils" 792 | version = "0.8.18" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" 795 | dependencies = [ 796 | "cfg-if", 797 | ] 798 | 799 | [[package]] 800 | name = "crypto-common" 801 | version = "0.1.6" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 804 | dependencies = [ 805 | "generic-array", 806 | "typenum", 807 | ] 808 | 809 | [[package]] 810 | name = "cursor-icon" 811 | version = "1.1.0" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" 814 | 815 | [[package]] 816 | name = "digest" 817 | version = "0.10.7" 818 | source = "registry+https://github.com/rust-lang/crates.io-index" 819 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 820 | dependencies = [ 821 | "block-buffer", 822 | "crypto-common", 823 | ] 824 | 825 | [[package]] 826 | name = "dispatch" 827 | version = "0.2.0" 828 | source = "registry+https://github.com/rust-lang/crates.io-index" 829 | checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" 830 | 831 | [[package]] 832 | name = "dlib" 833 | version = "0.5.2" 834 | source = "registry+https://github.com/rust-lang/crates.io-index" 835 | checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" 836 | dependencies = [ 837 | "libloading", 838 | ] 839 | 840 | [[package]] 841 | name = "document-features" 842 | version = "0.2.10" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" 845 | dependencies = [ 846 | "litrs", 847 | ] 848 | 849 | [[package]] 850 | name = "downcast-rs" 851 | version = "1.2.0" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" 854 | 855 | [[package]] 856 | name = "dpi" 857 | version = "0.1.1" 858 | source = "registry+https://github.com/rust-lang/crates.io-index" 859 | checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" 860 | 861 | [[package]] 862 | name = "ecolor" 863 | version = "0.31.1" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | checksum = "bc4feb366740ded31a004a0e4452fbf84e80ef432ecf8314c485210229672fd1" 866 | dependencies = [ 867 | "bytemuck", 868 | "emath", 869 | "serde", 870 | ] 871 | 872 | [[package]] 873 | name = "eframe" 874 | version = "0.31.1" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "d0dfe0859f3fb1bc6424c57d41e10e9093fe938f426b691e42272c2f336d915c" 877 | dependencies = [ 878 | "ahash", 879 | "bytemuck", 880 | "document-features", 881 | "egui", 882 | "egui-wgpu", 883 | "egui-winit", 884 | "egui_glow", 885 | "glow", 886 | "glutin", 887 | "glutin-winit", 888 | "home", 889 | "image 0.25.1", 890 | "js-sys", 891 | "log", 892 | "objc2", 893 | "objc2-app-kit", 894 | "objc2-foundation", 895 | "parking_lot", 896 | "percent-encoding", 897 | "profiling", 898 | "raw-window-handle", 899 | "ron", 900 | "serde", 901 | "static_assertions", 902 | "wasm-bindgen", 903 | "wasm-bindgen-futures", 904 | "web-sys", 905 | "web-time", 906 | "winapi", 907 | "windows-sys 0.59.0", 908 | "winit", 909 | ] 910 | 911 | [[package]] 912 | name = "egui" 913 | version = "0.31.1" 914 | source = "registry+https://github.com/rust-lang/crates.io-index" 915 | checksum = "25dd34cec49ab55d85ebf70139cb1ccd29c977ef6b6ba4fe85489d6877ee9ef3" 916 | dependencies = [ 917 | "accesskit", 918 | "ahash", 919 | "bitflags 2.9.0", 920 | "emath", 921 | "epaint", 922 | "log", 923 | "nohash-hasher", 924 | "profiling", 925 | "ron", 926 | "serde", 927 | ] 928 | 929 | [[package]] 930 | name = "egui-wgpu" 931 | version = "0.31.1" 932 | source = "registry+https://github.com/rust-lang/crates.io-index" 933 | checksum = "d319dfef570f699b6e9114e235e862a2ddcf75f0d1a061de9e1328d92146d820" 934 | dependencies = [ 935 | "ahash", 936 | "bytemuck", 937 | "document-features", 938 | "egui", 939 | "epaint", 940 | "log", 941 | "profiling", 942 | "thiserror 1.0.69", 943 | "type-map", 944 | "web-time", 945 | "wgpu", 946 | "winit", 947 | ] 948 | 949 | [[package]] 950 | name = "egui-winit" 951 | version = "0.31.1" 952 | source = "registry+https://github.com/rust-lang/crates.io-index" 953 | checksum = "7d9dfbb78fe4eb9c3a39ad528b90ee5915c252e77bbab9d4ebc576541ab67e13" 954 | dependencies = [ 955 | "accesskit_winit", 956 | "ahash", 957 | "arboard", 958 | "bytemuck", 959 | "egui", 960 | "log", 961 | "profiling", 962 | "raw-window-handle", 963 | "serde", 964 | "smithay-clipboard", 965 | "web-time", 966 | "webbrowser", 967 | "winit", 968 | ] 969 | 970 | [[package]] 971 | name = "egui_glow" 972 | version = "0.31.1" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "910906e3f042ea6d2378ec12a6fd07698e14ddae68aed2d819ffe944a73aab9e" 975 | dependencies = [ 976 | "ahash", 977 | "bytemuck", 978 | "egui", 979 | "glow", 980 | "log", 981 | "memoffset 0.9.0", 982 | "profiling", 983 | "wasm-bindgen", 984 | "web-sys", 985 | "winit", 986 | ] 987 | 988 | [[package]] 989 | name = "either" 990 | version = "1.15.0" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 993 | 994 | [[package]] 995 | name = "emath" 996 | version = "0.31.1" 997 | source = "registry+https://github.com/rust-lang/crates.io-index" 998 | checksum = "9e4cadcff7a5353ba72b7fea76bf2122b5ebdbc68e8155aa56dfdea90083fe1b" 999 | dependencies = [ 1000 | "bytemuck", 1001 | "serde", 1002 | ] 1003 | 1004 | [[package]] 1005 | name = "endi" 1006 | version = "1.1.0" 1007 | source = "registry+https://github.com/rust-lang/crates.io-index" 1008 | checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" 1009 | 1010 | [[package]] 1011 | name = "enumflags2" 1012 | version = "0.7.10" 1013 | source = "registry+https://github.com/rust-lang/crates.io-index" 1014 | checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" 1015 | dependencies = [ 1016 | "enumflags2_derive", 1017 | "serde", 1018 | ] 1019 | 1020 | [[package]] 1021 | name = "enumflags2_derive" 1022 | version = "0.7.10" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" 1025 | dependencies = [ 1026 | "proc-macro2", 1027 | "quote", 1028 | "syn", 1029 | ] 1030 | 1031 | [[package]] 1032 | name = "enumn" 1033 | version = "0.1.13" 1034 | source = "registry+https://github.com/rust-lang/crates.io-index" 1035 | checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" 1036 | dependencies = [ 1037 | "proc-macro2", 1038 | "quote", 1039 | "syn", 1040 | ] 1041 | 1042 | [[package]] 1043 | name = "env_filter" 1044 | version = "0.1.2" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" 1047 | dependencies = [ 1048 | "log", 1049 | "regex", 1050 | ] 1051 | 1052 | [[package]] 1053 | name = "env_logger" 1054 | version = "0.11.5" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" 1057 | dependencies = [ 1058 | "anstream", 1059 | "anstyle", 1060 | "env_filter", 1061 | "humantime", 1062 | "log", 1063 | ] 1064 | 1065 | [[package]] 1066 | name = "epaint" 1067 | version = "0.31.1" 1068 | source = "registry+https://github.com/rust-lang/crates.io-index" 1069 | checksum = "41fcc0f5a7c613afd2dee5e4b30c3e6acafb8ad6f0edb06068811f708a67c562" 1070 | dependencies = [ 1071 | "ab_glyph", 1072 | "ahash", 1073 | "bytemuck", 1074 | "ecolor", 1075 | "emath", 1076 | "epaint_default_fonts", 1077 | "log", 1078 | "nohash-hasher", 1079 | "parking_lot", 1080 | "profiling", 1081 | "serde", 1082 | ] 1083 | 1084 | [[package]] 1085 | name = "epaint_default_fonts" 1086 | version = "0.31.1" 1087 | source = "registry+https://github.com/rust-lang/crates.io-index" 1088 | checksum = "fc7e7a64c02cf7a5b51e745a9e45f60660a286f151c238b9d397b3e923f5082f" 1089 | 1090 | [[package]] 1091 | name = "equivalent" 1092 | version = "1.0.1" 1093 | source = "registry+https://github.com/rust-lang/crates.io-index" 1094 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 1095 | 1096 | [[package]] 1097 | name = "errno" 1098 | version = "0.3.8" 1099 | source = "registry+https://github.com/rust-lang/crates.io-index" 1100 | checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" 1101 | dependencies = [ 1102 | "libc", 1103 | "windows-sys 0.52.0", 1104 | ] 1105 | 1106 | [[package]] 1107 | name = "error-code" 1108 | version = "2.3.1" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" 1111 | dependencies = [ 1112 | "libc", 1113 | "str-buf", 1114 | ] 1115 | 1116 | [[package]] 1117 | name = "event-listener" 1118 | version = "2.5.3" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 1121 | 1122 | [[package]] 1123 | name = "event-listener" 1124 | version = "4.0.3" 1125 | source = "registry+https://github.com/rust-lang/crates.io-index" 1126 | checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" 1127 | dependencies = [ 1128 | "concurrent-queue", 1129 | "parking", 1130 | "pin-project-lite", 1131 | ] 1132 | 1133 | [[package]] 1134 | name = "event-listener" 1135 | version = "5.3.1" 1136 | source = "registry+https://github.com/rust-lang/crates.io-index" 1137 | checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" 1138 | dependencies = [ 1139 | "concurrent-queue", 1140 | "parking", 1141 | "pin-project-lite", 1142 | ] 1143 | 1144 | [[package]] 1145 | name = "event-listener-strategy" 1146 | version = "0.4.0" 1147 | source = "registry+https://github.com/rust-lang/crates.io-index" 1148 | checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" 1149 | dependencies = [ 1150 | "event-listener 4.0.3", 1151 | "pin-project-lite", 1152 | ] 1153 | 1154 | [[package]] 1155 | name = "event-listener-strategy" 1156 | version = "0.5.3" 1157 | source = "registry+https://github.com/rust-lang/crates.io-index" 1158 | checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" 1159 | dependencies = [ 1160 | "event-listener 5.3.1", 1161 | "pin-project-lite", 1162 | ] 1163 | 1164 | [[package]] 1165 | name = "fastrand" 1166 | version = "2.0.1" 1167 | source = "registry+https://github.com/rust-lang/crates.io-index" 1168 | checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" 1169 | 1170 | [[package]] 1171 | name = "fdeflate" 1172 | version = "0.3.3" 1173 | source = "registry+https://github.com/rust-lang/crates.io-index" 1174 | checksum = "209098dd6dfc4445aa6111f0e98653ac323eaa4dfd212c9ca3931bf9955c31bd" 1175 | dependencies = [ 1176 | "simd-adler32", 1177 | ] 1178 | 1179 | [[package]] 1180 | name = "flate2" 1181 | version = "1.0.28" 1182 | source = "registry+https://github.com/rust-lang/crates.io-index" 1183 | checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" 1184 | dependencies = [ 1185 | "crc32fast", 1186 | "miniz_oxide", 1187 | ] 1188 | 1189 | [[package]] 1190 | name = "foldhash" 1191 | version = "0.1.3" 1192 | source = "registry+https://github.com/rust-lang/crates.io-index" 1193 | checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" 1194 | 1195 | [[package]] 1196 | name = "foreign-types" 1197 | version = "0.3.2" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 1200 | dependencies = [ 1201 | "foreign-types-shared 0.1.1", 1202 | ] 1203 | 1204 | [[package]] 1205 | name = "foreign-types" 1206 | version = "0.5.0" 1207 | source = "registry+https://github.com/rust-lang/crates.io-index" 1208 | checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" 1209 | dependencies = [ 1210 | "foreign-types-macros", 1211 | "foreign-types-shared 0.3.1", 1212 | ] 1213 | 1214 | [[package]] 1215 | name = "foreign-types-macros" 1216 | version = "0.2.3" 1217 | source = "registry+https://github.com/rust-lang/crates.io-index" 1218 | checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" 1219 | dependencies = [ 1220 | "proc-macro2", 1221 | "quote", 1222 | "syn", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "foreign-types-shared" 1227 | version = "0.1.1" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 1230 | 1231 | [[package]] 1232 | name = "foreign-types-shared" 1233 | version = "0.3.1" 1234 | source = "registry+https://github.com/rust-lang/crates.io-index" 1235 | checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" 1236 | 1237 | [[package]] 1238 | name = "form_urlencoded" 1239 | version = "1.2.1" 1240 | source = "registry+https://github.com/rust-lang/crates.io-index" 1241 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 1242 | dependencies = [ 1243 | "percent-encoding", 1244 | ] 1245 | 1246 | [[package]] 1247 | name = "futures-core" 1248 | version = "0.3.30" 1249 | source = "registry+https://github.com/rust-lang/crates.io-index" 1250 | checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 1251 | 1252 | [[package]] 1253 | name = "futures-io" 1254 | version = "0.3.30" 1255 | source = "registry+https://github.com/rust-lang/crates.io-index" 1256 | checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" 1257 | 1258 | [[package]] 1259 | name = "futures-lite" 1260 | version = "2.5.0" 1261 | source = "registry+https://github.com/rust-lang/crates.io-index" 1262 | checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" 1263 | dependencies = [ 1264 | "fastrand", 1265 | "futures-core", 1266 | "futures-io", 1267 | "parking", 1268 | "pin-project-lite", 1269 | ] 1270 | 1271 | [[package]] 1272 | name = "futures-macro" 1273 | version = "0.3.30" 1274 | source = "registry+https://github.com/rust-lang/crates.io-index" 1275 | checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" 1276 | dependencies = [ 1277 | "proc-macro2", 1278 | "quote", 1279 | "syn", 1280 | ] 1281 | 1282 | [[package]] 1283 | name = "futures-sink" 1284 | version = "0.3.30" 1285 | source = "registry+https://github.com/rust-lang/crates.io-index" 1286 | checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" 1287 | 1288 | [[package]] 1289 | name = "futures-task" 1290 | version = "0.3.30" 1291 | source = "registry+https://github.com/rust-lang/crates.io-index" 1292 | checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" 1293 | 1294 | [[package]] 1295 | name = "futures-util" 1296 | version = "0.3.30" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" 1299 | dependencies = [ 1300 | "futures-core", 1301 | "futures-io", 1302 | "futures-macro", 1303 | "futures-sink", 1304 | "futures-task", 1305 | "memchr", 1306 | "pin-project-lite", 1307 | "pin-utils", 1308 | "slab", 1309 | ] 1310 | 1311 | [[package]] 1312 | name = "generic-array" 1313 | version = "0.14.7" 1314 | source = "registry+https://github.com/rust-lang/crates.io-index" 1315 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 1316 | dependencies = [ 1317 | "typenum", 1318 | "version_check", 1319 | ] 1320 | 1321 | [[package]] 1322 | name = "gethostname" 1323 | version = "0.3.0" 1324 | source = "registry+https://github.com/rust-lang/crates.io-index" 1325 | checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" 1326 | dependencies = [ 1327 | "libc", 1328 | "winapi", 1329 | ] 1330 | 1331 | [[package]] 1332 | name = "getrandom" 1333 | version = "0.2.11" 1334 | source = "registry+https://github.com/rust-lang/crates.io-index" 1335 | checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" 1336 | dependencies = [ 1337 | "cfg-if", 1338 | "js-sys", 1339 | "libc", 1340 | "wasi", 1341 | "wasm-bindgen", 1342 | ] 1343 | 1344 | [[package]] 1345 | name = "gl_generator" 1346 | version = "0.14.0" 1347 | source = "registry+https://github.com/rust-lang/crates.io-index" 1348 | checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" 1349 | dependencies = [ 1350 | "khronos_api", 1351 | "log", 1352 | "xml-rs", 1353 | ] 1354 | 1355 | [[package]] 1356 | name = "glow" 1357 | version = "0.16.0" 1358 | source = "registry+https://github.com/rust-lang/crates.io-index" 1359 | checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" 1360 | dependencies = [ 1361 | "js-sys", 1362 | "slotmap", 1363 | "wasm-bindgen", 1364 | "web-sys", 1365 | ] 1366 | 1367 | [[package]] 1368 | name = "glutin" 1369 | version = "0.32.1" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "ec69412a0bf07ea7607e638b415447857a808846c2b685a43c8aa18bc6d5e499" 1372 | dependencies = [ 1373 | "bitflags 2.9.0", 1374 | "cfg_aliases", 1375 | "cgl", 1376 | "core-foundation", 1377 | "dispatch", 1378 | "glutin_egl_sys", 1379 | "glutin_wgl_sys", 1380 | "libloading", 1381 | "objc2", 1382 | "objc2-app-kit", 1383 | "objc2-foundation", 1384 | "once_cell", 1385 | "raw-window-handle", 1386 | "wayland-sys", 1387 | "windows-sys 0.52.0", 1388 | ] 1389 | 1390 | [[package]] 1391 | name = "glutin-winit" 1392 | version = "0.5.0" 1393 | source = "registry+https://github.com/rust-lang/crates.io-index" 1394 | checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" 1395 | dependencies = [ 1396 | "cfg_aliases", 1397 | "glutin", 1398 | "raw-window-handle", 1399 | "winit", 1400 | ] 1401 | 1402 | [[package]] 1403 | name = "glutin_egl_sys" 1404 | version = "0.7.0" 1405 | source = "registry+https://github.com/rust-lang/crates.io-index" 1406 | checksum = "cae99fff4d2850dbe6fb8c1fa8e4fead5525bab715beaacfccf3fb994e01c827" 1407 | dependencies = [ 1408 | "gl_generator", 1409 | "windows-sys 0.52.0", 1410 | ] 1411 | 1412 | [[package]] 1413 | name = "glutin_wgl_sys" 1414 | version = "0.6.0" 1415 | source = "registry+https://github.com/rust-lang/crates.io-index" 1416 | checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" 1417 | dependencies = [ 1418 | "gl_generator", 1419 | ] 1420 | 1421 | [[package]] 1422 | name = "gpu-alloc" 1423 | version = "0.6.0" 1424 | source = "registry+https://github.com/rust-lang/crates.io-index" 1425 | checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" 1426 | dependencies = [ 1427 | "bitflags 2.9.0", 1428 | "gpu-alloc-types", 1429 | ] 1430 | 1431 | [[package]] 1432 | name = "gpu-alloc-types" 1433 | version = "0.3.0" 1434 | source = "registry+https://github.com/rust-lang/crates.io-index" 1435 | checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" 1436 | dependencies = [ 1437 | "bitflags 2.9.0", 1438 | ] 1439 | 1440 | [[package]] 1441 | name = "gpu-descriptor" 1442 | version = "0.3.0" 1443 | source = "registry+https://github.com/rust-lang/crates.io-index" 1444 | checksum = "9c08c1f623a8d0b722b8b99f821eb0ba672a1618f0d3b16ddbee1cedd2dd8557" 1445 | dependencies = [ 1446 | "bitflags 2.9.0", 1447 | "gpu-descriptor-types", 1448 | "hashbrown 0.14.3", 1449 | ] 1450 | 1451 | [[package]] 1452 | name = "gpu-descriptor-types" 1453 | version = "0.2.0" 1454 | source = "registry+https://github.com/rust-lang/crates.io-index" 1455 | checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" 1456 | dependencies = [ 1457 | "bitflags 2.9.0", 1458 | ] 1459 | 1460 | [[package]] 1461 | name = "graph-editor" 1462 | version = "0.4.1" 1463 | dependencies = [ 1464 | "anyhow", 1465 | "eframe", 1466 | "egui", 1467 | "env_logger", 1468 | "epaint", 1469 | "getrandom", 1470 | "itertools", 1471 | "log", 1472 | "num-traits", 1473 | "rand", 1474 | "serde", 1475 | "wasm-bindgen-futures", 1476 | "web-sys", 1477 | ] 1478 | 1479 | [[package]] 1480 | name = "hashbrown" 1481 | version = "0.14.3" 1482 | source = "registry+https://github.com/rust-lang/crates.io-index" 1483 | checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" 1484 | dependencies = [ 1485 | "ahash", 1486 | "allocator-api2", 1487 | ] 1488 | 1489 | [[package]] 1490 | name = "hashbrown" 1491 | version = "0.15.2" 1492 | source = "registry+https://github.com/rust-lang/crates.io-index" 1493 | checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 1494 | dependencies = [ 1495 | "foldhash", 1496 | ] 1497 | 1498 | [[package]] 1499 | name = "heck" 1500 | version = "0.5.0" 1501 | source = "registry+https://github.com/rust-lang/crates.io-index" 1502 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 1503 | 1504 | [[package]] 1505 | name = "hex" 1506 | version = "0.4.3" 1507 | source = "registry+https://github.com/rust-lang/crates.io-index" 1508 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1509 | 1510 | [[package]] 1511 | name = "hexf-parse" 1512 | version = "0.2.1" 1513 | source = "registry+https://github.com/rust-lang/crates.io-index" 1514 | checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" 1515 | 1516 | [[package]] 1517 | name = "home" 1518 | version = "0.5.9" 1519 | source = "registry+https://github.com/rust-lang/crates.io-index" 1520 | checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" 1521 | dependencies = [ 1522 | "windows-sys 0.52.0", 1523 | ] 1524 | 1525 | [[package]] 1526 | name = "humantime" 1527 | version = "2.1.0" 1528 | source = "registry+https://github.com/rust-lang/crates.io-index" 1529 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 1530 | 1531 | [[package]] 1532 | name = "idna" 1533 | version = "0.5.0" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 1536 | dependencies = [ 1537 | "unicode-bidi", 1538 | "unicode-normalization", 1539 | ] 1540 | 1541 | [[package]] 1542 | name = "image" 1543 | version = "0.24.9" 1544 | source = "registry+https://github.com/rust-lang/crates.io-index" 1545 | checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" 1546 | dependencies = [ 1547 | "bytemuck", 1548 | "byteorder", 1549 | "color_quant", 1550 | "num-traits", 1551 | "png", 1552 | "tiff", 1553 | ] 1554 | 1555 | [[package]] 1556 | name = "image" 1557 | version = "0.25.1" 1558 | source = "registry+https://github.com/rust-lang/crates.io-index" 1559 | checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11" 1560 | dependencies = [ 1561 | "bytemuck", 1562 | "byteorder", 1563 | "num-traits", 1564 | "png", 1565 | ] 1566 | 1567 | [[package]] 1568 | name = "immutable-chunkmap" 1569 | version = "2.0.6" 1570 | source = "registry+https://github.com/rust-lang/crates.io-index" 1571 | checksum = "12f97096f508d54f8f8ab8957862eee2ccd628847b6217af1a335e1c44dee578" 1572 | dependencies = [ 1573 | "arrayvec", 1574 | ] 1575 | 1576 | [[package]] 1577 | name = "indexmap" 1578 | version = "2.7.0" 1579 | source = "registry+https://github.com/rust-lang/crates.io-index" 1580 | checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" 1581 | dependencies = [ 1582 | "equivalent", 1583 | "hashbrown 0.15.2", 1584 | ] 1585 | 1586 | [[package]] 1587 | name = "is_terminal_polyfill" 1588 | version = "1.70.1" 1589 | source = "registry+https://github.com/rust-lang/crates.io-index" 1590 | checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 1591 | 1592 | [[package]] 1593 | name = "itertools" 1594 | version = "0.14.0" 1595 | source = "registry+https://github.com/rust-lang/crates.io-index" 1596 | checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" 1597 | dependencies = [ 1598 | "either", 1599 | ] 1600 | 1601 | [[package]] 1602 | name = "jni" 1603 | version = "0.21.1" 1604 | source = "registry+https://github.com/rust-lang/crates.io-index" 1605 | checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" 1606 | dependencies = [ 1607 | "cesu8", 1608 | "cfg-if", 1609 | "combine", 1610 | "jni-sys", 1611 | "log", 1612 | "thiserror 1.0.69", 1613 | "walkdir", 1614 | "windows-sys 0.45.0", 1615 | ] 1616 | 1617 | [[package]] 1618 | name = "jni-sys" 1619 | version = "0.3.0" 1620 | source = "registry+https://github.com/rust-lang/crates.io-index" 1621 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 1622 | 1623 | [[package]] 1624 | name = "jobserver" 1625 | version = "0.1.27" 1626 | source = "registry+https://github.com/rust-lang/crates.io-index" 1627 | checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" 1628 | dependencies = [ 1629 | "libc", 1630 | ] 1631 | 1632 | [[package]] 1633 | name = "jpeg-decoder" 1634 | version = "0.3.1" 1635 | source = "registry+https://github.com/rust-lang/crates.io-index" 1636 | checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" 1637 | 1638 | [[package]] 1639 | name = "js-sys" 1640 | version = "0.3.77" 1641 | source = "registry+https://github.com/rust-lang/crates.io-index" 1642 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 1643 | dependencies = [ 1644 | "once_cell", 1645 | "wasm-bindgen", 1646 | ] 1647 | 1648 | [[package]] 1649 | name = "khronos-egl" 1650 | version = "6.0.0" 1651 | source = "registry+https://github.com/rust-lang/crates.io-index" 1652 | checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" 1653 | dependencies = [ 1654 | "libc", 1655 | "libloading", 1656 | "pkg-config", 1657 | ] 1658 | 1659 | [[package]] 1660 | name = "khronos_api" 1661 | version = "3.1.0" 1662 | source = "registry+https://github.com/rust-lang/crates.io-index" 1663 | checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" 1664 | 1665 | [[package]] 1666 | name = "libc" 1667 | version = "0.2.168" 1668 | source = "registry+https://github.com/rust-lang/crates.io-index" 1669 | checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" 1670 | 1671 | [[package]] 1672 | name = "libloading" 1673 | version = "0.8.1" 1674 | source = "registry+https://github.com/rust-lang/crates.io-index" 1675 | checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" 1676 | dependencies = [ 1677 | "cfg-if", 1678 | "windows-sys 0.48.0", 1679 | ] 1680 | 1681 | [[package]] 1682 | name = "libredox" 1683 | version = "0.0.2" 1684 | source = "registry+https://github.com/rust-lang/crates.io-index" 1685 | checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" 1686 | dependencies = [ 1687 | "bitflags 2.9.0", 1688 | "libc", 1689 | "redox_syscall", 1690 | ] 1691 | 1692 | [[package]] 1693 | name = "linux-raw-sys" 1694 | version = "0.4.12" 1695 | source = "registry+https://github.com/rust-lang/crates.io-index" 1696 | checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" 1697 | 1698 | [[package]] 1699 | name = "litrs" 1700 | version = "0.4.1" 1701 | source = "registry+https://github.com/rust-lang/crates.io-index" 1702 | checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" 1703 | 1704 | [[package]] 1705 | name = "lock_api" 1706 | version = "0.4.11" 1707 | source = "registry+https://github.com/rust-lang/crates.io-index" 1708 | checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" 1709 | dependencies = [ 1710 | "autocfg", 1711 | "scopeguard", 1712 | ] 1713 | 1714 | [[package]] 1715 | name = "log" 1716 | version = "0.4.22" 1717 | source = "registry+https://github.com/rust-lang/crates.io-index" 1718 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 1719 | 1720 | [[package]] 1721 | name = "malloc_buf" 1722 | version = "0.0.6" 1723 | source = "registry+https://github.com/rust-lang/crates.io-index" 1724 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" 1725 | dependencies = [ 1726 | "libc", 1727 | ] 1728 | 1729 | [[package]] 1730 | name = "memchr" 1731 | version = "2.7.1" 1732 | source = "registry+https://github.com/rust-lang/crates.io-index" 1733 | checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" 1734 | 1735 | [[package]] 1736 | name = "memmap2" 1737 | version = "0.9.3" 1738 | source = "registry+https://github.com/rust-lang/crates.io-index" 1739 | checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" 1740 | dependencies = [ 1741 | "libc", 1742 | ] 1743 | 1744 | [[package]] 1745 | name = "memoffset" 1746 | version = "0.7.1" 1747 | source = "registry+https://github.com/rust-lang/crates.io-index" 1748 | checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" 1749 | dependencies = [ 1750 | "autocfg", 1751 | ] 1752 | 1753 | [[package]] 1754 | name = "memoffset" 1755 | version = "0.9.0" 1756 | source = "registry+https://github.com/rust-lang/crates.io-index" 1757 | checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" 1758 | dependencies = [ 1759 | "autocfg", 1760 | ] 1761 | 1762 | [[package]] 1763 | name = "metal" 1764 | version = "0.31.0" 1765 | source = "registry+https://github.com/rust-lang/crates.io-index" 1766 | checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" 1767 | dependencies = [ 1768 | "bitflags 2.9.0", 1769 | "block", 1770 | "core-graphics-types", 1771 | "foreign-types 0.5.0", 1772 | "log", 1773 | "objc", 1774 | "paste", 1775 | ] 1776 | 1777 | [[package]] 1778 | name = "miniz_oxide" 1779 | version = "0.7.1" 1780 | source = "registry+https://github.com/rust-lang/crates.io-index" 1781 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 1782 | dependencies = [ 1783 | "adler", 1784 | "simd-adler32", 1785 | ] 1786 | 1787 | [[package]] 1788 | name = "naga" 1789 | version = "24.0.0" 1790 | source = "registry+https://github.com/rust-lang/crates.io-index" 1791 | checksum = "e380993072e52eef724eddfcde0ed013b0c023c3f0417336ed041aa9f076994e" 1792 | dependencies = [ 1793 | "arrayvec", 1794 | "bit-set", 1795 | "bitflags 2.9.0", 1796 | "cfg_aliases", 1797 | "codespan-reporting", 1798 | "hexf-parse", 1799 | "indexmap", 1800 | "log", 1801 | "rustc-hash", 1802 | "spirv", 1803 | "strum", 1804 | "termcolor", 1805 | "thiserror 2.0.12", 1806 | "unicode-xid", 1807 | ] 1808 | 1809 | [[package]] 1810 | name = "ndk" 1811 | version = "0.9.0" 1812 | source = "registry+https://github.com/rust-lang/crates.io-index" 1813 | checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" 1814 | dependencies = [ 1815 | "bitflags 2.9.0", 1816 | "jni-sys", 1817 | "log", 1818 | "ndk-sys 0.6.0+11769913", 1819 | "num_enum", 1820 | "raw-window-handle", 1821 | "thiserror 1.0.69", 1822 | ] 1823 | 1824 | [[package]] 1825 | name = "ndk-context" 1826 | version = "0.1.1" 1827 | source = "registry+https://github.com/rust-lang/crates.io-index" 1828 | checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 1829 | 1830 | [[package]] 1831 | name = "ndk-sys" 1832 | version = "0.5.0+25.2.9519653" 1833 | source = "registry+https://github.com/rust-lang/crates.io-index" 1834 | checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" 1835 | dependencies = [ 1836 | "jni-sys", 1837 | ] 1838 | 1839 | [[package]] 1840 | name = "ndk-sys" 1841 | version = "0.6.0+11769913" 1842 | source = "registry+https://github.com/rust-lang/crates.io-index" 1843 | checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" 1844 | dependencies = [ 1845 | "jni-sys", 1846 | ] 1847 | 1848 | [[package]] 1849 | name = "nix" 1850 | version = "0.26.4" 1851 | source = "registry+https://github.com/rust-lang/crates.io-index" 1852 | checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" 1853 | dependencies = [ 1854 | "bitflags 1.3.2", 1855 | "cfg-if", 1856 | "libc", 1857 | "memoffset 0.7.1", 1858 | ] 1859 | 1860 | [[package]] 1861 | name = "nix" 1862 | version = "0.29.0" 1863 | source = "registry+https://github.com/rust-lang/crates.io-index" 1864 | checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" 1865 | dependencies = [ 1866 | "bitflags 2.9.0", 1867 | "cfg-if", 1868 | "cfg_aliases", 1869 | "libc", 1870 | "memoffset 0.9.0", 1871 | ] 1872 | 1873 | [[package]] 1874 | name = "nohash-hasher" 1875 | version = "0.2.0" 1876 | source = "registry+https://github.com/rust-lang/crates.io-index" 1877 | checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" 1878 | 1879 | [[package]] 1880 | name = "num-traits" 1881 | version = "0.2.19" 1882 | source = "registry+https://github.com/rust-lang/crates.io-index" 1883 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1884 | dependencies = [ 1885 | "autocfg", 1886 | ] 1887 | 1888 | [[package]] 1889 | name = "num_enum" 1890 | version = "0.7.2" 1891 | source = "registry+https://github.com/rust-lang/crates.io-index" 1892 | checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" 1893 | dependencies = [ 1894 | "num_enum_derive", 1895 | ] 1896 | 1897 | [[package]] 1898 | name = "num_enum_derive" 1899 | version = "0.7.2" 1900 | source = "registry+https://github.com/rust-lang/crates.io-index" 1901 | checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" 1902 | dependencies = [ 1903 | "proc-macro-crate", 1904 | "proc-macro2", 1905 | "quote", 1906 | "syn", 1907 | ] 1908 | 1909 | [[package]] 1910 | name = "objc" 1911 | version = "0.2.7" 1912 | source = "registry+https://github.com/rust-lang/crates.io-index" 1913 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" 1914 | dependencies = [ 1915 | "malloc_buf", 1916 | ] 1917 | 1918 | [[package]] 1919 | name = "objc-foundation" 1920 | version = "0.1.1" 1921 | source = "registry+https://github.com/rust-lang/crates.io-index" 1922 | checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" 1923 | dependencies = [ 1924 | "block", 1925 | "objc", 1926 | "objc_id", 1927 | ] 1928 | 1929 | [[package]] 1930 | name = "objc-sys" 1931 | version = "0.3.5" 1932 | source = "registry+https://github.com/rust-lang/crates.io-index" 1933 | checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" 1934 | 1935 | [[package]] 1936 | name = "objc2" 1937 | version = "0.5.2" 1938 | source = "registry+https://github.com/rust-lang/crates.io-index" 1939 | checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" 1940 | dependencies = [ 1941 | "objc-sys", 1942 | "objc2-encode", 1943 | ] 1944 | 1945 | [[package]] 1946 | name = "objc2-app-kit" 1947 | version = "0.2.2" 1948 | source = "registry+https://github.com/rust-lang/crates.io-index" 1949 | checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" 1950 | dependencies = [ 1951 | "bitflags 2.9.0", 1952 | "block2", 1953 | "libc", 1954 | "objc2", 1955 | "objc2-core-data", 1956 | "objc2-core-image", 1957 | "objc2-foundation", 1958 | "objc2-quartz-core", 1959 | ] 1960 | 1961 | [[package]] 1962 | name = "objc2-cloud-kit" 1963 | version = "0.2.2" 1964 | source = "registry+https://github.com/rust-lang/crates.io-index" 1965 | checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" 1966 | dependencies = [ 1967 | "bitflags 2.9.0", 1968 | "block2", 1969 | "objc2", 1970 | "objc2-core-location", 1971 | "objc2-foundation", 1972 | ] 1973 | 1974 | [[package]] 1975 | name = "objc2-contacts" 1976 | version = "0.2.2" 1977 | source = "registry+https://github.com/rust-lang/crates.io-index" 1978 | checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" 1979 | dependencies = [ 1980 | "block2", 1981 | "objc2", 1982 | "objc2-foundation", 1983 | ] 1984 | 1985 | [[package]] 1986 | name = "objc2-core-data" 1987 | version = "0.2.2" 1988 | source = "registry+https://github.com/rust-lang/crates.io-index" 1989 | checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" 1990 | dependencies = [ 1991 | "bitflags 2.9.0", 1992 | "block2", 1993 | "objc2", 1994 | "objc2-foundation", 1995 | ] 1996 | 1997 | [[package]] 1998 | name = "objc2-core-image" 1999 | version = "0.2.2" 2000 | source = "registry+https://github.com/rust-lang/crates.io-index" 2001 | checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" 2002 | dependencies = [ 2003 | "block2", 2004 | "objc2", 2005 | "objc2-foundation", 2006 | "objc2-metal", 2007 | ] 2008 | 2009 | [[package]] 2010 | name = "objc2-core-location" 2011 | version = "0.2.2" 2012 | source = "registry+https://github.com/rust-lang/crates.io-index" 2013 | checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" 2014 | dependencies = [ 2015 | "block2", 2016 | "objc2", 2017 | "objc2-contacts", 2018 | "objc2-foundation", 2019 | ] 2020 | 2021 | [[package]] 2022 | name = "objc2-encode" 2023 | version = "4.0.3" 2024 | source = "registry+https://github.com/rust-lang/crates.io-index" 2025 | checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" 2026 | 2027 | [[package]] 2028 | name = "objc2-foundation" 2029 | version = "0.2.2" 2030 | source = "registry+https://github.com/rust-lang/crates.io-index" 2031 | checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" 2032 | dependencies = [ 2033 | "bitflags 2.9.0", 2034 | "block2", 2035 | "dispatch", 2036 | "libc", 2037 | "objc2", 2038 | ] 2039 | 2040 | [[package]] 2041 | name = "objc2-link-presentation" 2042 | version = "0.2.2" 2043 | source = "registry+https://github.com/rust-lang/crates.io-index" 2044 | checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" 2045 | dependencies = [ 2046 | "block2", 2047 | "objc2", 2048 | "objc2-app-kit", 2049 | "objc2-foundation", 2050 | ] 2051 | 2052 | [[package]] 2053 | name = "objc2-metal" 2054 | version = "0.2.2" 2055 | source = "registry+https://github.com/rust-lang/crates.io-index" 2056 | checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" 2057 | dependencies = [ 2058 | "bitflags 2.9.0", 2059 | "block2", 2060 | "objc2", 2061 | "objc2-foundation", 2062 | ] 2063 | 2064 | [[package]] 2065 | name = "objc2-quartz-core" 2066 | version = "0.2.2" 2067 | source = "registry+https://github.com/rust-lang/crates.io-index" 2068 | checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" 2069 | dependencies = [ 2070 | "bitflags 2.9.0", 2071 | "block2", 2072 | "objc2", 2073 | "objc2-foundation", 2074 | "objc2-metal", 2075 | ] 2076 | 2077 | [[package]] 2078 | name = "objc2-symbols" 2079 | version = "0.2.2" 2080 | source = "registry+https://github.com/rust-lang/crates.io-index" 2081 | checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" 2082 | dependencies = [ 2083 | "objc2", 2084 | "objc2-foundation", 2085 | ] 2086 | 2087 | [[package]] 2088 | name = "objc2-ui-kit" 2089 | version = "0.2.2" 2090 | source = "registry+https://github.com/rust-lang/crates.io-index" 2091 | checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" 2092 | dependencies = [ 2093 | "bitflags 2.9.0", 2094 | "block2", 2095 | "objc2", 2096 | "objc2-cloud-kit", 2097 | "objc2-core-data", 2098 | "objc2-core-image", 2099 | "objc2-core-location", 2100 | "objc2-foundation", 2101 | "objc2-link-presentation", 2102 | "objc2-quartz-core", 2103 | "objc2-symbols", 2104 | "objc2-uniform-type-identifiers", 2105 | "objc2-user-notifications", 2106 | ] 2107 | 2108 | [[package]] 2109 | name = "objc2-uniform-type-identifiers" 2110 | version = "0.2.2" 2111 | source = "registry+https://github.com/rust-lang/crates.io-index" 2112 | checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" 2113 | dependencies = [ 2114 | "block2", 2115 | "objc2", 2116 | "objc2-foundation", 2117 | ] 2118 | 2119 | [[package]] 2120 | name = "objc2-user-notifications" 2121 | version = "0.2.2" 2122 | source = "registry+https://github.com/rust-lang/crates.io-index" 2123 | checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" 2124 | dependencies = [ 2125 | "bitflags 2.9.0", 2126 | "block2", 2127 | "objc2", 2128 | "objc2-core-location", 2129 | "objc2-foundation", 2130 | ] 2131 | 2132 | [[package]] 2133 | name = "objc_id" 2134 | version = "0.1.1" 2135 | source = "registry+https://github.com/rust-lang/crates.io-index" 2136 | checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" 2137 | dependencies = [ 2138 | "objc", 2139 | ] 2140 | 2141 | [[package]] 2142 | name = "once_cell" 2143 | version = "1.20.2" 2144 | source = "registry+https://github.com/rust-lang/crates.io-index" 2145 | checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" 2146 | 2147 | [[package]] 2148 | name = "orbclient" 2149 | version = "0.3.47" 2150 | source = "registry+https://github.com/rust-lang/crates.io-index" 2151 | checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" 2152 | dependencies = [ 2153 | "libredox", 2154 | ] 2155 | 2156 | [[package]] 2157 | name = "ordered-float" 2158 | version = "4.6.0" 2159 | source = "registry+https://github.com/rust-lang/crates.io-index" 2160 | checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" 2161 | dependencies = [ 2162 | "num-traits", 2163 | ] 2164 | 2165 | [[package]] 2166 | name = "ordered-stream" 2167 | version = "0.2.0" 2168 | source = "registry+https://github.com/rust-lang/crates.io-index" 2169 | checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" 2170 | dependencies = [ 2171 | "futures-core", 2172 | "pin-project-lite", 2173 | ] 2174 | 2175 | [[package]] 2176 | name = "owned_ttf_parser" 2177 | version = "0.20.0" 2178 | source = "registry+https://github.com/rust-lang/crates.io-index" 2179 | checksum = "d4586edfe4c648c71797a74c84bacb32b52b212eff5dfe2bb9f2c599844023e7" 2180 | dependencies = [ 2181 | "ttf-parser", 2182 | ] 2183 | 2184 | [[package]] 2185 | name = "parking" 2186 | version = "2.2.0" 2187 | source = "registry+https://github.com/rust-lang/crates.io-index" 2188 | checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" 2189 | 2190 | [[package]] 2191 | name = "parking_lot" 2192 | version = "0.12.1" 2193 | source = "registry+https://github.com/rust-lang/crates.io-index" 2194 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 2195 | dependencies = [ 2196 | "lock_api", 2197 | "parking_lot_core", 2198 | ] 2199 | 2200 | [[package]] 2201 | name = "parking_lot_core" 2202 | version = "0.9.9" 2203 | source = "registry+https://github.com/rust-lang/crates.io-index" 2204 | checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" 2205 | dependencies = [ 2206 | "cfg-if", 2207 | "libc", 2208 | "redox_syscall", 2209 | "smallvec", 2210 | "windows-targets 0.48.5", 2211 | ] 2212 | 2213 | [[package]] 2214 | name = "paste" 2215 | version = "1.0.14" 2216 | source = "registry+https://github.com/rust-lang/crates.io-index" 2217 | checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" 2218 | 2219 | [[package]] 2220 | name = "percent-encoding" 2221 | version = "2.3.1" 2222 | source = "registry+https://github.com/rust-lang/crates.io-index" 2223 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 2224 | 2225 | [[package]] 2226 | name = "pin-project" 2227 | version = "1.1.5" 2228 | source = "registry+https://github.com/rust-lang/crates.io-index" 2229 | checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" 2230 | dependencies = [ 2231 | "pin-project-internal", 2232 | ] 2233 | 2234 | [[package]] 2235 | name = "pin-project-internal" 2236 | version = "1.1.5" 2237 | source = "registry+https://github.com/rust-lang/crates.io-index" 2238 | checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" 2239 | dependencies = [ 2240 | "proc-macro2", 2241 | "quote", 2242 | "syn", 2243 | ] 2244 | 2245 | [[package]] 2246 | name = "pin-project-lite" 2247 | version = "0.2.13" 2248 | source = "registry+https://github.com/rust-lang/crates.io-index" 2249 | checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" 2250 | 2251 | [[package]] 2252 | name = "pin-utils" 2253 | version = "0.1.0" 2254 | source = "registry+https://github.com/rust-lang/crates.io-index" 2255 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 2256 | 2257 | [[package]] 2258 | name = "piper" 2259 | version = "0.2.1" 2260 | source = "registry+https://github.com/rust-lang/crates.io-index" 2261 | checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" 2262 | dependencies = [ 2263 | "atomic-waker", 2264 | "fastrand", 2265 | "futures-io", 2266 | ] 2267 | 2268 | [[package]] 2269 | name = "pkg-config" 2270 | version = "0.3.28" 2271 | source = "registry+https://github.com/rust-lang/crates.io-index" 2272 | checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" 2273 | 2274 | [[package]] 2275 | name = "png" 2276 | version = "0.17.10" 2277 | source = "registry+https://github.com/rust-lang/crates.io-index" 2278 | checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" 2279 | dependencies = [ 2280 | "bitflags 1.3.2", 2281 | "crc32fast", 2282 | "fdeflate", 2283 | "flate2", 2284 | "miniz_oxide", 2285 | ] 2286 | 2287 | [[package]] 2288 | name = "polling" 2289 | version = "3.3.1" 2290 | source = "registry+https://github.com/rust-lang/crates.io-index" 2291 | checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" 2292 | dependencies = [ 2293 | "cfg-if", 2294 | "concurrent-queue", 2295 | "pin-project-lite", 2296 | "rustix", 2297 | "tracing", 2298 | "windows-sys 0.52.0", 2299 | ] 2300 | 2301 | [[package]] 2302 | name = "ppv-lite86" 2303 | version = "0.2.17" 2304 | source = "registry+https://github.com/rust-lang/crates.io-index" 2305 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 2306 | 2307 | [[package]] 2308 | name = "proc-macro-crate" 2309 | version = "3.2.0" 2310 | source = "registry+https://github.com/rust-lang/crates.io-index" 2311 | checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" 2312 | dependencies = [ 2313 | "toml_edit", 2314 | ] 2315 | 2316 | [[package]] 2317 | name = "proc-macro2" 2318 | version = "1.0.92" 2319 | source = "registry+https://github.com/rust-lang/crates.io-index" 2320 | checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" 2321 | dependencies = [ 2322 | "unicode-ident", 2323 | ] 2324 | 2325 | [[package]] 2326 | name = "profiling" 2327 | version = "1.0.16" 2328 | source = "registry+https://github.com/rust-lang/crates.io-index" 2329 | checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d" 2330 | 2331 | [[package]] 2332 | name = "quick-xml" 2333 | version = "0.30.0" 2334 | source = "registry+https://github.com/rust-lang/crates.io-index" 2335 | checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" 2336 | dependencies = [ 2337 | "memchr", 2338 | "serde", 2339 | ] 2340 | 2341 | [[package]] 2342 | name = "quick-xml" 2343 | version = "0.36.2" 2344 | source = "registry+https://github.com/rust-lang/crates.io-index" 2345 | checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" 2346 | dependencies = [ 2347 | "memchr", 2348 | ] 2349 | 2350 | [[package]] 2351 | name = "quote" 2352 | version = "1.0.37" 2353 | source = "registry+https://github.com/rust-lang/crates.io-index" 2354 | checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 2355 | dependencies = [ 2356 | "proc-macro2", 2357 | ] 2358 | 2359 | [[package]] 2360 | name = "rand" 2361 | version = "0.8.5" 2362 | source = "registry+https://github.com/rust-lang/crates.io-index" 2363 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 2364 | dependencies = [ 2365 | "libc", 2366 | "rand_chacha", 2367 | "rand_core", 2368 | ] 2369 | 2370 | [[package]] 2371 | name = "rand_chacha" 2372 | version = "0.3.1" 2373 | source = "registry+https://github.com/rust-lang/crates.io-index" 2374 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 2375 | dependencies = [ 2376 | "ppv-lite86", 2377 | "rand_core", 2378 | ] 2379 | 2380 | [[package]] 2381 | name = "rand_core" 2382 | version = "0.6.4" 2383 | source = "registry+https://github.com/rust-lang/crates.io-index" 2384 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 2385 | dependencies = [ 2386 | "getrandom", 2387 | ] 2388 | 2389 | [[package]] 2390 | name = "raw-window-handle" 2391 | version = "0.6.2" 2392 | source = "registry+https://github.com/rust-lang/crates.io-index" 2393 | checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" 2394 | 2395 | [[package]] 2396 | name = "redox_syscall" 2397 | version = "0.4.1" 2398 | source = "registry+https://github.com/rust-lang/crates.io-index" 2399 | checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 2400 | dependencies = [ 2401 | "bitflags 1.3.2", 2402 | ] 2403 | 2404 | [[package]] 2405 | name = "regex" 2406 | version = "1.10.2" 2407 | source = "registry+https://github.com/rust-lang/crates.io-index" 2408 | checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" 2409 | dependencies = [ 2410 | "aho-corasick", 2411 | "memchr", 2412 | "regex-automata", 2413 | "regex-syntax", 2414 | ] 2415 | 2416 | [[package]] 2417 | name = "regex-automata" 2418 | version = "0.4.3" 2419 | source = "registry+https://github.com/rust-lang/crates.io-index" 2420 | checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" 2421 | dependencies = [ 2422 | "aho-corasick", 2423 | "memchr", 2424 | "regex-syntax", 2425 | ] 2426 | 2427 | [[package]] 2428 | name = "regex-syntax" 2429 | version = "0.8.2" 2430 | source = "registry+https://github.com/rust-lang/crates.io-index" 2431 | checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" 2432 | 2433 | [[package]] 2434 | name = "renderdoc-sys" 2435 | version = "1.1.0" 2436 | source = "registry+https://github.com/rust-lang/crates.io-index" 2437 | checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" 2438 | 2439 | [[package]] 2440 | name = "ron" 2441 | version = "0.8.1" 2442 | source = "registry+https://github.com/rust-lang/crates.io-index" 2443 | checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" 2444 | dependencies = [ 2445 | "base64", 2446 | "bitflags 2.9.0", 2447 | "serde", 2448 | "serde_derive", 2449 | ] 2450 | 2451 | [[package]] 2452 | name = "rustc-hash" 2453 | version = "1.1.0" 2454 | source = "registry+https://github.com/rust-lang/crates.io-index" 2455 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 2456 | 2457 | [[package]] 2458 | name = "rustix" 2459 | version = "0.38.28" 2460 | source = "registry+https://github.com/rust-lang/crates.io-index" 2461 | checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" 2462 | dependencies = [ 2463 | "bitflags 2.9.0", 2464 | "errno", 2465 | "libc", 2466 | "linux-raw-sys", 2467 | "windows-sys 0.52.0", 2468 | ] 2469 | 2470 | [[package]] 2471 | name = "rustversion" 2472 | version = "1.0.20" 2473 | source = "registry+https://github.com/rust-lang/crates.io-index" 2474 | checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" 2475 | 2476 | [[package]] 2477 | name = "same-file" 2478 | version = "1.0.6" 2479 | source = "registry+https://github.com/rust-lang/crates.io-index" 2480 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 2481 | dependencies = [ 2482 | "winapi-util", 2483 | ] 2484 | 2485 | [[package]] 2486 | name = "scoped-tls" 2487 | version = "1.0.1" 2488 | source = "registry+https://github.com/rust-lang/crates.io-index" 2489 | checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 2490 | 2491 | [[package]] 2492 | name = "scopeguard" 2493 | version = "1.2.0" 2494 | source = "registry+https://github.com/rust-lang/crates.io-index" 2495 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 2496 | 2497 | [[package]] 2498 | name = "serde" 2499 | version = "1.0.216" 2500 | source = "registry+https://github.com/rust-lang/crates.io-index" 2501 | checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" 2502 | dependencies = [ 2503 | "serde_derive", 2504 | ] 2505 | 2506 | [[package]] 2507 | name = "serde_derive" 2508 | version = "1.0.216" 2509 | source = "registry+https://github.com/rust-lang/crates.io-index" 2510 | checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" 2511 | dependencies = [ 2512 | "proc-macro2", 2513 | "quote", 2514 | "syn", 2515 | ] 2516 | 2517 | [[package]] 2518 | name = "serde_repr" 2519 | version = "0.1.19" 2520 | source = "registry+https://github.com/rust-lang/crates.io-index" 2521 | checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" 2522 | dependencies = [ 2523 | "proc-macro2", 2524 | "quote", 2525 | "syn", 2526 | ] 2527 | 2528 | [[package]] 2529 | name = "sha1" 2530 | version = "0.10.6" 2531 | source = "registry+https://github.com/rust-lang/crates.io-index" 2532 | checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 2533 | dependencies = [ 2534 | "cfg-if", 2535 | "cpufeatures", 2536 | "digest", 2537 | ] 2538 | 2539 | [[package]] 2540 | name = "signal-hook-registry" 2541 | version = "1.4.1" 2542 | source = "registry+https://github.com/rust-lang/crates.io-index" 2543 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 2544 | dependencies = [ 2545 | "libc", 2546 | ] 2547 | 2548 | [[package]] 2549 | name = "simd-adler32" 2550 | version = "0.3.7" 2551 | source = "registry+https://github.com/rust-lang/crates.io-index" 2552 | checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" 2553 | 2554 | [[package]] 2555 | name = "slab" 2556 | version = "0.4.9" 2557 | source = "registry+https://github.com/rust-lang/crates.io-index" 2558 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 2559 | dependencies = [ 2560 | "autocfg", 2561 | ] 2562 | 2563 | [[package]] 2564 | name = "slotmap" 2565 | version = "1.0.7" 2566 | source = "registry+https://github.com/rust-lang/crates.io-index" 2567 | checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" 2568 | dependencies = [ 2569 | "version_check", 2570 | ] 2571 | 2572 | [[package]] 2573 | name = "smallvec" 2574 | version = "1.11.2" 2575 | source = "registry+https://github.com/rust-lang/crates.io-index" 2576 | checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" 2577 | 2578 | [[package]] 2579 | name = "smithay-client-toolkit" 2580 | version = "0.19.2" 2581 | source = "registry+https://github.com/rust-lang/crates.io-index" 2582 | checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" 2583 | dependencies = [ 2584 | "bitflags 2.9.0", 2585 | "calloop", 2586 | "calloop-wayland-source", 2587 | "cursor-icon", 2588 | "libc", 2589 | "log", 2590 | "memmap2", 2591 | "rustix", 2592 | "thiserror 1.0.69", 2593 | "wayland-backend", 2594 | "wayland-client", 2595 | "wayland-csd-frame", 2596 | "wayland-cursor", 2597 | "wayland-protocols", 2598 | "wayland-protocols-wlr", 2599 | "wayland-scanner", 2600 | "xkeysym", 2601 | ] 2602 | 2603 | [[package]] 2604 | name = "smithay-clipboard" 2605 | version = "0.7.2" 2606 | source = "registry+https://github.com/rust-lang/crates.io-index" 2607 | checksum = "cc8216eec463674a0e90f29e0ae41a4db573ec5b56b1c6c1c71615d249b6d846" 2608 | dependencies = [ 2609 | "libc", 2610 | "smithay-client-toolkit", 2611 | "wayland-backend", 2612 | ] 2613 | 2614 | [[package]] 2615 | name = "smol_str" 2616 | version = "0.2.0" 2617 | source = "registry+https://github.com/rust-lang/crates.io-index" 2618 | checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" 2619 | dependencies = [ 2620 | "serde", 2621 | ] 2622 | 2623 | [[package]] 2624 | name = "spirv" 2625 | version = "0.3.0+sdk-1.3.268.0" 2626 | source = "registry+https://github.com/rust-lang/crates.io-index" 2627 | checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" 2628 | dependencies = [ 2629 | "bitflags 2.9.0", 2630 | ] 2631 | 2632 | [[package]] 2633 | name = "static_assertions" 2634 | version = "1.1.0" 2635 | source = "registry+https://github.com/rust-lang/crates.io-index" 2636 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 2637 | 2638 | [[package]] 2639 | name = "str-buf" 2640 | version = "1.0.6" 2641 | source = "registry+https://github.com/rust-lang/crates.io-index" 2642 | checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" 2643 | 2644 | [[package]] 2645 | name = "strum" 2646 | version = "0.26.3" 2647 | source = "registry+https://github.com/rust-lang/crates.io-index" 2648 | checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" 2649 | dependencies = [ 2650 | "strum_macros", 2651 | ] 2652 | 2653 | [[package]] 2654 | name = "strum_macros" 2655 | version = "0.26.4" 2656 | source = "registry+https://github.com/rust-lang/crates.io-index" 2657 | checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" 2658 | dependencies = [ 2659 | "heck", 2660 | "proc-macro2", 2661 | "quote", 2662 | "rustversion", 2663 | "syn", 2664 | ] 2665 | 2666 | [[package]] 2667 | name = "syn" 2668 | version = "2.0.90" 2669 | source = "registry+https://github.com/rust-lang/crates.io-index" 2670 | checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" 2671 | dependencies = [ 2672 | "proc-macro2", 2673 | "quote", 2674 | "unicode-ident", 2675 | ] 2676 | 2677 | [[package]] 2678 | name = "tempfile" 2679 | version = "3.9.0" 2680 | source = "registry+https://github.com/rust-lang/crates.io-index" 2681 | checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" 2682 | dependencies = [ 2683 | "cfg-if", 2684 | "fastrand", 2685 | "redox_syscall", 2686 | "rustix", 2687 | "windows-sys 0.52.0", 2688 | ] 2689 | 2690 | [[package]] 2691 | name = "termcolor" 2692 | version = "1.4.1" 2693 | source = "registry+https://github.com/rust-lang/crates.io-index" 2694 | checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" 2695 | dependencies = [ 2696 | "winapi-util", 2697 | ] 2698 | 2699 | [[package]] 2700 | name = "thiserror" 2701 | version = "1.0.69" 2702 | source = "registry+https://github.com/rust-lang/crates.io-index" 2703 | checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 2704 | dependencies = [ 2705 | "thiserror-impl 1.0.69", 2706 | ] 2707 | 2708 | [[package]] 2709 | name = "thiserror" 2710 | version = "2.0.12" 2711 | source = "registry+https://github.com/rust-lang/crates.io-index" 2712 | checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" 2713 | dependencies = [ 2714 | "thiserror-impl 2.0.12", 2715 | ] 2716 | 2717 | [[package]] 2718 | name = "thiserror-impl" 2719 | version = "1.0.69" 2720 | source = "registry+https://github.com/rust-lang/crates.io-index" 2721 | checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 2722 | dependencies = [ 2723 | "proc-macro2", 2724 | "quote", 2725 | "syn", 2726 | ] 2727 | 2728 | [[package]] 2729 | name = "thiserror-impl" 2730 | version = "2.0.12" 2731 | source = "registry+https://github.com/rust-lang/crates.io-index" 2732 | checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" 2733 | dependencies = [ 2734 | "proc-macro2", 2735 | "quote", 2736 | "syn", 2737 | ] 2738 | 2739 | [[package]] 2740 | name = "tiff" 2741 | version = "0.9.1" 2742 | source = "registry+https://github.com/rust-lang/crates.io-index" 2743 | checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" 2744 | dependencies = [ 2745 | "flate2", 2746 | "jpeg-decoder", 2747 | "weezl", 2748 | ] 2749 | 2750 | [[package]] 2751 | name = "tinyvec" 2752 | version = "1.6.0" 2753 | source = "registry+https://github.com/rust-lang/crates.io-index" 2754 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2755 | dependencies = [ 2756 | "tinyvec_macros", 2757 | ] 2758 | 2759 | [[package]] 2760 | name = "tinyvec_macros" 2761 | version = "0.1.1" 2762 | source = "registry+https://github.com/rust-lang/crates.io-index" 2763 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2764 | 2765 | [[package]] 2766 | name = "toml_datetime" 2767 | version = "0.6.8" 2768 | source = "registry+https://github.com/rust-lang/crates.io-index" 2769 | checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" 2770 | 2771 | [[package]] 2772 | name = "toml_edit" 2773 | version = "0.22.22" 2774 | source = "registry+https://github.com/rust-lang/crates.io-index" 2775 | checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" 2776 | dependencies = [ 2777 | "indexmap", 2778 | "toml_datetime", 2779 | "winnow", 2780 | ] 2781 | 2782 | [[package]] 2783 | name = "tracing" 2784 | version = "0.1.40" 2785 | source = "registry+https://github.com/rust-lang/crates.io-index" 2786 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 2787 | dependencies = [ 2788 | "pin-project-lite", 2789 | "tracing-attributes", 2790 | "tracing-core", 2791 | ] 2792 | 2793 | [[package]] 2794 | name = "tracing-attributes" 2795 | version = "0.1.27" 2796 | source = "registry+https://github.com/rust-lang/crates.io-index" 2797 | checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" 2798 | dependencies = [ 2799 | "proc-macro2", 2800 | "quote", 2801 | "syn", 2802 | ] 2803 | 2804 | [[package]] 2805 | name = "tracing-core" 2806 | version = "0.1.32" 2807 | source = "registry+https://github.com/rust-lang/crates.io-index" 2808 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 2809 | dependencies = [ 2810 | "once_cell", 2811 | ] 2812 | 2813 | [[package]] 2814 | name = "ttf-parser" 2815 | version = "0.20.0" 2816 | source = "registry+https://github.com/rust-lang/crates.io-index" 2817 | checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" 2818 | 2819 | [[package]] 2820 | name = "type-map" 2821 | version = "0.5.0" 2822 | source = "registry+https://github.com/rust-lang/crates.io-index" 2823 | checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" 2824 | dependencies = [ 2825 | "rustc-hash", 2826 | ] 2827 | 2828 | [[package]] 2829 | name = "typenum" 2830 | version = "1.17.0" 2831 | source = "registry+https://github.com/rust-lang/crates.io-index" 2832 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 2833 | 2834 | [[package]] 2835 | name = "uds_windows" 2836 | version = "1.1.0" 2837 | source = "registry+https://github.com/rust-lang/crates.io-index" 2838 | checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" 2839 | dependencies = [ 2840 | "memoffset 0.9.0", 2841 | "tempfile", 2842 | "winapi", 2843 | ] 2844 | 2845 | [[package]] 2846 | name = "unicode-bidi" 2847 | version = "0.3.14" 2848 | source = "registry+https://github.com/rust-lang/crates.io-index" 2849 | checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" 2850 | 2851 | [[package]] 2852 | name = "unicode-ident" 2853 | version = "1.0.12" 2854 | source = "registry+https://github.com/rust-lang/crates.io-index" 2855 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 2856 | 2857 | [[package]] 2858 | name = "unicode-normalization" 2859 | version = "0.1.22" 2860 | source = "registry+https://github.com/rust-lang/crates.io-index" 2861 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 2862 | dependencies = [ 2863 | "tinyvec", 2864 | ] 2865 | 2866 | [[package]] 2867 | name = "unicode-segmentation" 2868 | version = "1.10.1" 2869 | source = "registry+https://github.com/rust-lang/crates.io-index" 2870 | checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" 2871 | 2872 | [[package]] 2873 | name = "unicode-width" 2874 | version = "0.1.14" 2875 | source = "registry+https://github.com/rust-lang/crates.io-index" 2876 | checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" 2877 | 2878 | [[package]] 2879 | name = "unicode-xid" 2880 | version = "0.2.6" 2881 | source = "registry+https://github.com/rust-lang/crates.io-index" 2882 | checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 2883 | 2884 | [[package]] 2885 | name = "url" 2886 | version = "2.5.0" 2887 | source = "registry+https://github.com/rust-lang/crates.io-index" 2888 | checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" 2889 | dependencies = [ 2890 | "form_urlencoded", 2891 | "idna", 2892 | "percent-encoding", 2893 | ] 2894 | 2895 | [[package]] 2896 | name = "utf8parse" 2897 | version = "0.2.2" 2898 | source = "registry+https://github.com/rust-lang/crates.io-index" 2899 | checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 2900 | 2901 | [[package]] 2902 | name = "version_check" 2903 | version = "0.9.4" 2904 | source = "registry+https://github.com/rust-lang/crates.io-index" 2905 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2906 | 2907 | [[package]] 2908 | name = "walkdir" 2909 | version = "2.4.0" 2910 | source = "registry+https://github.com/rust-lang/crates.io-index" 2911 | checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" 2912 | dependencies = [ 2913 | "same-file", 2914 | "winapi-util", 2915 | ] 2916 | 2917 | [[package]] 2918 | name = "wasi" 2919 | version = "0.11.0+wasi-snapshot-preview1" 2920 | source = "registry+https://github.com/rust-lang/crates.io-index" 2921 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2922 | 2923 | [[package]] 2924 | name = "wasm-bindgen" 2925 | version = "0.2.100" 2926 | source = "registry+https://github.com/rust-lang/crates.io-index" 2927 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 2928 | dependencies = [ 2929 | "cfg-if", 2930 | "once_cell", 2931 | "rustversion", 2932 | "wasm-bindgen-macro", 2933 | ] 2934 | 2935 | [[package]] 2936 | name = "wasm-bindgen-backend" 2937 | version = "0.2.100" 2938 | source = "registry+https://github.com/rust-lang/crates.io-index" 2939 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 2940 | dependencies = [ 2941 | "bumpalo", 2942 | "log", 2943 | "proc-macro2", 2944 | "quote", 2945 | "syn", 2946 | "wasm-bindgen-shared", 2947 | ] 2948 | 2949 | [[package]] 2950 | name = "wasm-bindgen-futures" 2951 | version = "0.4.50" 2952 | source = "registry+https://github.com/rust-lang/crates.io-index" 2953 | checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" 2954 | dependencies = [ 2955 | "cfg-if", 2956 | "js-sys", 2957 | "once_cell", 2958 | "wasm-bindgen", 2959 | "web-sys", 2960 | ] 2961 | 2962 | [[package]] 2963 | name = "wasm-bindgen-macro" 2964 | version = "0.2.100" 2965 | source = "registry+https://github.com/rust-lang/crates.io-index" 2966 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 2967 | dependencies = [ 2968 | "quote", 2969 | "wasm-bindgen-macro-support", 2970 | ] 2971 | 2972 | [[package]] 2973 | name = "wasm-bindgen-macro-support" 2974 | version = "0.2.100" 2975 | source = "registry+https://github.com/rust-lang/crates.io-index" 2976 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 2977 | dependencies = [ 2978 | "proc-macro2", 2979 | "quote", 2980 | "syn", 2981 | "wasm-bindgen-backend", 2982 | "wasm-bindgen-shared", 2983 | ] 2984 | 2985 | [[package]] 2986 | name = "wasm-bindgen-shared" 2987 | version = "0.2.100" 2988 | source = "registry+https://github.com/rust-lang/crates.io-index" 2989 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 2990 | dependencies = [ 2991 | "unicode-ident", 2992 | ] 2993 | 2994 | [[package]] 2995 | name = "wayland-backend" 2996 | version = "0.3.7" 2997 | source = "registry+https://github.com/rust-lang/crates.io-index" 2998 | checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" 2999 | dependencies = [ 3000 | "cc", 3001 | "downcast-rs", 3002 | "rustix", 3003 | "scoped-tls", 3004 | "smallvec", 3005 | "wayland-sys", 3006 | ] 3007 | 3008 | [[package]] 3009 | name = "wayland-client" 3010 | version = "0.31.6" 3011 | source = "registry+https://github.com/rust-lang/crates.io-index" 3012 | checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" 3013 | dependencies = [ 3014 | "bitflags 2.9.0", 3015 | "rustix", 3016 | "wayland-backend", 3017 | "wayland-scanner", 3018 | ] 3019 | 3020 | [[package]] 3021 | name = "wayland-csd-frame" 3022 | version = "0.3.0" 3023 | source = "registry+https://github.com/rust-lang/crates.io-index" 3024 | checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" 3025 | dependencies = [ 3026 | "bitflags 2.9.0", 3027 | "cursor-icon", 3028 | "wayland-backend", 3029 | ] 3030 | 3031 | [[package]] 3032 | name = "wayland-cursor" 3033 | version = "0.31.0" 3034 | source = "registry+https://github.com/rust-lang/crates.io-index" 3035 | checksum = "a44aa20ae986659d6c77d64d808a046996a932aa763913864dc40c359ef7ad5b" 3036 | dependencies = [ 3037 | "nix 0.26.4", 3038 | "wayland-client", 3039 | "xcursor", 3040 | ] 3041 | 3042 | [[package]] 3043 | name = "wayland-protocols" 3044 | version = "0.32.4" 3045 | source = "registry+https://github.com/rust-lang/crates.io-index" 3046 | checksum = "2b5755d77ae9040bb872a25026555ce4cb0ae75fd923e90d25fba07d81057de0" 3047 | dependencies = [ 3048 | "bitflags 2.9.0", 3049 | "wayland-backend", 3050 | "wayland-client", 3051 | "wayland-scanner", 3052 | ] 3053 | 3054 | [[package]] 3055 | name = "wayland-protocols-plasma" 3056 | version = "0.3.4" 3057 | source = "registry+https://github.com/rust-lang/crates.io-index" 3058 | checksum = "8a0a41a6875e585172495f7a96dfa42ca7e0213868f4f15c313f7c33221a7eff" 3059 | dependencies = [ 3060 | "bitflags 2.9.0", 3061 | "wayland-backend", 3062 | "wayland-client", 3063 | "wayland-protocols", 3064 | "wayland-scanner", 3065 | ] 3066 | 3067 | [[package]] 3068 | name = "wayland-protocols-wlr" 3069 | version = "0.3.4" 3070 | source = "registry+https://github.com/rust-lang/crates.io-index" 3071 | checksum = "dad87b5fd1b1d3ca2f792df8f686a2a11e3fe1077b71096f7a175ab699f89109" 3072 | dependencies = [ 3073 | "bitflags 2.9.0", 3074 | "wayland-backend", 3075 | "wayland-client", 3076 | "wayland-protocols", 3077 | "wayland-scanner", 3078 | ] 3079 | 3080 | [[package]] 3081 | name = "wayland-scanner" 3082 | version = "0.31.5" 3083 | source = "registry+https://github.com/rust-lang/crates.io-index" 3084 | checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" 3085 | dependencies = [ 3086 | "proc-macro2", 3087 | "quick-xml 0.36.2", 3088 | "quote", 3089 | ] 3090 | 3091 | [[package]] 3092 | name = "wayland-sys" 3093 | version = "0.31.5" 3094 | source = "registry+https://github.com/rust-lang/crates.io-index" 3095 | checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" 3096 | dependencies = [ 3097 | "dlib", 3098 | "log", 3099 | "once_cell", 3100 | "pkg-config", 3101 | ] 3102 | 3103 | [[package]] 3104 | name = "web-sys" 3105 | version = "0.3.77" 3106 | source = "registry+https://github.com/rust-lang/crates.io-index" 3107 | checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" 3108 | dependencies = [ 3109 | "js-sys", 3110 | "wasm-bindgen", 3111 | ] 3112 | 3113 | [[package]] 3114 | name = "web-time" 3115 | version = "1.1.0" 3116 | source = "registry+https://github.com/rust-lang/crates.io-index" 3117 | checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" 3118 | dependencies = [ 3119 | "js-sys", 3120 | "wasm-bindgen", 3121 | ] 3122 | 3123 | [[package]] 3124 | name = "webbrowser" 3125 | version = "1.0.1" 3126 | source = "registry+https://github.com/rust-lang/crates.io-index" 3127 | checksum = "425ba64c1e13b1c6e8c5d2541c8fac10022ca584f33da781db01b5756aef1f4e" 3128 | dependencies = [ 3129 | "block2", 3130 | "core-foundation", 3131 | "home", 3132 | "jni", 3133 | "log", 3134 | "ndk-context", 3135 | "objc2", 3136 | "objc2-foundation", 3137 | "url", 3138 | "web-sys", 3139 | ] 3140 | 3141 | [[package]] 3142 | name = "weezl" 3143 | version = "0.1.8" 3144 | source = "registry+https://github.com/rust-lang/crates.io-index" 3145 | checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" 3146 | 3147 | [[package]] 3148 | name = "wgpu" 3149 | version = "24.0.1" 3150 | source = "registry+https://github.com/rust-lang/crates.io-index" 3151 | checksum = "47f55718f85c2fa756edffa0e7f0e0a60aba463d1362b57e23123c58f035e4b6" 3152 | dependencies = [ 3153 | "arrayvec", 3154 | "bitflags 2.9.0", 3155 | "cfg_aliases", 3156 | "document-features", 3157 | "js-sys", 3158 | "log", 3159 | "parking_lot", 3160 | "profiling", 3161 | "raw-window-handle", 3162 | "smallvec", 3163 | "static_assertions", 3164 | "wasm-bindgen", 3165 | "wasm-bindgen-futures", 3166 | "web-sys", 3167 | "wgpu-core", 3168 | "wgpu-hal", 3169 | "wgpu-types", 3170 | ] 3171 | 3172 | [[package]] 3173 | name = "wgpu-core" 3174 | version = "24.0.2" 3175 | source = "registry+https://github.com/rust-lang/crates.io-index" 3176 | checksum = "671c25545d479b47d3f0a8e373aceb2060b67c6eb841b24ac8c32348151c7a0c" 3177 | dependencies = [ 3178 | "arrayvec", 3179 | "bit-vec", 3180 | "bitflags 2.9.0", 3181 | "cfg_aliases", 3182 | "document-features", 3183 | "indexmap", 3184 | "log", 3185 | "naga", 3186 | "once_cell", 3187 | "parking_lot", 3188 | "profiling", 3189 | "raw-window-handle", 3190 | "rustc-hash", 3191 | "smallvec", 3192 | "thiserror 2.0.12", 3193 | "wgpu-hal", 3194 | "wgpu-types", 3195 | ] 3196 | 3197 | [[package]] 3198 | name = "wgpu-hal" 3199 | version = "24.0.2" 3200 | source = "registry+https://github.com/rust-lang/crates.io-index" 3201 | checksum = "4317a17171dc20e6577bf606796794580accae0716a69edbc7388c86a3ec9f23" 3202 | dependencies = [ 3203 | "android_system_properties", 3204 | "arrayvec", 3205 | "ash", 3206 | "bitflags 2.9.0", 3207 | "bytemuck", 3208 | "cfg_aliases", 3209 | "core-graphics-types", 3210 | "glow", 3211 | "glutin_wgl_sys", 3212 | "gpu-alloc", 3213 | "gpu-descriptor", 3214 | "js-sys", 3215 | "khronos-egl", 3216 | "libc", 3217 | "libloading", 3218 | "log", 3219 | "metal", 3220 | "naga", 3221 | "ndk-sys 0.5.0+25.2.9519653", 3222 | "objc", 3223 | "once_cell", 3224 | "ordered-float", 3225 | "parking_lot", 3226 | "profiling", 3227 | "raw-window-handle", 3228 | "renderdoc-sys", 3229 | "rustc-hash", 3230 | "smallvec", 3231 | "thiserror 2.0.12", 3232 | "wasm-bindgen", 3233 | "web-sys", 3234 | "wgpu-types", 3235 | "windows", 3236 | ] 3237 | 3238 | [[package]] 3239 | name = "wgpu-types" 3240 | version = "24.0.0" 3241 | source = "registry+https://github.com/rust-lang/crates.io-index" 3242 | checksum = "50ac044c0e76c03a0378e7786ac505d010a873665e2d51383dcff8dd227dc69c" 3243 | dependencies = [ 3244 | "bitflags 2.9.0", 3245 | "js-sys", 3246 | "log", 3247 | "web-sys", 3248 | ] 3249 | 3250 | [[package]] 3251 | name = "winapi" 3252 | version = "0.3.9" 3253 | source = "registry+https://github.com/rust-lang/crates.io-index" 3254 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 3255 | dependencies = [ 3256 | "winapi-i686-pc-windows-gnu", 3257 | "winapi-x86_64-pc-windows-gnu", 3258 | ] 3259 | 3260 | [[package]] 3261 | name = "winapi-i686-pc-windows-gnu" 3262 | version = "0.4.0" 3263 | source = "registry+https://github.com/rust-lang/crates.io-index" 3264 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 3265 | 3266 | [[package]] 3267 | name = "winapi-util" 3268 | version = "0.1.6" 3269 | source = "registry+https://github.com/rust-lang/crates.io-index" 3270 | checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" 3271 | dependencies = [ 3272 | "winapi", 3273 | ] 3274 | 3275 | [[package]] 3276 | name = "winapi-wsapoll" 3277 | version = "0.1.1" 3278 | source = "registry+https://github.com/rust-lang/crates.io-index" 3279 | checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" 3280 | dependencies = [ 3281 | "winapi", 3282 | ] 3283 | 3284 | [[package]] 3285 | name = "winapi-x86_64-pc-windows-gnu" 3286 | version = "0.4.0" 3287 | source = "registry+https://github.com/rust-lang/crates.io-index" 3288 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 3289 | 3290 | [[package]] 3291 | name = "windows" 3292 | version = "0.58.0" 3293 | source = "registry+https://github.com/rust-lang/crates.io-index" 3294 | checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" 3295 | dependencies = [ 3296 | "windows-core", 3297 | "windows-targets 0.52.6", 3298 | ] 3299 | 3300 | [[package]] 3301 | name = "windows-core" 3302 | version = "0.58.0" 3303 | source = "registry+https://github.com/rust-lang/crates.io-index" 3304 | checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" 3305 | dependencies = [ 3306 | "windows-implement", 3307 | "windows-interface", 3308 | "windows-result", 3309 | "windows-strings", 3310 | "windows-targets 0.52.6", 3311 | ] 3312 | 3313 | [[package]] 3314 | name = "windows-implement" 3315 | version = "0.58.0" 3316 | source = "registry+https://github.com/rust-lang/crates.io-index" 3317 | checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" 3318 | dependencies = [ 3319 | "proc-macro2", 3320 | "quote", 3321 | "syn", 3322 | ] 3323 | 3324 | [[package]] 3325 | name = "windows-interface" 3326 | version = "0.58.0" 3327 | source = "registry+https://github.com/rust-lang/crates.io-index" 3328 | checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" 3329 | dependencies = [ 3330 | "proc-macro2", 3331 | "quote", 3332 | "syn", 3333 | ] 3334 | 3335 | [[package]] 3336 | name = "windows-result" 3337 | version = "0.2.0" 3338 | source = "registry+https://github.com/rust-lang/crates.io-index" 3339 | checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" 3340 | dependencies = [ 3341 | "windows-targets 0.52.6", 3342 | ] 3343 | 3344 | [[package]] 3345 | name = "windows-strings" 3346 | version = "0.1.0" 3347 | source = "registry+https://github.com/rust-lang/crates.io-index" 3348 | checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" 3349 | dependencies = [ 3350 | "windows-result", 3351 | "windows-targets 0.52.6", 3352 | ] 3353 | 3354 | [[package]] 3355 | name = "windows-sys" 3356 | version = "0.45.0" 3357 | source = "registry+https://github.com/rust-lang/crates.io-index" 3358 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 3359 | dependencies = [ 3360 | "windows-targets 0.42.2", 3361 | ] 3362 | 3363 | [[package]] 3364 | name = "windows-sys" 3365 | version = "0.48.0" 3366 | source = "registry+https://github.com/rust-lang/crates.io-index" 3367 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 3368 | dependencies = [ 3369 | "windows-targets 0.48.5", 3370 | ] 3371 | 3372 | [[package]] 3373 | name = "windows-sys" 3374 | version = "0.52.0" 3375 | source = "registry+https://github.com/rust-lang/crates.io-index" 3376 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 3377 | dependencies = [ 3378 | "windows-targets 0.52.6", 3379 | ] 3380 | 3381 | [[package]] 3382 | name = "windows-sys" 3383 | version = "0.59.0" 3384 | source = "registry+https://github.com/rust-lang/crates.io-index" 3385 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 3386 | dependencies = [ 3387 | "windows-targets 0.52.6", 3388 | ] 3389 | 3390 | [[package]] 3391 | name = "windows-targets" 3392 | version = "0.42.2" 3393 | source = "registry+https://github.com/rust-lang/crates.io-index" 3394 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 3395 | dependencies = [ 3396 | "windows_aarch64_gnullvm 0.42.2", 3397 | "windows_aarch64_msvc 0.42.2", 3398 | "windows_i686_gnu 0.42.2", 3399 | "windows_i686_msvc 0.42.2", 3400 | "windows_x86_64_gnu 0.42.2", 3401 | "windows_x86_64_gnullvm 0.42.2", 3402 | "windows_x86_64_msvc 0.42.2", 3403 | ] 3404 | 3405 | [[package]] 3406 | name = "windows-targets" 3407 | version = "0.48.5" 3408 | source = "registry+https://github.com/rust-lang/crates.io-index" 3409 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 3410 | dependencies = [ 3411 | "windows_aarch64_gnullvm 0.48.5", 3412 | "windows_aarch64_msvc 0.48.5", 3413 | "windows_i686_gnu 0.48.5", 3414 | "windows_i686_msvc 0.48.5", 3415 | "windows_x86_64_gnu 0.48.5", 3416 | "windows_x86_64_gnullvm 0.48.5", 3417 | "windows_x86_64_msvc 0.48.5", 3418 | ] 3419 | 3420 | [[package]] 3421 | name = "windows-targets" 3422 | version = "0.52.6" 3423 | source = "registry+https://github.com/rust-lang/crates.io-index" 3424 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 3425 | dependencies = [ 3426 | "windows_aarch64_gnullvm 0.52.6", 3427 | "windows_aarch64_msvc 0.52.6", 3428 | "windows_i686_gnu 0.52.6", 3429 | "windows_i686_gnullvm", 3430 | "windows_i686_msvc 0.52.6", 3431 | "windows_x86_64_gnu 0.52.6", 3432 | "windows_x86_64_gnullvm 0.52.6", 3433 | "windows_x86_64_msvc 0.52.6", 3434 | ] 3435 | 3436 | [[package]] 3437 | name = "windows_aarch64_gnullvm" 3438 | version = "0.42.2" 3439 | source = "registry+https://github.com/rust-lang/crates.io-index" 3440 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 3441 | 3442 | [[package]] 3443 | name = "windows_aarch64_gnullvm" 3444 | version = "0.48.5" 3445 | source = "registry+https://github.com/rust-lang/crates.io-index" 3446 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 3447 | 3448 | [[package]] 3449 | name = "windows_aarch64_gnullvm" 3450 | version = "0.52.6" 3451 | source = "registry+https://github.com/rust-lang/crates.io-index" 3452 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 3453 | 3454 | [[package]] 3455 | name = "windows_aarch64_msvc" 3456 | version = "0.42.2" 3457 | source = "registry+https://github.com/rust-lang/crates.io-index" 3458 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 3459 | 3460 | [[package]] 3461 | name = "windows_aarch64_msvc" 3462 | version = "0.48.5" 3463 | source = "registry+https://github.com/rust-lang/crates.io-index" 3464 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 3465 | 3466 | [[package]] 3467 | name = "windows_aarch64_msvc" 3468 | version = "0.52.6" 3469 | source = "registry+https://github.com/rust-lang/crates.io-index" 3470 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 3471 | 3472 | [[package]] 3473 | name = "windows_i686_gnu" 3474 | version = "0.42.2" 3475 | source = "registry+https://github.com/rust-lang/crates.io-index" 3476 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 3477 | 3478 | [[package]] 3479 | name = "windows_i686_gnu" 3480 | version = "0.48.5" 3481 | source = "registry+https://github.com/rust-lang/crates.io-index" 3482 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 3483 | 3484 | [[package]] 3485 | name = "windows_i686_gnu" 3486 | version = "0.52.6" 3487 | source = "registry+https://github.com/rust-lang/crates.io-index" 3488 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 3489 | 3490 | [[package]] 3491 | name = "windows_i686_gnullvm" 3492 | version = "0.52.6" 3493 | source = "registry+https://github.com/rust-lang/crates.io-index" 3494 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 3495 | 3496 | [[package]] 3497 | name = "windows_i686_msvc" 3498 | version = "0.42.2" 3499 | source = "registry+https://github.com/rust-lang/crates.io-index" 3500 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 3501 | 3502 | [[package]] 3503 | name = "windows_i686_msvc" 3504 | version = "0.48.5" 3505 | source = "registry+https://github.com/rust-lang/crates.io-index" 3506 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 3507 | 3508 | [[package]] 3509 | name = "windows_i686_msvc" 3510 | version = "0.52.6" 3511 | source = "registry+https://github.com/rust-lang/crates.io-index" 3512 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 3513 | 3514 | [[package]] 3515 | name = "windows_x86_64_gnu" 3516 | version = "0.42.2" 3517 | source = "registry+https://github.com/rust-lang/crates.io-index" 3518 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 3519 | 3520 | [[package]] 3521 | name = "windows_x86_64_gnu" 3522 | version = "0.48.5" 3523 | source = "registry+https://github.com/rust-lang/crates.io-index" 3524 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 3525 | 3526 | [[package]] 3527 | name = "windows_x86_64_gnu" 3528 | version = "0.52.6" 3529 | source = "registry+https://github.com/rust-lang/crates.io-index" 3530 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 3531 | 3532 | [[package]] 3533 | name = "windows_x86_64_gnullvm" 3534 | version = "0.42.2" 3535 | source = "registry+https://github.com/rust-lang/crates.io-index" 3536 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 3537 | 3538 | [[package]] 3539 | name = "windows_x86_64_gnullvm" 3540 | version = "0.48.5" 3541 | source = "registry+https://github.com/rust-lang/crates.io-index" 3542 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 3543 | 3544 | [[package]] 3545 | name = "windows_x86_64_gnullvm" 3546 | version = "0.52.6" 3547 | source = "registry+https://github.com/rust-lang/crates.io-index" 3548 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 3549 | 3550 | [[package]] 3551 | name = "windows_x86_64_msvc" 3552 | version = "0.42.2" 3553 | source = "registry+https://github.com/rust-lang/crates.io-index" 3554 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 3555 | 3556 | [[package]] 3557 | name = "windows_x86_64_msvc" 3558 | version = "0.48.5" 3559 | source = "registry+https://github.com/rust-lang/crates.io-index" 3560 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 3561 | 3562 | [[package]] 3563 | name = "windows_x86_64_msvc" 3564 | version = "0.52.6" 3565 | source = "registry+https://github.com/rust-lang/crates.io-index" 3566 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 3567 | 3568 | [[package]] 3569 | name = "winit" 3570 | version = "0.30.9" 3571 | source = "registry+https://github.com/rust-lang/crates.io-index" 3572 | checksum = "a809eacf18c8eca8b6635091543f02a5a06ddf3dad846398795460e6e0ae3cc0" 3573 | dependencies = [ 3574 | "ahash", 3575 | "android-activity", 3576 | "atomic-waker", 3577 | "bitflags 2.9.0", 3578 | "block2", 3579 | "calloop", 3580 | "cfg_aliases", 3581 | "concurrent-queue", 3582 | "core-foundation", 3583 | "core-graphics 0.23.1", 3584 | "cursor-icon", 3585 | "dpi", 3586 | "js-sys", 3587 | "libc", 3588 | "memmap2", 3589 | "ndk", 3590 | "objc2", 3591 | "objc2-app-kit", 3592 | "objc2-foundation", 3593 | "objc2-ui-kit", 3594 | "orbclient", 3595 | "pin-project", 3596 | "raw-window-handle", 3597 | "redox_syscall", 3598 | "rustix", 3599 | "smithay-client-toolkit", 3600 | "smol_str", 3601 | "tracing", 3602 | "unicode-segmentation", 3603 | "wasm-bindgen", 3604 | "wasm-bindgen-futures", 3605 | "wayland-backend", 3606 | "wayland-client", 3607 | "wayland-protocols", 3608 | "wayland-protocols-plasma", 3609 | "web-sys", 3610 | "web-time", 3611 | "windows-sys 0.52.0", 3612 | "xkbcommon-dl", 3613 | ] 3614 | 3615 | [[package]] 3616 | name = "winnow" 3617 | version = "0.6.20" 3618 | source = "registry+https://github.com/rust-lang/crates.io-index" 3619 | checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" 3620 | dependencies = [ 3621 | "memchr", 3622 | ] 3623 | 3624 | [[package]] 3625 | name = "x11rb" 3626 | version = "0.12.0" 3627 | source = "registry+https://github.com/rust-lang/crates.io-index" 3628 | checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" 3629 | dependencies = [ 3630 | "gethostname", 3631 | "nix 0.26.4", 3632 | "winapi", 3633 | "winapi-wsapoll", 3634 | "x11rb-protocol", 3635 | ] 3636 | 3637 | [[package]] 3638 | name = "x11rb-protocol" 3639 | version = "0.12.0" 3640 | source = "registry+https://github.com/rust-lang/crates.io-index" 3641 | checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc" 3642 | dependencies = [ 3643 | "nix 0.26.4", 3644 | ] 3645 | 3646 | [[package]] 3647 | name = "xcursor" 3648 | version = "0.3.5" 3649 | source = "registry+https://github.com/rust-lang/crates.io-index" 3650 | checksum = "6a0ccd7b4a5345edfcd0c3535718a4e9ff7798ffc536bb5b5a0e26ff84732911" 3651 | 3652 | [[package]] 3653 | name = "xdg-home" 3654 | version = "1.3.0" 3655 | source = "registry+https://github.com/rust-lang/crates.io-index" 3656 | checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" 3657 | dependencies = [ 3658 | "libc", 3659 | "windows-sys 0.59.0", 3660 | ] 3661 | 3662 | [[package]] 3663 | name = "xkbcommon-dl" 3664 | version = "0.4.2" 3665 | source = "registry+https://github.com/rust-lang/crates.io-index" 3666 | checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" 3667 | dependencies = [ 3668 | "bitflags 2.9.0", 3669 | "dlib", 3670 | "log", 3671 | "once_cell", 3672 | "xkeysym", 3673 | ] 3674 | 3675 | [[package]] 3676 | name = "xkeysym" 3677 | version = "0.2.0" 3678 | source = "registry+https://github.com/rust-lang/crates.io-index" 3679 | checksum = "054a8e68b76250b253f671d1268cb7f1ae089ec35e195b2efb2a4e9a836d0621" 3680 | 3681 | [[package]] 3682 | name = "xml-rs" 3683 | version = "0.8.19" 3684 | source = "registry+https://github.com/rust-lang/crates.io-index" 3685 | checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" 3686 | 3687 | [[package]] 3688 | name = "zbus" 3689 | version = "4.4.0" 3690 | source = "registry+https://github.com/rust-lang/crates.io-index" 3691 | checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" 3692 | dependencies = [ 3693 | "async-broadcast", 3694 | "async-executor", 3695 | "async-fs", 3696 | "async-io", 3697 | "async-lock 3.4.0", 3698 | "async-process", 3699 | "async-recursion", 3700 | "async-task", 3701 | "async-trait", 3702 | "blocking", 3703 | "enumflags2", 3704 | "event-listener 5.3.1", 3705 | "futures-core", 3706 | "futures-sink", 3707 | "futures-util", 3708 | "hex", 3709 | "nix 0.29.0", 3710 | "ordered-stream", 3711 | "rand", 3712 | "serde", 3713 | "serde_repr", 3714 | "sha1", 3715 | "static_assertions", 3716 | "tracing", 3717 | "uds_windows", 3718 | "windows-sys 0.52.0", 3719 | "xdg-home", 3720 | "zbus_macros", 3721 | "zbus_names", 3722 | "zvariant", 3723 | ] 3724 | 3725 | [[package]] 3726 | name = "zbus-lockstep" 3727 | version = "0.4.4" 3728 | source = "registry+https://github.com/rust-lang/crates.io-index" 3729 | checksum = "4ca2c5dceb099bddaade154055c926bb8ae507a18756ba1d8963fd7b51d8ed1d" 3730 | dependencies = [ 3731 | "zbus_xml", 3732 | "zvariant", 3733 | ] 3734 | 3735 | [[package]] 3736 | name = "zbus-lockstep-macros" 3737 | version = "0.4.4" 3738 | source = "registry+https://github.com/rust-lang/crates.io-index" 3739 | checksum = "709ab20fc57cb22af85be7b360239563209258430bccf38d8b979c5a2ae3ecce" 3740 | dependencies = [ 3741 | "proc-macro2", 3742 | "quote", 3743 | "syn", 3744 | "zbus-lockstep", 3745 | "zbus_xml", 3746 | "zvariant", 3747 | ] 3748 | 3749 | [[package]] 3750 | name = "zbus_macros" 3751 | version = "4.4.0" 3752 | source = "registry+https://github.com/rust-lang/crates.io-index" 3753 | checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" 3754 | dependencies = [ 3755 | "proc-macro-crate", 3756 | "proc-macro2", 3757 | "quote", 3758 | "syn", 3759 | "zvariant_utils", 3760 | ] 3761 | 3762 | [[package]] 3763 | name = "zbus_names" 3764 | version = "3.0.0" 3765 | source = "registry+https://github.com/rust-lang/crates.io-index" 3766 | checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" 3767 | dependencies = [ 3768 | "serde", 3769 | "static_assertions", 3770 | "zvariant", 3771 | ] 3772 | 3773 | [[package]] 3774 | name = "zbus_xml" 3775 | version = "4.0.0" 3776 | source = "registry+https://github.com/rust-lang/crates.io-index" 3777 | checksum = "ab3f374552b954f6abb4bd6ce979e6c9b38fb9d0cd7cc68a7d796e70c9f3a233" 3778 | dependencies = [ 3779 | "quick-xml 0.30.0", 3780 | "serde", 3781 | "static_assertions", 3782 | "zbus_names", 3783 | "zvariant", 3784 | ] 3785 | 3786 | [[package]] 3787 | name = "zerocopy" 3788 | version = "0.7.32" 3789 | source = "registry+https://github.com/rust-lang/crates.io-index" 3790 | checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" 3791 | dependencies = [ 3792 | "zerocopy-derive", 3793 | ] 3794 | 3795 | [[package]] 3796 | name = "zerocopy-derive" 3797 | version = "0.7.32" 3798 | source = "registry+https://github.com/rust-lang/crates.io-index" 3799 | checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" 3800 | dependencies = [ 3801 | "proc-macro2", 3802 | "quote", 3803 | "syn", 3804 | ] 3805 | 3806 | [[package]] 3807 | name = "zvariant" 3808 | version = "4.2.0" 3809 | source = "registry+https://github.com/rust-lang/crates.io-index" 3810 | checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" 3811 | dependencies = [ 3812 | "endi", 3813 | "enumflags2", 3814 | "serde", 3815 | "static_assertions", 3816 | "zvariant_derive", 3817 | ] 3818 | 3819 | [[package]] 3820 | name = "zvariant_derive" 3821 | version = "4.2.0" 3822 | source = "registry+https://github.com/rust-lang/crates.io-index" 3823 | checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" 3824 | dependencies = [ 3825 | "proc-macro-crate", 3826 | "proc-macro2", 3827 | "quote", 3828 | "syn", 3829 | "zvariant_utils", 3830 | ] 3831 | 3832 | [[package]] 3833 | name = "zvariant_utils" 3834 | version = "2.1.0" 3835 | source = "registry+https://github.com/rust-lang/crates.io-index" 3836 | checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" 3837 | dependencies = [ 3838 | "proc-macro2", 3839 | "quote", 3840 | "syn", 3841 | ] 3842 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "graph-editor" 3 | version = "0.4.1" 4 | authors = ["Kenta KOMOTO"] 5 | edition = "2021" 6 | include = ["LICENSE-APACHE", "LICENSE-MIT", "**/*.rs", "Cargo.toml"] 7 | rust-version = "1.82" 8 | 9 | [package.metadata.docs.rs] 10 | all-features = true 11 | targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] 12 | 13 | [dependencies] 14 | egui = "0.31" 15 | eframe = { version = "0.31", default-features = false, features = [ 16 | "accesskit", # Make egui compatible with screen readers. NOTE: adds a lot of dependencies. 17 | "default_fonts", # Embed the default egui fonts. 18 | "glow", # Use the glow rendering backend. Alternative: "wgpu". 19 | "persistence", # Enable restoring app state when restarting the app. 20 | "wayland", # To support Linux (and CI) 21 | ] } 22 | log = "0.4" 23 | 24 | # You only need serde if you want app persistence: 25 | serde = { version = "1", features = ["derive"] } 26 | itertools = "0.14.0" 27 | epaint = "0.31.1" 28 | anyhow = "1.0.97" 29 | rand = { version = "0.8" } 30 | getrandom = { version = "0.2.2", features = ["js"] } 31 | num-traits = "0.2.19" 32 | 33 | # native: 34 | [target.'cfg(not(target_arch = "wasm32"))'.dependencies] 35 | env_logger = "0.11" 36 | 37 | # web: 38 | [target.'cfg(target_arch = "wasm32")'.dependencies] 39 | wasm-bindgen-futures = "0.4" 40 | web-sys = "0.3.70" # to access the DOM (to hide the loading text) 41 | 42 | [profile.release] 43 | opt-level = 2 # fast and small wasm 44 | 45 | # Optimize all dependencies even in debug builds: 46 | [profile.dev.package."*"] 47 | opt-level = 2 48 | 49 | 50 | [patch.crates-io] 51 | 52 | # If you want to use the bleeding edge version of egui and eframe: 53 | # egui = { git = "https://github.com/emilk/egui", branch = "master" } 54 | # eframe = { git = "https://github.com/emilk/egui", branch = "master" } 55 | 56 | # If you fork https://github.com/emilk/egui you can test with: 57 | # egui = { path = "../egui/crates/egui" } 58 | # eframe = { path = "../egui/crates/eframe" } 59 | -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any 2 | person obtaining a copy of this software and associated 3 | documentation files (the "Software"), to deal in the 4 | Software without restriction, including without 5 | limitation the rights to use, copy, modify, merge, 6 | publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software 8 | is furnished to do so, subject to the following 9 | conditions: 10 | 11 | The above copyright notice and this permission notice 12 | shall be included in all copies or substantial portions 13 | of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 16 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 17 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 18 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 19 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Graph Editor 2 | 3 | [![Build Status](https://github.com/kentakom1213/graph-editor/workflows/CI/badge.svg)](https://github.com/kentakom1213/graph-editor/actions?workflow=CI) 4 | 5 | Graph Editor は [eframe](https://github.com/emilk/egui/tree/master/crates/eframe) と [egui](https://github.com/emilk/egui/) によるグラフ編集アプリです. 6 | 7 | ![demo](./images/graph-editor-demo-v3.gif) 8 | 9 | ## 📌 操作 10 | 11 | ### Edit Mode 12 | 13 | | モード | コマンド | 説明 | 14 | | :--------------------------- | :------: | :-------------------------------- | 15 | | Normal モード | N | 頂点の移動などを行う | 16 | | Add Vertex (頂点追加) モード | V | クリックした位置に頂点を追加する | 17 | | Add Edge (辺追加) モード | E | 選択した 2 つの頂点の間に辺を張る | 18 | | Delete Edge (辺削除) モード | D | クリックした頂点/辺を削除する | 19 | 20 | ### Indexing 21 | 22 | 頂点の表示方法を変更する. 23 | 24 | | Indexing | コマンド | 説明 | 25 | | :-------- | :--------: | :-------------------------- | 26 | | 0-indexed | 1 (toggle) | 頂点を `0` 始まりで表示する | 27 | | 1-indexed | 1 (toggle) | 頂点を `1` 始まりで表示する | 28 | 29 | ### Direction 30 | 31 | | Direction | コマンド | 説明 | 32 | | :--------- | :----------------: | :----------------------- | 33 | | Undirected | Shift + D (toggle) | 無向グラフとして描画する | 34 | | Directed | Shift + D (toggle) | 有向グラフとして描画する | 35 | 36 | ### Animation 37 | 38 | | Animation | コマンド | 説明 | 39 | | :-------- | :--------: | :--------------- | 40 | | On | A (toggle) | ノードを動かす | 41 | | Off | A (toggle) | ノードを固定する | 42 | 43 | ### 共通 44 | 45 | - 右クリックでのドラッグ,または 2 本指でのスクロールでグラフ全体を移動する 46 | 47 | --- 48 | 49 | ## ローカル環境での実行方法 50 | 51 | ```bash 52 | # リポジトリをクローン 53 | git clone https://github.com/powell/graph-editor.git 54 | cd graph-editor 55 | 56 | # アプリケーションをビルドして実行 57 | cargo run --release 58 | ``` 59 | 60 | --- 61 | 62 | ## Web 版をローカルでプレビューする方法 63 | 64 | ### インストール 65 | 66 | - Rust と Trunk のインストールが必要です。 67 | 68 | ```bash 69 | # WebAssemblyターゲットを追加 70 | rustup target add wasm32-unknown-unknown 71 | 72 | # Trunk をインストール 73 | cargo install --locked trunk 74 | ``` 75 | 76 | ### ローカルサーバーで実行する場合 77 | 78 | ```bash 79 | # ローカルサーバーを起動 80 | trunk serve 81 | ``` 82 | 83 | ブラウザで `http://127.0.0.1:8080` を開いて確認してください。 84 | 85 | ## コントリビューション 86 | 87 | バグ報告、機能追加の提案、プルリクエストなど歓迎いたします。 88 | 89 | ## ライセンス 90 | 91 | このプロジェクトは MIT ライセンス、APACHE ライセンスの下で提供されています。詳細は [LICENSE-APACHE](https://github.com/kentakom1213/graph-editor/blob/main/LICENSE-APACHE)、[LICENSE-MIT](https://github.com/kentakom1213/graph-editor/blob/main/LICENSE-MIT) ファイルを参照してください。 92 | -------------------------------------------------------------------------------- /Trunk.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | filehash = false 3 | -------------------------------------------------------------------------------- /assets/card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentakom1213/graph-editor/c64a7f7530c5ad6ce9e12e428c7d4a45b6e7d181/assets/card.png -------------------------------------------------------------------------------- /assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentakom1213/graph-editor/c64a7f7530c5ad6ce9e12e428c7d4a45b6e7d181/assets/favicon.ico -------------------------------------------------------------------------------- /assets/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentakom1213/graph-editor/c64a7f7530c5ad6ce9e12e428c7d4a45b6e7d181/assets/icon-1024.png -------------------------------------------------------------------------------- /assets/icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentakom1213/graph-editor/c64a7f7530c5ad6ce9e12e428c7d4a45b6e7d181/assets/icon-256.png -------------------------------------------------------------------------------- /assets/icon_ios_touch_192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentakom1213/graph-editor/c64a7f7530c5ad6ce9e12e428c7d4a45b6e7d181/assets/icon_ios_touch_192.png -------------------------------------------------------------------------------- /assets/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Graph Editor", 3 | "short_name": "graph-editor", 4 | "icons": [ 5 | { 6 | "src": "./assets/icon-256.png", 7 | "sizes": "256x256", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "./assets/maskable_icon_x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png", 14 | "purpose": "any maskable" 15 | }, 16 | { 17 | "src": "./assets/icon-1024.png", 18 | "sizes": "1024x1024", 19 | "type": "image/png" 20 | }, 21 | { 22 | "src": "./assets/card.png", 23 | "sizes": "1234x817", 24 | "type": "image/png" 25 | } 26 | ], 27 | "lang": "en-US", 28 | "id": "/index.html", 29 | "start_url": "./index.html", 30 | "display": "standalone", 31 | "background_color": "white", 32 | "theme_color": "white" 33 | } 34 | -------------------------------------------------------------------------------- /assets/maskable_icon_x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentakom1213/graph-editor/c64a7f7530c5ad6ce9e12e428c7d4a45b6e7d181/assets/maskable_icon_x512.png -------------------------------------------------------------------------------- /assets/sw.js: -------------------------------------------------------------------------------- 1 | self.addEventListener('install', function (e) { 2 | self.skipWaiting(); 3 | }); 4 | 5 | self.addEventListener('activate', function (e) { 6 | e.waitUntil( 7 | caches.keys().then(function (cacheNames) { 8 | return Promise.all( 9 | cacheNames.map(function (cache) { 10 | return caches.delete(cache); 11 | }) 12 | ); 13 | }).then(() => self.clients.claim()) 14 | ); 15 | }); 16 | 17 | // ネットワーク接続が回復したらキャッシュを削除 18 | self.addEventListener('message', function (event) { 19 | if (event.data === 'clearCache') { 20 | caches.keys().then(function (cacheNames) { 21 | return Promise.all( 22 | cacheNames.map(function (cache) { 23 | return caches.delete(cache); 24 | }) 25 | ); 26 | }); 27 | } 28 | }); 29 | 30 | // すべてのリクエストをネットワークから取得し、キャッシュは使用しない 31 | self.addEventListener('fetch', function (e) { 32 | e.respondWith(fetch(e.request)); 33 | }); 34 | -------------------------------------------------------------------------------- /check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # This scripts runs various CI-like checks in a convenient way. 3 | set -eux 4 | 5 | cargo check --quiet --workspace --all-targets 6 | cargo check --quiet --workspace --all-features --lib --target wasm32-unknown-unknown 7 | cargo fmt --all -- --check 8 | cargo clippy --quiet --workspace --all-targets --all-features -- -D warnings -W clippy::all 9 | cargo test --quiet --workspace --all-targets --all-features 10 | cargo test --quiet --workspace --doc 11 | trunk build 12 | -------------------------------------------------------------------------------- /fill_template.ps1: -------------------------------------------------------------------------------- 1 | $crate = Read-Host "To fill the template, tell me your egui project crate name: " 2 | $name = Read-Host "To fill the template, tell me your name (for author in Cargo.toml): " 3 | $email = Read-Host "To fill the template, tell me your e-mail address (also for Cargo.toml): " 4 | 5 | Write-Host "Patching files..." 6 | 7 | (Get-Content "Cargo.toml") -replace "eframe_template", $crate | Set-Content "Cargo.toml" 8 | (Get-Content "src\main.rs") -replace "eframe_template", $crate | Set-Content "src\main.rs" 9 | (Get-Content "index.html") -replace "eframe template", $crate -replace "eframe_template", $crate | Set-Content "index.html" 10 | (Get-Content "assets\sw.js") -replace "eframe_template", $crate | Set-Content "assets\sw.js" 11 | (Get-Content "Cargo.toml") -replace "Emil Ernerfeldt", $name -replace "emil.ernerfeldt@gmail.com", $email | Set-Content "Cargo.toml" 12 | 13 | Write-Host "Done." -------------------------------------------------------------------------------- /fill_template.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | set -e 4 | 5 | echo "To fill the template tell me your egui project crate name: " 6 | 7 | read crate 8 | 9 | echo "To fill the template tell me your name (for author in Cargo.toml): " 10 | 11 | read name 12 | 13 | echo "To fill the template tell me your e-mail address (also for Cargo.toml): " 14 | 15 | read email 16 | 17 | echo "Patching files..." 18 | 19 | sed -i "s/eframe_template/$crate/g" Cargo.toml 20 | sed -i "s/eframe_template/$crate/g" src/main.rs 21 | sed -i "s/eframe template/$crate/g" index.html 22 | sed -i "s/eframe_template/$crate/g" assets/sw.js 23 | sed -i "s/Emil Ernerfeldt/$name/g" Cargo.toml 24 | sed -i "s/emil.ernerfeldt@gmail.com/$email/g" Cargo.toml 25 | 26 | echo "Done." 27 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "eframe devShell"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 | rust-overlay.url = "github:oxalica/rust-overlay"; 7 | flake-utils.url = "github:numtide/flake-utils"; 8 | }; 9 | 10 | outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: 11 | flake-utils.lib.eachDefaultSystem (system: 12 | let 13 | overlays = [ (import rust-overlay) ]; 14 | pkgs = import nixpkgs { inherit system overlays; }; 15 | in with pkgs; { 16 | devShells.default = mkShell rec { 17 | buildInputs = [ 18 | # Rust 19 | rust-bin.stable.latest.default 20 | trunk 21 | 22 | # misc. libraries 23 | openssl 24 | pkg-config 25 | 26 | # GUI libs 27 | libxkbcommon 28 | libGL 29 | fontconfig 30 | 31 | # wayland libraries 32 | wayland 33 | 34 | # x11 libraries 35 | xorg.libXcursor 36 | xorg.libXrandr 37 | xorg.libXi 38 | xorg.libX11 39 | 40 | ]; 41 | 42 | LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; 43 | }; 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /images/graph-editor-demo-v3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kentakom1213/graph-editor/c64a7f7530c5ad6ce9e12e428c7d4a45b6e7d181/images/graph-editor-demo-v3.gif -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | Graph Editor 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 31 | 35 | 39 | 40 | 41 | 42 | 43 | 47 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 67 | 73 | 79 | 85 | 91 | 92 | 93 | 94 | 99 | 104 | 105 | 191 | 192 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 |
205 |

Loading…

206 |
207 |
208 | 209 | 210 | 211 | 233 | 234 | 235 | 236 | 237 | -------------------------------------------------------------------------------- /memo/graph_visualization.md: -------------------------------------------------------------------------------- 1 | # グラフ描画アルゴリズム 2 | 3 | ## 資料 4 | 5 | - [力学モデル (グラフ描画アルゴリズム) - wikipedia](https://ja.wikipedia.org/wiki/%E5%8A%9B%E5%AD%A6%E3%83%A2%E3%83%87%E3%83%AB_(%E3%82%B0%E3%83%A9%E3%83%95%E6%8F%8F%E7%94%BB%E3%82%A2%E3%83%AB%E3%82%B4%E3%83%AA%E3%82%BA%E3%83%A0)) 6 | 7 | ## 定義 8 | 9 | - グラフ $G = (V, E)$ 10 | - 頂点集合 $V$ ( $N := |V|$ ) 11 | - 頂点 $v\in V$ について, 12 | - $v.\!\boldsymbol{x}$ :頂点 $v$ の座標 13 | - $v.\!\boldsymbol{\dot{x}}$ :頂点 $v$​ の速度ベクトル 14 | - $v.\!m$ :頂点 $v$ の重さ 15 | - 辺集合 $E \subseteq \binom{V}{2}$ ( $M := |E|$ ) 16 | - 定数 17 | - $c$ :クーロン定数 18 | - $k$​ :ばね定数 19 | - $l$​ :ばねの自然長 20 | - $h$ :減衰定数( $0 < h < 1$​ ) 21 | - $\Delta t$ :微小時間(フレームレートを取得) 22 | 23 | 24 | ## アルゴリズム 25 | 26 | 以下のようなアルゴリズムで描画を行う. 27 | 28 | 1. 全ての頂点 $v\in V$ について, $v.\!\mathit{dx} := 0,~v.\!\mathit{dy} := 0$ とする. 29 | 30 | 2. 全ての頂点 $v\in V$ について, 31 | 32 | 1. 頂点 $v$ に加わる力を $\boldsymbol{f}_v := (0, 0)$​ とする. 33 | 34 | 1. 全ての頂点 $w\in V$ について,$v.\!\boldsymbol{x}$ から $w.\!\boldsymbol{x}$ へ向かう単位ベクトルを $\hat{r}$ とするとき, 35 | $$ 36 | \boldsymbol{f}_v := \boldsymbol{f}_v + \frac{c}{\|v.\!\boldsymbol{x} - w.\!\boldsymbol{x}\|^2}\cdot \hat{r}. 37 | $$ 38 | 39 | 2. 頂点 $v$ の隣接頂点 $w\in N(v)$ について, 40 | $$ 41 | \boldsymbol{f}_v := \boldsymbol{f}_v + k \cdot (\|v.\!\boldsymbol{x} - w.\!\boldsymbol{x}\| - l) \cdot \hat{r}. 42 | $$ 43 | 44 | 3. 振動の減衰を加味して速度を更新する. 45 | $$ 46 | v.\!\boldsymbol{\dot{x}} := h \cdot \left(v.\!\boldsymbol{\dot{x}} + \Delta t \cdot \frac{\boldsymbol{f}_v}{v.\!m} \right). 47 | $$ 48 | 49 | 4. 頂点の位置を更新する. 50 | $$ 51 | v.\!\boldsymbol{x} := v.\!\boldsymbol{x} + \Delta t \cdot v.\!\boldsymbol{\dot{x}}. 52 | $$ 53 | -------------------------------------------------------------------------------- /memo/intersection_of_bezier_and_circle.py: -------------------------------------------------------------------------------- 1 | # %% ライブラリのインポート 2 | import sympy as sy 3 | 4 | # %% 変数の定義 5 | # sy.var("x0 y0 x1 y1 x2 y2 x3 y3 xc yc r t x y") 6 | 7 | x0, y0 = sy.symbols("x0 y0") 8 | x1, y1 = sy.symbols("x1 y1") 9 | x2, y2 = sy.symbols("x2 y2") 10 | xc, yc = sy.symbols("xc yc") 11 | r = sy.symbols("r") 12 | t = sy.symbols("t") 13 | x, y = sy.symbols("x y") 14 | 15 | # %% ベジエ曲線の定義 16 | x_bezier = (1 - t) ** 2 * x0 + 2 * (1 - t) * t * x1 + t**2 * x2 17 | y_bezier = (1 - t) ** 2 * y0 + 2 * (1 - t) * t * y1 + t**2 * y2 18 | 19 | # %% 円の定義 20 | circle = (x - xc) ** 2 + (y - yc) ** 2 - r**2 21 | 22 | # %% ベジエ曲線と円の交点を求める 23 | f = circle.subs({x: x_bezier, y: y_bezier}) 24 | df = sy.diff(f, t) 25 | 26 | print("f = ", f) 27 | print("df = ", df) 28 | -------------------------------------------------------------------------------- /rust-toolchain: -------------------------------------------------------------------------------- 1 | # If you see this, run "rustup self update" to get rustup 1.23 or newer. 2 | 3 | # NOTE: above comment is for older `rustup` (before TOML support was added), 4 | # which will treat the first line as the toolchain name, and therefore show it 5 | # to the user in the error, instead of "error: invalid channel name '[toolchain]'". 6 | 7 | [toolchain] 8 | channel = "1.82" # Avoid specifying a patch version here; see https://github.com/emilk/eframe_template/issues/145 9 | components = [ "rustfmt", "clippy" ] 10 | targets = [ "wasm32-unknown-unknown" ] 11 | -------------------------------------------------------------------------------- /src/app.rs: -------------------------------------------------------------------------------- 1 | use eframe::egui; 2 | 3 | use crate::components::{ 4 | draw_central_panel, draw_edit_menu, draw_error_modal, draw_footer, draw_graph_io, 5 | draw_top_panel, PanelTabState, 6 | }; 7 | use crate::config::AppConfig; 8 | use crate::graph::Graph; 9 | use crate::mode::EditMode; 10 | use crate::update::request_repaint; 11 | 12 | pub struct GraphEditorApp { 13 | pub graph: Graph, 14 | pub is_animated: bool, 15 | pub last_mouse_pos: Option, 16 | pub next_z_index: u32, 17 | pub edit_mode: EditMode, 18 | pub zero_indexed: bool, 19 | pub hovered_on_menu_window: bool, 20 | pub hovered_on_input_window: bool, 21 | pub config: AppConfig, 22 | pub input_text: String, 23 | pub error_message: Option, 24 | pub panel_tab: PanelTabState, 25 | } 26 | 27 | impl GraphEditorApp { 28 | pub fn new() -> Self { 29 | Self::default() 30 | } 31 | 32 | pub fn deselect_all_vertices_edges(&mut self) { 33 | for vertex in self.graph.vertices_mut() { 34 | vertex.is_pressed = false; 35 | vertex.is_selected = false; 36 | } 37 | for edge in self.graph.edges_mut() { 38 | edge.is_pressed = false; 39 | } 40 | } 41 | 42 | pub fn switch_normal_mode(&mut self) { 43 | self.deselect_all_vertices_edges(); 44 | self.edit_mode = EditMode::default_normal(); 45 | } 46 | 47 | pub fn switch_add_vertex_mode(&mut self) { 48 | self.deselect_all_vertices_edges(); 49 | self.edit_mode = EditMode::default_add_vertex(); 50 | } 51 | 52 | pub fn switch_add_edge_mode(&mut self) { 53 | self.deselect_all_vertices_edges(); 54 | self.edit_mode = EditMode::default_add_edge(); 55 | } 56 | 57 | pub fn switch_delete_mode(&mut self) { 58 | self.deselect_all_vertices_edges(); 59 | self.edit_mode = EditMode::default_delete(); 60 | } 61 | } 62 | 63 | impl Default for GraphEditorApp { 64 | fn default() -> Self { 65 | Self { 66 | graph: Graph::default(), 67 | is_animated: true, 68 | last_mouse_pos: None, 69 | next_z_index: 2, 70 | edit_mode: EditMode::default_normal(), 71 | zero_indexed: false, 72 | hovered_on_menu_window: false, 73 | hovered_on_input_window: false, 74 | config: AppConfig::default(), 75 | input_text: String::new(), 76 | error_message: None, 77 | panel_tab: PanelTabState::default(), 78 | } 79 | } 80 | } 81 | 82 | impl eframe::App for GraphEditorApp { 83 | fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { 84 | // トップパネル(タブバー)を描画 85 | draw_top_panel(self, ctx); // ★ 追加 86 | 87 | // メイン領域を描画 88 | draw_central_panel(self, ctx); 89 | 90 | // 現在選択されているタブに応じてサイドパネルの内容を切り替える 91 | if self.panel_tab.edit_menu { 92 | // 編集メニューを描画 93 | draw_edit_menu(self, ctx); 94 | } 95 | if self.panel_tab.graph_io { 96 | // グラフの入力を描画 97 | draw_graph_io(self, ctx); 98 | } 99 | 100 | // フッターを描画 101 | draw_footer(self, ctx); 102 | 103 | // エラーメッセージを描画 104 | draw_error_modal(self, ctx); 105 | 106 | // 再描画 107 | request_repaint(self, ctx); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /src/components/central_panel.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use itertools::Itertools; 4 | 5 | use super::transition_and_scale::{drag_central_panel, scale_central_panel}; 6 | use crate::{ 7 | config::AppConfig, 8 | graph::Graph, 9 | math::{ 10 | affine::{Affine2D, ApplyAffine}, 11 | bezier::{ 12 | bezier_curve, calc_bezier_control_point, calc_intersection_of_bezier_and_circle, 13 | d2_bezier_dt2, d_bezier_dt, 14 | }, 15 | newton::newton_method, 16 | }, 17 | mode::EditMode, 18 | GraphEditorApp, 19 | }; 20 | 21 | /// メイン領域を描画 22 | pub fn draw_central_panel(app: &mut GraphEditorApp, ctx: &egui::Context) { 23 | egui::CentralPanel::default() 24 | .frame(egui::Frame::new().fill(app.config.bg_color)) 25 | .show(ctx, |ui| { 26 | // モード切替を行う 27 | change_edit_mode(app, ui); 28 | 29 | // ドラッグを行う 30 | drag_central_panel(app, ui); 31 | 32 | // スケールを行う 33 | scale_central_panel(app, ui); 34 | 35 | // クリックした位置に頂点を追加 36 | add_vertex(app, ui); 37 | 38 | // ペインターを取得 39 | let painter = ui.painter(); 40 | 41 | // 辺の描画 42 | draw_edges(app, ui, painter); 43 | 44 | // 頂点の描画 45 | draw_vertices(app, ui, painter); 46 | }); 47 | } 48 | 49 | /// モード切替の処理 50 | fn change_edit_mode(app: &mut GraphEditorApp, ui: &egui::Ui) { 51 | // 入力中はモード切替を行わない 52 | if app.hovered_on_input_window { 53 | return; 54 | } 55 | 56 | if ui.input(|i| i.key_pressed(egui::Key::Escape)) { 57 | // AddEdgeモードで,片方の頂点が選択済みの場合,選択状態を解除 58 | if let EditMode::AddEdge { 59 | from_vertex: ref mut from_vertex @ Some(from_vertex_id), 60 | .. 61 | } = app.edit_mode 62 | { 63 | if let Some(from_vertex) = app 64 | .graph 65 | .vertices_mut() 66 | .iter_mut() 67 | .find(|v| v.id == from_vertex_id) 68 | { 69 | from_vertex.is_selected = false; 70 | } 71 | *from_vertex = None; 72 | } else { 73 | app.switch_normal_mode(); 74 | } 75 | } 76 | if ui.input(|i| i.key_pressed(egui::Key::V)) { 77 | app.switch_add_vertex_mode(); 78 | } 79 | if ui.input(|i| i.key_pressed(egui::Key::E)) { 80 | app.switch_add_edge_mode(); 81 | } 82 | if ui.input(|i| i.key_pressed(egui::Key::D)) { 83 | // Shift + D で無向グラフ/有向グラフを切り替え 84 | if ui.input(|i| i.modifiers.shift) { 85 | app.graph.is_directed ^= true; 86 | } else { 87 | app.switch_delete_mode(); 88 | } 89 | } 90 | if ui.input(|i| i.key_pressed(egui::Key::Num1)) { 91 | app.zero_indexed ^= true; 92 | } 93 | if ui.input(|i| i.key_pressed(egui::Key::A)) { 94 | // A でグラフのシミュレーションを切り替え 95 | app.is_animated ^= true; 96 | } 97 | } 98 | 99 | /// クリックした位置に頂点を追加する 100 | fn add_vertex(app: &mut GraphEditorApp, ui: &egui::Ui) { 101 | // クリックした位置に頂点を追加する 102 | if app.edit_mode.is_add_vertex() 103 | && ui.input(|i| i.pointer.any_click()) 104 | && !app.hovered_on_menu_window 105 | && !app.hovered_on_input_window 106 | { 107 | if let Some(mouse_pos) = ui.input(|i| i.pointer.hover_pos()) { 108 | let affine = app.graph.affine.borrow().to_owned(); 109 | if let Some(inv) = affine.inverse() { 110 | let scaled_pos = mouse_pos.applied(&inv); 111 | let pos = scaled_pos + affine.translation(); 112 | 113 | app.graph.add_vertex(pos, app.next_z_index); 114 | app.next_z_index += 1; 115 | } 116 | } 117 | } 118 | } 119 | 120 | /// central_panel に辺を描画する 121 | fn draw_edges(app: &mut GraphEditorApp, ui: &egui::Ui, painter: &egui::Painter) { 122 | app.graph.restore_graph(); 123 | 124 | // 辺をカウントする 125 | let edge_count = app 126 | .graph 127 | .edges() 128 | .iter() 129 | .fold(HashMap::new(), |mut map, edge| { 130 | *map.entry((edge.from, edge.to)).or_insert(0) += 1; 131 | *map.entry((edge.to, edge.from)).or_insert(0) += 1; 132 | map 133 | }); 134 | 135 | let is_directed = app.graph.is_directed; 136 | let (vertices_mut, edges_mut) = app.graph.vertices_edges_mut(); 137 | 138 | for edge in edges_mut.iter_mut() { 139 | if let (Some(from_vertex), Some(to_vertex)) = ( 140 | vertices_mut.iter().find(|v| v.id == edge.from), 141 | vertices_mut.iter().find(|v| v.id == edge.to), 142 | ) { 143 | // ノーマルモードの場合,エッジの選択判定を行う 144 | if app.edit_mode.is_delete() { 145 | let mouse_pos = ui.input(|i| i.pointer.hover_pos()).unwrap_or_default(); 146 | 147 | // 端点との距離 148 | let distance_from_vertex = (mouse_pos - from_vertex.get_position()) 149 | .length() 150 | .min((mouse_pos - to_vertex.get_position()).length()); 151 | 152 | // カーソルが頂点上にあるかどうか 153 | let is_on_vertex = distance_from_vertex < app.config.vertex_radius; 154 | 155 | // マウスと辺の最近接点の距離 156 | let distance = if !is_directed || edge_count.get(&(edge.from, edge.to)) == Some(&1) 157 | { 158 | distance_from_edge_line( 159 | from_vertex.get_position(), 160 | to_vertex.get_position(), 161 | mouse_pos, 162 | ) 163 | } else { 164 | distance_from_edge_bezier( 165 | from_vertex.get_position(), 166 | to_vertex.get_position(), 167 | app.config.edge_bezier_distance, 168 | mouse_pos, 169 | ) 170 | }; 171 | 172 | // 当たり判定の閾値 (線の太さ + 余裕分) 173 | let threshold = 10.0; 174 | 175 | // カーソルが辺上にあるかどうか 176 | let is_on_edge = distance < threshold; 177 | 178 | if is_on_edge && !is_on_vertex { 179 | edge.is_pressed = true; 180 | 181 | if ui.input(|i| i.pointer.any_click()) { 182 | edge.is_deleted = true; 183 | } 184 | } else { 185 | edge.is_pressed = false; 186 | } 187 | } 188 | 189 | let edge_color = if edge.is_pressed { 190 | app.config.edge_color_hover 191 | } else { 192 | app.config.edge_color_normal 193 | }; 194 | 195 | if is_directed { 196 | if edge_count.get(&(edge.from, edge.to)) == Some(&1) { 197 | draw_edge_directed( 198 | painter, 199 | from_vertex.get_position(), 200 | to_vertex.get_position(), 201 | edge_color, 202 | &app.config, 203 | ); 204 | } else { 205 | draw_edge_directed_curved( 206 | painter, 207 | from_vertex.get_position(), 208 | to_vertex.get_position(), 209 | edge_color, 210 | &app.config, 211 | ); 212 | } 213 | } else { 214 | draw_edge_undirected( 215 | painter, 216 | from_vertex.get_position(), 217 | to_vertex.get_position(), 218 | app.config.edge_stroke, 219 | edge_color, 220 | ); 221 | } 222 | } 223 | } 224 | } 225 | 226 | fn distance_from_edge_line(from_pos: egui::Pos2, to_pos: egui::Pos2, mouse_pos: egui::Pos2) -> f32 { 227 | let edge_vector = to_pos - from_pos; 228 | let mouse_vector = mouse_pos - from_pos; 229 | let edge_length = edge_vector.length(); 230 | 231 | let t_ast = (edge_vector.dot(mouse_vector) / edge_length.powi(2)).clamp(0.0, 1.0); 232 | let nearest_point = from_pos + t_ast * edge_vector; 233 | 234 | (mouse_pos - nearest_point).length() 235 | } 236 | 237 | fn distance_from_edge_bezier( 238 | from_pos: egui::Pos2, 239 | to_pos: egui::Pos2, 240 | bezier_distance: f32, 241 | mouse_pos: egui::Pos2, 242 | ) -> f32 { 243 | let control = calc_bezier_control_point(from_pos, to_pos, bezier_distance, false); 244 | 245 | let bezier = |t: f32| -> egui::Pos2 { bezier_curve(from_pos, control, to_pos, t) }; 246 | let d_bezier = |t: f32| -> egui::Vec2 { d_bezier_dt(from_pos, control, to_pos, t) }; 247 | let dd_bezier = d2_bezier_dt2(from_pos, control, to_pos); 248 | 249 | let d_dist_sq_dt = |t: f32| -> f32 { 250 | let pt = bezier(t); 251 | let d_pos = d_bezier(t); 252 | 2.0 * (pt - mouse_pos).dot(d_pos) 253 | }; 254 | let d2_sqr_dist_dt2 = |t: f32| -> f32 { 255 | let pt = bezier(t); // (x, y) 256 | let dp = d_bezier(t); // (dx/dt, dy/dt) 257 | let ddp = dd_bezier; // (d^2x/dt^2, d^2y/dt^2) for quadratic is constant 258 | 259 | // 2( (dx/dt)^2 + (dy/dt)^2 ) + 2( (x - Mx)*d^2x/dt^2 + (y - My)*d^2y/dt^2 ) 260 | 2.0 * dp.length_sq() + 2.0 * (pt - mouse_pos).dot(ddp) 261 | }; 262 | 263 | let t_ast = newton_method(d_dist_sq_dt, d2_sqr_dist_dt2, 0.5, 1e-6, 10); 264 | 265 | t_ast 266 | .filter(|&t| (0.0..=1.0).contains(&t)) 267 | .map(|t| bezier(t).distance(mouse_pos)) 268 | .unwrap_or(f32::INFINITY) 269 | } 270 | 271 | fn draw_edge_undirected( 272 | painter: &egui::Painter, 273 | from_pos: egui::Pos2, 274 | to_pos: egui::Pos2, 275 | stroke: f32, 276 | color: egui::Color32, 277 | ) { 278 | painter.line_segment([from_pos, to_pos], egui::Stroke::new(stroke, color)); 279 | } 280 | 281 | fn draw_edge_directed( 282 | painter: &egui::Painter, 283 | from_pos: egui::Pos2, 284 | to_pos: egui::Pos2, 285 | color: egui::Color32, 286 | config: &AppConfig, 287 | ) { 288 | // 矢印の方向を取得 289 | let dir = (to_pos - from_pos).normalized(); 290 | let arrowhead = to_pos - dir * config.vertex_radius; 291 | let endpoint = arrowhead - dir * config.edge_arrow_length; 292 | 293 | // 矢印のヘッド(三角形)の3つの頂点を計算 294 | let dir = dir * config.edge_arrow_length; 295 | let left = egui::Pos2::new( 296 | arrowhead.x - dir.x - dir.y * (config.edge_arrow_width / config.edge_arrow_length), 297 | arrowhead.y - dir.y + dir.x * (config.edge_arrow_width / config.edge_arrow_length), 298 | ); 299 | let right = egui::Pos2::new( 300 | arrowhead.x - dir.x + dir.y * (config.edge_arrow_width / config.edge_arrow_length), 301 | arrowhead.y - dir.y - dir.x * (config.edge_arrow_width / config.edge_arrow_length), 302 | ); 303 | 304 | // 三角形を描画 305 | painter.add(egui::Shape::convex_polygon( 306 | vec![arrowhead, left, right], 307 | color, 308 | egui::Stroke::NONE, 309 | )); 310 | 311 | // 線を描画 312 | painter.line_segment( 313 | [from_pos, endpoint], 314 | egui::Stroke::new(config.edge_stroke, color), 315 | ); 316 | } 317 | 318 | /// 曲線付きの矢印を描画する関数 319 | fn draw_edge_directed_curved( 320 | painter: &egui::Painter, 321 | from_pos: egui::Pos2, 322 | to_pos: egui::Pos2, 323 | color: egui::Color32, 324 | config: &AppConfig, 325 | ) -> Option<()> { 326 | let control = calc_bezier_control_point(from_pos, to_pos, config.edge_bezier_distance, false); 327 | 328 | // ベジェ曲線と円の交点を計算 329 | let (arrowhead, dir) = calc_intersection_of_bezier_and_circle( 330 | from_pos, 331 | control, 332 | to_pos, 333 | to_pos, 334 | config.vertex_radius, 335 | )?; 336 | 337 | // 2次ベジェ曲線を描画 338 | let bezier = epaint::QuadraticBezierShape { 339 | points: [from_pos, control, to_pos], // 始点・制御点・終点 340 | closed: false, 341 | fill: egui::Color32::TRANSPARENT, 342 | stroke: epaint::PathStroke::new(config.edge_stroke, color), 343 | }; 344 | painter.add(bezier); 345 | 346 | // 矢印のヘッドに曲線が重ならないよう,マスクを作成 347 | painter.line_segment( 348 | [ 349 | arrowhead - dir.normalized() * config.edge_arrow_length / 2.0, 350 | arrowhead, 351 | ], 352 | egui::Stroke::new(config.edge_stroke, config.bg_color), 353 | ); 354 | 355 | // 矢印のヘッド(三角形)の3つの頂点を計算 356 | let dir = dir.normalized() * config.edge_arrow_length; 357 | let left = egui::Pos2::new( 358 | arrowhead.x - dir.x - dir.y * (config.edge_arrow_width / config.edge_arrow_length), 359 | arrowhead.y - dir.y + dir.x * (config.edge_arrow_width / config.edge_arrow_length), 360 | ); 361 | let right = egui::Pos2::new( 362 | arrowhead.x - dir.x + dir.y * (config.edge_arrow_width / config.edge_arrow_length), 363 | arrowhead.y - dir.y - dir.x * (config.edge_arrow_width / config.edge_arrow_length), 364 | ); 365 | 366 | // 三角形を描画 367 | painter.add(egui::Shape::convex_polygon( 368 | vec![arrowhead, left, right], 369 | color, 370 | egui::Stroke::NONE, 371 | )); 372 | 373 | Some(()) 374 | } 375 | 376 | /// central_panel に頂点を描画する 377 | fn draw_vertices(app: &mut GraphEditorApp, ui: &egui::Ui, painter: &egui::Painter) { 378 | // グラフの更新 379 | app.graph.restore_graph(); 380 | 381 | // シミュレーションがonの場合,位置を更新 382 | if app.is_animated { 383 | app.graph.simulate_step(&app.config.simulate_config); 384 | } 385 | 386 | let is_directed = app.graph.is_directed; 387 | let (vertices_mut, edges_mut) = app.graph.vertices_edges_mut(); 388 | 389 | for vertex in vertices_mut.iter_mut().sorted_by_key(|v| v.z_index) { 390 | let rect = egui::Rect::from_center_size( 391 | vertex.get_position(), 392 | egui::vec2( 393 | app.config.vertex_radius * 2.0, 394 | app.config.vertex_radius * 2.0, 395 | ), 396 | ); 397 | let response = ui.interact( 398 | rect, 399 | egui::Id::new(vertex.id), 400 | egui::Sense::click_and_drag(), 401 | ); 402 | 403 | // ドラッグ開始時の処理 404 | if response.drag_started() { 405 | vertex.is_pressed = true; 406 | vertex.z_index = app.next_z_index; 407 | app.next_z_index += 1; 408 | if let Some(mouse_pos) = response.hover_pos() { 409 | let delta = Affine2D::from_transition(mouse_pos - vertex.get_position()); 410 | vertex.drag = delta; 411 | } 412 | } else if response.dragged() { 413 | // ドラッグ中の位置更新 414 | if let Some(mouse_pos) = response.hover_pos() { 415 | vertex.update_position(mouse_pos.applied(&vertex.drag)); 416 | } 417 | } else { 418 | vertex.is_pressed = false; 419 | } 420 | 421 | // ホバー時 422 | if app.edit_mode.is_add_edge() || app.edit_mode.is_delete() { 423 | vertex.is_pressed = response.hovered(); 424 | } 425 | 426 | // 選択時 427 | if response.clicked() && !response.dragged() { 428 | // 最前面に配置 429 | vertex.z_index = app.next_z_index; 430 | app.next_z_index += 1; 431 | 432 | match app.edit_mode { 433 | EditMode::AddEdge { 434 | ref mut from_vertex, 435 | ref mut confirmed, 436 | } => { 437 | if let Some(from_vertex_inner) = from_vertex { 438 | if *from_vertex_inner == vertex.id { 439 | // 自分だった場合,選択を解除 440 | vertex.is_selected = false; 441 | *from_vertex = None; 442 | } else { 443 | // クリックした頂点をto_vertexに設定(すでに追加されている場合は無視) 444 | Graph::add_unique_edge( 445 | is_directed, 446 | edges_mut, 447 | *from_vertex_inner, 448 | vertex.id, 449 | ); 450 | *confirmed = true; 451 | } 452 | } else { 453 | vertex.is_selected = true; 454 | vertex.z_index = app.next_z_index; 455 | app.next_z_index += 1; 456 | // クリックした頂点をfrom_vertexに設定 457 | *from_vertex = Some(vertex.id); 458 | } 459 | } 460 | EditMode::Delete => { 461 | vertex.is_deleted = true; 462 | } 463 | _ => {} 464 | } 465 | } 466 | 467 | match app.edit_mode { 468 | // 始点のみ選択状態の場合,辺を描画 469 | EditMode::AddEdge { 470 | from_vertex: Some(from_vertex_inner), 471 | confirmed: false, 472 | } => { 473 | if vertex.id == from_vertex_inner { 474 | if let Some(mouse_pos) = ui.input(|i| i.pointer.hover_pos()) { 475 | painter.line_segment( 476 | [vertex.get_position(), mouse_pos], 477 | egui::Stroke::new(app.config.edge_stroke, app.config.edge_color_normal), 478 | ); 479 | } 480 | } 481 | } 482 | // 辺を選択し終えた場合,状態をリセット 483 | EditMode::AddEdge { 484 | from_vertex: ref mut from_vertex @ Some(from_vertex_inner), 485 | confirmed: ref mut confirmed @ true, 486 | } => { 487 | if vertex.id == from_vertex_inner { 488 | vertex.is_selected = false; 489 | *from_vertex = None; 490 | *confirmed = false; 491 | } 492 | } 493 | _ => {} 494 | } 495 | 496 | // 頂点の色 497 | let color = if vertex.is_selected { 498 | app.config.vertex_color_selected 499 | } else if vertex.is_pressed { 500 | app.config.vertex_color_dragged 501 | } else { 502 | app.config.vertex_color_normal 503 | }; 504 | 505 | // 0-indexed / 1-indexed の選択によってIDを変更 506 | let vertex_show_id = if app.zero_indexed { 507 | vertex.id 508 | } else { 509 | vertex.id + 1 510 | } 511 | .to_string(); 512 | 513 | painter.circle_filled(vertex.get_position(), app.config.vertex_radius, color); 514 | painter.circle_stroke( 515 | vertex.get_position(), 516 | app.config.vertex_radius, 517 | egui::Stroke::new(app.config.vertex_stroke, app.config.vertex_color_outline), 518 | ); 519 | painter.text( 520 | vertex.get_position(), 521 | egui::Align2::CENTER_CENTER, 522 | vertex_show_id, 523 | egui::FontId::proportional(app.config.vertex_font_size), 524 | app.config.vertex_font_color, 525 | ); 526 | } 527 | } 528 | -------------------------------------------------------------------------------- /src/components/edit_menu.rs: -------------------------------------------------------------------------------- 1 | use egui::Context; 2 | 3 | use crate::{mode::EditMode, GraphEditorApp}; 4 | 5 | /// 編集メニューを表示する 6 | pub fn draw_edit_menu(app: &mut GraphEditorApp, ctx: &Context) { 7 | egui::SidePanel::left("Menu") 8 | .min_width(200.0) 9 | .show(ctx, |ui| { 10 | // カーソルがあるか判定 11 | app.hovered_on_menu_window = ui.rect_contains_pointer(ui.max_rect()); 12 | 13 | egui::Frame::new() 14 | .inner_margin(egui::Margin::same(10)) 15 | .show(ui, |ui| { 16 | ui.vertical(|ui| { 17 | // モード切替 18 | ui.label( 19 | egui::RichText::new("Edit Mode").size(app.config.menu_font_size_mini), 20 | ); 21 | 22 | ui.radio_value( 23 | &mut app.edit_mode, 24 | EditMode::default_normal(), 25 | egui::RichText::new("Normal [Esc]") 26 | .size(app.config.menu_font_size_normal), 27 | ); 28 | ui.radio_value( 29 | &mut app.edit_mode, 30 | EditMode::default_add_vertex(), 31 | egui::RichText::new("Add Vertex [V]") 32 | .size(app.config.menu_font_size_normal), 33 | ); 34 | ui.radio_value( 35 | &mut app.edit_mode, 36 | EditMode::default_add_edge(), 37 | egui::RichText::new("Add Edge [E]") 38 | .size(app.config.menu_font_size_normal), 39 | ); 40 | ui.radio_value( 41 | &mut app.edit_mode, 42 | EditMode::default_delete(), 43 | egui::RichText::new("Delete [D]") 44 | .size(app.config.menu_font_size_normal), 45 | ); 46 | 47 | ui.separator(); 48 | 49 | // 0-indexed / 1-indexed の選択 50 | ui.label( 51 | egui::RichText::new("Indexing [1]") 52 | .size(app.config.menu_font_size_mini), 53 | ); 54 | 55 | ui.radio_value( 56 | &mut app.zero_indexed, 57 | true, 58 | egui::RichText::new("0-indexed").size(app.config.menu_font_size_normal), 59 | ); 60 | ui.radio_value( 61 | &mut app.zero_indexed, 62 | false, 63 | egui::RichText::new("1-indexed").size(app.config.menu_font_size_normal), 64 | ); 65 | 66 | ui.separator(); 67 | 68 | ui.label( 69 | egui::RichText::new("Direction [Shift + D]") 70 | .size(app.config.menu_font_size_mini), 71 | ); 72 | ui.radio_value( 73 | &mut app.graph.is_directed, 74 | false, 75 | egui::RichText::new("Undirected") 76 | .size(app.config.menu_font_size_normal), 77 | ); 78 | ui.radio_value( 79 | &mut app.graph.is_directed, 80 | true, 81 | egui::RichText::new("Directed").size(app.config.menu_font_size_normal), 82 | ); 83 | 84 | ui.separator(); 85 | 86 | ui.checkbox( 87 | &mut app.is_animated, 88 | egui::RichText::new("Animate [A]") 89 | .size(app.config.menu_font_size_normal), 90 | ); 91 | 92 | ui.separator(); 93 | 94 | // グラフのクリア 95 | if ui 96 | .button( 97 | egui::RichText::new("Clear All") 98 | .size(app.config.menu_font_size_normal), 99 | ) 100 | .clicked() 101 | { 102 | app.graph.clear(); 103 | app.next_z_index = 0; 104 | } 105 | }); 106 | }); 107 | }); 108 | } 109 | -------------------------------------------------------------------------------- /src/components/error_modal.rs: -------------------------------------------------------------------------------- 1 | use egui::Context; 2 | 3 | use crate::GraphEditorApp; 4 | 5 | /// エラー表示を行うモーダル画面 6 | pub fn draw_error_modal(app: &mut GraphEditorApp, ctx: &Context) { 7 | if let Some(message) = app.error_message.to_owned() { 8 | // 背景を暗くする 9 | let screen_rect = ctx.screen_rect(); 10 | let dark_color = egui::Color32::from_black_alpha(160); 11 | let painter = ctx.layer_painter(egui::LayerId::new( 12 | egui::Order::Background, 13 | egui::Id::new("modal_bg"), 14 | )); 15 | painter.rect_filled(screen_rect, 0.0, dark_color); 16 | 17 | if ctx.input(|i| { 18 | i.key_pressed(egui::Key::Escape) 19 | || i.pointer.any_released() && !app.hovered_on_input_window 20 | }) { 21 | app.error_message = None; 22 | return; 23 | } 24 | 25 | // エラーモーダル本体 26 | egui::Window::new( 27 | egui::RichText::new("Error") 28 | .strong() 29 | .size(app.config.menu_font_size_normal) 30 | .color(egui::Color32::from_rgb(255, 100, 80)), 31 | ) 32 | .collapsible(false) 33 | .resizable(false) 34 | .anchor(egui::Align2::CENTER_CENTER, [0.0, 0.0]) 35 | .frame(egui::Frame::popup(ctx.style().as_ref()).inner_margin(10.0)) 36 | .show(ctx, |ui| { 37 | ui.label(egui::RichText::new(message).size(app.config.menu_font_size_normal)); 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/components/footer.rs: -------------------------------------------------------------------------------- 1 | use egui::Context; 2 | 3 | use crate::{config::APP_VERSION, GraphEditorApp}; 4 | 5 | /// フッターを描画する 6 | pub fn draw_footer(app: &mut GraphEditorApp, ctx: &Context) { 7 | // 画面下部にフッターを追加 8 | egui::Area::new("Footer".into()) 9 | .anchor(egui::Align2::RIGHT_BOTTOM, egui::vec2(-20.0, -10.0)) 10 | .show(ctx, |ui| { 11 | egui::Frame::default().show(ui, |ui| { 12 | ui.horizontal_centered(|ui| { 13 | ui.label( 14 | egui::RichText::new(format!( 15 | "Graph Editor v{APP_VERSION} © 2025 kentakom1213" 16 | )) 17 | .size(app.config.footer_font_size), 18 | ); 19 | 20 | if ui 21 | .hyperlink_to( 22 | egui::RichText::new("GitHub").size(app.config.footer_font_size), 23 | "https://github.com/kentakom1213/graph-editor", 24 | ) 25 | .clicked() 26 | {} 27 | }); 28 | }); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /src/components/graph_io.rs: -------------------------------------------------------------------------------- 1 | use egui::Context; 2 | 3 | use crate::{graph::BaseGraph, GraphEditorApp}; 4 | 5 | /// グラフのエンコードを表示する 6 | pub fn draw_graph_io(app: &mut GraphEditorApp, ctx: &Context) { 7 | if !app.hovered_on_input_window { 8 | app.input_text = app.graph.encode(app.zero_indexed) 9 | } 10 | 11 | // テキストの表示 12 | egui::Window::new("Graph Input") 13 | .collapsible(false) 14 | .default_width(150.0) 15 | .show(ctx, |ui| { 16 | // カーソルがあるか判定 17 | app.hovered_on_input_window = ui.rect_contains_pointer(ui.max_rect()); 18 | 19 | egui::Frame::default() 20 | .inner_margin(egui::Margin::same(10)) 21 | .show(ui, |ui| { 22 | ui.horizontal(|ui| { 23 | if ui 24 | .button( 25 | egui::RichText::new("Copy").size(app.config.menu_font_size_normal), 26 | ) 27 | .clicked() 28 | { 29 | ctx.copy_text(app.input_text.clone()); 30 | } 31 | 32 | if ui 33 | .button( 34 | egui::RichText::new("Apply").size(app.config.menu_font_size_normal), 35 | ) 36 | .clicked() 37 | { 38 | let new_graph = BaseGraph::parse(&app.input_text, app.zero_indexed) 39 | .and_then(|base| { 40 | app.graph.apply_input( 41 | app.config.visualize_method.as_ref(), 42 | base, 43 | ctx.used_size(), 44 | ) 45 | }); 46 | 47 | match new_graph { 48 | Ok(_) => { 49 | app.is_animated = true; 50 | } 51 | Err(err) => { 52 | app.error_message = Some(err.to_string()); 53 | } 54 | } 55 | } 56 | }); 57 | ui.separator(); 58 | 59 | // コード形式で表示 60 | if ui.code_editor(&mut app.input_text).has_focus() { 61 | app.hovered_on_input_window = true; 62 | } 63 | }); 64 | }); 65 | } 66 | -------------------------------------------------------------------------------- /src/components/mod.rs: -------------------------------------------------------------------------------- 1 | mod central_panel; 2 | mod edit_menu; 3 | mod error_modal; 4 | mod footer; 5 | mod graph_io; 6 | mod top_panel; 7 | mod transition_and_scale; 8 | 9 | pub use central_panel::draw_central_panel; 10 | pub use edit_menu::draw_edit_menu; 11 | pub use error_modal::draw_error_modal; 12 | pub use footer::draw_footer; 13 | pub use graph_io::draw_graph_io; 14 | pub use top_panel::{draw_top_panel, PanelTabState}; 15 | -------------------------------------------------------------------------------- /src/components/top_panel.rs: -------------------------------------------------------------------------------- 1 | // src/components/top_panel.rs 2 | use egui::{Context, TopBottomPanel}; 3 | 4 | use crate::GraphEditorApp; 5 | 6 | pub struct PanelTabState { 7 | pub edit_menu: bool, 8 | pub graph_io: bool, 9 | } 10 | 11 | impl Default for PanelTabState { 12 | fn default() -> Self { 13 | PanelTabState { 14 | edit_menu: true, 15 | graph_io: true, 16 | } 17 | } 18 | } 19 | 20 | pub fn draw_top_panel(app: &mut GraphEditorApp, ctx: &Context) { 21 | TopBottomPanel::top("top_panel").show(ctx, |ui| { 22 | egui::menu::bar(ui, |ui| { 23 | ui.checkbox( 24 | &mut app.panel_tab.edit_menu, 25 | egui::RichText::new("Menu").size(app.config.menu_font_size_normal), 26 | ); 27 | ui.checkbox( 28 | &mut app.panel_tab.graph_io, 29 | egui::RichText::new("Input").size(app.config.menu_font_size_normal), 30 | ); 31 | }); 32 | }); 33 | } 34 | -------------------------------------------------------------------------------- /src/components/transition_and_scale.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | math::affine::{Affine2D, ApplyAffine}, 3 | GraphEditorApp, 4 | }; 5 | 6 | /// 右クリックでドラッグを行う 7 | pub fn drag_central_panel(app: &mut GraphEditorApp, ui: &mut egui::Ui) { 8 | let response = ui.allocate_response(ui.available_size(), egui::Sense::drag()); 9 | 10 | // マウス入力の処理 11 | if response.dragged_by(egui::PointerButton::Secondary) { 12 | if let Some(mouse_pos) = ui.input(|i| i.pointer.hover_pos()) { 13 | if let Some(last_pos) = app.last_mouse_pos { 14 | let cur_scale = app.graph.affine.borrow().scale_x(); 15 | let delta = mouse_pos - last_pos; 16 | *app.graph.affine.borrow_mut() *= Affine2D::from_transition(delta / cur_scale); 17 | } 18 | app.last_mouse_pos = Some(mouse_pos); 19 | } 20 | } else { 21 | app.last_mouse_pos = None; 22 | } 23 | 24 | // 2本指ジェスチャーに対応 25 | if let Some(multitouch) = ui.input(|i| i.multi_touch()) { 26 | let cur_scale = app.graph.affine.borrow().scale_x(); 27 | *app.graph.affine.borrow_mut() *= 28 | Affine2D::from_transition(multitouch.translation_delta / cur_scale); 29 | } 30 | } 31 | 32 | /// グラフのスケールを行う 33 | pub fn scale_central_panel(app: &mut GraphEditorApp, ui: &mut egui::Ui) { 34 | let input = ui.input(|i| i.clone()); 35 | 36 | // スクロールに対応 37 | if let Some(pos) = input.pointer.hover_pos() { 38 | let scroll_delta = input.smooth_scroll_delta.y; 39 | 40 | // 現在のscaleの逆数倍で変化させる 41 | let cur_affine = app.graph.affine.borrow().to_owned(); 42 | 43 | let cur_scale = cur_affine.scale_x(); 44 | let scale = 1.0 + app.config.scale_delta * scroll_delta / cur_scale; 45 | 46 | if let Some(inv) = cur_affine.inverse() { 47 | // 中心の調整 48 | let center = pos.applied(&inv); 49 | 50 | // アフィン変換の生成 51 | let affine = Affine2D::from_center_and_scale(center, scale); 52 | 53 | if let Some(res) = 54 | cur_affine.try_compose(&affine, app.config.scale_min, app.config.scale_max) 55 | { 56 | *app.graph.affine.borrow_mut() = res; 57 | } 58 | } 59 | } 60 | 61 | // 2本指ジェスチャーに対応 62 | if let Some(multitouch) = input.multi_touch() { 63 | let scale = multitouch.zoom_delta; 64 | 65 | let cur_affine = app.graph.affine.borrow().to_owned(); 66 | 67 | if let Some(inv) = cur_affine.inverse() { 68 | // 中心の調整 69 | let center = multitouch.center_pos.applied(&inv); 70 | 71 | // アフィン変換の生成 72 | let affine = Affine2D::from_center_and_scale(center, scale); 73 | 74 | if let Some(res) = 75 | cur_affine.try_compose(&affine, app.config.scale_min, app.config.scale_max) 76 | { 77 | *app.graph.affine.borrow_mut() = res; 78 | } 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- 1 | use egui::Color32; 2 | 3 | use crate::graph::{visualize_methods, Visualize}; 4 | 5 | /// バージョン情報 6 | pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION"); 7 | 8 | /// 全体の設定 9 | pub struct AppConfig { 10 | pub bg_color: Color32, 11 | pub vertex_radius: f32, 12 | pub vertex_stroke: f32, 13 | pub vertex_color_outline: Color32, 14 | pub vertex_color_normal: Color32, 15 | pub vertex_color_dragged: Color32, 16 | pub vertex_color_selected: Color32, 17 | pub vertex_font_size: f32, 18 | pub vertex_font_color: Color32, 19 | pub edge_color_normal: Color32, 20 | pub edge_color_hover: Color32, 21 | pub edge_arrow_length: f32, 22 | pub edge_arrow_width: f32, 23 | pub edge_bezier_distance: f32, 24 | pub edge_stroke: f32, 25 | pub menu_font_size_normal: f32, 26 | pub menu_font_size_mini: f32, 27 | pub footer_font_size: f32, 28 | /// 最大倍率 29 | pub scale_max: f32, 30 | /// 最小倍率 31 | pub scale_min: f32, 32 | /// 倍率の刻み 33 | pub scale_delta: f32, 34 | /// 可視化アルゴリズム 35 | pub visualize_method: Box, 36 | /// シミュレーションの設定 37 | pub simulate_config: SimulateConfig, 38 | } 39 | 40 | impl Default for AppConfig { 41 | fn default() -> Self { 42 | Self { 43 | bg_color: Color32::from_rgb(230, 230, 230), 44 | vertex_radius: 36.0, 45 | vertex_stroke: 3.0, 46 | vertex_color_outline: Color32::from_rgb(150, 150, 150), 47 | vertex_color_normal: Color32::WHITE, 48 | vertex_color_dragged: Color32::from_rgb(200, 100, 100), 49 | vertex_color_selected: Color32::from_rgb(100, 200, 100), 50 | vertex_font_size: 40.0, 51 | vertex_font_color: Color32::BLACK, 52 | edge_color_normal: Color32::from_rgb(100, 100, 100), 53 | edge_color_hover: Color32::from_rgb(200, 100, 100), 54 | edge_stroke: 6.0, 55 | edge_arrow_length: 18.0, 56 | edge_arrow_width: 9.0, 57 | edge_bezier_distance: 50.0, 58 | menu_font_size_normal: 20.0, 59 | menu_font_size_mini: 15.0, 60 | footer_font_size: 13.0, 61 | scale_max: 3.0, 62 | scale_min: 0.1, 63 | scale_delta: 0.002, 64 | visualize_method: Box::new(visualize_methods::HillClimbing(1_000)), 65 | simulate_config: SimulateConfig::default(), 66 | } 67 | } 68 | } 69 | 70 | /// シミュレーションの設定 71 | pub struct SimulateConfig { 72 | /// クーロン定数 73 | pub c: f32, 74 | /// ばね定数 75 | pub k: f32, 76 | /// ばねの自然長 77 | pub l: f32, 78 | /// 減衰定数 79 | pub h: f32, 80 | /// 頂点の重さ 81 | pub m: f32, 82 | /// 最大速度 83 | pub max_v: f32, 84 | /// 微小時間 85 | pub dt: f32, 86 | } 87 | 88 | impl Default for SimulateConfig { 89 | fn default() -> Self { 90 | Self { 91 | c: 2e5, 92 | k: 7.0, 93 | l: 180.0, 94 | h: 0.73, 95 | m: 10.0, 96 | max_v: 100.0, 97 | dt: 0.2, 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/graph/base.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug)] 2 | pub struct BaseGraph { 3 | pub n: usize, 4 | pub edges: Vec<(usize, usize)>, 5 | } 6 | 7 | impl BaseGraph { 8 | /// 文字列からグラフの基本構造を生成する. 9 | /// ```text 10 | /// N M 11 | /// u_1 v_1 12 | /// ... 13 | /// u_M v_M 14 | /// ``` 15 | pub fn parse(input_text: &str, zero_indexed: bool) -> anyhow::Result { 16 | let mut source = input_text 17 | .split_ascii_whitespace() 18 | .map(|s| s.parse::()); 19 | 20 | let n = source 21 | .next() 22 | .ok_or_else(|| anyhow::anyhow!("Insufficient input"))??; 23 | let m = source 24 | .next() 25 | .ok_or_else(|| anyhow::anyhow!("Insufficient input"))??; 26 | 27 | let edges = (0..m) 28 | .map(|_| { 29 | let mut from = source 30 | .next() 31 | .ok_or_else(|| anyhow::anyhow!("Insufficient input"))??; 32 | let mut to = source 33 | .next() 34 | .ok_or_else(|| anyhow::anyhow!("Insufficient input"))??; 35 | 36 | if !zero_indexed { 37 | from = from 38 | .checked_sub(1) 39 | .ok_or_else(|| anyhow::anyhow!("Invalid edge: {} {}", from, to))?; 40 | to = to 41 | .checked_sub(1) 42 | .ok_or_else(|| anyhow::anyhow!("Invalid edge: {} {}", from, to))?; 43 | } 44 | 45 | if from > n || to > n { 46 | return Err(anyhow::anyhow!("Invalid edge: {} {}", from, to)); 47 | } 48 | 49 | anyhow::Ok((from, to)) 50 | }) 51 | .collect::>()?; 52 | 53 | if source.next().is_some() { 54 | return Err(anyhow::anyhow!("Excessive input")); 55 | } 56 | 57 | Ok(Self { n, edges }) 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/graph/mod.rs: -------------------------------------------------------------------------------- 1 | mod base; 2 | mod structures; 3 | mod visualize; 4 | 5 | pub use base::BaseGraph; 6 | pub use structures::Graph; 7 | pub use visualize::{visualize_methods, Visualize}; 8 | -------------------------------------------------------------------------------- /src/graph/structures.rs: -------------------------------------------------------------------------------- 1 | use std::{ 2 | cell::{Ref, RefCell}, 3 | collections::{HashMap, HashSet}, 4 | rc::Rc, 5 | }; 6 | 7 | use egui::Vec2; 8 | use num_traits::One; 9 | 10 | use crate::{ 11 | config::SimulateConfig, 12 | math::affine::{Affine2D, ApplyAffine}, 13 | }; 14 | 15 | use super::{BaseGraph, Visualize}; 16 | 17 | const DISTANCE_EPS: f32 = 1e-5; 18 | 19 | #[derive(Debug, Clone)] 20 | pub struct Vertex { 21 | pub id: usize, 22 | position: egui::Pos2, 23 | velocity: egui::Vec2, 24 | pub drag: Affine2D, 25 | pub is_pressed: bool, 26 | pub is_selected: bool, 27 | pub z_index: u32, 28 | pub is_deleted: bool, 29 | affine: Rc>, 30 | } 31 | 32 | impl Vertex { 33 | pub fn get_position(&self) -> egui::Pos2 { 34 | self.position.applied(&self.affine.borrow()) 35 | } 36 | 37 | pub fn affine(&self) -> Ref<'_, Affine2D> { 38 | self.affine.borrow() 39 | } 40 | 41 | pub fn update_position(&mut self, new_position: egui::Pos2) { 42 | if let Some(inv) = self.affine.borrow().inverse() { 43 | self.position = new_position.applied(&inv); 44 | } 45 | } 46 | 47 | pub fn solve_drag_offset(&mut self) { 48 | self.position.apply(&self.drag); 49 | self.drag = Affine2D::one(); 50 | } 51 | } 52 | 53 | #[derive(Debug, Clone)] 54 | pub struct Edge { 55 | pub from: usize, 56 | pub to: usize, 57 | pub is_pressed: bool, 58 | pub is_deleted: bool, 59 | } 60 | 61 | impl Edge { 62 | pub fn new(from: usize, to: usize) -> Self { 63 | Self { 64 | from, 65 | to, 66 | is_pressed: false, 67 | is_deleted: false, 68 | } 69 | } 70 | } 71 | 72 | #[derive(Debug)] 73 | pub struct Graph { 74 | /// 有向グラフ / 無向グラフ 75 | pub is_directed: bool, 76 | /// 頂点集合に対するアフィン変換 77 | pub affine: Rc>, 78 | /// 頂点集合 79 | vertices: Vec, 80 | /// 辺集合 81 | edges: Vec, 82 | } 83 | 84 | impl Graph { 85 | /// 削除済みフラグが立っている頂点,辺を削除する 86 | pub fn restore_graph(&mut self) { 87 | // 削除済みフラグが立っている頂点を削除 88 | self.vertices.retain(|vertex| !vertex.is_deleted); 89 | 90 | // 頂点番号を振り直す 91 | let mut new_vertex_id = HashMap::new(); 92 | 93 | for (i, vertex) in self.vertices.iter_mut().enumerate() { 94 | new_vertex_id.insert(vertex.id, i); 95 | vertex.id = i; 96 | } 97 | 98 | // 辺の頂点番号を振り直す 99 | for edge in &mut self.edges { 100 | if let Some((new_from, new_to)) = new_vertex_id 101 | .get(&edge.from) 102 | .zip(new_vertex_id.get(&edge.to)) 103 | { 104 | edge.from = *new_from; 105 | edge.to = *new_to; 106 | } else { 107 | // 辺を削除 108 | edge.is_deleted = true; 109 | } 110 | } 111 | 112 | // 削除済みフラグが立っている辺を削除 113 | self.edges.retain(|edge| !edge.is_deleted); 114 | } 115 | 116 | pub fn edges(&self) -> &Vec { 117 | &self.edges 118 | } 119 | 120 | pub fn vertices_mut(&mut self) -> &mut Vec { 121 | &mut self.vertices 122 | } 123 | 124 | pub fn edges_mut(&mut self) -> &mut Vec { 125 | &mut self.edges 126 | } 127 | 128 | pub fn vertices_edges_mut(&mut self) -> (&mut Vec, &mut Vec) { 129 | (&mut self.vertices, &mut self.edges) 130 | } 131 | 132 | pub fn add_vertex(&mut self, position: egui::Pos2, z_index: u32) { 133 | let position = position - self.affine.borrow().translation(); 134 | 135 | self.vertices.push(Vertex { 136 | id: self.vertices.len(), 137 | position, 138 | velocity: Vec2::ZERO, 139 | is_pressed: false, 140 | drag: Affine2D::one(), 141 | is_selected: false, 142 | z_index, 143 | is_deleted: false, 144 | affine: self.affine.clone(), 145 | }); 146 | } 147 | 148 | /// 始点と終点が同じ辺が存在するか 149 | fn has_same_edge(is_directed: bool, edges: &[Edge], from: usize, to: usize) -> bool { 150 | edges.iter().any(|edge| { 151 | (edge.from, edge.to) == (from, to) || !is_directed && (edge.from, edge.to) == (to, from) 152 | }) 153 | } 154 | 155 | /// ユニークな辺を追加する.正常に追加された場合`true`を返す. 156 | pub fn add_unique_edge( 157 | is_directed: bool, 158 | edges: &mut Vec, 159 | from: usize, 160 | to: usize, 161 | ) -> bool { 162 | if Self::has_same_edge(is_directed, edges, from, to) { 163 | false 164 | } else { 165 | edges.push(Edge::new(from, to)); 166 | true 167 | } 168 | } 169 | 170 | /// 隣接頂点のidを列挙する 171 | pub fn neighbor_vertices(&self, id: usize) -> impl Iterator { 172 | self.edges 173 | .iter() 174 | .filter_map(move |v| { 175 | if v.from == id { 176 | Some(v.to) 177 | } else if v.to == id { 178 | Some(v.from) 179 | } else { 180 | None 181 | } 182 | }) 183 | .filter_map(|id| self.vertices.iter().find(|v| v.id == id)) 184 | } 185 | 186 | pub fn clear(&mut self) { 187 | self.vertices.clear(); 188 | self.edges.clear(); 189 | } 190 | 191 | pub fn list_unique_edges(&self) -> Vec<(usize, usize)> { 192 | let mut seen = HashSet::new(); 193 | 194 | self.edges 195 | .iter() 196 | .filter_map(|e| { 197 | if !self.is_directed && seen.contains(&(e.to, e.from)) { 198 | None 199 | } else { 200 | seen.insert((e.from, e.to)); 201 | Some((e.from, e.to)) 202 | } 203 | }) 204 | .collect() 205 | } 206 | 207 | pub fn encode(&mut self, zero_indexed: bool) -> String { 208 | // 削除済み頂点を削除 209 | self.restore_graph(); 210 | 211 | let unique_edges = self.list_unique_edges(); 212 | let mut res = format!("{} {}", self.vertices.len(), unique_edges.len()); 213 | 214 | for (from, to) in unique_edges { 215 | res.push_str(&format!( 216 | "\n{} {}", 217 | if zero_indexed { from } else { from + 1 }, 218 | if zero_indexed { to } else { to + 1 } 219 | )); 220 | } 221 | 222 | res 223 | } 224 | 225 | /// グラフの入力からグラフを生成する 226 | pub fn apply_input( 227 | &mut self, 228 | vizualizer: &dyn Visualize, 229 | BaseGraph { n, edges }: BaseGraph, 230 | window_size: egui::Vec2, 231 | ) -> anyhow::Result<()> { 232 | // グラフの初期化 233 | self.clear(); 234 | *self.affine.borrow_mut() = Affine2D::one(); 235 | 236 | // 頂点座標を適切な位置に(上下左右 10% の余白をもたせる) 237 | let adjust_to_window = |pos: egui::Vec2| -> egui::Pos2 { 238 | (pos * window_size * 0.8 + window_size * 0.1).to_pos2() 239 | }; 240 | 241 | // グラフの構築 242 | let new_vertices = vizualizer 243 | .resolve_vertex_position(n, &edges) 244 | .into_iter() 245 | .enumerate() 246 | .map(|(id, pos)| Vertex { 247 | id, 248 | position: adjust_to_window(pos), 249 | velocity: egui::Vec2::ZERO, 250 | is_pressed: false, 251 | drag: Affine2D::one(), 252 | is_selected: false, 253 | z_index: 0, 254 | is_deleted: false, 255 | affine: self.affine.clone(), 256 | }); 257 | 258 | self.vertices.extend(new_vertices); 259 | 260 | let new_edges = edges.into_iter().map(|(from, to)| Edge::new(from, to)); 261 | 262 | self.edges.extend(new_edges); 263 | 264 | Ok(()) 265 | } 266 | 267 | /// 1ステップ分シミュレーションを行う 268 | /// アルゴリズム: 269 | /// 270 | /// ### Args 271 | /// - `c`: クーロン定数(頂点同士の反発力) 272 | /// - `k`: ばね定数 273 | /// - `l`: ばねの自然長 274 | /// - `h`: 力の減衰率 275 | /// - `m`: 頂点の重さ 276 | /// - `dt`: 微小時間 277 | pub fn simulate_step( 278 | &mut self, 279 | &SimulateConfig { 280 | c, 281 | k, 282 | l, 283 | h, 284 | m, 285 | max_v, 286 | dt, 287 | }: &SimulateConfig, 288 | ) { 289 | // ドラッグ差分を解消 290 | self.vertices_mut() 291 | .iter_mut() 292 | .for_each(|v| v.solve_drag_offset()); 293 | 294 | let n = self.vertices.len(); 295 | 296 | for i in 0..n { 297 | let v = self.vertices[i].clone(); 298 | 299 | // vからxへ向かう単位ベクトル 300 | let r = |x: egui::Pos2| -> egui::Vec2 { (x - v.position).normalized() }; 301 | 302 | // 頂点vに働く力 303 | let fv = self 304 | .vertices 305 | .iter() 306 | .filter(|w| w.position.distance(v.position) > DISTANCE_EPS) 307 | // 頂点間の斥力 308 | .map(|w| -r(w.position) * c / v.position.distance_sq(w.position)) 309 | // 辺による引力 310 | .chain( 311 | self.neighbor_vertices(v.id) 312 | .map(|w| r(w.position) * (v.position.distance(w.position) - l) * k), 313 | ) 314 | .fold(egui::Vec2::ZERO, |acc, f| acc + f); 315 | 316 | // 速度を更新 317 | let mut next_velocity = (v.velocity + fv * dt / m) * h; 318 | 319 | if next_velocity.length() > max_v { 320 | next_velocity = next_velocity.normalized() * max_v; 321 | } 322 | 323 | // 位置を更新 324 | let next_position = v.position + v.velocity * dt; 325 | 326 | self.vertices[i].velocity = next_velocity; 327 | self.vertices[i].position = next_position; 328 | } 329 | } 330 | } 331 | 332 | impl Default for Graph { 333 | fn default() -> Self { 334 | let affine = Rc::new(RefCell::new(Affine2D::one())); 335 | 336 | Self { 337 | is_directed: false, 338 | vertices: vec![ 339 | Vertex { 340 | id: 0, 341 | position: egui::pos2(400.0, 400.0), 342 | velocity: egui::Vec2::ZERO, 343 | is_pressed: false, 344 | drag: Affine2D::one(), 345 | is_selected: false, 346 | z_index: 0, 347 | is_deleted: false, 348 | affine: affine.clone(), 349 | }, 350 | Vertex { 351 | id: 1, 352 | position: egui::pos2(600.0, 400.0), 353 | velocity: egui::Vec2::ZERO, 354 | is_pressed: false, 355 | drag: Affine2D::one(), 356 | is_selected: false, 357 | z_index: 1, 358 | is_deleted: false, 359 | affine: affine.clone(), 360 | }, 361 | ], 362 | edges: vec![Edge { 363 | from: 0, 364 | to: 1, 365 | is_pressed: false, 366 | is_deleted: false, 367 | }], 368 | affine, 369 | } 370 | } 371 | } 372 | -------------------------------------------------------------------------------- /src/graph/visualize.rs: -------------------------------------------------------------------------------- 1 | /// 可視化を行う 2 | pub trait Visualize { 3 | /// グラフ G = (V,E) が与えられたとき, 4 | /// 頂点から 2 次元平面への写像 f: V → (0,1)^2 を構成する. 5 | fn resolve_vertex_position(&self, n: usize, edges: &[(usize, usize)]) -> Vec; 6 | } 7 | 8 | pub mod visualize_methods { 9 | /// [0,1]^2 から一様ランダムにサンプリングする 10 | fn sample_point() -> egui::Vec2 { 11 | egui::vec2(rand::random::(), rand::random::()) 12 | } 13 | 14 | /// 2 点の外積を計算する 15 | fn cross(a: egui::Vec2, b: egui::Vec2) -> f32 { 16 | a.x * b.y - a.y * b.x 17 | } 18 | 19 | /// 線分同士の交差判定 20 | fn is_crossing((p1, q1): (egui::Vec2, egui::Vec2), (p2, q2): (egui::Vec2, egui::Vec2)) -> bool { 21 | let d1 = cross(q1 - p1, p2 - p1); 22 | let d2 = cross(q1 - p1, q2 - p1); 23 | let d3 = cross(q2 - p2, p1 - p2); 24 | let d4 = cross(q2 - p2, q1 - p2); 25 | 26 | d1 * d2 < 0.0 && d3 * d4 < 0.0 27 | } 28 | 29 | /// 辺の重なりの回数を数える 30 | /// - 計算量: O(m^2) 31 | fn count_edge_crossing(positions: &[egui::Vec2], edges: &[(usize, usize)]) -> usize { 32 | let m = edges.len(); 33 | 34 | let mut count = 0; 35 | 36 | for i in 0..m { 37 | for j in i + 1..m { 38 | let (u, v) = edges[i]; 39 | let (w, x) = edges[j]; 40 | 41 | let p1 = positions[u]; 42 | let q1 = positions[v]; 43 | let p2 = positions[w]; 44 | let q2 = positions[x]; 45 | 46 | if is_crossing((p1, q1), (p2, q2)) { 47 | count += 1; 48 | } 49 | } 50 | } 51 | 52 | count 53 | } 54 | 55 | // -------------------- Visualize Methods -------------------- 56 | /// 一様ランダムに各頂点の座標を選択する. 57 | pub struct Naive; 58 | 59 | impl super::Visualize for Naive { 60 | fn resolve_vertex_position(&self, n: usize, _edges: &[(usize, usize)]) -> Vec { 61 | (0..n).map(|_| sample_point()).collect() 62 | } 63 | } 64 | 65 | /// 辺の重なりが減るように山登り法を用いて配置する. 66 | /// - `max_iter`: 最大反復回数 67 | pub struct HillClimbing(pub usize); 68 | 69 | impl super::Visualize for HillClimbing { 70 | fn resolve_vertex_position(&self, n: usize, edges: &[(usize, usize)]) -> Vec { 71 | if n == 0 { 72 | return vec![]; 73 | } 74 | 75 | let initial_positions = (0..n).map(|_| sample_point()).collect::>(); 76 | 77 | let mut best_positions = initial_positions.clone(); 78 | let mut best_crossing = count_edge_crossing(&best_positions, edges); 79 | 80 | for _ in 0..self.0 { 81 | let mut new_positions = best_positions.clone(); 82 | 83 | // 1 つの頂点をランダムに選択して座標を変更する 84 | let i = rand::random::() % n; 85 | new_positions[i] = sample_point(); 86 | 87 | // 辺の重なりが減るような配置を選択する 88 | let new_crossing = count_edge_crossing(&new_positions, edges); 89 | 90 | if new_crossing < best_crossing { 91 | best_positions = new_positions; 92 | best_crossing = new_crossing; 93 | } 94 | } 95 | 96 | best_positions 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #![warn(clippy::all, rust_2018_idioms)] 2 | 3 | mod app; 4 | mod components; 5 | mod config; 6 | mod graph; 7 | mod math; 8 | mod mode; 9 | mod update; 10 | 11 | pub use app::GraphEditorApp; 12 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![warn(clippy::all, rust_2018_idioms)] 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release 3 | 4 | // When compiling natively: 5 | #[cfg(not(target_arch = "wasm32"))] 6 | fn main() -> eframe::Result { 7 | env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`). 8 | 9 | let native_options = eframe::NativeOptions { 10 | viewport: egui::ViewportBuilder::default() 11 | .with_inner_size([400.0, 300.0]) 12 | .with_min_inner_size([300.0, 220.0]) 13 | .with_icon( 14 | // NOTE: Adding an icon is optional 15 | eframe::icon_data::from_png_bytes(&include_bytes!("../assets/icon-256.png")[..]) 16 | .expect("Failed to load icon"), 17 | ), 18 | ..Default::default() 19 | }; 20 | eframe::run_native( 21 | "Graph Editor", 22 | native_options, 23 | Box::new(|_cc| Ok(Box::new(graph_editor::GraphEditorApp::default()))), 24 | ) 25 | } 26 | 27 | // When compiling to web using trunk: 28 | #[cfg(target_arch = "wasm32")] 29 | fn main() { 30 | use eframe::wasm_bindgen::JsCast as _; 31 | 32 | // Redirect `log` message to `console.log` and friends: 33 | eframe::WebLogger::init(log::LevelFilter::Debug).ok(); 34 | 35 | let web_options = eframe::WebOptions::default(); 36 | 37 | wasm_bindgen_futures::spawn_local(async { 38 | let document = web_sys::window() 39 | .expect("No window") 40 | .document() 41 | .expect("No document"); 42 | 43 | let canvas = document 44 | .get_element_by_id("the_canvas_id") 45 | .expect("Failed to find the_canvas_id") 46 | .dyn_into::() 47 | .expect("the_canvas_id was not a HtmlCanvasElement"); 48 | 49 | let start_result = eframe::WebRunner::new() 50 | .start( 51 | canvas, 52 | web_options, 53 | Box::new(|_cc| Ok(Box::new(graph_editor::GraphEditorApp::default()))), 54 | ) 55 | .await; 56 | 57 | // Remove the loading text and spinner: 58 | if let Some(loading_text) = document.get_element_by_id("loading_text") { 59 | match start_result { 60 | Ok(_) => { 61 | loading_text.remove(); 62 | } 63 | Err(e) => { 64 | loading_text.set_inner_html( 65 | "

The app has crashed. See the developer console for details.

", 66 | ); 67 | panic!("Failed to start eframe: {e:?}"); 68 | } 69 | } 70 | } 71 | }); 72 | } 73 | -------------------------------------------------------------------------------- /src/math/affine.rs: -------------------------------------------------------------------------------- 1 | //! 2次元Affine変換 2 | //! 3 | //! 2次元平面上の点の拡大,縮小,平行移動 4 | 5 | #![allow(clippy::needless_range_loop)] 6 | 7 | use std::ops::{Mul, MulAssign}; 8 | 9 | use num_traits::One; 10 | 11 | /// 2次元アフィン変換の0元行列 12 | const AFFINE2D_ZERO: [[f32; 3]; 3] = [[0.0; 3]; 3]; 13 | 14 | /// 2次元アフィン変換の1元行列 15 | const AFFINE2D_ONE: [[f32; 3]; 3] = [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]; 16 | 17 | /// アフィン変換 18 | #[derive(Debug, Clone, Copy)] 19 | pub struct Affine2D(pub [[f32; 3]; 3]); 20 | 21 | impl Affine2D { 22 | /// アフィン変換の平行移動 23 | pub fn from_transition(vec2: egui::Vec2) -> Self { 24 | Self([[1.0, 0.0, vec2.x], [0.0, 1.0, vec2.y], [0.0, 0.0, 1.0]]) 25 | } 26 | 27 | /// アフィン変換の拡大縮小 28 | /// - `center`: 拡大縮小の中心 29 | /// - `scale`: 拡大縮小の倍率 30 | pub fn from_center_and_scale(center: egui::Pos2, scale: f32) -> Self { 31 | Self([ 32 | [scale, 0.0, center.x * (1.0 - scale)], 33 | [0.0, scale, center.y * (1.0 - scale)], 34 | [0.0, 0.0, 1.0], 35 | ]) 36 | } 37 | 38 | /// 並行移動成分を取得 39 | pub fn translation(&self) -> egui::Vec2 { 40 | egui::vec2(self.0[0][2], self.0[1][2]) 41 | } 42 | 43 | /// スケールを取得 44 | pub fn scale_x(&self) -> f32 { 45 | self.0[0][0] 46 | } 47 | 48 | /// アフィン変換を合成する 49 | /// - scale の最小値,最大値の範囲を超えない操作のみ行う 50 | pub fn try_compose(&self, rhs: &Affine2D, scale_min: f32, scale_max: f32) -> Option { 51 | let composed = *self * *rhs; 52 | let scale = composed.scale_x(); 53 | 54 | (scale_min <= scale && scale <= scale_max).then_some(composed) 55 | } 56 | 57 | /// アフィン変換の逆元 58 | pub fn inverse(&self) -> Option { 59 | let (a, b, tx) = (self.0[0][0], self.0[0][1], self.0[0][2]); 60 | let (c, d, ty) = (self.0[1][0], self.0[1][1], self.0[1][2]); 61 | 62 | // 行列式を計算 63 | let det = a * d - b * c; 64 | if det.abs() < 1e-6 { 65 | // 正則でない場合 66 | return None; 67 | } 68 | 69 | let inv_det = 1.0 / det; 70 | 71 | // 線形部分の逆行列 72 | let a_inv = d * inv_det; 73 | let b_inv = -b * inv_det; 74 | let c_inv = -c * inv_det; 75 | let d_inv = a * inv_det; 76 | 77 | // 平行移動の逆変換 78 | let tx_inv = -(a_inv * tx + b_inv * ty); 79 | let ty_inv = -(c_inv * tx + d_inv * ty); 80 | 81 | Some(Self([ 82 | [a_inv, b_inv, tx_inv], 83 | [c_inv, d_inv, ty_inv], 84 | [0.0, 0.0, 1.0], 85 | ])) 86 | } 87 | } 88 | 89 | impl Mul for Affine2D { 90 | type Output = Self; 91 | fn mul(self, rhs: Self) -> Self::Output { 92 | let mut res = AFFINE2D_ZERO; 93 | for i in 0..3 { 94 | for j in 0..3 { 95 | for k in 0..3 { 96 | res[i][j] += self.0[i][k] * rhs.0[k][j]; 97 | } 98 | } 99 | } 100 | Self(res) 101 | } 102 | } 103 | 104 | impl MulAssign for Affine2D { 105 | fn mul_assign(&mut self, rhs: Self) { 106 | *self = *self * rhs; 107 | } 108 | } 109 | 110 | impl One for Affine2D { 111 | fn one() -> Self { 112 | Self(AFFINE2D_ONE) 113 | } 114 | } 115 | 116 | /// アフィン変換を適用する 117 | pub trait ApplyAffine: Sized { 118 | /// アフィン変換を適用した結果を取得する 119 | fn applied(&self, affine: &Affine2D) -> Self; 120 | /// アフィン変換を適用する 121 | fn apply(&mut self, affine: &Affine2D) { 122 | *self = self.applied(affine); 123 | } 124 | } 125 | 126 | impl ApplyAffine for egui::Vec2 { 127 | fn applied(&self, affine: &Affine2D) -> Self { 128 | let new_x = affine.0[0][0] * self.x + affine.0[0][1] * self.y + affine.0[0][2]; 129 | let new_y = affine.0[1][0] * self.x + affine.0[1][1] * self.y + affine.0[1][2]; 130 | egui::vec2(new_x, new_y) 131 | } 132 | } 133 | 134 | impl ApplyAffine for egui::Pos2 { 135 | fn applied(&self, affine: &Affine2D) -> Self { 136 | let new_x = affine.0[0][0] * self.x + affine.0[0][1] * self.y + affine.0[0][2]; 137 | let new_y = affine.0[1][0] * self.x + affine.0[1][1] * self.y + affine.0[1][2]; 138 | egui::pos2(new_x, new_y) 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /src/math/bezier.rs: -------------------------------------------------------------------------------- 1 | use super::newton::newton_method; 2 | 3 | pub fn calc_bezier_control_point( 4 | start: egui::Pos2, 5 | end: egui::Pos2, 6 | distance: f32, 7 | is_clockwise: bool, 8 | ) -> egui::Pos2 { 9 | let mid = start + (end - start) / 2.0; 10 | let dir = (end - start).normalized().rot90(); 11 | 12 | mid + dir * if is_clockwise { distance } else { -distance } 13 | } 14 | 15 | /// ベジェ曲線 16 | pub fn bezier_curve(start: egui::Pos2, control: egui::Pos2, end: egui::Pos2, t: f32) -> egui::Pos2 { 17 | let x = (1.0 - t).powf(2.0) * start.x + 2.0 * t * (1.0 - t) * control.x + t.powf(2.0) * end.x; 18 | let y = (1.0 - t).powf(2.0) * start.y + 2.0 * t * (1.0 - t) * control.y + t.powf(2.0) * end.y; 19 | egui::Pos2::new(x, y) 20 | } 21 | 22 | /// ベジェ曲線のパラメータ`t`における微分 23 | pub fn d_bezier_dt(start: egui::Pos2, control: egui::Pos2, end: egui::Pos2, t: f32) -> egui::Vec2 { 24 | let mt = 1.0 - t; 25 | let dx = 2.0 * mt * (control.x - start.x) + 2.0 * t * (end.x - control.x); 26 | let dy = 2.0 * mt * (control.y - start.y) + 2.0 * t * (end.y - control.y); 27 | egui::Vec2::new(dx, dy) 28 | } 29 | 30 | /// ベジェ曲線の2階微分 31 | pub fn d2_bezier_dt2(start: egui::Pos2, control: egui::Pos2, end: egui::Pos2) -> egui::Vec2 { 32 | control.to_vec2() - 2.0 * start.to_vec2() + end.to_vec2() 33 | } 34 | 35 | /// ベジェ曲線と円の交点を計算 36 | /// 37 | /// ### Parameters 38 | /// - `bezier_start`: ベジェ曲線の始点 39 | /// - `bezier_control`: ベジェ曲線の制御点 40 | /// - `bezier_end`: ベジェ曲線の終点 41 | /// - `circle_center`: 円の中心 42 | /// - `circle_radius`: 円の半径 43 | /// 44 | /// ### Returns 45 | /// 交点が存在する場合はその座標と向き,存在しない場合は `None` 46 | pub fn calc_intersection_of_bezier_and_circle( 47 | bezier_start: egui::Pos2, 48 | bezier_control: egui::Pos2, 49 | bezier_end: egui::Pos2, 50 | circle_center: egui::Pos2, 51 | circle_radius: f32, 52 | ) -> Option<(egui::Pos2, egui::Vec2)> { 53 | let (x0, y0) = (bezier_start.x, bezier_start.y); 54 | let (x1, y1) = (bezier_control.x, bezier_control.y); 55 | let (x2, y2) = (bezier_end.x, bezier_end.y); 56 | let (xc, yc) = (circle_center.x, circle_center.y); 57 | let r = circle_radius; 58 | 59 | let bezier = 60 | |t: f32| -> egui::Pos2 { bezier_curve(bezier_start, bezier_control, bezier_end, t) }; 61 | 62 | let f = |t: f32| -> f32 { 63 | let pos = bezier(t); 64 | -r.powf(2.0) + (pos.x - xc).powf(2.0) + (pos.y - yc).powf(2.0) 65 | }; 66 | 67 | // df/dt (project://memo/intersection_of_bezier_and_circle.py で導出) 68 | let df = |t: f32| -> f32 { 69 | (-4.0 * t * x1 + 4.0 * t * x2 + 2.0 * x0 * (2.0 * t - 2.0) + 2.0 * x1 * (2.0 - 2.0 * t)) 70 | * (t.powf(2.0) * x2 + t * x1 * (2.0 - 2.0 * t) + x0 * (1.0 - t).powf(2.0) - xc) 71 | + (-4.0 * t * y1 72 | + 4.0 * t * y2 73 | + 2.0 * y0 * (2.0 * t - 2.0) 74 | + 2.0 * y1 * (2.0 - 2.0 * t)) 75 | * (t.powf(2.0) * y2 + t * y1 * (2.0 - 2.0 * t) + y0 * (1.0 - t).powf(2.0) - yc) 76 | }; 77 | 78 | let t = newton_method(f, df, 0.5, 1e-6, 10)?; 79 | 80 | (0.0..1.0).contains(&t).then(|| { 81 | ( 82 | bezier(t), 83 | d_bezier_dt(bezier_start, bezier_control, bezier_end, t), 84 | ) 85 | }) 86 | } 87 | -------------------------------------------------------------------------------- /src/math/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod affine; 2 | pub mod bezier; 3 | pub mod newton; 4 | -------------------------------------------------------------------------------- /src/math/newton.rs: -------------------------------------------------------------------------------- 1 | /// ニュートン法で方程式 f(x) = 0 の解を求める 2 | /// f: 関数, df: f の導関数, x0: 初期値, tol: 許容誤差, max_iter: 最大反復回数 3 | pub fn newton_method( 4 | f: impl Fn(f32) -> f32, 5 | df: impl Fn(f32) -> f32, 6 | x0: f32, 7 | tol: f32, 8 | max_iter: usize, 9 | ) -> Option { 10 | let mut x = x0; 11 | 12 | for _ in 0..max_iter { 13 | let fx = f(x); 14 | let dfx = df(x); 15 | 16 | if dfx.abs() < 1e-6 { 17 | // 導関数が 0 に近いときは収束しないため終了 18 | return None; 19 | } 20 | 21 | let x_next = x - fx / dfx; 22 | 23 | if (x_next - x).abs() < tol { 24 | return Some(x_next); // 収束したら解を返す 25 | } 26 | 27 | x = x_next; 28 | } 29 | 30 | None // 最大反復回数に達した場合は解なし 31 | } 32 | -------------------------------------------------------------------------------- /src/mode.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, PartialEq, Clone)] 2 | pub enum EditMode { 3 | Normal, 4 | AddVertex, 5 | AddEdge { 6 | from_vertex: Option, 7 | confirmed: bool, 8 | }, 9 | Delete, 10 | } 11 | 12 | impl EditMode { 13 | pub fn default_normal() -> Self { 14 | Self::Normal 15 | } 16 | 17 | pub fn default_add_vertex() -> Self { 18 | Self::AddVertex 19 | } 20 | 21 | pub fn default_add_edge() -> Self { 22 | Self::AddEdge { 23 | from_vertex: None, 24 | confirmed: false, 25 | } 26 | } 27 | 28 | pub fn default_delete() -> Self { 29 | Self::Delete 30 | } 31 | 32 | pub fn is_add_vertex(&self) -> bool { 33 | matches!(self, Self::AddVertex) 34 | } 35 | 36 | pub fn is_add_edge(&self) -> bool { 37 | matches!(self, Self::AddEdge { .. }) 38 | } 39 | 40 | pub fn is_delete(&self) -> bool { 41 | matches!(self, Self::Delete) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/update.rs: -------------------------------------------------------------------------------- 1 | use crate::GraphEditorApp; 2 | 3 | pub fn request_repaint(app: &mut GraphEditorApp, ctx: &egui::Context) { 4 | if app.is_animated { 5 | ctx.request_repaint(); 6 | } 7 | } 8 | --------------------------------------------------------------------------------