Skip to content
Snippets Groups Projects
Verified Commit 8136f8f3 authored by Louis's avatar Louis :fire:
Browse files

Start gitbook docs

parent 8746d47b
No related branches found
No related tags found
No related merge requests found
Showing
with 5362 additions and 0 deletions
node_modules
_book
\ No newline at end of file
## Sprite
A Sprite is a distinct group of pixel data that will be drawn onto a screen. This is independent of the
format used to store the sprite. For example, a sprite could be saved on a hard drive as a png image file,
or it could be contained alongside other sprites in a spritesheet.
## Spritesheet
A single image file that contains one or more sprites, laid out in a regular grid of a set size. There may be
differing numbers of rows and columns, but the latest version of Crunch assumes that the individual grid items
are squares. A Spritesheet may have padding around the edge, and spacing between the sprites. Each sprite within
a spritesheet is also referred to as a tile.
## Tile Size
The size of a tile is defined in whatever units the containing image is defined in (points, pixels, etc) -
typically pixels. The size of a tile is a consistent number for every tile in a spritesheet, and does not
change regardless of the amount of blank space in a given tile.
Some examples in these docs will use the term "units" to refer to a size when the specific unit does
not matter. For example, this spritesheet is 10 units across with a tile size of 2 units:
![An example of sprites in a spritesheet](images/Base%20Sprites.png)
## Padding
Spritesheets may have some amount of padding around the edge that does not contain any sprites. In the context of crunch, padding exclusively
refers to the units of empty space on the edges of an image, and not blank space within the image.
For example, this spritesheet is 10 units across, with a tile size of 2 units and 1 unit of padding:
![An example of sprites in a spritesheet with padding](images/Padding.png)
## Spacing
The term "spacing" or "space" is used to refer to the empty pixels left between each sprite in a spritesheet.
This is distinct from empty pixels within a tile, which is not considerd to be spacing.
For example, this spritesheet is 10 units across, with a tile size of 4 units and 2 units of spacing between each
sprite both vertically and horizontally:
![An example of sprites in a spritesheet with padding](images/Spacing.png)
# Introduction
Crunch is an [open source](), GPL-3.0 licensed command line tool written in Rust for manipulating assets,
designed to complement a game development asset pipeline. Commands can either be executed directly, or can
be executed via [pipeline files]().
\ No newline at end of file
# Summary
* [Introduction](README.md)
* [Glossary](GLOSSARY.md)
### Getting Started
* [Installation](getting_started/installation.md)
### Commands
* [rotate](commands/rotate.md)
* [scale](commands/scale.md)
* [flip](commands/flip.md)
* [extrude](commands/extrude.md)
* [split](commands/split.md)
* [palette](commands/palette.md)
* [remap](commands/remap.md)
* [pipeline](commands/pipeline.md)
### Pipelines
# Command: Extrude
## Usage
\ No newline at end of file
# Command: Flip
## Usage
`crunch flip -d vertical ./myimage.png ./myimage-flipped.png`
\ No newline at end of file
# Command: Palette
## Usage
\ No newline at end of file
# Command: Pipeline
## Usage
\ No newline at end of file
# Command: Remap
## Usage
\ No newline at end of file
# Command: Rotate
## Usage
\ No newline at end of file
# Command: Scale
## Usage
\ No newline at end of file
# Command: Split
## Usage
\ No newline at end of file
# Installation
There are a few ways you can install Crunch, depending on your needs
## Pre-built Binaries
- [Latest version for Windows]()
- [Latest version for Linux]()
## Via Cargo
`cargo install crunch`
## From Source
```bash
git clone https://lab.lcr.gr/microhacks/crunch.git crunch
cd crunch
cargo build --release
cp target/release/crunch /some/path/entry
```
\ No newline at end of file
docs/images/Base Sprites.png

5.11 KiB

docs/images/Padding And Spacing.png

4.46 KiB

docs/images/Padding.png

5.25 KiB

docs/images/Spacing.png

4.09 KiB

This diff is collapsed.
{
"name": "docs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"init": "honkit init",
"serve": "honkit serve",
"build": "honkit build"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"honkit": "^4.0.4"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment