organize headers, add icon/logo sprites to demo
This commit is contained in:
parent
553bf95c3b
commit
2a1a3f1768
21 changed files with 52 additions and 44 deletions
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
(global init (fn []
|
||||
(pxl8.load_palette "palettes/gruvbox.ase")
|
||||
(set logo-sprite (pxl8.load_sprite "sprites/pxl8_logo.ase"))))
|
||||
(set particles (pxl8.particles_new 1000))
|
||||
(set logo-sprite (pxl8.load_sprite "sprites/pxl8.ase"))))
|
||||
|
||||
(global update (fn [dt]
|
||||
(set time (+ time dt))
|
||||
|
|
@ -52,13 +52,11 @@
|
|||
(pxl8.particles_update particles dt))))
|
||||
|
||||
(global draw (fn []
|
||||
(match current-effect
|
||||
(case current-effect
|
||||
1 (do
|
||||
(pxl8.clr 0)
|
||||
(when logo-sprite
|
||||
(pxl8.sprite logo-sprite logo-x logo-y 128 64))
|
||||
(pxl8.text "Bouncing Logo" 200 10 15)
|
||||
(pxl8.text "Press 1-7 for effects" 10 150 7))
|
||||
(pxl8.sprite logo-sprite logo-x logo-y 128 64)))
|
||||
|
||||
2 (pxl8.vfx_plasma time 0.10 0.04 0)
|
||||
|
||||
|
|
@ -69,8 +67,7 @@
|
|||
(local bars [{:base_y 40 :amplitude 20 :height 16 :speed 2.0 :phase 0 :color 14 :fade_color 11}
|
||||
{:base_y 80 :amplitude 15 :height 16 :speed 2.5 :phase 1.5 :color 20 :fade_color 11}
|
||||
{:base_y 120 :amplitude 25 :height 16 :speed 1.8 :phase 3.0 :color 26 :fade_color 11}])
|
||||
(pxl8.vfx_raster_bars bars time)
|
||||
(pxl8.text "Raster Bars" 200 10 15))
|
||||
(pxl8.vfx_raster_bars bars time))
|
||||
|
||||
5 (do
|
||||
(pxl8.clr 0)
|
||||
|
|
@ -79,8 +76,7 @@
|
|||
(pxl8.particles_clear particles)
|
||||
(pxl8.vfx_fire particles 160 140 100 12)
|
||||
(set fire-init true))
|
||||
(pxl8.particles_render particles))
|
||||
(pxl8.text "Fire Effect Test" 200 10 15))
|
||||
(pxl8.particles_render particles)))
|
||||
|
||||
6 (do
|
||||
(pxl8.clr 0)
|
||||
|
|
@ -89,8 +85,7 @@
|
|||
(pxl8.particles_clear particles)
|
||||
(pxl8.vfx_rain particles 320 10.0)
|
||||
(set rain-init true))
|
||||
(pxl8.particles_render particles))
|
||||
(pxl8.text "Rain" 200 10 15))
|
||||
(pxl8.particles_render particles)))
|
||||
|
||||
7 (do
|
||||
(pxl8.clr 0)
|
||||
|
|
@ -99,7 +94,6 @@
|
|||
(pxl8.particles_clear particles)
|
||||
(pxl8.vfx_snow particles 320 5.0)
|
||||
(set snow-init true))
|
||||
(pxl8.particles_render particles))
|
||||
(pxl8.text "Snow" 200 10 15))
|
||||
(pxl8.particles_render particles)))
|
||||
|
||||
_ (pxl8.clr 0))))
|
||||
|
|
|
|||
BIN
demo/sprites/pxl8_icon.ase
Normal file
BIN
demo/sprites/pxl8_icon.ase
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue