Skip to content

Commit

Permalink
New example: particlefx "confetti" (#44)
Browse files Browse the repository at this point in the history
* Add `confetti` example

* Update description

* Randomize particles initial rotation
  • Loading branch information
aglitchman authored Oct 12, 2024
1 parent 22caba8 commit d590c2c
Show file tree
Hide file tree
Showing 11 changed files with 1,078 additions and 88 deletions.
Binary file added assets/images/confetti/confetti_curvy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/confetti/confetti_rectangle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/confetti/confetti_star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 9 additions & 87 deletions assets/sprites.atlas
Original file line number Diff line number Diff line change
@@ -1,314 +1,236 @@
images {
image: "/assets/images/spinner.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/elementStone019.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/elementStone023.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bunny1_ready.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bunny2_ready.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/carrot.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/red_button12.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/flame.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/smoke.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/rainbow.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/enemyFloating_1.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/logo-color.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/shipGreen_manned.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/elementMetal001.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/plank_slice.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/hitman1_machine.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/green_button03.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/playerShip1_red.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/enemyBlack1.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/lighting_blue.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/particle_brown.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/crosshair010.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/confetti/confetti_star.png"
}
images {
image: "/assets/images/confetti/confetti_curvy.png"
}
images {
image: "/assets/images/confetti/confetti_rectangle.png"
}
animations {
id: "bee"
images {
image: "/assets/images/bee/Bee01.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee02.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee03.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee04.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee05.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee06.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee07.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee08.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee09.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee10.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee11.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee12.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee13.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee14.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee15.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee16.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee17.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee18.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee19.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee20.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee21.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee22.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee23.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee24.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
playback: PLAYBACK_LOOP_FORWARD
fps: 30
flip_horizontal: 0
flip_vertical: 0
}
animations {
id: "bee_shot"
images {
image: "/assets/images/bee/Bee_shot01.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee_shot02.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee_shot03.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee_shot04.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee_shot05.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee_shot06.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee_shot07.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee_shot08.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee_shot09.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Bee_shot10.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
playback: PLAYBACK_ONCE_FORWARD
fps: 30
flip_horizontal: 0
flip_vertical: 0
}
animations {
id: "stinger"
images {
image: "/assets/images/bee/Sting01.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Sting02.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Sting03.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Sting04.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Sting05.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Sting06.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Sting07.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Sting08.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/bee/Sting09.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
playback: PLAYBACK_LOOP_FORWARD
fps: 30
flip_horizontal: 0
flip_vertical: 0
}
animations {
id: "coin"
images {
image: "/assets/images/coin/dcoin_1.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/coin/dcoin_2.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/coin/dcoin_3.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/coin/dcoin_4.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
images {
image: "/assets/images/coin/dcoin_5.png"
sprite_trim_mode: SPRITE_TRIM_MODE_OFF
}
playback: PLAYBACK_LOOP_FORWARD
fps: 8
flip_horizontal: 0
flip_vertical: 0
}
margin: 0
extrude_borders: 2
inner_padding: 0
max_page_width: 0
max_page_height: 0
rename_patterns: ""
2 changes: 1 addition & 1 deletion examples/_main/examples.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ examples["gui"] = {
}
examples["input"] = { "move", "text", "down_duration", "mouse_and_touch" }
examples["material"] = { "vertexcolor", { name = "unlit", nobg = true }, "uvgradient", "noise" }
examples["particles"] = { "particlefx", "modifiers", "fire_and_smoke" }
examples["particles"] = { "confetti", "particlefx", "modifiers", "fire_and_smoke" }
examples["sound"] = { "music", "fade_in_out", "panning" }
examples["render"] = { "camera", "screen_to_world" }
examples["debug"] = { "physics", "profile" }
Expand Down
6 changes: 6 additions & 0 deletions examples/_main/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,3 +436,9 @@ embedded_components {
data: "collection: \"/examples/material/unlit/unlit.collection\"\n"
""
}
embedded_components {
id: "particles/confetti"
type: "collectionproxy"
data: "collection: \"/examples/particles/confetti/confetti.collection\"\n"
""
}
Loading

0 comments on commit d590c2c

Please sign in to comment.