@famibee/skynovel 1.48.11 → 1.48.13

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/app.js CHANGED
@@ -17380,8 +17380,8 @@ class pr {
17380
17380
  this.#e = this.#t.save = { ...t.hSave }, this.#w = this.#e["sn.doRecLog"] ?? !1;
17381
17381
  }
17382
17382
  // 既読系
17383
- loadScrWork(t) {
17384
- t in this.#h || (this.#h[t] = new Ol());
17383
+ touchAreaKidoku(t) {
17384
+ return this.#h[t] ??= new Ol();
17385
17385
  }
17386
17386
  getAreaKidoku = (t) => this.#h[t];
17387
17387
  saveKidoku() {
@@ -18130,7 +18130,7 @@ class X {
18130
18130
  X.tweenB(e.chain, h);
18131
18131
  }
18132
18132
  static tweenA(t, e, i, n, s, o, a) {
18133
- const h = this.#e.isSkipping() ? 0 : D(e, "time", NaN), l = new dn(i).to(n, h).onUpdate(s);
18133
+ const h = this.#e.isSkipping ? 0 : D(e, "time", NaN), l = new dn(i).to(n, h).onUpdate(s);
18134
18134
  X.setTwProp(l, e), X.#t[t] = { tw: l, onEnd: a };
18135
18135
  const { path: u } = e;
18136
18136
  let c = l;
@@ -19419,7 +19419,7 @@ class pn {
19419
19419
  const a = o * Number(Pt.getVal("sys:" + s, 1)), h = W(e, "stop", o === 0);
19420
19420
  h && Mt.delLoopPlay(i), Pt.flush();
19421
19421
  const l = D(e, "time", NaN), u = D(e, "delay", 0);
19422
- if (l === 0 && u === 0 || xr.isSkipping()) {
19422
+ if (l === 0 && u === 0 || xr.isSkipping) {
19423
19423
  t.snd.volume = a, t.stt = h ? new Vi(t) : new pn();
19424
19424
  return;
19425
19425
  }
@@ -19589,7 +19589,7 @@ class Dg {
19589
19589
  const { buf: e = "SE", fn: i } = t;
19590
19590
  if (this.#c({ buf: e }), !i)
19591
19591
  throw `[playse] fnは必須です buf:${e}`;
19592
- return W(t, "canskip", !0) && this.#i.isSkipping() ? !1 : (this.#t[e] = new Mt()).init(t);
19592
+ return W(t, "canskip", !0) && this.#i.isSkipping ? !1 : (this.#t[e] = new Mt()).init(t);
19593
19593
  }
19594
19594
  clearCache() {
19595
19595
  mr.removeAll();
@@ -20039,15 +20039,14 @@ class Y {
20039
20039
  destroy() {
20040
20040
  this.fncFirstComp = () => {
20041
20041
  }, this.fncAllComp = () => {
20042
- }, this.#l = () => {
20043
- }, this.#d.forEach((t) => {
20042
+ }, this.#l = (t) => t.destroy(), this.#d.forEach((t) => {
20044
20043
  t.parent?.removeChild(t), t.destroy();
20045
20044
  }), this.#d = [];
20046
20045
  }
20047
20046
  static destroy() {
20048
20047
  Y.#u = {}, Y.#m = {}, Y.#o = {};
20049
20048
  }
20050
- // static #ldrHFn: {[fn: string]: 1} = {};
20049
+ //static #ldrHFn: {[fn: string]: 1} = {};
20051
20050
  static #a(t, e, i, n) {
20052
20051
  let s = !1;
20053
20052
  if (t.slice(0, 5) === "data:") {
@@ -20075,33 +20074,36 @@ class Y {
20075
20074
  const v = Y.#t.searchPath(m, ce.SP_GSM), y = this.#i.crypto ? { xhrType: v.slice(-5) === ".json" ? ct.XHR_RESPONSE_TYPE.TEXT : ct.XHR_RESPONSE_TYPE.BUFFER } : {};
20076
20075
  a.add({ ...y, name: m, url: v });
20077
20076
  });
20078
- const h = (l) => {
20079
- for (const { fn: u, fnc: c } of o) {
20080
- const f = Y.#x(u, l);
20081
- f.name = u, n(f), c(f);
20077
+ const h = (l, u) => {
20078
+ for (const { fn: c, fnc: f } of o) {
20079
+ const d = Y.#x(c, u);
20080
+ d.name = c, n(d), f(d);
20082
20081
  }
20083
20082
  i(s);
20084
20083
  };
20085
20084
  return s ? a.use((l, u) => {
20086
- this.#i.dec(l.extension, l.data).then((c) => Y.#p(c, l, () => u?.())).catch((c) => this.#r.errScript(`Graphic ロード失敗です fn:${l.name} ${c}`, !1));
20087
- }).load((l, u) => h(u)) : h({}), s;
20085
+ this.#i.dec(l.extension, l.data).then((c) => Y.#p(c, l, () => u?.())).catch((c) => {
20086
+ const f = `画像/動画ロード失敗です fn:${l.name} ${c}`;
20087
+ Y.#h.isSkipping ? console.warn(f) : this.#r.errScript(f, !1);
20088
+ });
20089
+ }).load(h) : h(0, {}), s;
20088
20090
  }
20089
20091
  static #u = {};
20090
20092
  static #m = {};
20091
- static #p = (t, e, i) => {
20092
- switch (e.type) {
20093
+ static #p = (t, { type: e, spritesheet: i, name: n, data: s }, o) => {
20094
+ switch (e) {
20093
20095
  case ct.TYPE.JSON:
20094
- const n = e.spritesheet._frameKeys;
20095
- Y.#c(n), Y.#m[e.name] = {
20096
- aTex: n.map((o) => rt.from(o)),
20097
- meta: e.data.meta
20096
+ const a = i._frameKeys;
20097
+ Y.#c(a), Y.#m[n] = {
20098
+ aTex: a.map((l) => rt.from(l)),
20099
+ meta: s.meta
20098
20100
  };
20099
20101
  break;
20100
20102
  case ct.TYPE.VIDEO:
20101
- const s = e.data;
20102
- s.volume = Y.#n, Y.#o[e.name] = Y.#f(s);
20103
+ const h = s;
20104
+ h.volume = Y.#n, Y.#o[n] = Y.#f(h);
20103
20105
  }
20104
- i();
20106
+ o();
20105
20107
  };
20106
20108
  static #c(t) {
20107
20109
  const e = /([^\d]+)\d+\.(\w+)/.exec(t[0]);
@@ -20130,7 +20132,7 @@ class Y {
20130
20132
  new Te().use((h, l) => {
20131
20133
  this.#i.dec(h.extension, h.data).then((u) => {
20132
20134
  h.data = u, u instanceof HTMLImageElement && (h.type = ct.TYPE.IMAGE, URL.revokeObjectURL(u.src)), l?.();
20133
- }).catch((u) => this.#r.errScript(`Graphic ロード失敗です dec2res4Cripto fn:${h.name} ${u}`, !1));
20135
+ }).catch((u) => this.#r.errScript(`画像/動画ロード失敗です dec2res4Cripto fn:${h.name} ${u}`, !1));
20134
20136
  }).add({ name: o, url: a, xhrType: ct.XHR_RESPONSE_TYPE.BUFFER }).load((h, l) => {
20135
20137
  for (const { data: u } of Object.values(h.resources)) {
20136
20138
  const { baseTexture: c } = rt.from(u), f = Object.values(s);
@@ -20167,7 +20169,7 @@ class Y {
20167
20169
  const i = Y.#o[e];
20168
20170
  if (!i || i.loop)
20169
20171
  return !1;
20170
- if (Y.#h.isSkipping() || i.ended)
20172
+ if (Y.#h.isSkipping || i.ended)
20171
20173
  return Y.stopVideo(e), !1;
20172
20174
  const n = () => Y.#h.breakLimitedEvent();
20173
20175
  i.addEventListener("ended", n, { once: !0, passive: !0 });
@@ -21663,7 +21665,7 @@ text-combine-upright: all;
21663
21665
  #R(t, e, i = `
21664
21666
  `) {
21665
21667
  const n = this.#T ? e ?? this.#E.at(0)?.o.wait ?? (it.#a ? it.#u[i.at(0) ?? ""] ?? 0 : Ci.msecChWait) : 0;
21666
- it.#l.isSkipping() ? this.#W = 0 : t && this.#T && (this.#W += Number(n));
21668
+ it.#l.isSkipping ? this.#W = 0 : t && this.#T && (this.#W += Number(n));
21667
21669
  const s = `data-add='{"ch_in_style":"${this.#k}", "ch_out_style":"${this.#j}"}'`;
21668
21670
  return {
21669
21671
  cl: ` class='sn_ch${n > 0 ? ` sn_ch_in_${this.#k}` : ""}'`,
@@ -21812,7 +21814,7 @@ class Re {
21812
21814
  if (this.val.getVal(`tmp:${h}`))
21813
21815
  throw `frame【${e}】はすでにあります`;
21814
21816
  const l = W(t, "visible", !0), u = t.b_color ? ` background-color: ${t.b_color};` : "", c = this.#l(t);
21815
- ue.cvs.insertAdjacentHTML("beforebegin", `<iframe id="${e}" sandbox="allow-scripts allow-same-origin" style="opacity: ${n}; position: absolute; left:${this.sys.ofsLeft4elm + c.x * this.sys.cvsScale}px; top: ${this.sys.ofsTop4elm + c.y * this.sys.cvsScale}px; z-index: 1; ${u} border: 0px; overflow: hidden; display: ${l ? "inline" : "none"}; transform: scale(${s}, ${o}) rotate(${a}deg);" width="${c.width * this.sys.cvsScale}" height="${c.height * this.sys.cvsScale}"></iframe>`);
21817
+ ue.cvs.insertAdjacentHTML("beforebegin", `<iframe id="${e}" style="opacity: ${n}; position: absolute; left:${this.sys.ofsLeft4elm + c.x * this.sys.cvsScale}px; top: ${this.sys.ofsTop4elm + c.y * this.sys.cvsScale}px; z-index: 1; ${u} border: 0px; overflow: hidden; display: ${l ? "inline" : "none"}; transform: scale(${s}, ${o}) rotate(${a}deg);" width="${c.width * this.sys.cvsScale}" height="${c.height * this.sys.cvsScale}"></iframe>`);
21816
21818
  const f = this.cfg.searchPath(i, ce.HTML), d = new Te().add({ name: i, url: f, xhrType: ct.XHR_RESPONSE_TYPE.TEXT });
21817
21819
  return this.sys.crypto && d.use((m, p) => {
21818
21820
  try {
@@ -22190,7 +22192,7 @@ class Ci {
22190
22192
  case "txt":
22191
22193
  this.#_ || (this.#Z = () => {
22192
22194
  }, this.#R = this.#W, this.#B = this.#U, this.hTag.current({ layer: e }), this.goTxt = () => {
22193
- this.#m.isSkipping() ? Ci.#M = 0 : this.setNormalChWait();
22195
+ this.#m.isSkipping ? Ci.#M = 0 : this.setNormalChWait();
22194
22196
  for (const s of this.#b()) {
22195
22197
  const o = this.#o[s].fore;
22196
22198
  o instanceof it && this.#c("gotxt|", o, !1);
@@ -22347,7 +22349,7 @@ void main(void) {
22347
22349
  }
22348
22350
  Promise.allSettled(v), this.#e.visible = !0, this.#i.visible = !1, this.#z.visible = !1, this.#w.visible = !1;
22349
22351
  };
22350
- if (D(t, "time", 0) === 0 || this.#m.isSkipping())
22352
+ if (D(t, "time", 0) === 0 || this.#m.isSkipping)
22351
22353
  return l(), !1;
22352
22354
  const { glsl: c, rule: f, chain: d } = t;
22353
22355
  if (!c && !f)
@@ -22392,7 +22394,7 @@ void main(void) {
22392
22394
  }
22393
22395
  // 画面を揺らす
22394
22396
  #X(t) {
22395
- if (X.finish_trans(), D(t, "time", NaN) === 0 || this.#m.isSkipping())
22397
+ if (X.finish_trans(), D(t, "time", NaN) === 0 || this.#m.isSkipping)
22396
22398
  return !1;
22397
22399
  const { layer: i } = t, n = [];
22398
22400
  for (const u of this.#b(i))
@@ -22426,7 +22428,7 @@ void main(void) {
22426
22428
  const s = this.#o[this.#Y(t)], o = s.fore;
22427
22429
  let a = () => {
22428
22430
  };
22429
- i && !this.#m.isSkipping() && (o.renderStart(), a = () => o.renderEnd());
22431
+ i && !this.#m.isSkipping && (o.renderStart(), a = () => o.renderEnd());
22430
22432
  const h = X.cnvTweenArg(t, o), l = W(t, "arrive", !1), u = W(t, "backlay", !1), c = s.back.spLay;
22431
22433
  return X.tween(n ?? e, t, o, X.cnvTweenArg(t, o), () => {
22432
22434
  }, a, () => {
@@ -22449,7 +22451,7 @@ void main(void) {
22449
22451
  if (!e)
22450
22452
  throw "textは必須です";
22451
22453
  const i = this.#R(t);
22452
- delete t.text, this.#m.isSkipping() ? t.wait = 0 : "wait" in t && D(t, "wait", NaN);
22454
+ delete t.text, this.#m.isSkipping ? t.wait = 0 : "wait" in t && D(t, "wait", NaN);
22453
22455
  const n = encodeURIComponent(JSON.stringify(t));
22454
22456
  this.#c("add|" + n, i);
22455
22457
  const s = W(t, "record", !0), o = this.val.doRecLog();
@@ -24443,7 +24445,7 @@ class Z0 {
24443
24445
  ht.noticeCompTxt();
24444
24446
  }
24445
24447
  // キー押下によるスキップ中か
24446
- isSkipping() {
24448
+ get isSkipping() {
24447
24449
  return this.#r.isSkipping ? !0 : Object.keys(this.#g).some((t) => this.#g[t] === 2);
24448
24450
  }
24449
24451
  // 0:no push 1:one push 2:push repeating
@@ -25070,7 +25072,7 @@ class xe {
25070
25072
  } catch (i) {
25071
25073
  i instanceof Error ? e += `例外 mes=${i.message}(${i.name})` : e = i, this.main.errScript(e, !1);
25072
25074
  }
25073
- this.val.loadScrWork(this.#e);
25075
+ this.val.touchAreaKidoku(this.#e);
25074
25076
  }
25075
25077
  #et(t) {
25076
25078
  this.#e = t.fn, this.#i = t.idx;
@@ -25105,9 +25107,7 @@ class xe {
25105
25107
  t.len = t.aToken.length;
25106
25108
  }
25107
25109
  #ht() {
25108
- const t = this.val.getAreaKidoku(this.#e);
25109
- if (!t)
25110
- throw `recordKidoku fn:'${this.#e}' (areas === null)`;
25110
+ const t = this.val.touchAreaKidoku(this.#e);
25111
25111
  if (this.#s.length > 0) {
25112
25112
  t.record(this.#i);
25113
25113
  return;