Structures - AlsoGhostglowDev/Ghost-s-Utilities GitHub Wiki

Ghost's Utilities Structures

This documentation lists the custom table structures that exists within GhostUtil that are used in some module's methods or exists as a module's field.


TweenOptions:

{
    ?type:String|Int,
    ?startDelay:Float,
    ?loopDelay:Float,
    ?ease:String,
    ?onUpdate:String,
    ?onStart:String,
    ?onComplete:String 
}

The tween options used for tweening functions like startTween.

ColorChannels:

{
    // ranges from 0 to 1
    alpha:Int,

    // all of these ranges from 0 to 255
    red:Int,
    green:Int,
    blue:Int
}

An object storing values of each respective color channels. Found returned from color.extractChannels.
(from ghostutil.color)

─────────────────────────

ModFunctions:

{
    SINE = math.sin,
    COSINE = math.cos,
    TAN = math.tan,
    LOG = math.log10,

    -- to be edited by users
    CUSTOM = math.sin
}

The common modchart functions used for the certain modifiers.
(from ghostutil.modchart)

─────────────────────────

ScrollType:

{
    UPSCROLL = 'up',
    DOWNSCROLL = 'down'
}

Used to determine the current strum's scroll type.
(from ghostutil.modchart)

─────────────────────────

Point:

{
    x:Float|Dynamic,
    y:Float|Dynamic
}

Used to either determine a point from the two-dimensional axis or get the appropriate property for the corresponding axis.
(from ghostutil.modchart)

─────────────────────────

WiggleMod:

{
    enabled:Bool,
    frequency:Point,
    phase:Point,
    magnitude:Point,
    offset:Point,
    func:Point
}

Used to store the attributes of the wiggle modifier for modcharts.
(from ghostutil.modchart)

─────────────────────────

ShakeMod:

{
    enabled:Bool,
    magnitude:Point,
    func:Point
}

Used to store the attributes of the shake modifier for modcharts.
(from ghostutil.modchart)

─────────────────────────

HiddenMod & SuddenMod:

{
    enabled:Bool,
    startStep:Int,
    startAlpha:Float,
    endAlpha:Float
}

Used to store the attributes of the hidden/sudden modifier for modcharts.
(from ghostutil.modchart)

─────────────────────────

BoostMod & BrakeMod:

{
    enabled:Bool,
    startStep:Int,
    speed:Float
}

Used to store the attributes of the boost/brake modifier for modcharts.
(from ghostutil.modchart)

─────────────────────────

StrumMod:

{
    enabled:Bool,
    scroll:ScrollType,
    position:Point,
    offset:Point,
    wiggleMod:WiggleMod,
    shakeMod:ShakeMod,
    hiddenMod:HiddenMod,
    suddenMod:SuddenMod,
    boostMod:BoostMod,
    brakeMod:BrakeMod,
    direction:Float,
    speed:Float
}

Used to store the attributes of the strum's modifiers for modcharts.
(from ghostutil.modchart)

─────────────────────────

ModTweenData:

{
    index: number,
    mod: string,
    ?axis: string
}  

Contains the data for a modifier tween. (from ghostutil.modchart)

─────────────────────────

ModScrollTweenData:

{
    index: number,
    downscroll: boolean
}  

Contains the data for a modchart scroll tween. (from ghostutil.modchart)

─────────────────────────

WindowAttributes:

{
    ?x:Float = 0,
    ?y:Float = 0,
    ?width:Int = 256,
    ?height:Int = 256,
    ?title:String = 'New Window',
    ?resizable:Bool = true,
    ?minimized:Bool = false,
    ?maximized:Bool = false,
    ?fullscreen:Bool = false,
    ?borderless:Bool = false,
    ?alwaysOnTop:Bool = false
}

Contains attributes for creating a window. All fields are optional.
(from ghostutil.window)



GhostUtil 3.0.0Docs 3.0.0, Revision 1

a Lua Library made by GhostglowDev; for Psych Engine
© 2025 GhostglowDevGhost's Utilities
Licensed under the MIT License.

⚠️ **GitHub.com Fallback** ⚠️