Skip to content
Tempestissiman edited this page Jul 26, 2022 · 4 revisions

Descriptions

Holds references to internal controllers, and allows for controller creation.

Remarks

_

Properties


Name Type Description
gameplayCamera CameraController The main camera
combo TextController The combo text
score TextController The score text
jacket ImageController The song jacket
title TextController The title text
composer TextController The composer text
difficultyText TextController The difficulty name text
difficultyBackground ImageController The difficulty background image
hud CanvasController The canvas containing the pause button and the info panel
infoPanel InfoPanelController The info panel
pauseButton PauseController The pause button
background ImageController The background image
videoBackground SpriteController The video background sprite
track TrackController The main track
singleLineL SpriteController The left Memory Archives line
singleLineR SpriteController The right Memory Archives line
skyInputLine SpriteController The sky input line
skyInputLabel SpriteController The sky input label that displays "Sky Input"
darken SpriteController The background darken sprite (used internally)
worldCanvas CanvasController The world-space canvas
screenCanvas CanvasController The screen-space canvas

Methods


createSprite(imgPath, material = "default", newMaterialInstance = false)

Descriptions

Creates an sprite object and returns its controller.

Parameters

Name Type Description
imgPath string The path to the image file
material string The image's blend mode. See Blend modes
newMaterialInstance boolean Whether or not to create a new material instance

Return types

SpriteController

Remarks

newMaterialInstance should be left to false unless you intend on changing its texture offset or scaling.

Example

local sprite = Scene.createSprite("test.jpg")
local sprite2 = Scene.createSprite("test2.png", "fastadd")
local sprite3 = Scene.createSprite("test3.png", "fastmultiply", true)

createImage(imgPath, material = "default", newMaterialInstance = false)

Descriptions

Creates an image object and returns its controller.

Parameters

Name Type Description
imgPath string The path to the image file
material string The image's blend mode. See Blend modes
newMaterialInstance boolean Whether or not to create a new material instance

Return types

ImageController

Remarks

newMaterialInstance should be left to false unless you intend on changing its texture offset or scaling.

Example

local img = Scene.createImage("test.jpg")
local img2 = Scene.createImage("test2.png", "fastadd")
local img3 = Scene.createImage("test3.png", "fastmultiply", true)

createCanvas(worldSpace = false)

Descriptions

Creates an world-space canvas or screen-space canvas and returns its controller.

Parameters

Name Type Description
worldSpace boolean Whether or not to create a world-space canvas

Return types

CanvasController

Remarks

_

Example

local img = Scene.createCanvas() -- A screen-space canvas
local img = Scene.createCanvas(true)

createText(font = "default", fontSize = 40, lineSpacing = 1, alignment = "middlecenter")

Descriptions

Creates a text object and returns its controller.

Parameters

Name Type Description
font string The font to use
fontSize number The font size of the text
lineSpacing number The line spacing of the text
alignment string How to align the text relative to its width and height

Return types

TextController

Remarks

font must be a font already installed on the user's operating system. alignment can be one of the following (case insensitive)

  • "upperleft"
  • "uppercenter"
  • "upperright"
  • "middleleft"
  • "middlecenter"
  • "middleright"
  • "lowerleft"
  • "lowercenter"
  • "lowerright"

Example

local txt = Scene.createText()
local txt2 = Scene.createText("Forte")
local txt3 = Scene.createText("Wingdings", 50, 1, "middleleft")

createMesh(objPath, texturePath)

Descriptions

Creates a 3D mesh object and returns its controller.

Parameters

Name Type Description
objPath string The path to the .obj file
texturePath string The path to the image texture file

Return types

MeshController

Remarks

Both objPath and texturePath are relative to the parent Scenecontrol folder, not the script that called this method.

Example

local mesh = Scene.createMesh("model.obj", "model.jpg")

getNoteGroup(tg)

Descriptions

Retrieves the note group controller of a timing group.

Parameters

Name Type Description
tg number The timing group number

Return types

NoteGroupController

Remarks

Returns nil if input number is an invalid timing group number.

Example

local mainTg = Scene.getNoteGroup(0)
addScenecontrol("myType", 0, function(cmd)
    local tg = Scene.getNoteGroup(cmd.timingGroup)
end)

Clone this wiki locally