Struct yy_typings::sprite_yy::Sprite [−][src]
pub struct Sprite {Show 31 fields
pub bbox_mode: BBoxMode,
pub collision_kind: CollisionKind,
pub separate_masks: bool,
pub resource_sprite_type: usize,
pub origin: Origin,
pub pre_multiply_alpha: bool,
pub edge_filtering: bool,
pub collision_tolerance: u8,
pub swf_precision: f64,
pub bbox_left: isize,
pub bbox_right: isize,
pub bbox_top: isize,
pub bbox_bottom: isize,
pub h_tile: bool,
pub v_tile: bool,
pub for3d: bool,
pub width: NonZeroUsize,
pub height: NonZeroUsize,
pub texture_group_id: TexturePath,
pub swatch_colours: Value,
pub grid_x: usize,
pub grid_y: usize,
pub frames: Vec<Frame>,
pub sequence: SpriteSequence,
pub layers: Vec<Layer>,
pub nine_slice: Option<NineSlice>,
pub parent: ViewPath,
pub resource_version: ResourceVersion,
pub name: String,
pub tags: Tags,
pub resource_type: ConstGmSprite,
}
Fields
bbox_mode: BBoxMode
collision_kind: CollisionKind
separate_masks: bool
removed in Gms2.3.167. Instead, use PrecisePerFrame
resource_sprite_type: usize
The type of sprite, whether a bitmap or a vector sprite. Right now, we don’t handle this intelligently.
origin: Origin
pre_multiply_alpha: bool
edge_filtering: bool
collision_tolerance: u8
swf_precision: f64
The precision for Vector sprites. Its default is 2.525
, a number
which is very odd in my opinion.
bbox_left: isize
bbox_right: isize
bbox_top: isize
bbox_bottom: isize
h_tile: bool
v_tile: bool
for3d: bool
width: NonZeroUsize
height: NonZeroUsize
texture_group_id: TexturePath
This is the Path to the Texture Group Id.
swatch_colours: Value
This is probably always null, unless you make a swatch, but why are you doing that! Just don’t do that. Easy.
grid_x: usize
grid_y: usize
frames: Vec<Frame>
Each frame within this Sprite File.
sequence: SpriteSequence
The sequence assigned to each sprite.
layers: Vec<Layer>
Each layer within each Frame for this Sprite File. Unless users use the built-in Sprite Editor, this will likely always have a .len() of 1, as there is always one layer. Layers are shared between frames.
nine_slice: Option<NineSlice>
Optional nineslice data. Added in Gms2.3.2.556.
parent: ViewPath
Defines the parent of the YY folder path.
resource_version: ResourceVersion
Version string. Right now, this is loosely typed and ignored, but will be used in the future to aid in parsing.
name: String
The human readable name of the resource, such as spr_player
.
These are the tags assigned in the GMS2 Editor to each sprite.
resource_type: ConstGmSprite
ModelName. Always GMSprite.
Trait Implementations
Return Sprite { bbox_mode: Default::default(), collision_kind: Default::default(), separate_masks: Default::default(), resource_sprite_type: Default::default(), origin: Default::default(), pre_multiply_alpha: Default::default(), edge_filtering: Default::default(), collision_tolerance: Default::default(), swf_precision: 2.525, bbox_left: Default::default(), bbox_right: Default::default(), bbox_top: Default::default(), bbox_bottom: Default::default(), h_tile: Default::default(), v_tile: Default::default(), for3d: Default::default(), width: NonZeroUsize :: new(1).unwrap(), height: NonZeroUsize :: new(1).unwrap(), texture_group_id: Default::default(), swatch_colours: Default::default(), grid_x: Default::default(), grid_y: Default::default(), frames: Default::default(), sequence: Default::default(), layers: Default::default(), nine_slice: Default::default(), parent: Default::default(), resource_version: Default::default(), name: Default::default(), tags: Default::default(), resource_type: Default::default() }
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Sprite
impl UnwindSafe for Sprite
Blanket Implementations
Mutably borrows from an owned value. Read more