[][src]Struct yy_typings::sprite_yy::Sprite

pub struct Sprite {
    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 parent: ViewPath,
    pub resource_version: ResourceVersion,
    pub name: String,
    pub tags: Tags,
    pub resource_type: ConstGmSprite,
}

Fields

bbox_mode: BBoxModecollision_kind: CollisionKindseparate_masks: bool
👎 Deprecated:

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: Originpre_multiply_alpha: booledge_filtering: boolcollision_tolerance: u8swf_precision: f64

The precision for Vector sprites. Its default is 2.525, a number which is very odd in my opinion.

bbox_left: isizebbox_right: isizebbox_top: isizebbox_bottom: isizeh_tile: boolv_tile: boolfor3d: boolwidth: NonZeroUsizeheight: NonZeroUsizetexture_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: usizegrid_y: usizeframes: 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.

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.

tags: Tags

These are the tags assigned in the GMS2 Editor to each sprite.

resource_type: ConstGmSprite

ModelName. Always GMSprite.

Trait Implementations

impl Clone for Sprite[src]

impl Debug for Sprite[src]

impl Default for Sprite[src]

fn default() -> Self[src]

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(), parent: Default::default(), resource_version: Default::default(), name: Default::default(), tags: Default::default(), resource_type: Default::default() }

impl<'de> Deserialize<'de> for Sprite[src]

impl PartialEq<Sprite> for Sprite[src]

impl Serialize for Sprite[src]

impl StructuralPartialEq for Sprite[src]

Auto Trait Implementations

impl RefUnwindSafe for Sprite

impl Send for Sprite

impl Sync for Sprite

impl Unpin for Sprite

impl UnwindSafe for Sprite

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,