@automovie/human 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +11 -13
  2. package/lib/generation/{AutoMovieHumanLegSection.d.ts → AutoMovieHumanLegSectionProportion.d.ts} +1 -1
  3. package/lib/generation/{AutoMovieHumanLegSection.js → AutoMovieHumanLegSectionProportion.js} +17 -14
  4. package/lib/generation/AutoMovieHumanLegSectionProportion.js.map +1 -0
  5. package/lib/generation/arm/AutoMovieHumanArmFrame.js +2 -2
  6. package/lib/generation/arm/AutoMovieHumanArmFrame.js.map +1 -1
  7. package/lib/generation/arm/index.d.ts +28 -0
  8. package/lib/generation/arm/index.js +45 -0
  9. package/lib/generation/arm/index.js.map +1 -0
  10. package/lib/generation/foot/index.d.ts +51 -0
  11. package/lib/generation/foot/index.js +68 -0
  12. package/lib/generation/foot/index.js.map +1 -0
  13. package/lib/generation/hand/index.d.ts +53 -0
  14. package/lib/generation/hand/index.js +70 -0
  15. package/lib/generation/hand/index.js.map +1 -0
  16. package/lib/generation/head/index.d.ts +37 -0
  17. package/lib/generation/head/index.js +54 -0
  18. package/lib/generation/head/index.js.map +1 -0
  19. package/lib/generation/index.d.ts +176 -0
  20. package/lib/generation/index.js +193 -0
  21. package/lib/generation/index.js.map +1 -0
  22. package/lib/generation/leg/AutoMovieHumanLegLaws.d.ts +1 -1
  23. package/lib/generation/leg/AutoMovieHumanLegLaws.js +23 -11
  24. package/lib/generation/leg/AutoMovieHumanLegLaws.js.map +1 -1
  25. package/lib/generation/leg/index.d.ts +34 -0
  26. package/lib/generation/leg/index.js +51 -0
  27. package/lib/generation/leg/index.js.map +1 -0
  28. package/lib/generation/limb/{AutoMovieHumanJointTurn.d.ts → AutoMovieHumanBendArc.d.ts} +1 -1
  29. package/lib/generation/limb/{AutoMovieHumanJointTurn.js → AutoMovieHumanBendArc.js} +12 -8
  30. package/lib/generation/limb/AutoMovieHumanBendArc.js.map +1 -0
  31. package/lib/generation/limb/AutoMovieHumanDigitWalk.js +2 -2
  32. package/lib/generation/limb/AutoMovieHumanDigitWalk.js.map +1 -1
  33. package/lib/generation/limb/AutoMovieHumanWalkPart.js +72 -17
  34. package/lib/generation/limb/AutoMovieHumanWalkPart.js.map +1 -1
  35. package/lib/generation/limb/index.d.ts +12 -0
  36. package/lib/generation/limb/index.js +29 -0
  37. package/lib/generation/limb/index.js.map +1 -0
  38. package/lib/generation/trunk/index.d.ts +17 -0
  39. package/lib/generation/trunk/index.js +34 -0
  40. package/lib/generation/trunk/index.js.map +1 -0
  41. package/lib/generation/web/index.d.ts +14 -0
  42. package/lib/generation/web/index.js +31 -0
  43. package/lib/generation/web/index.js.map +1 -0
  44. package/lib/index.d.ts +3 -4
  45. package/lib/index.js +3 -9
  46. package/lib/index.js.map +1 -1
  47. package/lib/lofting/index.d.ts +14 -0
  48. package/lib/lofting/index.js +31 -0
  49. package/lib/lofting/index.js.map +1 -0
  50. package/lib/skeleton/index.d.ts +28 -0
  51. package/lib/skeleton/index.js +45 -0
  52. package/lib/skeleton/index.js.map +1 -0
  53. package/lib/structures/index.d.ts +2 -2
  54. package/lib/structures/index.js +2 -2
  55. package/lib/structures/index.js.map +1 -1
  56. package/lib/typings/index.d.ts +1 -1
  57. package/lib/typings/index.js +1 -1
  58. package/lib/typings/index.js.map +1 -1
  59. package/package.json +6 -6
  60. package/src/generation/{AutoMovieHumanLegSection.ts → AutoMovieHumanLegSectionProportion.ts} +15 -6
  61. package/src/generation/arm/AutoMovieHumanArmFrame.ts +2 -2
  62. package/src/generation/arm/index.ts +28 -0
  63. package/src/generation/foot/index.ts +51 -0
  64. package/src/generation/hand/index.ts +53 -0
  65. package/src/generation/head/index.ts +37 -0
  66. package/src/generation/index.ts +176 -0
  67. package/src/generation/leg/AutoMovieHumanLegLaws.ts +80 -25
  68. package/src/generation/leg/index.ts +34 -0
  69. package/src/generation/limb/{AutoMovieHumanJointTurn.ts → AutoMovieHumanBendArc.ts} +39 -11
  70. package/src/generation/limb/AutoMovieHumanDigitWalk.ts +2 -2
  71. package/src/generation/limb/AutoMovieHumanWalkPart.ts +163 -41
  72. package/src/generation/limb/index.ts +12 -0
  73. package/src/generation/trunk/index.ts +17 -0
  74. package/src/generation/web/index.ts +14 -0
  75. package/src/index.ts +3 -4
  76. package/src/lofting/index.ts +14 -0
  77. package/src/skeleton/index.ts +28 -0
  78. package/src/structures/index.ts +2 -2
  79. package/src/typings/index.ts +1 -1
  80. package/lib/generation/AutoMovieHumanLegSection.js.map +0 -1
  81. package/lib/generation/limb/AutoMovieHumanJointTurn.js.map +0 -1
@@ -1,8 +1,9 @@
1
1
  import { AutoMovieConstructionViews } from "@automovie/engine";
2
+
2
3
  import { AutoMovieHumanConstructionView } from "./AutoMovieHumanConstructionView";
3
4
 
4
5
  /** Convert a geometric bend-radius condition into the engine's jointed-axis half arclength. */
5
- export namespace AutoMovieHumanJointTurn {
6
+ export namespace AutoMovieHumanBendArc {
6
7
  /**
7
8
  * Half arclength whose peak curvature is `1/radius` for the engine's
8
9
  * quintic smoothstep angle law: kappa=theta*S'(t)/(2h), max S'=15/8,
@@ -17,20 +18,47 @@ export namespace AutoMovieHumanJointTurn {
17
18
  * @evidence contracts/performance.md#reuse-equivalent-work The same conversion serves fingers, thumbs and their shared walk.
18
19
  * @evidence contracts/performance.md#bound-retention-and-release-resources Returns a scalar without retaining geometry.
19
20
  */
20
- export function half(before: readonly number[], joint: readonly number[], after: readonly number[], radius: number): number {
21
- const points: [number, number, number][] = [before, joint, after].map((point: readonly number[]): [number, number, number] => AutoMovieConstructionViews.point(AutoMovieHumanConstructionView.point(point)));
22
- const first: number[] = points[1]!.map((value: number, index: number): number => value - points[0]![index]!);
23
- const second: number[] = points[2]!.map((value: number, index: number): number => value - points[1]![index]!);
21
+ export function half(
22
+ before: readonly number[],
23
+ joint: readonly number[],
24
+ after: readonly number[],
25
+ radius: number,
26
+ ): number {
27
+ const points: [number, number, number][] = [before, joint, after].map(
28
+ (point: readonly number[]): [number, number, number] =>
29
+ AutoMovieConstructionViews.point(
30
+ AutoMovieHumanConstructionView.point(point),
31
+ ),
32
+ );
33
+ const first: number[] = points[1]!.map(
34
+ (value: number, index: number): number => value - points[0]![index]!,
35
+ );
36
+ const second: number[] = points[2]!.map(
37
+ (value: number, index: number): number => value - points[1]![index]!,
38
+ );
24
39
  const firstLength: number = Math.hypot(...first);
25
40
  const secondLength: number = Math.hypot(...second);
26
- if (!(firstLength > 0 && secondLength > 0 && radius > 0)) throw new Error("A joint turn needs positive segments and radius");
41
+ if (!(firstLength > 0 && secondLength > 0 && radius > 0))
42
+ throw new Error("A joint turn needs positive segments and radius");
27
43
  // Match the axis owner's unit-direction arithmetic: raw-vector cross
28
44
  // cancellation can otherwise call a tiny admitted turn exactly straight.
29
- const a: number[] = first.map((value: number): number => value * (1 / firstLength));
30
- const b: number[] = second.map((value: number): number => value * (1 / secondLength));
31
- const dot: number = a.reduce((sum: number, value: number, index: number): number => sum + value * b[index]!, 0);
32
- const cross: number[] = [a[1]! * b[2]! - a[2]! * b[1]!, a[2]! * b[0]! - a[0]! * b[2]!, a[0]! * b[1]! - a[1]! * b[0]!];
45
+ const a: number[] = first.map(
46
+ (value: number): number => value * (1 / firstLength),
47
+ );
48
+ const b: number[] = second.map(
49
+ (value: number): number => value * (1 / secondLength),
50
+ );
51
+ const dot: number = a.reduce(
52
+ (sum: number, value: number, index: number): number =>
53
+ sum + value * b[index]!,
54
+ 0,
55
+ );
56
+ const cross: number[] = [
57
+ a[1]! * b[2]! - a[2]! * b[1]!,
58
+ a[2]! * b[0]! - a[0]! * b[2]!,
59
+ a[0]! * b[1]! - a[1]! * b[0]!,
60
+ ];
33
61
  const angle: number = Math.atan2(Math.hypot(...cross), dot);
34
- return 15 * radius * angle / 16;
62
+ return (15 * radius * angle) / 16;
35
63
  }
36
64
  }
@@ -4,7 +4,7 @@ import type {
4
4
  } from "@automovie/engine";
5
5
 
6
6
  import type { AutoMovieHumanHandAttachment } from "../hand/AutoMovieHumanHandAttachment";
7
- import { AutoMovieHumanJointTurn } from "./AutoMovieHumanJointTurn";
7
+ import { AutoMovieHumanBendArc } from "./AutoMovieHumanBendArc";
8
8
  import { AutoMovieHumanSiteViewPart } from "./AutoMovieHumanSiteViewPart";
9
9
  import { AutoMovieHumanWalkPart } from "./AutoMovieHumanWalkPart";
10
10
 
@@ -165,7 +165,7 @@ export namespace AutoMovieHumanDigitWalk {
165
165
  const joints: { half: number }[] = Array.from(
166
166
  { length: bones - 1 },
167
167
  (_: unknown, k: number): { half: number } => ({
168
- half: AutoMovieHumanJointTurn.half(
168
+ half: AutoMovieHumanBendArc.half(
169
169
  input.centres[k]!,
170
170
  input.centres[k + 1]!,
171
171
  input.centres[k + 2]!,
@@ -1,7 +1,12 @@
1
- import { AutoMovieConstructionViews, type AutoMovieSolidVector, AutoMovieViewAxis } from "@automovie/engine";
1
+ import {
2
+ AutoMovieConstructionViews,
3
+ type AutoMovieSolidVector,
4
+ AutoMovieViewAxis,
5
+ } from "@automovie/engine";
6
+
7
+ import { AutoMovieHumanBendArc } from "./AutoMovieHumanBendArc";
2
8
  import { AutoMovieHumanConstructionView } from "./AutoMovieHumanConstructionView";
3
9
  import { AutoMovieHumanSiteViewPart } from "./AutoMovieHumanSiteViewPart";
4
- import { AutoMovieHumanJointTurn } from "./AutoMovieHumanJointTurn";
5
10
 
6
11
  type Vec3 = AutoMovieSolidVector.Vec3;
7
12
 
@@ -63,7 +68,11 @@ export namespace AutoMovieHumanWalkPart {
63
68
  ranges?: AutoMovieHumanSiteViewPart.IInput["ranges"];
64
69
 
65
70
  /** Optional material-frame transition between actual bone/share positions; signed up is projected into the endpoint's normal plane by the engine. */
66
- roll?: { from: { bone: number; share: number }; to: { bone: number; share: number }; up: Vec3 };
71
+ roll?: {
72
+ from: { bone: number; share: number };
73
+ to: { bone: number; share: number };
74
+ up: Vec3;
75
+ };
67
76
 
68
77
  /**
69
78
  * Whether the walk closes at its first centre in a G2 dome: the base of a
@@ -95,7 +104,21 @@ export namespace AutoMovieHumanWalkPart {
95
104
  */
96
105
  export function create(input: IInput): AutoMovieHumanSiteViewPart.IResult {
97
106
  const built: ISource | string = source(input);
98
- return typeof built === "string" ? { part: null, loft: null, view: null, diagnostics: [{ producer: `walk.${input.name}`, level: 2, contract: "axis", detail: built }] } : AutoMovieHumanSiteViewPart.create(built.input);
107
+ return typeof built === "string"
108
+ ? {
109
+ part: null,
110
+ loft: null,
111
+ view: null,
112
+ diagnostics: [
113
+ {
114
+ producer: `walk.${input.name}`,
115
+ level: 2,
116
+ contract: "axis",
117
+ detail: built,
118
+ },
119
+ ],
120
+ }
121
+ : AutoMovieHumanSiteViewPart.create(built.input);
99
122
  }
100
123
 
101
124
  /** The identical pre-loft declaration and its authoritative course mapping. */
@@ -121,45 +144,110 @@ export namespace AutoMovieHumanWalkPart {
121
144
  // reserving a fixed quarter segment for that numerical angle.
122
145
  const last: Vec3 = input.centres[input.centres.length - 1]!;
123
146
  const before: Vec3 = input.centres[input.centres.length - 2]!;
124
- const length: number = Math.hypot(last[0] - before[0], last[1] - before[1], last[2] - before[2]);
125
- if (!(length > 0)) return fail(`the last bone of ${input.centres.length} centres has no length`);
147
+ const length: number = Math.hypot(
148
+ last[0] - before[0],
149
+ last[1] - before[1],
150
+ last[2] - before[2],
151
+ );
152
+ if (!(length > 0))
153
+ return fail(
154
+ `the last bone of ${input.centres.length} centres has no length`,
155
+ );
126
156
  const tip: number = input.tip ?? 0;
127
- const raw: Vec3[] = tip > 0 ? [...input.centres, [0, 1, 2].map((c: number): number => last[c]! + ((last[c]! - before[c]!) * tip) / length) as Vec3] : [...input.centres];
157
+ const raw: Vec3[] =
158
+ tip > 0
159
+ ? [
160
+ ...input.centres,
161
+ [0, 1, 2].map(
162
+ (c: number): number =>
163
+ last[c]! + ((last[c]! - before[c]!) * tip) / length,
164
+ ) as Vec3,
165
+ ]
166
+ : [...input.centres];
128
167
  // The tree's metre record is authoritative for both the runs and the
129
168
  // reconstructed axis. A second mm-to-m conversion need not be bit-identical.
130
- const positions: ReturnType<typeof AutoMovieHumanConstructionView.point>[] = raw.map(AutoMovieHumanConstructionView.point);
169
+ const positions: ReturnType<typeof AutoMovieHumanConstructionView.point>[] =
170
+ raw.map(AutoMovieHumanConstructionView.point);
131
171
  const centres: Vec3[] = positions.map(AutoMovieConstructionViews.point);
132
- const metreHalves: number[] = [...input.joints.map((j: { half: number }): number => j.half), ...(tip > 0 ? [AutoMovieHumanJointTurn.half(before, last, raw.at(-1)!, Math.min(tip, length))] : [])].map((half: number): number => half * AutoMovieHumanConstructionView.METRES);
133
- const halves: number[] = metreHalves.map((half: number): number => half * 1000);
134
- const runs: AutoMovieViewAxis.IRun[] | string = AutoMovieViewAxis.runs(centres, halves);
172
+ const metreHalves: number[] = [
173
+ ...input.joints.map((j: { half: number }): number => j.half),
174
+ ...(tip > 0
175
+ ? [
176
+ AutoMovieHumanBendArc.half(
177
+ before,
178
+ last,
179
+ raw.at(-1)!,
180
+ Math.min(tip, length),
181
+ ),
182
+ ]
183
+ : []),
184
+ ].map(
185
+ (half: number): number => half * AutoMovieHumanConstructionView.METRES,
186
+ );
187
+ const halves: number[] = metreHalves.map(
188
+ (half: number): number => half * 1000,
189
+ );
190
+ const runs: AutoMovieViewAxis.IRun[] | string = AutoMovieViewAxis.runs(
191
+ centres,
192
+ halves,
193
+ );
135
194
  if (typeof runs === "string") return fail(runs);
136
195
 
137
196
  // Each site's station from its bone and share, then its edges in the
138
197
  // engine's chart.
139
198
  const sites: AutoMovieHumanSiteViewPart.ISite[] = input.sites.map(
140
- (s: ISite): AutoMovieHumanSiteViewPart.ISite => ({ site: s.site, station: station(centres, runs, s.bone, s.share), edges: engine(s.edges), fullness: s.fullness, ...(s.jets === undefined ? {} : { jets: engineJets(s.jets) }) }),
199
+ (s: ISite): AutoMovieHumanSiteViewPart.ISite => ({
200
+ site: s.site,
201
+ station: station(centres, runs, s.bone, s.share),
202
+ edges: engine(s.edges),
203
+ fullness: s.fullness,
204
+ ...(s.jets === undefined ? {} : { jets: engineJets(s.jets) }),
205
+ }),
141
206
  );
142
207
  const end: number = runs[input.centres.length - 2]!.end;
143
- return { runs, station: (bone: number, share: number): number => station(centres, runs, bone, share), input: {
144
- name: input.name,
145
- axis: {
146
- type: "jointed",
147
- centres: positions,
148
- halves: metreHalves,
149
- up: AutoMovieHumanConstructionView.direction(input.u),
150
- ...(input.roll === undefined ? {} : { roll: {
151
- from: station(centres, runs, input.roll.from.bone, input.roll.from.share) * AutoMovieHumanConstructionView.METRES,
152
- to: station(centres, runs, input.roll.to.bone, input.roll.to.share) * AutoMovieHumanConstructionView.METRES,
153
- up: AutoMovieHumanConstructionView.direction(input.roll.up),
154
- } }),
208
+ return {
209
+ runs,
210
+ station: (bone: number, share: number): number =>
211
+ station(centres, runs, bone, share),
212
+ input: {
213
+ name: input.name,
214
+ axis: {
215
+ type: "jointed",
216
+ centres: positions,
217
+ halves: metreHalves,
218
+ up: AutoMovieHumanConstructionView.direction(input.u),
219
+ ...(input.roll === undefined
220
+ ? {}
221
+ : {
222
+ roll: {
223
+ from:
224
+ station(
225
+ centres,
226
+ runs,
227
+ input.roll.from.bone,
228
+ input.roll.from.share,
229
+ ) * AutoMovieHumanConstructionView.METRES,
230
+ to:
231
+ station(
232
+ centres,
233
+ runs,
234
+ input.roll.to.bone,
235
+ input.roll.to.share,
236
+ ) * AutoMovieHumanConstructionView.METRES,
237
+ up: AutoMovieHumanConstructionView.direction(input.roll.up),
238
+ },
239
+ }),
240
+ },
241
+ sites,
242
+ ...(input.ranges === undefined
243
+ ? {}
244
+ : { ranges: engineRanges(input.ranges) }),
245
+ ...pole(input, tip > 0 ? runs[runs.length - 1]!.end : end),
246
+ order: input.order,
247
+ samples: input.samples,
248
+ gap: input.gap,
155
249
  },
156
- sites,
157
- ...(input.ranges === undefined ? {} : { ranges: engineRanges(input.ranges) }),
158
- ...pole(input, tip > 0 ? runs[runs.length - 1]!.end : end),
159
- order: input.order,
160
- samples: input.samples,
161
- gap: input.gap,
162
- } };
250
+ };
163
251
  }
164
252
 
165
253
  /**
@@ -176,7 +264,12 @@ export namespace AutoMovieHumanWalkPart {
176
264
  * @param share The share along it from its proximal centre.
177
265
  * @returns The station, mm.
178
266
  */
179
- function station(centres: readonly Vec3[], runs: readonly AutoMovieViewAxis.IRun[], bone: number, share: number): number {
267
+ function station(
268
+ centres: readonly Vec3[],
269
+ runs: readonly AutoMovieViewAxis.IRun[],
270
+ bone: number,
271
+ share: number,
272
+ ): number {
180
273
  const span = (i: number): number => {
181
274
  const a: Vec3 = centres[i]!;
182
275
  const b: Vec3 = centres[i + 1]!;
@@ -186,12 +279,19 @@ export namespace AutoMovieHumanWalkPart {
186
279
  const x: number = share * span(bone);
187
280
  if (x > run.to && bone + 1 < runs.length) {
188
281
  const next: AutoMovieViewAxis.IRun = runs[bone + 1]!;
189
- return run.end + ((x - run.to) * (next.start - run.end)) / (span(bone) - run.to + next.from);
282
+ return (
283
+ run.end +
284
+ ((x - run.to) * (next.start - run.end)) /
285
+ (span(bone) - run.to + next.from)
286
+ );
190
287
  }
191
288
  if (x < run.from && bone > 0) {
192
289
  const previous: AutoMovieViewAxis.IRun = runs[bone - 1]!;
193
290
  const back: number = span(bone - 1) - previous.to;
194
- return previous.end + ((back + x) * (run.start - previous.end)) / (back + run.from);
291
+ return (
292
+ previous.end +
293
+ ((back + x) * (run.start - previous.end)) / (back + run.from)
294
+ );
195
295
  }
196
296
  return run.start + (x - run.from);
197
297
  }
@@ -204,19 +304,37 @@ export namespace AutoMovieHumanWalkPart {
204
304
  * @param e The edges `[+u, +v, -u, -v]` in the walk's chart.
205
305
  * @returns The edges in the engine's chart.
206
306
  */
207
- function engine(e: readonly [number, number, number, number]): [number, number, number, number] {
307
+ function engine(
308
+ e: readonly [number, number, number, number],
309
+ ): [number, number, number, number] {
208
310
  return [e[0], -e[3], e[2], -e[1]];
209
311
  }
210
312
 
211
313
  /** Carry derivatives of the same signed edges through the side-pair reflection; their normalized parameter is unchanged. */
212
- function engineJets(jets: NonNullable<ISite["jets"]>): NonNullable<AutoMovieHumanSiteViewPart.ISite["jets"]> {
213
- const neg = (jet: (typeof jets)[number]): (typeof jets)[number] => jet === undefined ? undefined : { first: jet.first === null ? null : -jet.first, second: jet.second === null ? null : -jet.second };
314
+ function engineJets(
315
+ jets: NonNullable<ISite["jets"]>,
316
+ ): NonNullable<AutoMovieHumanSiteViewPart.ISite["jets"]> {
317
+ const neg = (jet: (typeof jets)[number]): (typeof jets)[number] =>
318
+ jet === undefined
319
+ ? undefined
320
+ : {
321
+ first: jet.first === null ? null : -jet.first,
322
+ second: jet.second === null ? null : -jet.second,
323
+ };
214
324
  return [jets[0], neg(jets[3]), jets[2], neg(jets[1])];
215
325
  }
216
326
 
217
327
  /** Negating a side edge exchanges its scalar bounds as well as their signs. */
218
- function engineRanges(ranges: NonNullable<IInput["ranges"]>): NonNullable<AutoMovieHumanSiteViewPart.IInput["ranges"]> {
219
- const neg = (range: (typeof ranges)[number]): (typeof ranges)[number] => range === undefined ? undefined : { minimum: range.maximum === null ? null : -range.maximum, maximum: range.minimum === null ? null : -range.minimum };
328
+ function engineRanges(
329
+ ranges: NonNullable<IInput["ranges"]>,
330
+ ): NonNullable<AutoMovieHumanSiteViewPart.IInput["ranges"]> {
331
+ const neg = (range: (typeof ranges)[number]): (typeof ranges)[number] =>
332
+ range === undefined
333
+ ? undefined
334
+ : {
335
+ minimum: range.maximum === null ? null : -range.maximum,
336
+ maximum: range.minimum === null ? null : -range.minimum,
337
+ };
220
338
  return [ranges[0], neg(ranges[3]), ranges[2], neg(ranges[1])];
221
339
  }
222
340
 
@@ -228,8 +346,12 @@ export namespace AutoMovieHumanWalkPart {
228
346
  * @param top The tip's station, mm: past the last centre by the tip, or the last centre's.
229
347
  * @returns The site part's pole, or nothing for two open ends.
230
348
  */
231
- function pole(input: IInput, top: number): Pick<AutoMovieHumanSiteViewPart.IInput, "pole"> {
232
- if (input.base === true && input.tip !== undefined) return { pole: { end: "both", bottom: 0, top } };
349
+ function pole(
350
+ input: IInput,
351
+ top: number,
352
+ ): Pick<AutoMovieHumanSiteViewPart.IInput, "pole"> {
353
+ if (input.base === true && input.tip !== undefined)
354
+ return { pole: { end: "both", bottom: 0, top } };
233
355
  if (input.base === true) return { pole: { end: "bottom", station: 0 } };
234
356
  if (input.tip !== undefined) return { pole: { end: "top", station: top } };
235
357
  return {};
@@ -0,0 +1,12 @@
1
+ export * from "./AutoMovieHumanBendArc";
2
+ export * from "./AutoMovieHumanConstructionView";
3
+ export * from "./AutoMovieHumanDigitInterim";
4
+ export * from "./AutoMovieHumanDigitWalk";
5
+ export * from "./AutoMovieHumanMassPart";
6
+ export * from "./AutoMovieHumanMassSource";
7
+ export * from "./AutoMovieHumanSiteConstraints";
8
+ export * from "./AutoMovieHumanSiteControls";
9
+ export * from "./AutoMovieHumanSiteDefinition";
10
+ export * from "./AutoMovieHumanSiteRegionControls";
11
+ export * from "./AutoMovieHumanSiteViewPart";
12
+ export * from "./AutoMovieHumanWalkPart";
@@ -0,0 +1,17 @@
1
+ export * from "./AutoMovieHumanBreastConnection";
2
+ export * from "./AutoMovieHumanGlutealConnection";
3
+ export * from "./AutoMovieHumanGlutealCut";
4
+ export * from "./AutoMovieHumanGlutealParent";
5
+ export * from "./AutoMovieHumanMassInterim";
6
+ export * from "./AutoMovieHumanTrunkAxis";
7
+ export * from "./AutoMovieHumanTrunkBuild";
8
+ export * from "./AutoMovieHumanTrunkConnection";
9
+ export * from "./AutoMovieHumanTrunkInterim";
10
+ export * from "./AutoMovieHumanTrunkLaws";
11
+ export * from "./AutoMovieHumanTrunkLegs";
12
+ export * from "./AutoMovieHumanTrunkMassPlacement";
13
+ export * from "./AutoMovieHumanTrunkSectionFamily";
14
+ export * from "./AutoMovieHumanTrunkTape";
15
+ export * from "./AutoMovieHumanTrunkViewPart";
16
+ export * from "./AutoMovieHumanTrunkViews";
17
+ export * from "./IAutoMovieHumanTrunkViews";
@@ -0,0 +1,14 @@
1
+ export * from "./AutoMovieHumanWebColumns";
2
+ export * from "./AutoMovieHumanWebCrest";
3
+ export * from "./AutoMovieHumanWebCurve";
4
+ export * from "./AutoMovieHumanWebMesh";
5
+ export * from "./AutoMovieHumanWebSurface";
6
+ export * from "./IAutoMovieHumanWeb";
7
+ export * from "./IAutoMovieHumanWebBranch";
8
+ export * from "./IAutoMovieHumanWebChild";
9
+ export * from "./IAutoMovieHumanWebColumn";
10
+ export * from "./IAutoMovieHumanWebColumns";
11
+ export * from "./IAutoMovieHumanWebCrests";
12
+ export * from "./IAutoMovieHumanWebInput";
13
+ export * from "./IAutoMovieHumanWebResult";
14
+ export * from "./IAutoMovieHumanWebSurface";
package/src/index.ts CHANGED
@@ -1,6 +1,5 @@
1
+ export * from "./generation";
2
+ export * from "./lofting";
3
+ export * from "./skeleton";
1
4
  export * from "./structures";
2
5
  export * from "./typings";
3
- export { AutoMovieHumanSkeleton } from "./skeleton/AutoMovieHumanSkeleton";
4
- export { AutoMovieHumanCanonicalBody } from "./skeleton/AutoMovieHumanCanonicalBody";
5
- export { AutoMovieHumanFootSurface } from "./generation/AutoMovieHumanFootSurface";
6
- export { AutoMovieHumanRigControls } from "./skeleton/AutoMovieHumanRigControls";
@@ -0,0 +1,14 @@
1
+ export * from "./AutoMovieHumanChordArc";
2
+ export * from "./AutoMovieHumanGuidePublish";
3
+ export * from "./AutoMovieHumanLoftAperture";
4
+ export * from "./AutoMovieHumanLoftMesh";
5
+ export * from "./AutoMovieHumanLoftStations";
6
+ export * from "./AutoMovieHumanMonotoneCubic";
7
+ export * from "./AutoMovieHumanPolarSection";
8
+ export * from "./AutoMovieHumanSeam";
9
+ export * from "./AutoMovieHumanSeamCarve";
10
+ export * from "./AutoMovieHumanSeamKnot";
11
+ export * from "./AutoMovieHumanSeamUnion";
12
+ export * from "./IAutoMovieHumanHermiteCurve";
13
+ export * from "./IAutoMovieHumanLoftAperture";
14
+ export * from "./IAutoMovieHumanSeam";
@@ -0,0 +1,28 @@
1
+ export * from "./AutoMovieHumanBindingInputs";
2
+ export * from "./AutoMovieHumanCanonicalBody";
3
+ export * from "./AutoMovieHumanCanonicalProfile";
4
+ export * from "./AutoMovieHumanCrotchBinding";
5
+ export * from "./AutoMovieHumanJointCentres";
6
+ export * from "./AutoMovieHumanJointTransition";
7
+ export * from "./AutoMovieHumanJointTurn";
8
+ export * from "./AutoMovieHumanLimbCapsule";
9
+ export * from "./AutoMovieHumanNeutral";
10
+ export * from "./AutoMovieHumanNeutralAnkle";
11
+ export * from "./AutoMovieHumanNeutralForearm";
12
+ export * from "./AutoMovieHumanNeutralHip";
13
+ export * from "./AutoMovieHumanNeutralKnuckle";
14
+ export * from "./AutoMovieHumanNeutralShoulder";
15
+ export * from "./AutoMovieHumanNeutralThumbCmc";
16
+ export * from "./AutoMovieHumanNeutralTurn";
17
+ export * from "./AutoMovieHumanPelvicShare";
18
+ export * from "./AutoMovieHumanPoseChannels";
19
+ export * from "./AutoMovieHumanPreparedKinematics";
20
+ export * from "./AutoMovieHumanRigControls";
21
+ export * from "./AutoMovieHumanSkeleton";
22
+ export * from "./AutoMovieHumanSkeletonMath";
23
+ export * from "./AutoMovieHumanSkinStep";
24
+ export * from "./IAutoMovieHumanBindingLimb";
25
+ export * from "./IAutoMovieHumanBindingLips";
26
+ export * from "./IAutoMovieHumanBindingPlane";
27
+ export * from "./IAutoMovieHumanChainRings";
28
+ export * from "./IAutoMovieHumanNeutralBody";
@@ -1,8 +1,8 @@
1
+ export * from "./IAutoMovieHumanGenerated";
2
+ export * from "./IAutoMovieHumanParameters";
1
3
  export * from "./appearance";
2
4
  export * from "./body";
3
5
  export * from "./common";
4
6
  export * from "./expression";
5
7
  export * from "./head";
6
8
  export * from "./pose";
7
- export * from "./IAutoMovieHumanGenerated";
8
- export * from "./IAutoMovieHumanParameters";
@@ -2,8 +2,8 @@ export * from "./AutoMovieHumanActionUnit";
2
2
  export * from "./AutoMovieHumanExpressionSide";
3
3
  export * from "./AutoMovieHumanHairColor";
4
4
  export * from "./AutoMovieHumanHairCurl";
5
- export * from "./AutoMovieHumanHairline";
6
5
  export * from "./AutoMovieHumanHairStyle";
6
+ export * from "./AutoMovieHumanHairline";
7
7
  export * from "./AutoMovieHumanIrisColor";
8
8
  export * from "./AutoMovieHumanLowerUnderwear";
9
9
  export * from "./AutoMovieHumanPopulation";
@@ -1 +0,0 @@
1
- {"version":3,"file":"AutoMovieHumanLegSection.js","sourceRoot":"","sources":["../../src/generation/AutoMovieHumanLegSection.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,IAAiB,wBAAwB,CAoExC;AApED,WAAiB,wBAAwB;IAavC,iCAAiC;IACpB,6BAAI,GAAoB;QACnC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC9C,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC7C,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC9C,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC7C,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC9C,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC7C,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC9C,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC7C,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC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