Skip to main content

Models

Represents a node in the model tree, basically a group/cube/mesh in Blockbench

Each bbmodel file is itself a ModelPart, and all of your models are contained in a global ModelPart called models

warning

This page is a WIP. It contains all the information in Figura's documentation but we're working on adding more helpful descriptions.


Transformations

setVisible()

Aliases: visible()

Sets this part to be visible or invisible

The default value is nil, meaning the part copies its visibility from its parent part

setVisible(visible)

Parameters:

NameTypeDescriptionDefault
visibleBoolean--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setVisible(false)

getVisible()

Gets whether or not this model part is visible

The default value is nil, meaning it copies the visibility of its parent part during rendering

getVisible()

Returns:

TypeDescription
Boolean-

Example:

models:getVisible()

setRot()

Aliases: rot()

Sets the absolute rotation for this part

Nil values for rotation are assumed to be 0

Angles are given in degrees

For relative rotation values, check out the "offset" rot functions

setRot(rot)

Parameters:

NameTypeDescriptionDefault
rotVector3--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setRot(0, 90, 0)

getRot()

Gets the rotation of the model part, including its rotation in Blockbench

For relative rotation values, check out the "offset" rot functions

getRot()

Returns:

TypeDescription
Vector3-

Example:

models:getRot()

setPos()

Aliases: pos()

Sets the position offset for this part from its Blockbench position

Nil values for position are assumed to be 0

setPos(pos)

Parameters:

NameTypeDescriptionDefault
posVector3--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setPos(0, 5, 0)

getPos()

Gets the position of the model part, as an offset from its position in Blockbench

Only changes from {0,0,0} when you call setPos()

getPos()

Returns:

TypeDescription
Vector3-

Example:

models:getPos()

setScale()

Aliases: scale()

Sets the scale factor for this part

Nil values for scale are assumed to be 1

setScale(scale)

Parameters:

NameTypeDescriptionDefault
scaleVector3--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setScale(2, 2, 2)

getScale()

Gets the scale of the model part, as a multiple of its Blockbench size

Only changes from {1,1,1} when you call setScale()

getScale()

Returns:

TypeDescription
Vector3-

Example:

models:getScale()

setPivot()

Aliases: pivot()

Sets the absolute pivot for this part

Nil values are assumed to be 0

For relative pivot offsets, check out the "offset" pivot functions

setPivot(pivot)

Parameters:

NameTypeDescriptionDefault
pivotVector3--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setPivot(0, 5, 0)

getPivot()

Gets the pivot point of the model part, including its pivot in Blockbench

For relative values, check out the "offset" pivot functions

getPivot()

Returns:

TypeDescription
Vector3-

Example:

models:getPivot()

setOffsetRot()

Aliases: offsetRot()

Sets the rotation offset for this part

Nil values for rotation are assumed to be 0

Angles are given in degrees

For absolute rotation values, check out the non-offset rot functions

setOffsetRot(offsetRot)

Parameters:

NameTypeDescriptionDefault
offsetRotVector3--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setOffsetRot(0, 90, 0)

getOffsetRot()

Gets the rotation offset of the model part, offset from its rotation in Blockbench

For absolute rotation values, check out the non-offset rot functions

getOffsetRot()

Returns:

TypeDescription
Vector3-

Example:

models:getOffsetRot()

setOffsetScale()

Aliases: offsetScale()

Sets the scale offset for this part

Nil values are assumed to be 1

For absolute scale values, check out the non-offset rot functions

setOffsetScale(offsetScale)

Parameters:

NameTypeDescriptionDefault
offsetScaleVector3--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setOffsetScale(2, 2, 2)

getOffsetScale()

Gets the scale offset of the model part, offset from its default scale

For absolute scale values, check out the non-offset rot functions

getOffsetScale()

Returns:

TypeDescription
Vector3-

Example:

models:getOffsetScale()

setOffsetPivot()

Aliases: offsetPivot()

Sets the pivot offset point for this part (multiplicative)

Nil values are assumed to be 0

For absolute pivot point values, check out the non-offset pivot functions

setOffsetPivot(offsetPivot)

Parameters:

NameTypeDescriptionDefault
offsetPivotVector3--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setOffsetPivot(0, 5, 0)

getOffsetPivot()

Gets the pivot offset of the model part, offset from its pivot in Blockbench

For absolute pivot point values, check out the non-offset pivot functions

getOffsetPivot()

Returns:

TypeDescription
Vector3-

Example:

models:getOffsetPivot()

setMatrix()

Aliases: matrix()

Sets the given matrix as the position matrix for this model part

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 model part

If you call setPos() or a similar function, the effects of setMatrix() will be overwritten

setMatrix(matrix)

Parameters:

NameTypeDescriptionDefault
matrixMatrix4--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setMatrix(matrices.mat4())

getPositionMatrix()

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

getPositionMatrix()

Returns:

TypeDescription
Matrix4-

Example:

models:getPositionMatrix()

getPositionMatrixRaw()

Returns the position matrix for this model part

The Raw version of the function is different in that it doesn't recalculate the matrix before getting it

getPositionMatrixRaw()

Returns:

TypeDescription
Matrix4-

Example:

models:getPositionMatrixRaw()

getNormalMatrix()

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

getNormalMatrix()

Returns:

TypeDescription
Matrix3-

Example:

models:getNormalMatrix()

getNormalMatrixRaw()

Returns the normal matrix for this model part

The Raw version of the function is different in that it doesn't recalculate the matrix before returning it

getNormalMatrixRaw()

Returns:

TypeDescription
Matrix3-

Example:

models:getNormalMatrixRaw()

Part Information

getName()

The name of this model part

getName()

Returns:

TypeDescription
String-

Example:

models:getName()

getType()

Returns whether this part is a "GROUP", a "CUBE", or a "MESH"

getType()

Returns:

TypeDescription
String-

Example:

models:getType()

getTrueRot()

Gets the true rotation of this model part, which is a sum of the rotation, the offset rotation and the animation position

getTrueRot()

Returns:

TypeDescription
Vector3-

Example:

models:getTrueRot()

getTruePos()

Gets the true position of this model part, which is a sum of the position and the animation position

getTruePos()

Returns:

TypeDescription
Vector3-

Example:

models:getTruePos()

getTrueScale()

Gets the true scale of this model part, which is a sum of the scale, the offset scale and the animation scale

getTrueScale()

Returns:

TypeDescription
Vector3-

Example:

models:getTrueScale()

getTruePivot()

Gets the true pivot of this model part, which is a sum of the pivot and the offset pivot

getTruePivot()

Returns:

TypeDescription
Vector3-

Example:

models:getTruePivot()

partToWorldMatrix()

Gets a matrix which transforms a point from this part's position to a world location

Recommended to use this in POST_RENDER, as by then the matrix is updated

In RENDER it will be 1 frame behind the part's visual position for that frame

Also, if the model is not rendered in-world, the part's matrix will not be updated

Paperdoll rendering and other UI renderings will not affect this matrix

partToWorldMatrix()

Returns:

TypeDescription
Matrix4-

Example:

models:partToWorldMatrix():apply()

Rendering

setPrimaryRenderType()

Aliases: primaryRenderType()

Sets the current primary render type of this model part

Nil by default, meaning the part copies the primary render type of its parent during rendering

Check the docs enum command for all render types

setPrimaryRenderType(renderType)

Parameters:

NameTypeDescriptionDefault
renderTypeString--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setPrimaryRenderType("END_PORTAL")

getPrimaryRenderType()

Gets the current primary render type of this model part

Nil by default, meaning the part copies the primary render type of its parent

getPrimaryRenderType()

Returns:

TypeDescription
String-

Example:

models:getPrimaryRenderType() == "TRANSLUCENT_CULL"

setSecondaryRenderType()

Aliases: secondaryRenderType()

Sets the current secondary render type of this model part

Nil by default, meaning the part copies the secondary render type of its parent during rendering

Check the docs enum command for all render types

setSecondaryRenderType(renderType)

Parameters:

NameTypeDescriptionDefault
renderTypeString--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setSecondaryRenderType("GLINT")

getSecondaryRenderType()

Gets the current secondary render type of this model part

Nil by default, meaning the part copies the secondary render type of its parent

getSecondaryRenderType()

Returns:

TypeDescription
String-

Example:

models:getSecondaryRenderType() == "LINES"

setOpacity()

Aliases: opacity()

Sets the opacity multiplier of this part

Note that opacity settings will only take effect if the part has a suitable Render Type for them, mainly TRANSLUCENT

Check out modelPart.setPrimaryRenderType() for how to do this

setOpacity(opacity)

Parameters:

NameTypeDescriptionDefault
opacityNumber--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setOpacity(0.5)

getOpacity()

Gets the opacity multiplier of this part

Note that opacity settings will only take effect if the part has a suitable Render Type for them, mainly TRANSLUCENT

Check out modelPart.setPrimaryRenderType() for how to do this

getOpacity()

Returns:

TypeDescription
Number-

Example:

models:getOpacity()

setLight()

Aliases: light()

Sets the light level to be used when rendering this part

Values you give are 0 to 15, indicating the block light and sky light levels you want to use

Passing nil will reset the lighting override for this part

setLight(light)

Parameters:

NameTypeDescriptionDefault
lightVector2--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

-- Example for mimicking vanilla lighting
local blockLight = world.getBlockLightLevel(player:getPos():add(0, .4, 0))
local skyLight = world.getSkyLightLevel(player:getPos():add(0, .4, 0))
models:setLight(blockLight, skyLight)

getLight()

Gets the light level you set earlier to this part

Does not interact with Minecraft's lighting system, only retrieving values you set earlier with setLight()

getLight()

Returns:

TypeDescription
Vector2-

Example:

models:getLight()

setOverlay()

Aliases: overlay()

Sets the overlay color to be used when rendering this part

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 part

setOverlay(overlay)

Parameters:

NameTypeDescriptionDefault
overlayVector2--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

-- Example for a hurt overlay
local hurt = player:getNbt().HurtTime > 0
models:setOverlay(hurt and 0 or nil, 1)

getOverlay()

Gets the overlay color you set earlier to this part

Does not interact with Minecraft's overlay system, only retrieving values you set earlier with setOverlay()

getOverlay()

Returns:

TypeDescription
Vector2-

Example:

models:getOverlay()

setColor()

Aliases: color()

Sets the color multiplier for this part for primary and secondary colors

Values are RGB from 0 to 1

setColor(color)

Parameters:

NameTypeDescriptionDefault
colorVector3--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setColor(0 / 255, 0 / 255, 255 / 255)

getColor()

Returns the average set color from this part, as adding the primary color with the secondary, then dividing them

Values are RGB from 0 to 1

getColor()

Returns:

TypeDescription
Vector3-

Example:

models:getColor()

setPrimaryColor()

Aliases: primaryColor()

Sets the primary color multiplier for this part

Values are RGB from 0 to 1

setPrimaryColor(color)

Parameters:

NameTypeDescriptionDefault
colorVector3--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setPrimaryColor(0 / 255, 0 / 255, 255 / 255)

getPrimaryColor()

Gets the primary color multiplier of this part

Values are RGB from 0 to 1

getPrimaryColor()

Returns:

TypeDescription
Vector3-

Example:

models:getPrimaryColor()

setSecondaryColor()

Aliases: secondaryColor()

Sets the secondary color multiplier for this part

Values are RGB from 0 to 1

setSecondaryColor(color)

Parameters:

NameTypeDescriptionDefault
colorVector3--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setSecondaryColor(0 / 255, 0 / 255, 255 / 255)

getSecondaryColor()

Gets the secondary color multiplier of this part

Values are RGB from 0 to 1

getSecondaryColor()

Returns:

TypeDescription
Vector3-

Example:

models:getSecondaryColor()

setPreRender()

Sets a function to run before this part starts being rendered

setPreRender(function)

Parameters:

NameTypeDescriptionDefault
functionFunction--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setPreRender(function()
print("PreRender!")
end)

setMidRender()

Sets a function to run during the middle of this part's rendering, after its matrices are calculated

setMidRender(function)

Parameters:

NameTypeDescriptionDefault
functionFunction--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setMidRender(function()
print("MidRender!")
end)

setPostRender()

Sets a function to run after this part and its children are rendered

setPostRender(function)

Parameters:

NameTypeDescriptionDefault
functionFunction--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setPostRender(function()
print("PostRender!")
end)

Animations

getAnimRot()

Gets the rotation offset provided by the currently active animation of this model part

getAnimRot()

Returns:

TypeDescription
Vector3-

Example:

models:getAnimRot()

getAnimPos()

Gets the position offset provided by the currently active animation of this model part

getAnimPos()

Returns:

TypeDescription
Vector3-

Example:

models:getAnimPos()

getAnimScale()

Gets the scale multiplier provided by the currently active animation of this model part

getAnimScale()

Returns:

TypeDescription
Vector3-

Example:

models:getAnimScale()

overrideVanillaRot()

Returns if this part vanilla rotation is being overridden by an animation

overrideVanillaRot()

Returns:

TypeDescription
Boolean-

Example:

models:overrideVanillaRot()

overrideVanillaPos()

Returns if this part vanilla position is being overridden by an animation

overrideVanillaPos()

Returns:

TypeDescription
Boolean-

Example:

models:overrideVanillaPos()

overrideVanillaScale()

Returns if this part vanilla scale is being overridden by an animation

overrideVanillaScale()

Returns:

TypeDescription
Boolean-

Example:

models:overrideVanillaScale()

Texturing

setPrimaryTexture()

Aliases: primaryTexture()

Sets the primary texture override of this part

Check the TextureType types in the list docs

If using "resource", the second parameter should indicate the path to the Minecraft texture you want to use

If using "custom", the second parameter should indicate a texture object

setPrimaryTexture(textureType)

Parameters:

NameTypeDescriptionDefault
textureTypeString--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

-- Vanilla Skin
models:setPrimaryTexture("Skin")
-- Custom Texture
models:setPrimaryTexture("Custom", textures["myTexture"])
-- Minecraft Resource
models:setPrimaryTexture("Resource", "textures/entity/pig/pig.png")

getPrimaryTexture()

Gets the primary texture of this part

Returns two values, first being the override type, second being the texture object, if any.

getPrimaryTexture()

Returns:

TypeDescription
TextureTypeOverride type
String or TexturePrimary texture

Example:

local texType, tex = models:getPrimaryTexture() -- this saves both of the potential returns to two variables in a single line of code
log(textType, tex)

getPrimaryDefinedTextures()

Gets the primary textures of this part

Returns a table of each texture for the specified face.

getPrimaryDefinedTextures()

Returns:

TypeDescription
AnyType-

Example:

models:getPrimaryDefinedTextures()

setSecondaryTexture()

Aliases: secondaryTexture()

Sets the secondary texture override of this part

Check the TextureType types in the list docs

If using "resource", the second parameter should indicate the path to the Minecraft texture you want to use

If using "custom", the second parameter should indicate a texture object

setSecondaryTexture(textureType)

Parameters:

NameTypeDescriptionDefault
textureTypeString--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

-- Vanilla Skin
models:setSecondaryTexture("Skin")
-- Custom Texture
models:setSecondaryTexture("Custom", textures["myTexture"])
-- Minecraft Resource
models:setSecondaryTexture("Resource", "textures/entity/pig/pig.png")

getSecondaryTexture()

Gets the secondary texture of this part

Returns two values, first being the override type, second being the value, if any.

getSecondaryTexture()

Returns:

TypeDescription
TextureTypeOverride type
String or TextureSecondary texture

Example:

local texType, tex = models:getSecondaryTexture()

getSecondaryDefinedTextures()

Gets the secondary textures of this part

Returns a table of each texture for the specified face.

getSecondaryDefinedTextures()

Returns:

TypeDescription
AnyType-

Example:

models:getSecondaryDefinedTextures()

getTextures()

caution

This function is currently bugged, but it is mainly useless anyway

Returns a table with all textures used by this part

Does not include children textures, so groups usually will return an empty table

getTextures()

Returns:

TypeDescription
Table-

Example:

models:getTextures()

getTextureSize()

Gets the width, height of this part's texture in pixels

Throws an error if this part has multiple different-sized textures on it, or if the part is a Group

getTextureSize()

Returns:

TypeDescription
Vector2-

Example:

models:getTextureSize()

setUV()

Aliases: uv()

Sets the UV of this part

This function is normalized, meaning it works with values 0 to 1

If you say setUV(0.5, 0.25), for example, it will scroll by half of your texture width to the right, and one-fourth of the texture width downwards

setUV(uv)

Parameters:

NameTypeDescriptionDefault
uvVector2--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setUV(0.5, 0.5)

getUV()

Gets the UV of this part

This function is normalized, meaning it will return values between 0 to 1

getUV()

Returns:

TypeDescription
Vector2-

Example:

models:getUV()

setUVPixels()

Aliases: uvPixels()

Sets the UV of this part in pixels

Automatically divides by the results of getTextureSize(), so you can just input the number of pixels you want the UV to scroll by

Errors if the part has multiple different-sized textures

If this part is a Group, it will attempt to setUVPixels on its children

setUVPixels(uv)

Parameters:

NameTypeDescriptionDefault
uvVector2--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setUVPixels(16.16)

getUVPixels()

Gets the UV of this part

Automatically multiplies the result by getTextureSize()

Errors if the part has multiple different-sized textures of if the part is a Group

getUVPixels()

Returns:

TypeDescription
Vector2-

Example:

models:getUVPixels()

setUVMatrix()

Aliases: uvMatrix()

Sets the UV matrix of this part

This matrix is applied to all UV points during the transform, with the UVs treated as homogeneous vectors

setUV() and setUVPixels() are just simpler ways of setting this matrix

setUVMatrix(matrix)

Parameters:

NameTypeDescriptionDefault
matrixMatrix3--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setUVMatrix(matrices.mat3())

getUVMatrix()

Gets the UV matrix of this part

getUVMatrix()

Returns:

TypeDescription
Matrix3-

Example:

models:getUVMatrix()

Render Tasks

newText()

Adds a new Text Render Task on this part

newText(taskName)

Parameters:

NameTypeDescriptionDefault
taskNameString--

Returns:

TypeDescription
TextTask-

Example:

models:newText("Example")

newEntity()

Adds a new Entity Render Task on this part

newEntity(taskName)

Parameters:

NameTypeDescriptionDefault
taskNameString--

Returns:

TypeDescription
EntityTask-

Example:

models:newEntity("Example")

newItem()

Adds a new Item Render Task on this part

newItem(taskName)

Parameters:

NameTypeDescriptionDefault
taskNameString--

Returns:

TypeDescription
ItemTask-

Example:

models:newItem("Example")

newBlock()

Adds a new Block Render Task on this part

newBlock(taskName)

Parameters:

NameTypeDescriptionDefault
taskNameString--

Returns:

TypeDescription
BlockTask-

Example:

models:newBlock("Example")

newSprite()

Adds a new Sprite Render Task on this part

newSprite(taskName)

Parameters:

NameTypeDescriptionDefault
taskNameString--

Returns:

TypeDescription
SpriteTask-

Example:

models:newSprite("Example")

addTask()

Adds the given Render Task on this part

addTask(renderTask)

Parameters:

NameTypeDescriptionDefault
renderTaskRenderTask--

Returns:

TypeDescription
RenderTask-

Example:

local myItem = models:newItem("foo")
myItem:setItem("slime_ball")
models.model.root.Head:addTask(myItem)

getTask()

Gets the Render Task with the given name from this part

Returns a table with all tasks if a name is not given

getTask()

Returns:

TypeDescription
Table-

Example:

models:getTask()

removeTask()

Removes the Task with the given name from this part

Removes ALL tasks if a name is not given

removeTask()

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:removeTask()

Misc

setParentType()

Aliases: parentType()

Sets the parent type of the part

See the ParentType parts in the list docs for legal types

setParentType(parentType)

Parameters:

NameTypeDescriptionDefault
parentTypeString--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:setParentType("Head")

getParentType()

Returns the current parent type of the part

getParentType()

Returns:

TypeDescription
String-

Example:

models:getParentType()

getVertices()

Return a table with all vertices from the given texture id

Returns nil if no vertices were found

getVertices(textureID)

Parameters:

NameTypeDescriptionDefault
textureIDString--

Returns:

TypeDescription
Table-

Example:

models:getVertices("myTexture")

getAllVertices()

Return a table of all texture ids and their vertices

getAllVertices()

Returns:

TypeDescription
Table-

Example:

models:getAllVertices()

getParent()

Gets the parent part of this part

If this part has no parent, returns nil

getParent()

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:getParentType()

remove()

Removes this part from the parent model part

remove()

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

-- halloween costume in one line!
models.model.root.Head:remove()

getChildren()

Gets the children of this part, stored in a table

getChildren()

Returns:

TypeDescription
Table-

Example:

models:getChildren()

isChildOf()

Checks if this part is a child of the given part

isChildOf(part)

Parameters:

NameTypeDescriptionDefault
partModelPart--

Returns:

TypeDescription
Boolean-

Example:

models:isChildOf(models)

moveTo()

Moves this part to be a child of the given part

moveTo(part)

Parameters:

NameTypeDescriptionDefault
partModelPart--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:moveTo(models)
-- This is recursive

addChild()

Adds the given part into this part's children list

addChild(part)

Parameters:

NameTypeDescriptionDefault
partModelPart--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:addChild(models)
-- This is recursive

removeChild()

Removes the given part from this part's children list

removeChild(part)

Parameters:

NameTypeDescriptionDefault
partModelPart--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:removeChild(models)
-- This is recursive

copy()

Returns a copy of this part, with all customizations and vertices copied

Children parts are passed as reference, in a new list

copy(name)

Parameters:

NameTypeDescriptionDefault
nameString--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

models:copy("Example")

newPart()

Creates a new, empty, group model part as a child of this part, at the same pivot point

Takes two arguments, the new part's name, and optionally its parent type

newPart(name)

Parameters:

NameTypeDescriptionDefault
nameString--

Returns:

TypeDescription
ModelPartReturns self for chaining

Example:

-- Example with same parent type
models:newPart("Example")
-- Example with different parent type
models:newPart("Example", "Head")

Fields

preRender

Function to run before this part starts being rendered


midRender

Function to run during the middle of this part's rendering, after its matrices are calculated


postRender

Function to run after this part and its children are rendered