Crate pmd_wan

source ·

Re-exports

pub use wan_image::WanImage;

Modules

Structs

An Animation is a set of AnimationFrame, that will be played one after the other, and that would loop most of the time. The duration between an AnimationFrame and the next one is contained in the AnimationFrame
A single frame of an crate::Animation
Contain all the Animation, as well as all the animation group (a.k.a animation table in ppmdu sprite editor). Animation group are a list of Animation. An animation group usually have 8 entry, one per rotation of the monster.
A Fragment may reference an crate::FragmentBytes, that will form a single (or all if small enought) part of an crate::Frame
The output of find_fragments_in_images. The fragment (here) are 8×8 pixel of size. A tile may be Flip on either or both axis (or not at all). Only the smallest of the 4 possible flip is added in this collection (based on the comparaison of the resulting pixels, as Rust compare u8 arrays). The key is the pixels of the fragment (image are stored line by line, from top-left to bottom-right) The key is where they are used. The x or y may be negative.
Size of an [crate::ImageBytes] (computed from crate::Fragment)
A single frame of animation
The coordinate of some point in the Pokémon, in the form of X then Y
Represent a 8×8 bytes that is been normalized, as such that all four FragmentFlip will result in the same NormalizedBytes
A palette, composed of group of 16 color when the first is transparent. Colors are RGBA.

Enums

Constants

Functions

Take the raw encoded fragment (from an [ImageBytes]), and decode them into a list of pixels
Find all 8×8 fragment all input images contain. See FragmentFinderData for more information on the output The image is filled on all sides (7 pixels) by 0s. Fragments consisting of only zeroes are discared. 0×0 images are skipped.