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.

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

O.png 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), or nil on failure

Synopsis

image = LoadImage(path)

Load image. Directory is relative to current beatmap folder.

Arguments

string path
Image filename

Returns

Image image
New drawable Image, or nil on failure

Synopsis

font = LoadFont(path, size)

Load image. Directory is relative to current beatmap folder.

Arguments

string path ("MTLmr3m.ttf")
Font file
number size (14)
Font size

Returns

Font font
New Font, or nil on failure

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.