Sidewalk Spline Kit
Handles loading sidewalk mesh kits from folders - discovers meshes, extracts anchor points, groups base meshes with variations, and builds distribution groups for piece selection.
Handles loading sidewalk mesh kits from folders - discovers meshes, extracts anchor points, groups base meshes with variations, and builds distribution groups for piece selection.
Public API
| Function | Signature | Description |
|---|---|---|
M.getSidewalkKit | (kitFolderPath) | Scans a folder for .dae files and returns a mesh kit array |
M.buildSidewalkKit | (meshKit, spline) | Pre-computes piece data, groups variations with base meshes, builds kit description |
M.buildDistributionGroups | (spline) | Builds weighted distribution groups for efficient piece selection during population |
M.getRectAndPizzaMeshPaths | (meshKit) | Extracts paths for square.dae (rect) and triangle.dae (pizza) special meshes |
M.getPieceEnabled | (spline, pieceId) | Returns whether a piece is enabled for the given spline |
M.setPieceEnabled | (spline, pieceId, enabled) | Sets the enabled state for a piece |
Mesh Kit Structure
local meshKit = {
{ id = "uuid", meshPath = "/path/to/piece.dae", fileName = "piece.dae", folderPath = "/path/to/" },
...
}Kit Description Structure
local kitDescription = {
pieces = {
{
pieceIndex = 1,
baseMesh = { meshPath = "...", fileName = "sidewalk_straight.dae" },
anchors = { leftA = vec3(...), rightA = vec3(...) },
variations = {
{ varId = "uuid_var1", meshPath = "...", fileName = "sidewalk_straight_var1.dae" },
},
isEnabled = true,
},
},
folderPath = "/path/to/kit/",
}Anchor Point Format
Anchor points are read from mesh node names matching: sidewalk.<identifier>
Examples: sidewalk.leftA, sidewalk.rightB
Naming Conventions
| Pattern | Meaning |
|---|---|
piece.dae | Base mesh |
piece_var1.dae | Variation 1 of piece.dae |
square.dae | Rectangular fill piece |
triangle.dae | Pizza (triangular) fill piece |
Notes
- Uses
TSStatictemporarily to read anchor point names from meshes - Variations are detected by
"var"substring in filename (case-insensitive) - Distribution groups support weighted random and round-robin selection
- Piece enabled states are stored per-spline in
spline.pieceEnabledStates
See Also
- Sidewalk Spline Populate - Related reference
- Sidewalk Spline Manager - Related reference
- World Editor Guide - Guide
Road Spline Layer Manager
Manages the DecalRoad layers within road spline groups - handles layer creation, removal, duplication, chunking for long splines, and all auto-generated detail layer types.
Sidewalk Spline Populate
Handles the procedural placement of sidewalk meshes along splines - places rectangular pieces along the path with parallel-transport framing, fills gaps with triangular "pizza" pieces at turns, and ma