Skip to main content

ScaleModelUtils

Utility methods to scale a model

Functions

scalePartSize

ScaleModelUtils.scalePartSize(
partBasePart,
scalenumber
) → ()

Scales a given part's size and any mesh underneath it.

scalePart

ScaleModelUtils.scalePart(
partBasePart,
scalenumber,
centroidVector3
) → ()

Scales the part around the centroid

scale

ScaleModelUtils.scale(
parts{BasePart},--

Table of parts, the parts to scale

scalenumber,--

The scale to scale by

centroidVector3--

the center to scale by

) → ()

Scales a group of parts around a centroid

createMeshFromPart

ScaleModelUtils.createMeshFromPart(partBasePart) → Mesh?

Given a part, creates a mesh for that part type if possible

Show raw api
{
    "functions": [
        {
            "name": "scalePartSize",
            "desc": "Scales a given part's size and any mesh underneath it.",
            "params": [
                {
                    "name": "part",
                    "desc": "",
                    "lua_type": "BasePart"
                },
                {
                    "name": "scale",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 20,
                "path": "src/geometryutils/src/Shared/ScaleModelUtils.lua"
            }
        },
        {
            "name": "scalePart",
            "desc": "Scales the part around the centroid",
            "params": [
                {
                    "name": "part",
                    "desc": "",
                    "lua_type": "BasePart"
                },
                {
                    "name": "scale",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "centroid",
                    "desc": "",
                    "lua_type": "Vector3"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 64,
                "path": "src/geometryutils/src/Shared/ScaleModelUtils.lua"
            }
        },
        {
            "name": "scale",
            "desc": "Scales a group of parts around a centroid",
            "params": [
                {
                    "name": "parts",
                    "desc": "Table of parts, the parts to scale",
                    "lua_type": "{ BasePart }"
                },
                {
                    "name": "scale",
                    "desc": "The scale to scale by",
                    "lua_type": "number"
                },
                {
                    "name": "centroid",
                    "desc": "the center to scale by",
                    "lua_type": "Vector3"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 83,
                "path": "src/geometryutils/src/Shared/ScaleModelUtils.lua"
            }
        },
        {
            "name": "createMeshFromPart",
            "desc": "Given a part, creates a mesh for that part type if possible",
            "params": [
                {
                    "name": "part",
                    "desc": "",
                    "lua_type": "BasePart"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Mesh?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 95,
                "path": "src/geometryutils/src/Shared/ScaleModelUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "ScaleModelUtils",
    "desc": "Utility methods to scale a model",
    "source": {
        "line": 5,
        "path": "src/geometryutils/src/Shared/ScaleModelUtils.lua"
    }
}