Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ufgo/sparkle_effect
https://github.com/ufgo/sparkle_effect
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ufgo/sparkle_effect
- Owner: ufgo
- Created: 2024-09-06T19:08:28.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-07T17:17:02.000Z (5 months ago)
- Last Synced: 2024-09-07T22:47:06.079Z (5 months ago)
- Language: GLSL
- Size: 48.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-defold - Sparkle Effect
README
![](title.gif)
# Simple Sparkle Effect for DefoldSimple Sparkle Effect is Material for creating a sparkle or glare effect on the sprite. You can adjust parameters such as size, angle, and position in the material constants, as well as animate them via go.animate()
## Setup
### Dependency
To integrate the **Sparkle Effect** extension into your own project, add this project as a [dependency](https://www.defold.com/manuals/libraries/) in your **Defold** game. Open your `game.project` file and add the following line to the dependencies field under the project section:
> [https://github.com/ufgo/sparkle_effect/archive/master.zip](https://github.com/ufgo/sparkle_effect/archive/master.zip)
## Usage
- I highly recommend using a single image in the atlas.
- Adjust the constants in the material so that they match your sprite.
- Copy the material in order to be able to edit the constants of the materials or set them via go.set() Adjust the constants in the material so that they match your sprite.
- Set sparkle_material to sprite then animate it.## Example
```lua
function init(self)
--shader animation
local url = msg.url(nil, go.get_id(), "sprite")
go.animate(url, "pos.x", go.PLAYBACK_LOOP_FORWARD, 0.8, go.EASING_INSINE, 0.7)
end
```## License
![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)