@netless/app-slide 0.2.94 → 0.2.96-alpha.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.
package/dist/main.es.js CHANGED
@@ -28682,6 +28682,9 @@ void main() {
28682
28682
  const t3 = l2 * u2;
28683
28683
  t3 > 2048 && (l2 *= u2 / t3);
28684
28684
  }
28685
+ if (Math.abs(l2 - 1) < 1e-3) {
28686
+ return { baseTexture: new Vh.c(a2, { resolution: 1 }), scale: 1 };
28687
+ }
28685
28688
  const c2 = Math.ceil(a2.width * l2), d2 = Math.ceil(a2.height * l2);
28686
28689
  let p2;
28687
28690
  try {
@@ -30038,10 +30041,10 @@ void main(void){
30038
30041
  if (r2) {
30039
30042
  const i3 = new ep();
30040
30043
  if (i3.texture = r2, n2.length > 0 && this.config.useFilter && (this.ctx.featureList || {}).filter && (i3.filters = av(n2, this.ctx.featureList)), this.config.fillFloat) {
30041
- const { l: n3, t: r3, r: o3, b: s2 } = this.config.fillFloat.fillRect, a2 = this.width * (1 - n3 - o3), l2 = this.height * (1 - r3 - s2), h2 = (null !== (t2 = this.config.shapeRotation) && void 0 !== t2 ? t2 : 0) + (null !== (e2 = this.config.groupRotation) && void 0 !== e2 ? e2 : 0), u2 = new Jd();
30042
- u2.drawRect(0, 0, a2, l2), u2.pivot.x = a2 / 2, u2.pivot.y = l2 / 2, u2.rotation = h2;
30043
- const c2 = u2.getBounds(), d2 = c2.width, p2 = c2.height;
30044
- i3.width = d2, i3.height = p2, i3.anchor.x = 0.5, i3.anchor.y = 0.5, i3.rotation = -1 * h2, i3.name = "math-texture", 0 === h2 ? (i3.position.x = d2 / 2 + n3 * this.width, i3.position.y = p2 / 2 + r3 * this.height) : (i3.position.x = this.width / 2, i3.position.y = this.height / 2);
30044
+ const n3 = (null !== (t2 = this.config.shapeRotation) && void 0 !== t2 ? t2 : 0) + (null !== (e2 = this.config.groupRotation) && void 0 !== e2 ? e2 : 0), { l: r3, t: o3, r: s2, b: a2 } = this.config.fillFloat.fillRect, l2 = (t3) => Math.abs(Math.sin(t3)), h2 = (t3) => Math.abs(Math.cos(t3)), u2 = 1 - r3 * h2(n3) - s2 * h2(n3) - o3 * l2(n3) - a2 * l2(n3), c2 = 1 - r3 * l2(n3) - s2 * l2(n3) - o3 * h2(n3) - a2 * h2(n3), d2 = this.width * u2, p2 = this.height * c2, f2 = new Jd();
30045
+ f2.drawRect(0, 0, d2, p2), f2.pivot.x = d2 / 2, f2.pivot.y = p2 / 2, f2.rotation = n3;
30046
+ const m2 = f2.getBounds(), g2 = m2.width, v2 = m2.height;
30047
+ i3.width = g2, i3.height = v2, i3.anchor.x = 0.5, i3.anchor.y = 0.5, i3.rotation = -1 * n3, i3.name = "math-texture", 0 === n3 ? (i3.position.x = g2 / 2 + r3 * this.width, i3.position.y = v2 / 2 + o3 * this.height) : (i3.position.x = this.width / 2, i3.position.y = this.height / 2);
30045
30048
  } else
30046
30049
  i3.width = this.width, i3.height = this.height, o2.rotate && (i3.position.x = this.width / 2, i3.position.y = this.height / 2, i3.anchor.x = 0.5, i3.anchor.y = 0.5, i3.rotation = o2.rotate / 180 * Math.PI);
30047
30050
  return i3;
@@ -31111,6 +31114,8 @@ void main(void){
31111
31114
  }
31112
31115
  createStrokeGraphics() {
31113
31116
  var t2, e2, i2, n2;
31117
+ if (this.json.isMathFallback)
31118
+ return null;
31114
31119
  const { id: r2, geometry: o2, lineStyle: s2 } = this.json, { width: a2, height: l2, pivot: h2 } = (null == o2 ? void 0 : o2.lineTransform) || $v, u2 = a2 || this.json.width, c2 = l2 || this.json.height, d2 = "solidFill" === (null === (t2 = null == s2 ? void 0 : s2.fill) || void 0 === t2 ? void 0 : t2.fillType) ? s2.fill.color : null;
31115
31120
  return s2 && "noFill" !== (null === (e2 = s2.fill) || void 0 === e2 ? void 0 : e2.fillType) ? new Zv(r2 + "-path-graphics", this.ctx, null !== (i2 = null == o2 ? void 0 : o2.paths) && void 0 !== i2 ? i2 : [], null !== (n2 = null == o2 ? void 0 : o2.hash) && void 0 !== n2 ? n2 : "", h2 || { x: 0, y: 0 }, u2, c2, s2, false, null, d2) : null;
31116
31121
  }
@@ -32320,8 +32325,8 @@ void main(void){
32320
32325
  this.math = { pi: Math.PI, e: Math.E, abs: Math.abs, acos: Math.acos, asin: Math.asin, atan: Math.atan, ceil: Math.ceil, cos: Math.cos, cosh: Math.cosh, deg: (t3) => t3 / Math.PI * 180, exp: Math.exp, floor: Math.floor, ln: Math.log, max: Math.max, min: Math.min, rad: (t3) => t3 / 180 * Math.PI, rand: (t3) => Math.random() * t3, sin: Math.sin, sinh: Math.sinh, sqrt: Math.sqrt, tan: Math.tan, tanh: Math.tanh }, this.timingTarget = e2, this.val = t2.val.value, this.time = t2.time, t2.fmla && (this.fmla = this.parseFmla(t2.fmla));
32321
32326
  }
32322
32327
  parseFmla(t2) {
32323
- let e2 = t2.replace(/#ppt_h/g, `(${this.timingTarget.design_ppt_h})`);
32324
- return e2 = e2.replace(/#ppt_w/g, `(${this.timingTarget.design_ppt_w})`), e2 = e2.replace(/#ppt_x/g, `(${this.timingTarget.design_ppt_x})`), e2 = e2.replace(/#ppt_y/g, `(${this.timingTarget.design_ppt_y})`), e2 = e2.replace(/ppt_w/g, "vars.ppt_w"), e2 = e2.replace(/ppt_h/g, "vars.ppt_h"), e2 = e2.replace(/ppt_x/g, "vars.ppt_x"), e2 = e2.replace(/ppt_y/g, "vars.ppt_y"), e2 = e2.replace(/ppt_r/g, "vars.ppt_r"), e2 = e2.replace(/#/g, "vars."), ["abs", "acos", "asin", "atan", "ceil", "cos", "cosh", "deg", "exp", "floor", "ln", "max", "min", "rad", "rand", "sin", "sinh", "sqrt", "tan", "tanh", "pi", "e"].forEach((t3) => {
32328
+ let e2 = t2.replace(/#ppt_w/g, `(${this.timingTarget.design_ppt_w})`).replace(/#ppt_h/g, `(${this.timingTarget.design_ppt_h})`).replace(/#ppt_x/g, `(${this.timingTarget.design_ppt_x})`).replace(/#ppt_y/g, `(${this.timingTarget.design_ppt_y})`).replace(/#ppt_r/g, `(${this.timingTarget.ppt_r})`).replace(/ppt_w/g, "vars.ppt_w").replace(/ppt_h/g, "vars.ppt_h").replace(/ppt_x/g, "vars.ppt_x").replace(/ppt_y/g, "vars.ppt_y").replace(/ppt_r/g, "vars.ppt_r").replace(/#/g, "vars.");
32329
+ return ["abs", "acos", "asin", "atan", "ceil", "cos", "cosh", "deg", "exp", "floor", "ln", "max", "min", "rad", "rand", "sin", "sinh", "sqrt", "tan", "tanh", "pi", "e"].forEach((t3) => {
32325
32330
  const i2 = new RegExp(`([^a-z])${t3}([^a-z])`, "g");
32326
32331
  e2 = e2.replace(i2, (e3, i3, n2) => `${i3}math.${t3}${n2}`);
32327
32332
  }), new Function("vars", "math", "$", "return " + e2);
@@ -36526,7 +36531,7 @@ void main(void){
36526
36531
  }
36527
36532
  var _T = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange", slideStepEnd: "slideEnd", slideStepStart: "slideStart", useraddLink: "useraddLink" }, yT = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, xT = "";
36528
36533
  try {
36529
- xT = "1.4.47";
36534
+ xT = "1.4.50";
36530
36535
  } catch (t2) {
36531
36536
  xT = "-dev-";
36532
36537
  }
@@ -40350,7 +40355,7 @@ class SlidePreviewer {
40350
40355
  }
40351
40356
  }
40352
40357
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
40353
- const version = "0.2.94";
40358
+ const version = "0.2.96-alpha.0";
40354
40359
  const SlideApp = {
40355
40360
  kind: "Slide",
40356
40361
  setup(context) {