MCPcopy Create free account
hub / github.com/alefore/knit / build

Method build

src/cable_pattern_factory.ts:314–328  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

312 }
313
314 build(): Pattern {
315 const output = new Pattern();
316 const marginType = this.marginTypeInput.value();
317 const marginDistance =
318 marginType == 'None' ? 0 : this.marginDistanceInput.numberValue();
319 const layout = new CableLayout(
320 this.cableCountInput.numberValue(),
321 this.rowsBetweenCablesInput.numberValue(),
322 this.cableEdgeRowsInput.numberValue(),
323 this.smoothingRowsInput.numberValue(),
324 this.innerCablesInput.value() == 'Enable', marginType as 'None' | 'ICord' | 'Knit', marginDistance);
325 for (let row = 0; row < 2 * layout.rowsCount; row++)
326 output.addRow(layout.computeRow(row));
327 return output;
328 }
329}
330
331PatternFactoryRegistry.register('Cables', CablePatternFactory);

Callers

nothing calls this directly

Calls 4

addRowMethod · 0.95
computeRowMethod · 0.95
valueMethod · 0.80
numberValueMethod · 0.80

Tested by

no test coverage detected