-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render cg with layer blending (#566)
Co-authored-by: namse <[email protected]>
- Loading branch information
Showing
106 changed files
with
7,046 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
version: 2 | ||
|
||
jobs: | ||
|
||
test: | ||
docker: | ||
- image: rust:latest | ||
steps: | ||
- checkout | ||
|
||
- restore_cache: | ||
keys: | ||
- v3-cargo-cache-test-{{ arch }}-{{ .Branch }} | ||
- v3-cargo-cache-test-{{ arch }} | ||
|
||
# Install nightly & wasm | ||
- run: | ||
name: Install Rust nightly | ||
command: rustup update nightly && rustup default nightly | ||
- run: | ||
name: Add wasm32 target | ||
command: rustup target add wasm32-unknown-unknown | ||
|
||
# Install wasm tools | ||
- run: | ||
name: Install wasm-pack | ||
command: > | ||
curl -L https://github.com/rustwasm/wasm-pack/releases/download/v0.9.1/wasm-pack-v0.9.1-x86_64-unknown-linux-musl.tar.gz | ||
| tar --strip-components=1 --wildcards -xzf - "*/wasm-pack" | ||
&& chmod +x wasm-pack | ||
&& mv wasm-pack $CARGO_HOME/bin/ | ||
# Show versions | ||
- run: | ||
name: Show versions | ||
command: rustc --version && cargo --version && wasm-pack --version | ||
|
||
# Run tests | ||
- run: | ||
name: Run all tests | ||
command: cargo test --all | ||
|
||
# Save cache | ||
- save_cache: | ||
key: v3-cargo-cache-test-{{ arch }}-{{ .Branch }} | ||
paths: | ||
- target | ||
- /usr/local/cargo | ||
- save_cache: | ||
key: v3-cargo-cache-test-{{ arch }} | ||
paths: | ||
- target | ||
- /usr/local/cargo | ||
|
||
site-build: | ||
docker: | ||
- image: rust:latest | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v3-cargo-cache-site-{{ arch }}-{{ .Branch }} | ||
- v3-cargo-cache-site-{{ arch }} | ||
|
||
# Install nightly | ||
- run: | ||
name: Install Rust nightly | ||
command: rustup update nightly && rustup default nightly | ||
|
||
# Show versions | ||
- run: | ||
name: Show versions | ||
command: rustc --version && cargo --version | ||
|
||
# Install wasm tools | ||
- run: | ||
name: Install wasm-pack | ||
command: > | ||
curl -L https://github.com/rustwasm/wasm-pack/releases/download/v0.9.1/wasm-pack-v0.9.1-x86_64-unknown-linux-musl.tar.gz | ||
| tar --strip-components=1 --wildcards -xzf - "*/wasm-pack" | ||
&& chmod +x wasm-pack | ||
&& mv wasm-pack $CARGO_HOME/bin/ | ||
# Install mdbook | ||
- run: | ||
name: Install mdbook | ||
command: > | ||
(test -x $CARGO_HOME/bin/cargo-install-update || cargo install cargo-update) | ||
&& (test -x $CARGO_HOME/bin/mdbook || cargo install --vers "^0.4" mdbook) | ||
&& mv ~/.gitconfig ~/.gitconfig.disabled # Workaround for https://github.com/nabijaczleweli/cargo-update/issues/100 | ||
&& cargo install-update -a | ||
&& mv ~/.gitconfig.disabled ~/.gitconfig | ||
# Build Site | ||
- run: | ||
name: Build Site | ||
command: > | ||
(cd book && mdbook build) | ||
&& cargo doc --no-deps -p psd | ||
&& cp -R target/doc book/book/api | ||
&& (cd examples/drag-drop-browser && ./build-release.sh) | ||
&& cp -R examples/drag-drop-browser/public book/book/drag-drop-demo | ||
&& rm book/book/drag-drop-demo/.gitignore | ||
&& sed -i -e 's/drag_drop_browser/psd\/drag-drop-demo\/drag_drop_browser/g' book/book/drag-drop-demo/index.html # Fix script path | ||
&& sed -i -e 's/app.css/psd\/drag-drop-demo\/app.css/g' book/book/drag-drop-demo/index.html # Fix script path | ||
- persist_to_workspace: | ||
root: book | ||
paths: book | ||
|
||
# Save cache | ||
- save_cache: | ||
key: v3-cargo-cache-site-{{ arch }}-{{ .Branch }} | ||
paths: | ||
- target | ||
- /usr/local/cargo | ||
- save_cache: | ||
key: v3-cargo-cache-site-{{ arch }} | ||
paths: | ||
- target | ||
- /usr/local/cargo | ||
|
||
site-deploy: | ||
docker: | ||
- image: node:10 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: book | ||
- run: | ||
name: Disable jekyll builds | ||
command: touch book/book/.nojekyll | ||
- run: | ||
name: Install and configure dependencies | ||
command: | | ||
npm install -g --silent [email protected] | ||
git config user.email "[email protected]" | ||
git config user.name "ci-build" | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "74:9d:18:d2:11:b2:15:39:9f:d3:77:84:10:cd:f9:c1" | ||
- run: | ||
name: Deploy site to gh-pages branch | ||
command: gh-pages --dotfiles --message "[skip ci] Updates" --dist book/book | ||
|
||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- test | ||
- site-build | ||
- site-deploy: | ||
requires: | ||
- site-build | ||
filters: | ||
branches: | ||
only: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/target | ||
**/*.rs.bk | ||
Cargo.lock | ||
.idea | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# psd Changelog | ||
|
||
Types of changes: | ||
|
||
- `[added]` for new features. | ||
- `[changed]` for changes in existing functionality. | ||
- `[deprecated]` for once-stable features removed in upcoming releases. | ||
- `[removed]` for deprecated features removed in this release. | ||
- `[fixed]` for any bug fixes. | ||
- `[security]` to invite users to upgrade in case of vulnerabilities. | ||
|
||
## Not Yet Published | ||
|
||
_Here we list notable things that have been merged into the master branch but have not been released yet._ | ||
|
||
- [added] Public information on the position of each layer (E.g. `layer_top`, `layer_bottom`. `layer_left`, `layer_right`). | ||
|
||
## 0.1.8 - April 23, 2020 | ||
|
||
- [fixed] Parsing of slices resource section [PR][17] | ||
|
||
## 0.1.7 - April 11, 2020 | ||
|
||
- [added] Support for PSD groups [PR][13] | ||
- @tdakkota | ||
|
||
[13]: https://github.com/chinedufn/psd/pull/13 | ||
[17]: https://github.com/chinedufn/psd/pull/17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
name = "psd" | ||
version = "0.3.4" | ||
authors = ["Chinedu Francis Nwafili <[email protected]>"] | ||
description = "A Rust API for parsing and working with PSD files." | ||
keywords = ["psd", "photoshop", "texture", "png", "image"] | ||
license = "MIT/Apache-2.0" | ||
repository = "https://github.com/chinedufn/psd" | ||
edition = "2018" | ||
|
||
[dependencies] | ||
thiserror = "1.0" | ||
|
||
[dev-dependencies] | ||
anyhow = "1.0" | ||
|
||
[workspace] | ||
members = [ | ||
"examples/drag-drop-browser" | ||
] | ||
|
||
[profile.release] | ||
# We can re-enable lto for the demo when wasm-pack 0.2.38 is released. There's a bug in 0.2.37 | ||
# lto = true |
Oops, something went wrong.