--- title: Layout on a chain --- Similar to layout on a path, you can use a chain as a layout guide for a row of child models within a model. Call makerjs.layout.childrenOnChain(parentModel: Model, onChain: chain), the x-axis will be projected onto your onChain: {% highlight javascript %} //render a row of squares on a chain var makerjs = require('makerjs'); var square = new makerjs.models.Square(5); var row = makerjs.layout.cloneToRow(square, 10, 10); var curve = new makerjs.models.BezierCurve([0, 0], [33, 25], [66, -25], [100, 0]); var chain = makerjs.model.findSingleChain(curve); makerjs.layout.childrenOnChain(row, chain, 0.5, false, true); var model = { models: { curve: curve, row: row } }; curve.layer = "red"; var svg = makerjs.exporter.toSVG(model); document.write(svg); {% endhighlight %} There are additional optional parameters to this makerjs.layout.childrenOnChain: