logo
pub struct Library {
    pub frame_rate: f32,
    /* private fields */
}
Expand description

An exported Flump library containing movies and bitmaps.

Fields

frame_rate: f32

The original frame rate of movies in this library.

Implementations

Creates a library using files in an AssetPack. @param baseDir The directory in the pack containing Flump’s library.json and texture atlases.

Creates a library procedurally using a set of Flipbook definitions. Each flipbook will be converted to a movie that can be instanciated with createMovie(). *

Disposes the source library.json File used to create this Library. This can free up some memory, if you don’t intend to recreate this Library later from the same AssetPack.

@returns This instance, for chaining.

Retrieve a name symbol from this library, or None if not found.

Creates a sprite from a symbol name, it’ll either be a movie or a bitmap. @param required If true and the symbol is not in this library, an error is thrown.

Creates a movie sprite from a symbol name. @param required If true and the symbol is not in this library, an error is thrown.

Iterates over all the symbols in this library.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Typed getter

Inspect the context.

Inspect the context.

Inspect the context.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert into color

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Sets value as a parameter of self.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.