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

Method constructor

src/triangles_pattern_factory.ts:106–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104 sections: Section[];
105
106 constructor() {
107 this.knittingStyleInput = new PatternFactoryInput(
108 'Knitting Style', 'Should the piece be knit in the round or flat?',
109 RowSwitchStyles.round, null, Object.values(RowSwitchStyles));
110 this.lengthInput = new PatternFactoryInput(
111 'Length', 'How long should the set of triangles be?', 30, 'rows');
112 this.sectionCountInput = new PatternFactoryInput(
113 'Sections', 'How many sections should the polygon have?', 4,
114 'sections');
115 this.sections = Array.from(
116 {length: 20},
117 (_, index) => new Section(
118 index, this.sectionCountInput, this.knittingStyleInput));
119 }
120
121 getInputs(): PatternFactoryInput[] {
122 return [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected