Skip to content

Commit

Permalink
Merge pull request #59 from sorenpeter/patch-1
Browse files Browse the repository at this point in the history
Create textures.pz
  • Loading branch information
rumblesan authored Apr 28, 2021
2 parents 7ce70bb + f8b1d08 commit 2f1e5fb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions stdlib/textures.pz
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,14 @@ func animate(name, speed, &blk)
intMaterial(:material, :texture)
blk(frame)
popScope()

func slideshow(image_list, slideshow_speed, animation_speed, &blk)
slideshow_speed := 1
image = image_list[(slideshow_speed * time) % length(image_list)]
animation_speed := 10
if (isNull(blk))
animate(image, animation_speed)
else
animate(image, animation_speed)
blk()

0 comments on commit 2f1e5fb

Please sign in to comment.