Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PistonDevelopers/sprite
/ functions
Functions
68 in github.com/PistonDevelopers/sprite
⨍
Functions
68
◇
Types & classes
5
↓ 5 callers
Method
id
(&self)
src/sprite.rs:93
↓ 4 callers
Method
find
(&self, sprite_id: Uuid, animation: &Behavior<Animation>)
src/scene.rs:132
↓ 3 callers
Method
add_child
Add sprite to scene
src/scene.rs:208
↓ 3 callers
Method
get_opacity
(&self)
src/sprite.rs:211
↓ 3 callers
Method
get_size
(&self)
tests/fake_texture.rs:12
↓ 3 callers
Method
remove_child_when_done
Remove the child by `id` from the scene's children or grandchild once all of its animations have finished. If the child current has no animations, it
src/scene.rs:255
↓ 2 callers
Function
dt_event
(dt: f64)
tests/lib.rs:65
↓ 2 callers
Method
event
Update animation's state
src/scene.rs:44
↓ 2 callers
Method
get_position
(&self)
src/sprite.rs:123
↓ 2 callers
Method
get_rotation
(&self)
src/sprite.rs:147
↓ 2 callers
Method
get_scale
(&self)
src/sprite.rs:159
↓ 2 callers
Method
get_visible
Whether or not the sprite is visible
src/sprite.rs:98
↓ 2 callers
Method
remove_child
Remove the child by `id` from the scene's children or grandchild will stop all the animations run by this child
src/scene.rs:224
↓ 2 callers
Method
run
Register animation with sprite
src/scene.rs:122
↓ 2 callers
Method
running_for_child
Get the number of running animations for a sprite. If sprite does not exist, returns None.
src/scene.rs:195
↓ 2 callers
Method
set_opacity
(&mut self, opacity: f32)
src/sprite.rs:217
↓ 2 callers
Method
set_position
(&mut self, x: Scalar, y: Scalar)
src/sprite.rs:129
↓ 2 callers
Method
set_rotation
(&mut self, deg: Scalar)
src/sprite.rs:153
↓ 2 callers
Method
set_scale
(&mut self, sx: Scalar, sy: Scalar)
src/sprite.rs:165
↓ 2 callers
Method
set_visible
Set the sprite's visibility
src/sprite.rs:103
↓ 2 callers
Function
update_opacity
( sprite: &mut Sprite<I>, factor: f64, t: f64, b: f64, c: f64, d: f64 )
src/animation.rs:312
↓ 2 callers
Function
update_position
( sprite: &mut Sprite<I>, factor: f64, t: f64, bx: f64, by: f64, cx: f64, cy: f64,
src/animation.rs:254
↓ 2 callers
Function
update_rotation
( sprite: &mut Sprite<I>, factor: f64, t: f64, b: f64, c: f64, d: f64 )
src/animation.rs:274
↓ 2 callers
Function
update_scale
( sprite: &mut Sprite<I>, factor: f64, t: f64, bx: f64, by: f64, cx: f64, cy: f64,
src/animation.rs:292
↓ 1 callers
Method
child
Find the child by `id` from the scene's children or grandchild
src/scene.rs:269
↓ 1 callers
Method
child_mut
Find the child by `id` from this sprite's children or grandchild, mutability
src/scene.rs:283
↓ 1 callers
Method
children
(&self)
src/scene.rs:298
↓ 1 callers
Method
draw
Draw this sprite and its children
src/sprite.rs:309
↓ 1 callers
Method
get_flip_x
(&self)
src/sprite.rs:179
↓ 1 callers
Method
get_flip_y
(&self)
src/sprite.rs:199
↓ 1 callers
Method
pause
Pause a running animation of the sprite
src/scene.rs:146
↓ 1 callers
Method
prune_dead_sprites
(&mut self)
src/scene.rs:88
↓ 1 callers
Method
set_flip_x
(&mut self, flip_x: bool)
src/sprite.rs:185
↓ 1 callers
Method
set_flip_y
(&mut self, flip_y: bool)
src/sprite.rs:205
↓ 1 callers
Method
stop_all
Stop all running animations of the sprite
src/scene.rs:180
↓ 1 callers
Method
stop_all_including_children
(&mut self, sprite: &Sprite<I>)
src/scene.rs:215
↓ 1 callers
Method
to_state
Generate a new state from Animation with specified Sprite
src/animation.rs:72
↓ 1 callers
Method
update
Update the state and change the sprite's properties
src/animation.rs:164
Method
add_child
Add a sprite as the child of this sprite, return the added sprite's id.
src/sprite.rs:246
Method
bounding_box
Get the sprite's bounding box
src/sprite.rs:410
Method
child
Find the child by `id` from this sprite's children or grandchild
src/sprite.rs:275
Method
child_mut
Find the child by `id` from this sprite's children or grandchild, mutability
src/sprite.rs:289
Method
children
(&self)
src/sprite.rs:304
Method
draw
Render this scene
src/scene.rs:108
Method
draw_tinted
Render this scene with tint
src/scene.rs:115
Method
draw_tinted
Draw this sprite and its children with color
src/sprite.rs:359
Method
from_texture
Crate sprite from a texture
src/sprite.rs:38
Method
from_texture_rect
Create sprite from a rectangle selection of a texture
src/sprite.rs:65
Method
get_anchor
(&self)
src/sprite.rs:111
Method
get_color
(&self)
src/sprite.rs:141
Method
get_height
(&self)
tests/fake_texture.rs:14
Method
get_src_rect
(&self)
src/sprite.rs:223
Method
get_texture
(&self)
src/sprite.rs:235
Method
get_width
(&self)
tests/fake_texture.rs:13
Method
new
Create a new scene
src/scene.rs:34
Method
new
()
tests/fake_texture.rs:8
Function
pruning_stopped_sprites
()
tests/lib.rs:14
Method
remove_child
Remove the child by `id` from this sprite's children or grandchild
src/sprite.rs:254
Function
remove_child_when_done_when_animations_paused
()
tests/lib.rs:52
Function
remove_child_when_done_when_sprite_already_stopped
()
tests/lib.rs:41
Method
resume
Resume a paused animation of the sprite
src/scene.rs:155
Method
running
Get all the running animations in the scene
src/scene.rs:185
Method
set_anchor
(&mut self, x: Scalar, y: Scalar)
src/sprite.rs:117
Method
set_color
(&mut self, r: f32, g: f32, b: f32)
src/sprite.rs:135
Method
set_src_rect
(&mut self, src_rect: SourceRectangle)
src/sprite.rs:229
Method
set_texture
(&mut self, texture: Rc<I>)
src/sprite.rs:241
Method
stop
Stop a running animation of the sprite
src/scene.rs:173
Method
toggle
Toggle an animation of the sprite
src/scene.rs:164