Skip to main content

RenderTask

Represents a rendering task for Figura to complete each frame. An abstract superclass of ItemTask, BlockTask, TextTask, and SpriteTask.

remove(): RenderTask

Removes this render task from the parent model part


getName(): string

Get this task's name


setVisible(state: boolean): RenderTask

Sets whether or not this task should be rendered


isVisible(): boolean

Checks if this task is visible


setLight(blockLight: number?, skyLight: number?): RenderTask

Sets the light override value of this task Values are given from 0 to 15, indicating the block light and sky light levels you want to use Passing nil will reset the lighting override for this task


getLight(): Vector2

Returns the light override value of this task


setOverlay(whiteOverlay: number?, hurtOverlay: number?): RenderTask

Sets the overlay override value of this task Values you give are 0 to 15, indicating the white overlay and the damage overlay levels you want to use Passing nil will reset the overlay override for this task


getOverlay(): Vector2

Returns the overlay override value of this task


setPos(pos: Vector3): RenderTask

Sets the position of the task, relative with its attached part Uses model coordinates


getPos(): Vector3

Gets this task position


setRot(rot: Vector3): RenderTask

Sets the rotation of the task, relative with its attached part


getRot(): Vector3

Gets this task rotation


setScale(scale: Vector3): RenderTask

Sets the scale of the task, relative with its attached part


getScale(): RenderTask

Gets this task scale


setMatrix(matrix: Matrix4): RenderTask

Sets the given matrix as the position matrix for this render task The normal matrix is automatically calculated as the inverse transpose of this matrix Calling this DOES NOT CHANGE the values of position, rot, or scale in the render task If you call setPos() or a similar function, the effects of setMatrix() will be overwritten


getPositionMatrix(): Matrix4

Recalculates the matrix for this render task, based on its current position, rotation, scale, and pivot, then returns this matrix


getPositionMatrixRaw(): Matrix4

Returns the position matrix for this render task The Raw version of the function is different in that it doesn't recalculate the matrix before getting it


getNormalMatrix(): Matrix3

Recalculates the normal matrix for this render task, based on its current position, rotation, scale, and pivot, then returns this matrix


getNormalMatrixRaw(): Matrix3

Returns the normal matrix for this render task The Raw version of the function is different in that it doesn't recalculate the matrix before returning it