Appearance
anim-format (runtime format) / softMesh
Function: softMesh()
ts
function softMesh(
rest,
drawn,
tris,
level
): object;A mesh object's SOFTNESS (owner 2026-11-07, like subdivision surfaces): the user's points stay where they are (the first rest.length / 2 points, same order) and level times every triangle is split in four, the new points pulled along a smooth curve through their neighbours' pulls (each point's slope = the least-squares gradient of the pulls around it; edge middle = cubic Hermite midpoint) — so bends come out round instead of folded at the triangle edges. Interpolating: a pull that changes evenly (moves, turns, scales, shears) is drawn exactly as without softness, and no pull = nothing changes. Rest points of the new points are halfway between theirs (the flat picture is not bent). drawn absent = rest (nothing to soften).
Parameters
| Parameter | Type |
|---|---|
rest | readonly number[] |
drawn | readonly number[] | null | undefined |
tris | readonly number[] |
level | number |
Returns
object
| Name | Type |
|---|---|
drawn | number[] |
rest | number[] |
tris | number[] |