Skip to content

Commit

Permalink
Merge 3b4c389 into release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jan 17, 2023
2 parents bb9a91a + 3b4c389 commit 623d2fc
Show file tree
Hide file tree
Showing 121 changed files with 11,200 additions and 5,799 deletions.
4 changes: 4 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
codecov:
disable_default_path_fixes: true
coverage:
range: "0...100"
status:
Expand All @@ -7,3 +9,5 @@ coverage:
project:
default:
informational: true
fixes:
- "::src-tauri/" # eg. remaps `src/main.rs` to `src-tauri/src/main.rs`
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ jobs:
toolchain: stable
profile: minimal
default: true
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ github.ref }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-cargo-${{ github.ref }}
- name: Install frontend dependencies
run: npm install
- name: Build complete app
Expand Down
53 changes: 33 additions & 20 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,47 @@ on:
jobs:
test:
name: Measure Test Coverage
runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: nightly
profile: minimal
components: llvm-tools-preview
default: true
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ github.ref }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-cargo-${{ github.ref }}
- name: Install Tauri Dependencies
run: sudo apt update && sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev
- name: Install grcov
run: cargo install grcov
- name: Build Frontend
run: npm install && npm run build
- name: Run Tarpaulin
uses: actions-rs/[email protected]
with:
args: "--root src-tauri --ignore-tests"
- name: Run Tests
run: cargo test --no-fail-fast
working-directory: src-tauri
env:
RUSTFLAGS: "-Cinstrument-coverage"
- name: Gather Results
run: >
grcov
.
-s .
-t lcov
-o coverage.txt
--llvm
--branch
--ignore-not-existing
--ignore src/mock.rs
--keep-only src/**
--binary-path ./target/debug
--excl-line "#\[derive\("
--excl-br-line "#\[derive\("
--excl-start "mod tests \{"
--excl-br-start "mod tests \{"
working-directory: src-tauri
- name: Upload Results
uses: codecov/codecov-action@v2
with:
file: src-tauri/coverage.txt
fail_ci_if_error: true
35 changes: 34 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog

## Tiger 0.8

- [x] Missing frame files are detected and can be relocated
- [x] Onboarding tutorial for first-time users
- [x] Export complete notifications
- [x] ⚠ The `sheet_image` field in template data was replaced by `atlas_image` and now includes atlas dimensions (issue #13)
- [x] Bumped `.tiger` format version to `Tiger5` (backwards compatible)
- [x] Creating an animation or a hitbox immediately begins renaming it
- [x] Automatically add `.png` extension to atlas image path in export settings
- [x] All file dialogs open with a sensible default file/directory selected
- [x] Using `Export` before defining export settings behaves like `Export As…`
- [x] Hover & pressed states for Button controls
- [x] Hover & pressed states for Toggle controls
- [x] Hover & pressed states for playback controls
- [x] Hover state for FlatMultiSwitch controls
- [x] Hover state for InputPath controls
- [x] Can press Ctrl+Tab / Shift+Ctrl+Tab to cycle active document
- [x] Can press escape to close modals / export overlay
- [x] Can press Tab / Shift+Tab to cycle active input in export overlay
- [x] Can press arrow keys to cycle active input in modal dialogs or export overlay
- [x] Can no longer use keyboard shortcuts while modal dialogs or export overlay are active
- [x] Can close directions dropdown menu by clicking it again
- [x] Styled file names in open/save errors dialogs
- [x] Fixed a bug where scrollable panels would sometimes jitter when using the mouse wheel
- [x] Fixed a bug where window could be resized narrow enough to break timeline UI
- [x] Fixed a bug where the `sheet_image` field would use `\` as path separator instead of `/` (issue #14)
- [x] Fixed export documentation referencing a non-existing source field on `Frame`
- [x] Fixed a bug where the timeline would not fill entire panel after resizing the program window
- [x] Fixed a bug where scrolling a panel would cancel any in-progress rename operation
- [x] Fixed a bug where panel scroll positions were not saving as often as intended
- [x] Replace tarpaulin with grcov for code coverage measurements
- [x] Reached satisfying test coverage
- [x] Merge redundant code between save(), save_as() and save_all()

## Tiger 0.7

- [x] Tooltips to show full path in frames pane
Expand Down Expand Up @@ -151,7 +185,6 @@
- [x] Multiple selections
- [x] Jump to next/previous frame
- [x] Auto reload images on frame edit
- ~~[ ] Visible handles for adjusting frame durations (instead of invisible buttons)~~

## Tiger 0.2.0

Expand Down
8 changes: 4 additions & 4 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

# How to increment Tiger format version

1. Create a new module file under `src/sheet/compat/versionN.rs` (copy-paste the previous version as a starting point)
1. Create a new module file under `src/sheet/versionN.rs` (copy-paste the previous version as a starting point)
2. In your new module, update the THIS_VERSION constant and the `as previous_version` import
3. Declare your new module in `src/sheet/compat.rs`
4. Also in `src/sheet/compat.rs`, update the `Version` enum and the `CURRENT_VERSION` constant
5. Update the `pub use self::compat::versionN::*;` line in src/sheet/mod.rs
3. Declare your new module in `src/sheet.rs`
4. Also in `src/sheet.rs`, update the `Version` enum and the `CURRENT_VERSION` constant
5. Update the `pub use self::versionN::*;` line in `src/sheet.rs`
6. Update the sheet structures and From<> implementations in your new module as needed
27 changes: 7 additions & 20 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
# Roadmap

## Tiger 0.8

- [ ] Handle missing frame files (warning + offer to relocate)
- [ ] In-place tutorials instead of blank data
- [ ] Consider merging some code between save, save_as and save_all
- [ ] Automatically add extensions to exported files
- [ ] Default paths for NFD dialogs
- [ ] Reach satisfying test coverage
- [ ] Button hover & press states
- [ ] Toggle hover state
- [ ] Multiswitch hover state
- [ ] Playback controls hover & press states
- [ ] Can press escape to close modals
- [ ] Can press escape to close export overlay
- [ ] Export complete notification

## Tiger 0.9

- [ ] Document keyboard shortcuts
Expand All @@ -25,6 +9,7 @@
- [ ] Splash screen
- [ ] Add a a help menu with links to issues/discussions/documentation
- [ ] Add About dialog with version number / license info
- [ ] Add landing screen with links to new/open/recent/github/docs-home/keyboard-docs
- [ ] Can open log from help menu
- [ ] .tiger file association

Expand All @@ -34,12 +19,14 @@
- [ ] Re-evaluate https://github.com/1Password/typeshare to auto-generate typescript DTOs
- [ ] Tiger file format uses semver
- [ ] Remove support for pre-1.0 versions of Tiger file format
- [ ] Readme logo
- [ ] Logo in readme
- [ ] Gif/video in readme
- [ ] Branding in installer
- [ ] Remove under-development warning from readme
- [ ] Logo in documentation
- [ ] Favicon in documentation
- [ ] Branding in installer and installer icon
- [ ] App icon (file explorer, taskbar, add/remove programs, title bar)
- [ ] Github social media preview image (in repo settings)
- [ ] About dialog
- [ ] App icon (file explorer, taskbar, add/remove programers, installer, title bar)
- [ ] Itch.io or other distribution method

## Post 1.0
Expand Down
65 changes: 36 additions & 29 deletions docs/exporting.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ nav_order: 2
The spritesheet files with the `.tiger` extension being created and edited by Tiger are simple `json` files. You might be tempted to use them directly into your game engine of choice, but there are reasons not to:

- The exact format may change between Tiger releases and could break your engine integration
- The `.tiger` files refer to animation frames as individual files. For performance reasons, it is often preferable to combine frames into atlas textures
- The `.tiger` files refer to animation frames as individual files. For performance reasons, it is often preferable to combine frames into atlas images

The export process in Tiger is designed to solve these two issues. When exporting a spritesheet (from the `File` > `Export` menu), Tiger generates two files:

1. An atlas image file (`.png`) containing all the individual frames of animation packed together
2. A metadata text file describing the position of individual frames in the atlas image, and additional metadata like hitboxes, animation names and timings

The `Texture File` and `Metadata File` options in the Export dialog tell Tiger where to save the corresponding files.
The `Atlas Image File` and `Metadata File` options in the Export dialog tell Tiger where to save the corresponding files.

## Metadata Format

Expand Down Expand Up @@ -84,22 +84,29 @@ In the context of boolean operators, the following operands evaluate as `false`:

The spritesheet data that can be referenced in the template is described in the following tables:

| Field | Type | Description |
| :---------- | :------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sheet_image | String | Path to the atlas image file containing all the fames in the spritesheet. This path is relative to the directory selected in the `Metadata Root Directory` option of the Export dialog. |
| frames | [Frame](#frame)[] | List of all the frames in the spritesheet. |
| animations | [Animation](#animation)[] | List of all the animations in the spritesheet. |
| Field | Type | Description |
| :---------- | :------------------------ | :------------------------------------------------------- |
| atlas_image | [Image](#image) | Image file containing all the frames in the spritesheet. |
| frames | [Frame](#frame)[] | List of frames in the spritesheet. |
| animations | [Animation](#animation)[] | List of animations in the spritesheet. |

### Image

| Field | Type | Description |
| :----- | :----- | :------------------------------------------------------------------------------------------------------------------------------------ |
| path | Number | Path to the image file. This path is relative to the directory selected in the `Metadata Root Directory` option of the Export dialog. |
| width | Number | Image width in pixels. |
| height | Number | Image height in pixels. |

### Frame

| Field | Type | Description |
| :----- | :----- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| source | String | Path to the source image file of this individual frame. This path is relative to the directory selected in the `Metadata Root Directory` option of the Export dialog. |
| index | Number | Arbitrary frame identifier. |
| x | Number | Horizontal position of the frame in the atlas image file, measured from the left edge. |
| y | Number | Vertical position of the frame in the atlas image file, measured from the top edge. |
| width | Number | Frame width in pixels. |
| height | Number | Frame height in pixels. |
| Field | Type | Description |
| :----- | :----- | :-------------------------------------------------------------------------------- |
| index | Number | Arbitrary frame identifier. |
| x | Number | Horizontal position of the frame in the atlas image, measured from the left edge. |
| y | Number | Vertical position of the frame in the atlas image, measured from the top edge. |
| width | Number | Frame width in pixels. |
| height | Number | Frame height in pixels. |

### Animation

Expand All @@ -118,23 +125,23 @@ The spritesheet data that can be referenced in the template is described in the

### Keyframe

| Field | Type | Description |
| :------- | :------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| frame | [Frame](#frame) | Frame to display during this keyframe. |
| hitboxes | [Hitbox](#hitbox)[] | List of hitboxes in this keyframe. |
| duration | Number | Duration in milliseconds. |
| x | Number | Horizontal position of this keyframe, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions to the right of the origin. |
| y | Number | Vertical position of this keyframe, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions above the origin. |
| Field | Type | Description |
| :------- | :------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| frame | [Frame](#frame) | Frame to display during this keyframe. |
| hitboxes | [Hitbox](#hitbox)[] | List of hitboxes in this keyframe. |
| duration | Number | Duration in milliseconds. |
| x | Number | Position of this keyframe's left edge, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions to the right of the origin. |
| y | Number | Position of this keyframe's top edge, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions above the origin. |

### Hitbox

| Field | Type | Description |
| :----- | :----- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | String | Name of the hitbox. |
| x | Number | Horizontal position of this hitbox, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions to the right of the origin. |
| y | Number | Vertical position of this hitbox, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions above the origin. |
| width | Number | Hitbox width in pixels. |
| height | Number | Hitbox height in pixels. |
| Field | Type | Description |
| :----- | :----- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | String | Name of the hitbox. |
| x | Number | Position of this hitbox's left edge, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions to the right of the origin. |
| y | Number | Vosition of this hitbox's top edge, relative to the origin of the animation (blue ➕ in the Tiger UI). Positive values for positions above the origin. |
| width | Number | Hitbox width in pixels. |
| height | Number | Hitbox height in pixels. |

### Direction

Expand Down
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tiger</title>
</head>
Expand Down
Loading

0 comments on commit 623d2fc

Please sign in to comment.