类 MolangVariableMap实验性

Contains a set of additional variable values for further defining how rendering and animations function.

构造函数

方法

  • 实验性

    参数

    • variableName: string
    • color: RGB

    返回 void

    Adds the following variables to Molang:

    • <variable_name>.r - Red color value [0-1]
    • <variable_name>.g - Green color value [0-1]
    • <variable_name>.b - Blue color value [0-1]

    This function can throw errors.

  • 实验性

    参数

    • variableName: string
    • color: RGBA

    返回 void

    Adds the following variables to Molang:

    • <variable_name>.r - Red color value [0-1]
    • <variable_name>.g - Green color value [0-1]
    • <variable_name>.b - Blue color value [0-1]
    • <variable_name>.a - Alpha (transparency) color value [0-1]

    This function can throw errors.

  • 实验性

    参数

    • variableName: string

      Name of the float-based number to set.

    • number: number

      Value for the Molang-based variable to set.

    返回 void

    Sets a numeric (decimal) value within the Molang variable map.

    This function can throw errors.

  • 实验性

    参数

    • variableName: string
    • speed: number
    • direction: Vector3

    返回 void

    Adds the following variables to Molang:

    • <variable_name>.speed - Speed number provided
    • <variable_name>.direction_x - X value from the Vector3 provided
    • <variable_name>.direction_y - Y value from the Vector3 provided
    • <variable_name>.direction_z - Z value from the Vector3 provided

    This function can throw errors.

  • 实验性

    参数

    • variableName: string
    • vector: Vector3

    返回 void

    Adds the following variables to Molang:

    • <variable_name>.x - X value from the Vector3 provided
    • <variable_name>.y - Y value from the Vector3 provided
    • <variable_name>.z - Z value from the Vector3 provided

    This function can throw errors.