textmode.js 0.2.0-beta.4 → 0.2.0-beta.5

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.
@@ -429,8 +429,8 @@ class rt {
429
429
  p.tt(), p.st({ u_src0: f.textures[0], u_src1: f.textures[1], u_src2: f.textures[2], u_src3: f.textures[3], u_src4: f.textures[4], u_srcSize: [f.width, f.height] });
430
430
  const m = U(u) || u.getParameter(u.VIEWPORT);
431
431
  p.rt("u_aspectRatio") && p.it("u_aspectRatio", m[2] / m[3]), p.rt("u_viewportSize") && p.it("u_viewportSize", [m[2], m[3]]);
432
- const E = Math.floor(s), v = Math.floor(n), b = Math.max(1, Math.floor(o)), _ = Math.max(1, Math.floor(h));
433
- if (i.Kt({ x: E, y: v, width: b, height: _ }, r), i.Yt()) {
432
+ const E = Math.floor(s), v = Math.floor(n), _ = Math.max(1, Math.floor(o)), b = Math.max(1, Math.floor(h));
433
+ if (i.Kt({ x: E, y: v, width: _, height: b }, r), i.Yt()) {
434
434
  const y = i.unitGeometry, P = i.unitBuffer;
435
435
  try {
436
436
  this.Vt.kt(p.ot, i.type + "", y, P), i.batch.qt(p), i.batch.Zt(y.primitiveType, y.vertexCount);
@@ -1166,7 +1166,7 @@ class Et {
1166
1166
  return this.Es.Ps(t, e);
1167
1167
  }
1168
1168
  }
1169
- class bt {
1169
+ class _t {
1170
1170
  constructor(t) {
1171
1171
  c(this, "Ws");
1172
1172
  c(this, "ks");
@@ -1188,7 +1188,7 @@ class bt {
1188
1188
  for (let o = 0; o < t.length; o++) {
1189
1189
  const h = o % r, l = Math.floor(o / r), d = t[o].character, u = this.Hs(s, d);
1190
1190
  if (!u) continue;
1191
- const f = d.codePointAt(0) || 0, g = this.Vs.vs(s, f), p = this.Xs(s, g) * n, m = h * e.width, E = l * e.height, v = m + 0.5 * e.width, b = E + 0.5 * e.height, _ = Math.round(v - 0.5 * e.width), y = Math.round(b - 0.5 * i), P = _ + 0.5 * (e.width - p), Z = y + s.hhea.ascender * n;
1191
+ const f = d.codePointAt(0) || 0, g = this.Vs.vs(s, f), p = this.Xs(s, g) * n, m = h * e.width, E = l * e.height, v = m + 0.5 * e.width, _ = E + 0.5 * e.height, b = Math.round(v - 0.5 * e.width), y = Math.round(_ - 0.5 * i), P = b + 0.5 * (e.width - p), Z = y + s.hhea.ascender * n;
1192
1192
  this.Ys(u, P, Z, n);
1193
1193
  }
1194
1194
  }
@@ -1227,11 +1227,11 @@ class bt {
1227
1227
  const m = e + s[p] * i, E = r - n[p] * i;
1228
1228
  let v = p + 1 > u ? l : p + 1;
1229
1229
  if (1 & h[v]) {
1230
- const b = e + s[v] * i, _ = r - n[v] * i;
1231
- this.ks.quadraticCurveTo(m, E, b, _), p = v + 1;
1230
+ const _ = e + s[v] * i, b = r - n[v] * i;
1231
+ this.ks.quadraticCurveTo(m, E, _, b), p = v + 1;
1232
1232
  } else {
1233
- const b = (m + (e + s[v] * i)) / 2, _ = (E + (r - n[v] * i)) / 2;
1234
- this.ks.quadraticCurveTo(m, E, b, _), p = v;
1233
+ const _ = (m + (e + s[v] * i)) / 2, b = (E + (r - n[v] * i)) / 2;
1234
+ this.ks.quadraticCurveTo(m, E, _, b), p = v;
1235
1235
  }
1236
1236
  }
1237
1237
  this.ks.closePath();
@@ -1242,7 +1242,7 @@ class bt {
1242
1242
  this.ks.fill();
1243
1243
  }
1244
1244
  }
1245
- class _t {
1245
+ class bt {
1246
1246
  constructor() {
1247
1247
  c(this, "Ss");
1248
1248
  this.Ss = new z();
@@ -1311,7 +1311,7 @@ class Tt {
1311
1311
  c(this, "oi");
1312
1312
  c(this, "ai");
1313
1313
  c(this, "hi");
1314
- this.ti = e, this.ni = new Et(), this.oi = new bt(t), this.ai = new _t(), this.hi = new wt();
1314
+ this.ti = e, this.ni = new Et(), this.oi = new _t(t), this.ai = new bt(), this.hi = new wt();
1315
1315
  }
1316
1316
  async ci(t) {
1317
1317
  let e;
@@ -1723,13 +1723,13 @@ class It {
1723
1723
  l += `L${E.toFixed(2)},${v.toFixed(2)}`, m++;
1724
1724
  } else {
1725
1725
  const E = e + s[m] * i, v = r - n[m] * i;
1726
- let b = m + 1 > f ? d : m + 1;
1727
- if (1 & h[b]) {
1728
- const _ = e + s[b] * i, y = r - n[b] * i;
1729
- l += `Q${E.toFixed(2)},${v.toFixed(2)} ${_.toFixed(2)},${y.toFixed(2)}`, m = b + 1;
1726
+ let _ = m + 1 > f ? d : m + 1;
1727
+ if (1 & h[_]) {
1728
+ const b = e + s[_] * i, y = r - n[_] * i;
1729
+ l += `Q${E.toFixed(2)},${v.toFixed(2)} ${b.toFixed(2)},${y.toFixed(2)}`, m = _ + 1;
1730
1730
  } else {
1731
- const _ = (E + (e + s[b] * i)) / 2, y = (v + (r - n[b] * i)) / 2;
1732
- l += `Q${E.toFixed(2)},${v.toFixed(2)} ${_.toFixed(2)},${y.toFixed(2)}`, m = b;
1731
+ const b = (E + (e + s[_] * i)) / 2, y = (v + (r - n[_] * i)) / 2;
1732
+ l += `Q${E.toFixed(2)},${v.toFixed(2)} ${b.toFixed(2)},${y.toFixed(2)}`, m = _;
1733
1733
  }
1734
1734
  }
1735
1735
  l += "Z";
@@ -2136,7 +2136,7 @@ class N {
2136
2136
  I.v(t);
2137
2137
  }
2138
2138
  static get version() {
2139
- return "0.2.0-beta.4";
2139
+ return "0.2.0-beta.5";
2140
2140
  }
2141
2141
  }
2142
2142
  const Zt = Object.freeze(Object.defineProperty({ __proto__: null }, Symbol.toStringTag, { value: "Module" })), Kt = N.create, qt = N.setErrorLevel, Jt = N.version;