Module vectorlayer

Vector layer related variables and functions.

Functions

addChild (child, index) Adds a display object to the layer's child list.
removeChild (child) Removes a display object from the layer's child list.
destroy () Destroys the art layer, removing it from the level.
clear () Clears the art layer, emptying its contents without destroying the layer.

Fields

depth The depth of the art layer.
layerNum The layerNum of the art layer (equivalent to the ">" icon in Level Editor).
alpha The alpha of the art layer, represented by a number in the range of 0 - 1.
blendMode The blend mode of the art layer.
numChildren The number of children.
destroyed Whether or not the art layer was destroyed.
redMultiplier A number value that is multiplied with the red color channel when drawn.
greenMultiplier A number value that is multiplied with the green color channel when drawn.
blueMultiplier A number value that is multiplied with the blue color channel when drawn.
colorMultiplier Sets red, green, and blue multipliers based on a hexadecimal RGB value (e.g.


Functions

addChild (child, index)
Adds a display object to the layer's child list. This allows it to appear on screen.

Parameters:

  • child sprite/stamp/textfield The display object to be parented.
  • index int The index position to add the child into. By default the end of the list.
removeChild (child)
Removes a display object from the layer's child list.

Parameters:

  • child sprite/stamp/textfield The child display object to be removed.
destroy ()
Destroys the art layer, removing it from the level. Once destroyed, no operations on the layer will function.
clear ()
Clears the art layer, emptying its contents without destroying the layer.

Fields

depth
The depth of the art layer. By default 1.
layerNum
The layerNum of the art layer (equivalent to the ">" icon in Level Editor). By default 1. Greater layerNum layers are drawn above lesser layerNum layers, regardless of layer depth. layerNums of 2 or greater draw above blocks. 3 or greater draws above players, hats, projectiles, and other visual effects.
alpha
The alpha of the art layer, represented by a number in the range of 0 - 1. An alpha of 0 means the layer is completely transparent; 1 means fully visible. By default 1.
blendMode
The blend mode of the art layer. Use BlendMode enum values. By default BlendMode.NORMAL. Not all blend modes are guaranteed to have any effect when used by art layers

See also:

numChildren
The number of children. Read-only.
destroyed
Whether or not the art layer was destroyed. Calling destroy sets this to true. Read-only.
redMultiplier
A number value that is multiplied with the red color channel when drawn. By default 1.
greenMultiplier
A number value that is multiplied with the green color channel when drawn. By default 1.
blueMultiplier
A number value that is multiplied with the blue color channel when drawn. By default 1.
colorMultiplier
Sets red, green, and blue multipliers based on a hexadecimal RGB value (e.g. 0xFF0000). Write-only.
generated by LDoc 1.5.0 Last updated 2026-06-07 03:06:03