Skip to content

1681-engine / pixel / buildRig

Function: buildRig() ​

ts
function buildRig(
   def, 
   w, 
   h, 
   rowWidths?, 
   variant?
): SwayRig;

Defined in: src/pixel/swayRig.ts:136

The rig for one prop frame wxh. rowWidths is only read by a crown, whose pivot comes from the pixels (without it, or without a trunk in them, the crown falls back to the top 60%). variant is only read by tufts, whose rects are drawn per variant.

Parameters ​

ParameterTypeDefault value
defSwayDefundefined
wnumberundefined
hnumberundefined
rowWidths?readonly number[]undefined
variant?number0

Returns ​

SwayRig

Released under the MIT License.