├── .cargo └── config.toml ├── .clippy.toml ├── .github ├── copyright.sh └── workflows │ ├── ci.yml │ └── pages-release.yml ├── .gitignore ├── .taplo.toml ├── .typos.toml ├── AUTHORS ├── CHANGELOG.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── examples ├── assets │ ├── downloads │ │ └── .tracked │ ├── google_fonts │ │ ├── LICENSE │ │ ├── README.md │ │ └── Tiger.json │ └── roboto │ │ ├── LICENSE.txt │ │ └── Roboto-Regular.ttf ├── run_wasm │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── scenes │ ├── Cargo.toml │ └── src │ │ ├── download.rs │ │ ├── download │ │ └── default_downloads.rs │ │ ├── lib.rs │ │ ├── lottie.rs │ │ ├── simple_text.rs │ │ └── test_scenes.rs └── with_winit │ ├── Cargo.toml │ ├── README.md │ └── src │ ├── hot_reload.rs │ ├── lib.rs │ ├── main.rs │ ├── multi_touch.rs │ └── stats.rs ├── rustfmt.toml └── src ├── error.rs ├── import ├── builders.rs ├── converters.rs ├── defaults.rs └── mod.rs ├── lib.rs ├── runtime ├── mod.rs ├── model │ ├── animated.rs │ ├── fixed.rs │ ├── mod.rs │ ├── spline.rs │ └── value.rs └── render.rs └── schema ├── animated_properties ├── animated_property.rs ├── color_value.rs ├── gradient_colors.rs ├── keyframe.rs ├── keyframe_base.rs ├── keyframe_bezier_handle.rs ├── mod.rs ├── multi_dimensional.rs ├── position.rs ├── position_keyframe.rs ├── shape_keyframe.rs ├── shape_property.rs ├── split_vector.rs └── value.rs ├── animation ├── animation.rs ├── composition.rs └── mod.rs ├── assets ├── asset.rs ├── file_asset.rs ├── image.rs ├── mod.rs └── precomposition.rs ├── constants ├── blend_mode.rs ├── composite.rs ├── fill_rule.rs ├── font_path_origin.rs ├── gradient_type.rs ├── line_cap.rs ├── line_join.rs ├── mask_mode.rs ├── matte_mode.rs ├── merge_mode.rs ├── mod.rs ├── shape_direction.rs ├── star_type.rs ├── stroke_dash_type.rs ├── text_based.rs ├── text_caps.rs ├── text_grouping.rs ├── text_justify.rs ├── text_range_units.rs ├── text_shape.rs └── trim_multiple_shapes.rs ├── helpers ├── bezier.rs ├── color.rs ├── int_boolean.rs ├── marker.rs ├── mask.rs ├── mod.rs ├── transform.rs └── visual_object.rs ├── layers ├── enumerations.rs ├── mod.rs ├── null.rs ├── precomposition.rs ├── shape.rs ├── solid_color.rs └── visual.rs ├── mod.rs ├── shapes ├── base_stroke.rs ├── ellipse.rs ├── fill.rs ├── gradient.rs ├── gradient_fill.rs ├── gradient_stroke.rs ├── group.rs ├── merge.rs ├── mod.rs ├── offset_path.rs ├── path.rs ├── polystar.rs ├── pucker_bloat.rs ├── rectangle.rs ├── repeater.rs ├── repeater_transform.rs ├── shape.rs ├── shape_element.rs ├── stroke.rs ├── stroke_dash.rs ├── transform.rs └── trim.rs └── styles ├── color_overlay_style.rs ├── gradient_overlay_style.rs ├── layer_style.rs ├── mod.rs ├── outer_glow_style.rs └── satin_style.rs /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [alias] 2 | run_wasm = "run --release --package run_wasm --" 3 | # Other crates use the alias run-wasm, even though crate names should use `_`s not `-`s 4 | # Allow this to be used 5 | run-wasm = "run_wasm" 6 | -------------------------------------------------------------------------------- /.clippy.toml: -------------------------------------------------------------------------------- 1 | # LINEBENDER LINT SET - .clippy.toml - v1 2 | # See https://linebender.org/wiki/canonical-lints/ 3 | 4 | # The default Clippy value is capped at 8 bytes, which was chosen to improve performance on 32-bit. 5 | # Given that we are building for the future and even low-end mobile phones have 64-bit CPUs, 6 | # it makes sense to optimize for 64-bit and accept the performance hits on 32-bit. 7 | # 16 bytes is the number of bytes that fits into two 64-bit CPU registers. 8 | trivial-copy-size-limit = 16 9 | 10 | # END LINEBENDER LINT SET 11 | -------------------------------------------------------------------------------- /.github/copyright.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # If there are new files with headers that can't match the conditions here, 4 | # then the files can be ignored by an additional glob argument via the -g flag. 5 | # For example: 6 | # -g "!src/special_file.rs" 7 | # -g "!src/special_directory" 8 | 9 | # Check all the standard Rust source files 10 | output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Velato Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0 OR MIT$\n\n" --files-without-match --multiline -g "*.rs" .) 11 | 12 | if [ -n "$output" ]; then 13 | echo -e "The following files lack the correct copyright header:\n" 14 | echo $output 15 | echo -e "\n\nPlease add the following header:\n" 16 | echo "// Copyright $(date +%Y) the Velato Authors" 17 | echo "// SPDX-License-Identifier: Apache-2.0 OR MIT" 18 | echo -e "\n... rest of the file ...\n" 19 | exit 1 20 | fi 21 | 22 | echo "All files have correct copyright headers." 23 | exit 0 24 | 25 | -------------------------------------------------------------------------------- /.github/workflows/pages-release.yml: -------------------------------------------------------------------------------- 1 | name: Web Demo Update 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | release-web: 10 | permissions: 11 | contents: read 12 | pages: write 13 | id-token: write 14 | environment: 15 | name: github-pages 16 | url: ${{ steps.deployment.outputs.page_url }} 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: actions/checkout@v4 20 | 21 | - name: Install | Rust 22 | uses: dtolnay/rust-toolchain@stable 23 | with: 24 | targets: wasm32-unknown-unknown 25 | 26 | - name: Install | WASM Bindgen 27 | uses: jetli/wasm-bindgen-action@v0.2.0 28 | with: 29 | version: 'latest' 30 | 31 | - name: Build | WASM 32 | run: cargo build -p with_winit --bin with_winit_bin --release --target wasm32-unknown-unknown 33 | 34 | - name: Package | WASM 35 | run: | 36 | mkdir public 37 | wasm-bindgen --target web --out-dir public target/wasm32-unknown-unknown/release/with_winit_bin.wasm --no-typescript 38 | cat << EOF > public/index.html 39 | 40 |