Live Simulator: 2/Storyboard
Lua storyboard is simply a Lua script which controls how objects shown behind the simulator, hence it's named Lua storyboard. Please note that Lua script running as Lua storyboard is sandboxed, which means most of `love` functions doesn't exist in here or modified to prevent alteration of the rendering state, and to prevent malicious Lua script from running.
Contents
- 1 Storyboard Entry Points
- 2 Storyboard Functions
- 2.1 Synopsis
- 2.2 Arguments
- 2.3 Returns
- 2.4 Synopsis
- 2.5 Arguments
- 2.6 Returns
- 2.7 Synopsis
- 2.8 Arguments
- 2.9 Returns
- 2.10 Synopsis
- 2.11 Arguments
- 2.12 Returns
- 2.13 Synopsis
- 2.14 Arguments
- 2.15 Returns
- 2.16 Synopsis
- 2.17 Arguments
- 2.18 Returns
- 2.19 Synopsis
- 2.20 Arguments
- 2.21 Returns
- 2.22 Synopsis
- 2.23 Arguments
- 2.24 Returns
- 3 TODO
Storyboard Entry Points
Lua storyboard needs to create this function in global namespace. Although there's way to use it without this entry points by using coroutines, but it's usage is discouraged and only provided for legacy DEPLS storyboard Lua script.
Synopsis
Initialize()
Storyboard initialization. This function is called everytime storyboard is loaded. Load your images here
Arguments
None.
Returns
Nothing.
Synopsis
Update(deltaT)
Storyboard frame update. Draw and calculate everything for the storyboard in here.
Arguments
number deltaT
- Time since the last update in milliseconds
Returns
Nothing.
Storyboard Functions
Synopsis
SetLiveOpacity(opacity)
Sets the Live Show! image opacity. This includes unit, header, notes, and more.
Arguments
number opacity (255)
- The opacity, range from 0-255. 0 for invisible, 255 for opaque (fully visible)
Returns
Nothing.
Synopsis
SetBackgroundDimOpacity(opacity)
Sets background blackness (but not entirely black)
Arguments
number opacity (255)
- Background blackness, from 0-255. 0 for full black (approx. 190 blackness), 255 for full bright
Returns
Nothing.
Synopsis
elapsedTime = GetCurrentElapsedTime()
Sets background blackness (but not entirely black)
Arguments
None.
Returns
number elapsedTime
- Elapsed time, in milliseconds. Negative value means simulator is not started yet
Synopsis
delay = GetLiveSimulatorDelay()
Get live simulator delay. Delay before live simulator is shown
Arguments
None.
Returns
number delay
- Live simulator delay, in milliseconds
Synopsis
video = LoadVideo(path)
Load video file. Directory is relative to current beatmap folder
AquaShineVideo requires at least FFmpeg v3.0 available. This is the default for Windows release and Android release for x86 architecture. If none is found, it only loads video using love.graphics.newVideo. |
Arguments
string path
- Video filename
Returns
Video or AquaShineVideo video
- New drawable
Video
object (identical to Video), ornil
on failure
Synopsis
image = LoadImage(path)
Load image. Directory is relative to current beatmap folder.
Arguments
string path
- Image filename
Returns
Synopsis
font = LoadFont(path, size)
Load image. Directory is relative to current beatmap folder.
Arguments
Returns
Synopsis
contents = ReadFile(path)
Reads the contents of file. Directory is relative to current beatmap folder
Arguments
string path
- Filename
Returns
string contents
- The file contents, or
nil
on failure
TODO
- Complete it.