Skip to content

feat(assets): a reusable material library with capture, import, placement and sharing, plus a CC0 paper starter pack - #207

Open
lashmanRB wants to merge 4 commits into
artcraft-android:mainfrom
lashmanRB:asset-gallery
Open

lashmanRB wants to merge 4 commits into
artcraft-android:mainfrom
lashmanRB:asset-gallery

Conversation

@lashmanRB

Copy link
Copy Markdown
Contributor

This adds an Assets panel on desktop and Android: a shared library of reusable materials - paper textures, stamps, motifs - that can be captured from the canvas, imported, placed with the transform tool, and shared as files. It follows the brush library's structure (libraries, then folders) and its card view for switching libraries.

What it does:

  • Capture the current layer, a group, the picked layers, the canvas or the selection as a new asset.
  • Import images, layered PSDs (kept as a group or exploded into layers), other projects, and shared asset files.
  • Tap an asset to place it; it lands as a layer or a group and enters transform. Confirming the transform returns the selection to the layer you were on and folds a placed group closed.
  • Rename, duplicate, move and delete libraries, folders and assets, with a name prompt right after adding.
  • Set an asset's thumbnail from the canvas, the current layer, the clipboard or a file.
  • Share one asset (.asset), a folder (.assetset) or a whole library (.assetlibrary). The file is a zip of the layer images plus a JSON manifest carrying the names, grouping, blend modes and opacities; import reads the same format.
  • Kinetic scrolling in the panel, matching the brush list.

The paper starter pack and its licence:
The papers under assets/papers are my own scans, and I am releasing them under CC0 so anyone can use them for any purpose. I include them to give people something to start with and to show what the asset library can do. They are deliberately not compiled into the app: the repository ships the full-resolution source triplets and a small packer (desktop/examples/pack_papers.rs) that builds a single Papers.assetlibrary. How that file reaches users is left to whoever maintains the app - a release download, an optional bundle, or not at all - and it imports through the normal asset import like any other shared library. The CC0 grant places no restriction on redistribution.

Each paper is a group of three layers - the colour at Multiply, a Screen layer and a Colour Burn layer - with the opacities that produce the paper look, and the asset format preserves all of that.

A couple of implementation notes:

  • Photographic asset layers are stored as JPEG so shared libraries stay small; layers that need lossless data or alpha remain PNG.
  • The Android side is compiled and checked by CI.

@lashmanRB

Copy link
Copy Markdown
Contributor Author

The Assets panel with the paper starter library open - each paper is a grouped triplet (colour at Multiply, a Screen layer, a Colour Burn layer) ready to place and transform.

The Assets panel showing the paper library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant