https://github.com/love2d-community/splashes
A collection of splash screens for LÖVE
https://github.com/love2d-community/splashes
love love2d lua splash splash-screen
Last synced: 6 months ago
JSON representation
A collection of splash screens for LÖVE
- Host: GitHub
- URL: https://github.com/love2d-community/splashes
- Owner: love2d-community
- License: other
- Created: 2016-02-15T18:26:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-01-28T16:13:05.000Z (8 months ago)
- Last Synced: 2025-03-30T01:11:18.561Z (6 months ago)
- Topics: love, love2d, lua, splash, splash-screen
- Language: Lua
- Homepage:
- Size: 2.72 MB
- Stars: 80
- Watchers: 8
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
splashes [](https://gitter.im/love2d-community/splashes) [](http://love2d.org/)
========
A collection of splash screens for LÖVE.Run this repo with `love .` to check out all splash screens.
Press any key to skip ahead.Usage
-----
Pick the splash you want to use from our wide variety of **1** (*one*) splashes and move the directory somewhere into your project.
Require the file and instantiate the splash using `splash.new()`.
Make sure to hook the love callbacks up to `splash:update(dt)` and `splash:draw()` and call `splash:skip()` to let the player skip the splash.```lua
local o_ten_one = require "o-ten-one"function love.load()
splash = o_ten_one()
splash.onDone = function() print "DONE" end
endfunction love.update(dt)
splash:update(dt)
endfunction love.draw()
splash:draw()
endfunction love.keypressed()
splash:skip()
end
```Splash Interface
----------------The library only has one function you should use:
### `lib.new(...)`
Instantiate a new `splash`.
You can also do this by calling the library itself: `lib(...)`.
Accepts a table with parameters depending on the specific splash (see below).The following members of the `splash` variable are of importance to you as a user:
### `splash:update(dt)`
Update the splash.### `splash:draw()`
Draw the splash.### `splash:skip()`
Skip the splash.
Splash may still run an exit transition after this, wait for the `onDone()` callback to fire.### `splash.onDone()`
A callback you can add on the `splash` table.
Gets called when the splash exits or is skipped.Splashes
--------### `o-ten-one`
Splash with the new 0.10.1 (windows) logo.`new()` parameters:
* `background`: `{r,g,b,a}` table used to clear the screen with.
Set to `false` to draw underneath.Example: _Setting a pink background color_
```lua
splash = lib.new({background={255,0,255}})
```* `fill`: Whether and how to fill the background in the second animation stage.
One of `"rain"` (fill with baby-inspector rain) or `"lighten"` (keep pink/blue stripes but lighten outside)* `delay_before`: number of seconds to delay before the animation.
Defaults to `0`.* `delay_after`: number of seconds to delay before the animation.
Defaults to `0`.