load_sprite

Function load_sprite 

Source
pub fn load_sprite(file_path: String) -> Sprite
Expand description

Sprite loading helper to create the sprite 2D collection based on a JSON file. It can be static sprite or animated sprite.

§Examples

§Load a sprite from json file

let sprite = load_sprite("./src/rendering/tests/simple_sprite.json".to_string());