pub struct TextureRef {
pub slot: u32,
pub path: String,
pub embedded: bool,
}Expand description
One atlas a pack asks for, described the way the .ssab itself describes it.
This is what makes reference mode loadable without the host guessing: the
pack answers what it needs and where the exporter put it, and the host —
the only side that has a filesystem or a network — does the reading. A host
resolves
TextureRef::path against the directory the .ssab came from, skipping
the entries that are TextureRef::embedded because those arrive with the
pack.
Fields§
§slot: u32What DrawBatch.texture_hash carries: a cellmap’s name_hash, or a
texture file name’s hash for a TextureChange target (see
SSPack::textures).
A slot inside this pack, not an identity for the image — two packs
from two projects one tool exported can both name theirs spritemap1. Hand it to
crate::SSPlayer::texture_key for what crate::SSRenderer is keyed
by, which is what a host supplying its own pixels registers under.
path: StringThe image path the exporter wrote, relative to the .ssab’s own location.
embedded: boolWhether this image rides inside the .ssab (embedded mode).
true means the host has nothing to load: SSPack::decode_embedded
already produces it, and a player registers it on the next update.