@souldi/try-on 0.1.52 → 0.1.54

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.
@@ -148,6 +148,13 @@ async function e(e, t, n = []) {
148
148
  i.push(L(a ? a.cx : 0, t, a ? a.z1 : A.zF));
149
149
  }
150
150
  z(i, !1, .65 * b, t), R.inseam = i[i.length - 1].clone();
151
+ }, oe = (e, t) => {
152
+ let n = A.shY - .02, r = n - Math.max(e, 4) * b * .9, i = [];
153
+ for (let e = 0; e <= 10; e++) {
154
+ let t = n + (r - n) * (e / 10), a = T(t, -.19, .19);
155
+ i.push(L(a ? a.cx : 0, t, a ? a.z1 : A.zF));
156
+ }
157
+ z(i, !1, .65 * b, t), R.torso_length = i[i.length - 1].clone();
151
158
  }, H = (e) => {
152
159
  for (; F.children.length;) {
153
160
  let e = F.children.pop();
@@ -157,7 +164,7 @@ async function e(e, t, n = []) {
157
164
  for (let e in R) delete R[e];
158
165
  for (let t of e) {
159
166
  let e = t.color || I;
160
- t.key === "chest" ? ne(B(A.rx, .012, t.easeCm), e) : t.key === "waist" && A.waistRow ? V(A.waistRow, B(A.waistRow.t.w / 2, .008, t.easeCm), "waist", e) : t.key === "hips" && A.hipsRow ? V(A.hipsRow, B(A.hipsRow.t.w / 2, .008, t.easeCm), "hips", e) : t.key === "shoulder_width" ? re(te(A.shHalf, .015, t.easeCm), e) : t.key === "sleeve_length" ? ie(20 + t.easeCm, e) : t.key === "inseam" && ae(60 + t.easeCm, e);
167
+ t.key === "chest" ? ne(B(A.rx, .012, t.easeCm), e) : t.key === "waist" && A.waistRow ? V(A.waistRow, B(A.waistRow.t.w / 2, .008, t.easeCm), "waist", e) : t.key === "hips" && A.hipsRow ? V(A.hipsRow, B(A.hipsRow.t.w / 2, .008, t.easeCm), "hips", e) : t.key === "shoulder_width" ? re(te(A.shHalf, .015, t.easeCm), e) : t.key === "sleeve_length" ? ie(20 + t.easeCm, e) : t.key === "inseam" ? ae(60 + t.easeCm, e) : t.key === "torso_length" && oe(65 + t.easeCm, e);
161
168
  }
162
169
  };
163
170
  H(n);
@@ -178,7 +185,7 @@ async function e(e, t, n = []) {
178
185
  let a = document.createElementNS(W, "circle");
179
186
  a.setAttribute("r", "2.2"), a.setAttribute("fill", "#1c1c16"), a.setAttribute("fill-opacity", "0.55"), G.appendChild(a), q[e.key] = t, J[e.key] = r, Y[e.key] = i, X[e.key] = a;
180
187
  });
181
- let oe = () => {
188
+ let se = () => {
182
189
  let t = e.clientWidth, n = e.clientHeight;
183
190
  if (!t || !n) return;
184
191
  G.setAttribute("width", String(t)), G.setAttribute("height", String(n));
@@ -207,7 +214,7 @@ async function e(e, t, n = []) {
207
214
  });
208
215
  });
209
216
  }, Z = () => {
210
- a || (l.render(o, N), oe());
217
+ a || (l.render(o, N), se());
211
218
  };
212
219
  Z();
213
220
  let Q = new ResizeObserver(() => {