@famibee/skynovel 1.64.7 → 1.64.9
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/README.md +1 -1
- package/dist/LayerMng.js +496 -495
- package/dist/LayerMng.js.map +1 -1
- package/dist/sn/SpritesMng.d.ts.map +1 -1
- package/dist_app/LayerMng.js +496 -495
- package/dist_app/LayerMng.js.map +1 -1
- package/dist_app/sn/SpritesMng.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/LayerMng.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { e as R, T as ct, L as Q, B as St, m as Z, o as D, i as bt, p as J, D as it, q as Rt, R as Y, A as gt, r as j, s as H, d as
|
|
1
|
+
import { e as R, T as ct, L as Q, B as St, m as Z, o as D, i as bt, p as J, D as it, q as Rt, R as Y, A as gt, r as j, s as H, d as x, E as kt, g as S, t as tt, C as W, G as U, u as V, v as Tt, n as dt, w as Pt, x as Ft, h as ot, y as vt, z as Ot, F as Bt, P as It, H as _t, I as Vt, J as jt } from "./web2.js";
|
|
2
2
|
import { C as B, T as xt, b as A } from "./SndBuf.js";
|
|
3
3
|
import { a as F, T as Dt } from "./Reading.js";
|
|
4
4
|
import { R as wt, a as pt } from "./ScriptIterator.js";
|
|
5
5
|
class et {
|
|
6
6
|
constructor(t, e, s, i, n, a, o, r) {
|
|
7
7
|
this.cls = e, this.hArg = n, this.sys = a, this.val = o, this.ret = r;
|
|
8
|
-
const
|
|
9
|
-
if (!
|
|
10
|
-
const
|
|
11
|
-
|
|
8
|
+
const l = a.hFactoryCls[e];
|
|
9
|
+
if (!l) throw `属性 class【${e}】が不正です`;
|
|
10
|
+
const d = l(), c = l();
|
|
11
|
+
d.layname = c.layname = t;
|
|
12
12
|
const p = n[":id_tag"] = `layer:${t} cls:${e} page:`;
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
o.setVal_Nochk("tmp",
|
|
13
|
+
d.ctn.name = d.name = p + "A", c.ctn.name = c.name = p + "B", s.addChild(d.ctn), i.addChild(c.ctn), R(n, "visible", !0), R(n, "visible", !0), r.isWait = d.lay(n) || c.lay(n), this.#s = { fore: d, back: c }, i.visible = !1;
|
|
14
|
+
const f = `const.sn.lay.${t}`;
|
|
15
|
+
o.setVal_Nochk("tmp", f, !0), o.defTmp(f + ".fore.alpha", () => this.#s.fore.alpha), o.defTmp(f + ".back.alpha", () => this.#s.back.alpha), o.defTmp(f + ".fore.height", () => this.#s.fore.height), o.defTmp(f + ".back.height", () => this.#s.back.height), o.defTmp(f + ".fore.visible", () => this.#s.fore.ctn.visible), o.defTmp(f + ".back.visible", () => this.#s.back.ctn.visible), o.defTmp(f + ".fore.width", () => this.#s.fore.width), o.defTmp(f + ".back.width", () => this.#s.back.width), o.defTmp(f + ".fore.x", () => this.#s.fore.x), o.defTmp(f + ".back.x", () => this.#s.back.x), o.defTmp(f + ".fore.y", () => this.#s.fore.y), o.defTmp(f + ".back.y", () => this.#s.back.y);
|
|
16
16
|
}
|
|
17
17
|
#s;
|
|
18
18
|
destroy() {
|
|
@@ -80,14 +80,14 @@ class Ht extends ut {
|
|
|
80
80
|
setSp(t) {
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
class
|
|
83
|
+
class u {
|
|
84
84
|
constructor(t = "", e, s = () => {
|
|
85
85
|
}, i = () => {
|
|
86
86
|
}) {
|
|
87
87
|
this.csvFn = t, this.ctn = e, this.fncFirstComp = s, this.fncAllComp = i, t && (this.#u = e ? (n) => {
|
|
88
88
|
e.addChild(n), this.#c.push(n);
|
|
89
89
|
} : () => {
|
|
90
|
-
}, this.ret =
|
|
90
|
+
}, this.ret = u.#x(
|
|
91
91
|
t,
|
|
92
92
|
(n) => this.fncFirstComp(n),
|
|
93
93
|
// 差し替え考慮
|
|
@@ -102,17 +102,17 @@ class m {
|
|
|
102
102
|
static #n;
|
|
103
103
|
static #r;
|
|
104
104
|
static init(t, e, s, i, n) {
|
|
105
|
-
|
|
105
|
+
u.#s = t, u.#e = e, u.#n = s, u.#r = i, s.arg.crypto && (u.#f = (o, r, l) => u.#a(o, r, l), u.#o = (o, r, l) => u.#I(o, r, l));
|
|
106
106
|
const a = () => {
|
|
107
|
-
const o =
|
|
108
|
-
for (const r of Object.values(
|
|
107
|
+
const o = u.#l * u.#t;
|
|
108
|
+
for (const r of Object.values(u.#w)) r.volume = o;
|
|
109
109
|
};
|
|
110
110
|
n.setNoticeChgVolume(
|
|
111
111
|
(o) => {
|
|
112
|
-
|
|
112
|
+
u.#l = o, a();
|
|
113
113
|
},
|
|
114
114
|
(o) => {
|
|
115
|
-
|
|
115
|
+
u.#t = o, a();
|
|
116
116
|
}
|
|
117
117
|
);
|
|
118
118
|
}
|
|
@@ -120,7 +120,7 @@ class m {
|
|
|
120
120
|
static #l = 1;
|
|
121
121
|
static #p;
|
|
122
122
|
static setEvtMng(t) {
|
|
123
|
-
|
|
123
|
+
u.#p = t;
|
|
124
124
|
}
|
|
125
125
|
ret = !1;
|
|
126
126
|
#u;
|
|
@@ -130,59 +130,60 @@ class m {
|
|
|
130
130
|
}, this.fncAllComp = () => {
|
|
131
131
|
}, this.#u = (t) => t.destroy();
|
|
132
132
|
for (const t of this.#c)
|
|
133
|
-
|
|
133
|
+
u.stopVideo(t.name), t.parent?.removeChild(t), t.destroy();
|
|
134
134
|
this.#c = [];
|
|
135
135
|
}
|
|
136
136
|
static destroy() {
|
|
137
|
-
|
|
137
|
+
u.#i = {}, u.#d = {}, u.#w = {};
|
|
138
138
|
}
|
|
139
139
|
//static #ldrHFn: {[fn: string]: 1} = {};
|
|
140
140
|
static #x(t, e, s, i) {
|
|
141
141
|
if (!t) return !1;
|
|
142
142
|
let n = !1;
|
|
143
143
|
if (t.startsWith("data:")) {
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
i(
|
|
144
|
+
const d = () => {
|
|
145
|
+
const c = j.from(t);
|
|
146
|
+
i(c), e(c), s(n);
|
|
147
147
|
};
|
|
148
|
-
return t in ct ?
|
|
148
|
+
return t in ct ? d() : (n = !0, new Q().add(t, t).load(d)), n;
|
|
149
149
|
}
|
|
150
|
-
const a = [], o = new Q()
|
|
151
|
-
for (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
fn: p,
|
|
150
|
+
const a = [], o = new Q();
|
|
151
|
+
for (const d of t.split(",")) {
|
|
152
|
+
if (!d) throw "face属性に空要素が含まれます";
|
|
153
|
+
const { dx: c, dy: p, blendmode: f, fn: h } = u.#i[d] ?? {
|
|
154
|
+
fn: d,
|
|
156
155
|
dx: 0,
|
|
157
156
|
dy: 0,
|
|
158
157
|
blendmode: St.NORMAL
|
|
159
|
-
}, v = l === 0 ? e : (E) => {
|
|
160
|
-
E.transform && (E.x = d, E.y = h, E.blendMode = u);
|
|
161
158
|
};
|
|
162
|
-
if (a.push({ fn:
|
|
159
|
+
if (a.push({ fn: h, fnc: (k) => {
|
|
160
|
+
k.transform && (k.x = c, k.y = p, k.blendMode = f);
|
|
161
|
+
} }), h in u.#d || h in ct || h in Q.shared.resources) continue;
|
|
163
162
|
n = !0;
|
|
164
|
-
const y =
|
|
165
|
-
o.add({ ...
|
|
163
|
+
const y = u.#s.searchPath(h, Z.SP_GSM), g = this.#n.arg.crypto ? { xhrType: y.endsWith(".json") ? D.XHR_RESPONSE_TYPE.TEXT : D.XHR_RESPONSE_TYPE.BUFFER } : {};
|
|
164
|
+
o.add({ ...g, name: h, url: y });
|
|
166
165
|
}
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
const r = a.at(0);
|
|
167
|
+
r && (r.fnc = e);
|
|
168
|
+
const l = (d, c) => {
|
|
169
|
+
for (const { fn: p, fnc: f } of a) {
|
|
170
|
+
const h = u.#k(p, c);
|
|
171
|
+
h.name = p, i(h), f(h);
|
|
171
172
|
}
|
|
172
173
|
s(n);
|
|
173
174
|
};
|
|
174
|
-
return n ? o.use((
|
|
175
|
+
return n ? o.use((d, c) => {
|
|
175
176
|
try {
|
|
176
|
-
if (
|
|
177
|
-
this.#n.dec("json",
|
|
177
|
+
if (d.extension === "json") {
|
|
178
|
+
this.#n.dec("json", d.data).then((p) => u.#o(p, d, c));
|
|
178
179
|
return;
|
|
179
180
|
}
|
|
180
|
-
this.#n.decAB(
|
|
181
|
-
} catch (
|
|
182
|
-
const
|
|
183
|
-
|
|
181
|
+
this.#n.decAB(d.data).then((p) => u.#f(p, d, c));
|
|
182
|
+
} catch (p) {
|
|
183
|
+
const f = `画像/動画ロード失敗です fn:${d.name} ${String(p)}`;
|
|
184
|
+
u.#p.isSkipping ? console.warn(f) : console.error("%c" + f, "color:#FF3300;");
|
|
184
185
|
}
|
|
185
|
-
}).load(
|
|
186
|
+
}).load(l) : queueMicrotask(() => l(0, {})), n;
|
|
186
187
|
}
|
|
187
188
|
static #i = {};
|
|
188
189
|
static #d = {};
|
|
@@ -191,7 +192,7 @@ class m {
|
|
|
191
192
|
switch (e) {
|
|
192
193
|
case D.TYPE.VIDEO: {
|
|
193
194
|
const a = i;
|
|
194
|
-
a.volume =
|
|
195
|
+
a.volume = u.#l, u.#w[s] = u.#g(a);
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
198
|
n();
|
|
@@ -207,20 +208,20 @@ class m {
|
|
|
207
208
|
if (e.data = t, e.extension !== "bin" && s(), t instanceof HTMLImageElement) {
|
|
208
209
|
J.fromLoader(t, e.url, e.name).then((i) => {
|
|
209
210
|
e.texture = i, e.type = D.TYPE.IMAGE;
|
|
210
|
-
});
|
|
211
|
+
}), s();
|
|
211
212
|
return;
|
|
212
213
|
}
|
|
213
|
-
t instanceof HTMLVideoElement && (t.volume =
|
|
214
|
+
t instanceof HTMLVideoElement && (t.volume = u.#l, u.#w[e.name] = u.#g(t), e.type = D.TYPE.VIDEO), s();
|
|
214
215
|
}
|
|
215
216
|
static #g(t) {
|
|
216
|
-
return
|
|
217
|
+
return u.#e.getVal("const.sn.needClick2Play") && (it.trace_beforeNew(`[lay系] ${it.strPos()}未クリック状態で動画を自動再生します。音声はミュートされます`, "W"), t.muted = !0), t.setAttribute("playsinline", ""), t;
|
|
217
218
|
}
|
|
218
219
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
219
220
|
static #o = (t, { type: e, spritesheet: s, name: i, data: n }, a) => {
|
|
220
221
|
switch (e) {
|
|
221
222
|
case D.TYPE.JSON: {
|
|
222
223
|
const o = s._frameKeys;
|
|
223
|
-
|
|
224
|
+
u.#y(o), u.#d[i] = {
|
|
224
225
|
aTex: o.map((r) => J.from(r)),
|
|
225
226
|
meta: n.meta
|
|
226
227
|
};
|
|
@@ -235,18 +236,18 @@ class m {
|
|
|
235
236
|
s();
|
|
236
237
|
return;
|
|
237
238
|
}
|
|
238
|
-
const a = Rt(i.image), o =
|
|
239
|
-
new Q().use((r,
|
|
240
|
-
this.#n.decAB(r.data).then((
|
|
241
|
-
r.data =
|
|
242
|
-
}).catch((
|
|
243
|
-
}).add({ name: a, url: o, xhrType: D.XHR_RESPONSE_TYPE.BUFFER }).load((r,
|
|
244
|
-
for (const { data:
|
|
245
|
-
const { baseTexture:
|
|
246
|
-
|
|
247
|
-
aTex: p.map(({ frame: { x:
|
|
248
|
-
|
|
249
|
-
new Y(
|
|
239
|
+
const a = Rt(i.image), o = u.#s.searchPath(a, Z.SP_GSM);
|
|
240
|
+
new Q().use((r, l) => {
|
|
241
|
+
this.#n.decAB(r.data).then((d) => {
|
|
242
|
+
r.data = d, d instanceof HTMLImageElement && (r.type = D.TYPE.IMAGE, URL.revokeObjectURL(d.src)), l();
|
|
243
|
+
}).catch((d) => this.#r.errScript(`画像/動画ロード失敗です dec2res4Cripto fn:${r.name} ${String(d)}`, !1));
|
|
244
|
+
}).add({ name: a, url: o, xhrType: D.XHR_RESPONSE_TYPE.BUFFER }).load((r, l) => {
|
|
245
|
+
for (const { data: d } of Object.values(r.resources)) {
|
|
246
|
+
const { baseTexture: c } = J.from(d), p = Object.values(n);
|
|
247
|
+
u.#d[e.name] = {
|
|
248
|
+
aTex: p.map(({ frame: { x: f, y: h, w: y, h: g } }) => new J(
|
|
249
|
+
c,
|
|
250
|
+
new Y(f, h, y, g)
|
|
250
251
|
)),
|
|
251
252
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
252
253
|
meta: i
|
|
@@ -256,46 +257,46 @@ class m {
|
|
|
256
257
|
});
|
|
257
258
|
}
|
|
258
259
|
static #k(t, e) {
|
|
259
|
-
const s =
|
|
260
|
+
const s = u.#d[t];
|
|
260
261
|
if (s) {
|
|
261
262
|
const a = new gt(s.aTex);
|
|
262
263
|
return a.animationSpeed = s.meta.animationSpeed ?? 1, a.play(), a;
|
|
263
264
|
}
|
|
264
265
|
if (t in ct) return j.from(t);
|
|
265
|
-
const i =
|
|
266
|
+
const i = u.#w[t];
|
|
266
267
|
if (i) return j.from(i);
|
|
267
268
|
const n = e[t];
|
|
268
269
|
return n ? new j(n.texture) : new j();
|
|
269
270
|
}
|
|
270
271
|
static #w = {};
|
|
271
272
|
static getHFn2VElm(t) {
|
|
272
|
-
return
|
|
273
|
+
return u.#w[t];
|
|
273
274
|
}
|
|
274
275
|
static wv(t) {
|
|
275
276
|
const { fn: e } = t;
|
|
276
277
|
if (!e) throw "fnは必須です";
|
|
277
|
-
const s =
|
|
278
|
+
const s = u.#w[e];
|
|
278
279
|
if (!s || s.loop) return !1;
|
|
279
|
-
if (
|
|
280
|
-
return
|
|
280
|
+
if (u.#p.isSkipping || s.ended)
|
|
281
|
+
return u.stopVideo(e), !1;
|
|
281
282
|
const i = "wv fn:" + e, n = R(t, "stop", !0), a = () => {
|
|
282
|
-
n &&
|
|
283
|
+
n && u.stopVideo(e);
|
|
283
284
|
};
|
|
284
285
|
return F.beginProc(i, a, !0, a), s.addEventListener("ended", () => F.notifyEndProc(i), { once: !0, passive: !0 }), !0;
|
|
285
286
|
}
|
|
286
287
|
static stopVideo(t) {
|
|
287
|
-
const e =
|
|
288
|
-
e && (delete
|
|
288
|
+
const e = u.#w[t];
|
|
289
|
+
e && (delete u.#w[t], e.pause(), e.currentTime = e.duration);
|
|
289
290
|
}
|
|
290
291
|
static add_face(t) {
|
|
291
292
|
const { name: e } = t;
|
|
292
293
|
if (!e) throw "nameは必須です";
|
|
293
|
-
if (e in
|
|
294
|
+
if (e in u.#i) throw "一つのname(" + e + ")に対して同じ画像を複数割り当てられません";
|
|
294
295
|
const { fn: s = e } = t;
|
|
295
|
-
return
|
|
296
|
+
return u.#i[e] = {
|
|
296
297
|
fn: s,
|
|
297
|
-
dx:
|
|
298
|
-
dy:
|
|
298
|
+
dx: x(t, "dx", 0),
|
|
299
|
+
dy: x(t, "dy", 0),
|
|
299
300
|
blendmode: H.getBlendmodeNum(t.blendmode ?? "")
|
|
300
301
|
}, !1;
|
|
301
302
|
}
|
|
@@ -305,10 +306,10 @@ class L extends H {
|
|
|
305
306
|
static #s = new kt();
|
|
306
307
|
static #e;
|
|
307
308
|
static init(t, e, s, i, n, a) {
|
|
308
|
-
L.#e = s,
|
|
309
|
+
L.#e = s, u.init(e, a, i, t, n);
|
|
309
310
|
}
|
|
310
311
|
static destroy() {
|
|
311
|
-
L.#s.clear(),
|
|
312
|
+
L.#s.clear(), u.destroy();
|
|
312
313
|
}
|
|
313
314
|
#n = new Ht(this.ctn, this);
|
|
314
315
|
constructor() {
|
|
@@ -332,16 +333,16 @@ class L extends H {
|
|
|
332
333
|
if (this.#n.sethArg(t), !s)
|
|
333
334
|
return super.lay(t), this.ctn.children.length > 0 && this.setPos(t), this.#l = "", this.#t = this.#p = i, e(!1), !1;
|
|
334
335
|
const n = "fn" in t, a = "face" in t;
|
|
335
|
-
return this.clearLay({ clear_filter: R(t, "clear_filter", !0) }), n && (this.#l = s), a && (this.#p = i), super.lay(t), t.dx = 0, t.dy = 0, this.#c.destroy(), this.#c = new
|
|
336
|
+
return this.clearLay({ clear_filter: R(t, "clear_filter", !0) }), n && (this.#l = s), a && (this.#p = i), super.lay(t), t.dx = 0, t.dy = 0, this.#c.destroy(), this.#c = new u(
|
|
336
337
|
this.#t = s + (i ? "," + i : ""),
|
|
337
338
|
this.ctn,
|
|
338
339
|
(o) => {
|
|
339
|
-
("width" in t || "height" in t) && (o.width =
|
|
340
|
+
("width" in t || "height" in t) && (o.width = x(t, "width", 0), o.height = x(t, "height", 0)), this.#x = o.width, this.#i = o.height, H.setXY(o, t, this.ctn, !0), H.setBlendmode(this.ctn, t), this.#r(o);
|
|
340
341
|
},
|
|
341
342
|
(o) => e(o)
|
|
342
343
|
), this.#c.ret;
|
|
343
344
|
}
|
|
344
|
-
#c = new
|
|
345
|
+
#c = new u();
|
|
345
346
|
#x = 0;
|
|
346
347
|
#i = 0;
|
|
347
348
|
get width() {
|
|
@@ -398,7 +399,7 @@ class L extends H {
|
|
|
398
399
|
if (this.#t === "") return !1;
|
|
399
400
|
const t = this.ctn.children;
|
|
400
401
|
return this.#t.split(",").some(
|
|
401
|
-
(e, s) => t[s] instanceof gt ||
|
|
402
|
+
(e, s) => t[s] instanceof gt || u.getHFn2VElm(e)
|
|
402
403
|
);
|
|
403
404
|
}
|
|
404
405
|
clearLay(t) {
|
|
@@ -463,7 +464,7 @@ class Jt {
|
|
|
463
464
|
break_fixed_top = 0;
|
|
464
465
|
bura = !1;
|
|
465
466
|
lay(t) {
|
|
466
|
-
t.kinsoku_sol && (this.#s = t.kinsoku_sol, this.#t = new RegExp(`[${this.#s}]`)), t.kinsoku_eol && (this.#e = t.kinsoku_eol, this.#c(), this.#l = new RegExp(`[${this.#e}]`)), t.kinsoku_dns && (this.#n = t.kinsoku_dns, this.#x(), this.#p = new RegExp(`[${this.#n}]`)), t.kinsoku_bura && (this.#r = t.kinsoku_bura, this.#c(), this.#x(), this.#u = new RegExp(`[${this.#r}]`)), "bura" in t && (this.bura = R(t, "bura", !1)), this.break_fixed = R(t, "break_fixed", this.break_fixed), this.break_fixed_left =
|
|
467
|
+
t.kinsoku_sol && (this.#s = t.kinsoku_sol, this.#t = new RegExp(`[${this.#s}]`)), t.kinsoku_eol && (this.#e = t.kinsoku_eol, this.#c(), this.#l = new RegExp(`[${this.#e}]`)), t.kinsoku_dns && (this.#n = t.kinsoku_dns, this.#x(), this.#p = new RegExp(`[${this.#n}]`)), t.kinsoku_bura && (this.#r = t.kinsoku_bura, this.#c(), this.#x(), this.#u = new RegExp(`[${this.#r}]`)), "bura" in t && (this.bura = R(t, "bura", !1)), this.break_fixed = R(t, "break_fixed", this.break_fixed), this.break_fixed_left = x(t, "break_fixed_left", this.break_fixed_left), this.break_fixed_top = x(t, "break_fixed_top", this.break_fixed_top);
|
|
467
468
|
}
|
|
468
469
|
// 禁則の競合(ぶら下げ と 行末禁則 の両方に含まれる文字があってはならない)
|
|
469
470
|
#c() {
|
|
@@ -517,32 +518,32 @@ class Jt {
|
|
|
517
518
|
), this.break_fixed = t.break_fixed, this.break_fixed_left = t.break_fixed_left, this.break_fixed_top = t.break_fixed_top, this.bura = t.bura);
|
|
518
519
|
}
|
|
519
520
|
hyph(t, e, s, i, n) {
|
|
520
|
-
let a, o = 0, r = 2,
|
|
521
|
+
let a, o = 0, r = 2, l = (d) => (l = () => !1, i === d ? (i > 0 && (t.innerHTML = n.replaceAll('class="sn_ch"', 'class="sn_ch sn_ch_in_default"')), !0) : d < 2);
|
|
521
522
|
do {
|
|
522
|
-
if (a = this.#f(t, e), o = a.length,
|
|
523
|
-
let
|
|
523
|
+
if (a = this.#f(t, e), o = a.length, l(o)) break;
|
|
524
|
+
let d = -1 / 0;
|
|
524
525
|
for (; r < o; ++r) {
|
|
525
|
-
const { elm:
|
|
526
|
-
if (
|
|
526
|
+
const { elm: c, rect: p, ch: f } = a[r];
|
|
527
|
+
if (c.tagName === "RT") continue;
|
|
527
528
|
const h = s ? p.y : p.x;
|
|
528
|
-
if (
|
|
529
|
-
|
|
529
|
+
if (d <= h || c.previousElementSibling?.tagName === "SPAN" && c.previousElementSibling?.innerHTML.includes("<br>") || c.parentElement?.previousElementSibling?.tagName === "SPAN" && c.parentElement?.previousElementSibling?.innerHTML.includes("<br>")) {
|
|
530
|
+
d = h, this.break_fixed || (this.break_fixed_left = p.x, this.break_fixed_top = p.y);
|
|
530
531
|
continue;
|
|
531
532
|
}
|
|
532
|
-
const
|
|
533
|
+
const y = this.#d(a, r), { elm: g, rect: k, ch: m } = a[y];
|
|
533
534
|
if (!this.break_fixed) {
|
|
534
|
-
this.break_fixed_left =
|
|
535
|
-
const
|
|
535
|
+
this.break_fixed_left = k.x, this.break_fixed_top = k.y;
|
|
536
|
+
const E = globalThis.getComputedStyle(g), O = parseFloat(E.fontSize);
|
|
536
537
|
s ? this.break_fixed_top += O : this.break_fixed_left += O;
|
|
537
538
|
}
|
|
538
|
-
|
|
539
|
-
const b = r, { cont:
|
|
540
|
-
if (r = _,
|
|
541
|
-
const T = a[r].elm, $ = T.parentElement,
|
|
542
|
-
if ($.classList.contains("sn_tx")) $.insertBefore(
|
|
539
|
+
d = -1 / 0;
|
|
540
|
+
const b = r, { cont: N, ins: _ } = this.bura ? this.hyph_alg_bura(a, y, m, r) : this.hyph_alg(a, y, m, r, f);
|
|
541
|
+
if (r = _, N) continue;
|
|
542
|
+
const T = a[r].elm, $ = T.parentElement, v = document.createElement("br");
|
|
543
|
+
if ($.classList.contains("sn_tx")) $.insertBefore(v, T);
|
|
543
544
|
else {
|
|
544
|
-
const
|
|
545
|
-
|
|
545
|
+
const E = $.parentElement;
|
|
546
|
+
E.classList.contains("sn_ch") ? E.parentElement.insertBefore(v, E) : E.insertBefore(v, $);
|
|
546
547
|
}
|
|
547
548
|
r += 2, r < b && (r = b), o = -1;
|
|
548
549
|
break;
|
|
@@ -613,10 +614,10 @@ class Jt {
|
|
|
613
614
|
if (this.#u.test(a) || this.#t.test(a)) {
|
|
614
615
|
let r = e;
|
|
615
616
|
(this.#u.test(s) || this.#t.test(s)) && ++r;
|
|
616
|
-
const
|
|
617
|
-
if (
|
|
618
|
-
if (!this.#l.test(
|
|
619
|
-
r =
|
|
617
|
+
const l = this.#d(t, r), { ch: d } = t[l], { ch: c } = t[r];
|
|
618
|
+
if (d === c && this.#p.test(c)) return { cont: !1, ins: l };
|
|
619
|
+
if (!this.#l.test(d)) return { cont: !1, ins: r };
|
|
620
|
+
r = l;
|
|
620
621
|
do
|
|
621
622
|
if (!this.#l.test(t[r].ch)) break;
|
|
622
623
|
while ((r = this.#d(t, r)) >= 0);
|
|
@@ -628,10 +629,10 @@ class Jt {
|
|
|
628
629
|
if (this.#p.test(a) && r === a)
|
|
629
630
|
return { cont: !1, ins: o };
|
|
630
631
|
if (this.#l.test(r)) {
|
|
631
|
-
let
|
|
632
|
-
for (; (
|
|
632
|
+
let l = o;
|
|
633
|
+
for (; (l = this.#d(t, l)) >= 0 && this.#l.test(t[l].ch); )
|
|
633
634
|
;
|
|
634
|
-
return { cont: !1, ins:
|
|
635
|
+
return { cont: !1, ins: l + 1 };
|
|
635
636
|
}
|
|
636
637
|
}
|
|
637
638
|
return { cont: !1, ins: n };
|
|
@@ -639,26 +640,26 @@ class Jt {
|
|
|
639
640
|
}
|
|
640
641
|
function Ut(q, t, e, s, i, n = !0) {
|
|
641
642
|
const a = {
|
|
642
|
-
escape: (
|
|
643
|
-
mimeType: (
|
|
644
|
-
const b =
|
|
643
|
+
escape: (m) => m.replaceAll(/([.*+?^${}()|[\]/\\])/g, "\\$1"),
|
|
644
|
+
mimeType: (m) => {
|
|
645
|
+
const b = c(m).toLowerCase();
|
|
645
646
|
return o()[b] || "";
|
|
646
647
|
},
|
|
647
|
-
dataAsUrl:
|
|
648
|
+
dataAsUrl: y,
|
|
648
649
|
isDataUrl: p,
|
|
649
|
-
resolveUrl:
|
|
650
|
+
resolveUrl: f,
|
|
650
651
|
getAndEncode: h,
|
|
651
|
-
asArray: (
|
|
652
|
-
const b = [],
|
|
653
|
-
for (let _ = 0; _ <
|
|
652
|
+
asArray: (m) => {
|
|
653
|
+
const b = [], N = m.length;
|
|
654
|
+
for (let _ = 0; _ < N; ++_) b.push(m[_]);
|
|
654
655
|
return b;
|
|
655
656
|
}
|
|
656
657
|
};
|
|
657
658
|
function o() {
|
|
658
|
-
const
|
|
659
|
+
const m = "application/font-woff", b = "image/jpeg";
|
|
659
660
|
return {
|
|
660
|
-
woff:
|
|
661
|
-
woff2:
|
|
661
|
+
woff: m,
|
|
662
|
+
woff2: m,
|
|
662
663
|
ttf: "application/font-truetype",
|
|
663
664
|
eot: "application/vnd.ms-fontobject",
|
|
664
665
|
png: "image/png",
|
|
@@ -669,81 +670,81 @@ function Ut(q, t, e, s, i, n = !0) {
|
|
|
669
670
|
svg: "image/svg+xml"
|
|
670
671
|
};
|
|
671
672
|
}
|
|
672
|
-
const r =
|
|
673
|
-
function
|
|
674
|
-
return
|
|
675
|
-
const
|
|
676
|
-
return
|
|
673
|
+
const r = g(), l = k();
|
|
674
|
+
function d(m) {
|
|
675
|
+
return l.resolveAll().then((b) => {
|
|
676
|
+
const N = document.createElement("style");
|
|
677
|
+
return m.appendChild(N), N.appendChild(document.createTextNode(b)), m;
|
|
677
678
|
});
|
|
678
679
|
}
|
|
679
|
-
function
|
|
680
|
-
return /\.([^./]*?)$/g.exec(
|
|
680
|
+
function c(m) {
|
|
681
|
+
return /\.([^./]*?)$/g.exec(m)?.[1] ?? "";
|
|
681
682
|
}
|
|
682
|
-
function p(
|
|
683
|
-
return
|
|
683
|
+
function p(m) {
|
|
684
|
+
return m.search(/^(data:)/) !== -1;
|
|
684
685
|
}
|
|
685
|
-
function
|
|
686
|
-
const
|
|
687
|
-
|
|
688
|
-
const T =
|
|
689
|
-
return
|
|
686
|
+
function f(m, b) {
|
|
687
|
+
const N = document.implementation.createHTMLDocument(), _ = N.createElement("base");
|
|
688
|
+
N.head.appendChild(_);
|
|
689
|
+
const T = N.createElement("a");
|
|
690
|
+
return N.body.appendChild(T), _.href = b, T.href = m, T.href;
|
|
690
691
|
}
|
|
691
|
-
function h(
|
|
692
|
-
return new Promise(function(
|
|
692
|
+
function h(m) {
|
|
693
|
+
return new Promise(function(N) {
|
|
693
694
|
const _ = new XMLHttpRequest();
|
|
694
|
-
_.onreadystatechange = T, _.ontimeout = $, _.responseType = "blob", _.timeout = 3e4, _.open("GET",
|
|
695
|
+
_.onreadystatechange = T, _.ontimeout = $, _.responseType = "blob", _.timeout = 3e4, _.open("GET", m, !0), _.send();
|
|
695
696
|
function T() {
|
|
696
697
|
if (_.readyState !== 4) return;
|
|
697
698
|
if (_.status !== 200) {
|
|
698
|
-
|
|
699
|
+
v("cannot fetch resource: " + m + ", status: " + _.status);
|
|
699
700
|
return;
|
|
700
701
|
}
|
|
701
|
-
const
|
|
702
|
-
|
|
703
|
-
const O =
|
|
704
|
-
|
|
705
|
-
},
|
|
702
|
+
const E = new FileReader();
|
|
703
|
+
E.onloadend = function() {
|
|
704
|
+
const O = E.result.toString().split(/,/)[1];
|
|
705
|
+
N(O);
|
|
706
|
+
}, E.readAsDataURL(_.response);
|
|
706
707
|
}
|
|
707
708
|
function $() {
|
|
708
|
-
|
|
709
|
+
v("timeout of 30000ms occured while fetching resource: " + m);
|
|
709
710
|
}
|
|
710
|
-
function
|
|
711
|
-
console.error(
|
|
711
|
+
function v(E) {
|
|
712
|
+
console.error(E), N("");
|
|
712
713
|
}
|
|
713
714
|
});
|
|
714
715
|
}
|
|
715
|
-
function
|
|
716
|
-
return "data:" + b + ";base64," +
|
|
716
|
+
function y(m, b) {
|
|
717
|
+
return "data:" + b + ";base64," + m;
|
|
717
718
|
}
|
|
718
|
-
function
|
|
719
|
-
const
|
|
719
|
+
function g() {
|
|
720
|
+
const m = /url\(['"]?([^'"]+?)['"]?\)/g;
|
|
720
721
|
return {
|
|
721
722
|
inlineAll: T,
|
|
722
723
|
shouldProcess: b
|
|
723
724
|
};
|
|
724
725
|
function b($) {
|
|
725
|
-
return $.search(
|
|
726
|
+
return $.search(m) !== -1;
|
|
726
727
|
}
|
|
727
|
-
function
|
|
728
|
-
const
|
|
729
|
-
let
|
|
730
|
-
for (;
|
|
731
|
-
|
|
732
|
-
return
|
|
728
|
+
function N($) {
|
|
729
|
+
const v = [];
|
|
730
|
+
let E;
|
|
731
|
+
for (; E = m.exec($); )
|
|
732
|
+
v.push(E[1]);
|
|
733
|
+
return v.filter(function(O) {
|
|
733
734
|
return !a.isDataUrl(O);
|
|
734
735
|
});
|
|
735
736
|
}
|
|
736
|
-
function _($,
|
|
737
|
-
return Promise.resolve(
|
|
737
|
+
function _($, v, E, O) {
|
|
738
|
+
return Promise.resolve(v).then((I) => E ? a.resolveUrl(I, E) : I).then(O || a.getAndEncode).then((I) => a.dataAsUrl(I, a.mimeType(v))).then((I) => $.replace(M(v), "$1" + I + "$3"));
|
|
738
739
|
function M(I) {
|
|
739
740
|
return new RegExp(`(url\\(['"]?)(` + a.escape(I) + `)(['"]?\\))`, "g");
|
|
740
741
|
}
|
|
741
742
|
}
|
|
742
|
-
function T($,
|
|
743
|
+
function T($, v, E) {
|
|
743
744
|
if (O()) return Promise.resolve($);
|
|
744
|
-
return Promise.resolve($).then(
|
|
745
|
+
return Promise.resolve($).then(N).then((M) => {
|
|
745
746
|
let I = Promise.resolve($);
|
|
746
|
-
for (const K of M) I = I.then((lt) => _(lt, K,
|
|
747
|
+
for (const K of M) I = I.then((lt) => _(lt, K, v, E));
|
|
747
748
|
return I;
|
|
748
749
|
});
|
|
749
750
|
function O() {
|
|
@@ -751,38 +752,38 @@ function Ut(q, t, e, s, i, n = !0) {
|
|
|
751
752
|
}
|
|
752
753
|
}
|
|
753
754
|
}
|
|
754
|
-
function
|
|
755
|
+
function k() {
|
|
755
756
|
return {
|
|
756
|
-
resolveAll:
|
|
757
|
+
resolveAll: m,
|
|
757
758
|
impl: { readAll: b }
|
|
758
759
|
};
|
|
759
|
-
function
|
|
760
|
-
return b().then((
|
|
761
|
-
|
|
762
|
-
)).then((
|
|
760
|
+
function m() {
|
|
761
|
+
return b().then((N) => Promise.allSettled(
|
|
762
|
+
N.map((_) => _.resolve())
|
|
763
|
+
)).then((N) => N.join(`
|
|
763
764
|
`));
|
|
764
765
|
}
|
|
765
766
|
function b() {
|
|
766
|
-
return Promise.resolve(a.asArray(document.styleSheets)).then(_).then(
|
|
767
|
-
function
|
|
768
|
-
return $.filter((
|
|
767
|
+
return Promise.resolve(a.asArray(document.styleSheets)).then(_).then(N).then(($) => $.map(T));
|
|
768
|
+
function N($) {
|
|
769
|
+
return $.filter((v) => v.type === CSSRule.FONT_FACE_RULE).filter((v) => r.shouldProcess(v.style.getPropertyValue("src")));
|
|
769
770
|
}
|
|
770
771
|
function _($) {
|
|
771
|
-
const
|
|
772
|
-
for (const
|
|
772
|
+
const v = [];
|
|
773
|
+
for (const E of $)
|
|
773
774
|
try {
|
|
774
|
-
if (
|
|
775
|
-
a.asArray(
|
|
775
|
+
if (E.href) continue;
|
|
776
|
+
a.asArray(E.cssRules || []).forEach(v.push.bind(v));
|
|
776
777
|
} catch (O) {
|
|
777
|
-
console.error("Error while reading CSS rules from " +
|
|
778
|
+
console.error("Error while reading CSS rules from " + E.href, String(O));
|
|
778
779
|
}
|
|
779
|
-
return
|
|
780
|
+
return v;
|
|
780
781
|
}
|
|
781
782
|
function T($) {
|
|
782
783
|
return {
|
|
783
784
|
resolve: function() {
|
|
784
|
-
const
|
|
785
|
-
return r.inlineAll($.cssText,
|
|
785
|
+
const E = ($.parentStyleSheet || {}).href;
|
|
786
|
+
return r.inlineAll($.cssText, E);
|
|
786
787
|
},
|
|
787
788
|
src() {
|
|
788
789
|
return $.style.getPropertyValue("src");
|
|
@@ -791,36 +792,36 @@ function Ut(q, t, e, s, i, n = !0) {
|
|
|
791
792
|
}
|
|
792
793
|
}
|
|
793
794
|
}
|
|
794
|
-
Promise.resolve(t).then((
|
|
795
|
-
const b =
|
|
795
|
+
Promise.resolve(t).then((m) => {
|
|
796
|
+
const b = m.cloneNode(!0);
|
|
796
797
|
return b.style.padding = "0px", b.style.paddingRight = s + "px", b.style.paddingTop = i + "px", b.style.left = "0px", b.style.top = "0px", b.style.width = e.$width - e.pad_left - e.pad_right + "px", b.style.height = e.$height - e.pad_top - e.pad_bottom + "px", t.hidden = n, b;
|
|
797
|
-
}).then(
|
|
798
|
-
|
|
798
|
+
}).then(d).then((m) => {
|
|
799
|
+
m.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
|
799
800
|
const b = new Image();
|
|
800
|
-
return b.src = `data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="${e.$width}px" height="${e.$height}px"><foreignObject x="0" y="0" width="100%" height="100%">${new XMLSerializer().serializeToString(
|
|
801
|
-
`, "%0A")}</foreignObject></svg>`, new Promise((
|
|
802
|
-
b.onload = () =>
|
|
801
|
+
return b.src = `data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="${e.$width}px" height="${e.$height}px"><foreignObject x="0" y="0" width="100%" height="100%">${new XMLSerializer().serializeToString(m).replaceAll("#", "%23").replaceAll(`
|
|
802
|
+
`, "%0A")}</foreignObject></svg>`, new Promise((N) => {
|
|
803
|
+
b.onload = () => N(b);
|
|
803
804
|
});
|
|
804
|
-
}).then((
|
|
805
|
+
}).then((m) => new Promise((b) => setTimeout(() => b(m), 100))).then((m) => {
|
|
805
806
|
const b = document.createElement("canvas");
|
|
806
|
-
b.width = e.$width, b.height = e.$height, b.getContext("2d").drawImage(
|
|
807
|
-
}).catch((
|
|
807
|
+
b.width = e.$width, b.height = e.$height, b.getContext("2d").drawImage(m, 0, 0), q(J.from(b));
|
|
808
|
+
}).catch((m) => it.myTrace(`goTxt() = ${m}`));
|
|
808
809
|
}
|
|
809
|
-
class
|
|
810
|
+
class w extends W {
|
|
810
811
|
constructor(t, e, s) {
|
|
811
|
-
super(), this.ctn = t, this.canFocus = e, this.sys = s, this.#t.classList.add("sn_tx"), this.#t.style.position = "absolute",
|
|
812
|
-
const i = S.debugLog ? ({ ch: n, rect: { x: a, y: o, width: r, height:
|
|
812
|
+
super(), this.ctn = t, this.canFocus = e, this.sys = s, this.#t.classList.add("sn_tx"), this.#t.style.position = "absolute", w.#e.view.parentElement.appendChild(this.#t), this.addChild(this.#l), this.addChild(this.#p), this.#p.name = "grpDbgMasume";
|
|
813
|
+
const i = S.debugLog ? ({ ch: n, rect: { x: a, y: o, width: r, height: l } }) => console.log(`🍌 masume ch:${n} x:${a} y:${o} w:${r} h:${l}`) : () => {
|
|
813
814
|
};
|
|
814
|
-
this.#x =
|
|
815
|
+
this.#x = w.#s.oCfg.debug.masume ? (n) => {
|
|
815
816
|
i(n);
|
|
816
|
-
const { x: a, y: o, width: r, height:
|
|
817
|
-
this.#p.beginFill(6737151, 0.5).lineStyle(2, 16724736, 1).drawRect(a, o, r,
|
|
817
|
+
const { x: a, y: o, width: r, height: l } = n.rect;
|
|
818
|
+
this.#p.beginFill(6737151, 0.5).lineStyle(2, 16724736, 1).drawRect(a, o, r, l).endFill();
|
|
818
819
|
} : () => {
|
|
819
|
-
}, this.noticeCompTxt = s.isApp &&
|
|
820
|
+
}, this.noticeCompTxt = s.isApp && w.#s.oCfg.debug.dumpHtm ? () => {
|
|
820
821
|
F.notifyEndProc(wt);
|
|
821
822
|
const n = this.#t.innerHTML;
|
|
822
823
|
if (n === "") return;
|
|
823
|
-
const { fn: a, ln: o } =
|
|
824
|
+
const { fn: a, ln: o } = w.#r.nowScrFnLn(), r = `dumpHtm ${t.name.slice(0, -7).replaceAll(":", "=")}(fn=${a} line=${String(o)})`;
|
|
824
825
|
s.outputFile(
|
|
825
826
|
s.path_downloads + r + ".htm",
|
|
826
827
|
`<!doctype html><html><head><meta charset=utf-8><title>${r}</title>
|
|
@@ -834,15 +835,15 @@ $1
|
|
|
834
835
|
static #s;
|
|
835
836
|
static #e;
|
|
836
837
|
static init(t, e) {
|
|
837
|
-
|
|
838
|
+
w.#s = t, w.#e = e;
|
|
838
839
|
}
|
|
839
840
|
static #n;
|
|
840
841
|
static #r;
|
|
841
842
|
static setEvtMng(t, e) {
|
|
842
|
-
|
|
843
|
+
w.#n = t, w.#r = e;
|
|
843
844
|
}
|
|
844
845
|
static destroy() {
|
|
845
|
-
|
|
846
|
+
w.#F = /* @__PURE__ */ Object.create(null), w.#j = /* @__PURE__ */ Object.create(null), w.delBreak();
|
|
846
847
|
}
|
|
847
848
|
#t = document.createElement("span");
|
|
848
849
|
// サンプリング元
|
|
@@ -889,7 +890,7 @@ $1
|
|
|
889
890
|
const i = s.style.length;
|
|
890
891
|
for (let n = 0; n < i; ++n) {
|
|
891
892
|
const a = s.style[n];
|
|
892
|
-
if (a in
|
|
893
|
+
if (a in w.#u) {
|
|
893
894
|
it.myTrace(`${String(a)}は指定できません`, "W");
|
|
894
895
|
continue;
|
|
895
896
|
}
|
|
@@ -948,107 +949,107 @@ $1
|
|
|
948
949
|
#w = 0;
|
|
949
950
|
static #v = "<span class='sn_ch sn_ch_last'> </span>";
|
|
950
951
|
#h(t, e) {
|
|
951
|
-
|
|
952
|
+
w.#H.visible = !1;
|
|
952
953
|
let s = this.#k.length, i = "";
|
|
953
954
|
if (s === 0) {
|
|
954
|
-
if (
|
|
955
|
+
if (w.#s.oCfg.debug.masume && (S.debugLog && console.log(`🍌 masume ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
955
956
|
this.name} v:${this.visible} l:${this.x} t:${this.y} a:${this.alpha} pl:${this.#i.pad_left} pr:${this.#i.pad_right} pt:${this.#i.pad_top} pb:${this.#i.pad_bottom} w:${this.#i.$width} h:${this.#i.$height}`), this.#p.clear().beginFill(3407616, 0.2).lineStyle(1, 3407616, 1).drawRect(-this.#i.pad_left, -this.#i.pad_top, this.#i.$width, this.#i.$height).endFill().beginFill(13311, 0.2).lineStyle(2, 13311, 1).drawRect(
|
|
956
957
|
0,
|
|
957
958
|
0,
|
|
958
959
|
this.#i.$width - this.#i.pad_left - this.#i.pad_right,
|
|
959
960
|
this.#i.$height - this.#i.pad_top - this.#i.pad_bottom
|
|
960
|
-
).endFill()), this.#t.innerHTML = [...t].join("").replaceAll(/[\n\t]/g, "") +
|
|
961
|
-
const
|
|
962
|
-
this.#a ? (this.#c.break_fixed_left = (this.#i.$width - this.#i.pad_left - this.#i.pad_right -
|
|
961
|
+
).endFill()), this.#t.innerHTML = [...t].join("").replaceAll(/[\n\t]/g, "") + w.#v, !this.#c.break_fixed) {
|
|
962
|
+
const y = globalThis.getComputedStyle(this.#t), g = parseFloat(y.fontSize);
|
|
963
|
+
this.#a ? (this.#c.break_fixed_left = (this.#i.$width - this.#i.pad_left - this.#i.pad_right - g * 1.5) * this.sys.cvsScale, this.#c.break_fixed_top = 0) : (this.#c.break_fixed_left = 0, this.#c.break_fixed_top = g / 2 * this.sys.cvsScale);
|
|
963
964
|
}
|
|
964
965
|
} else
|
|
965
|
-
i = this.#t.innerHTML, --s, this.#t.getElementsByClassName("sn_ch_last").item(0)?.remove(), this.#t.querySelectorAll(":scope > br").forEach((
|
|
966
|
+
i = this.#t.innerHTML, --s, this.#t.getElementsByClassName("sn_ch_last").item(0)?.remove(), this.#t.querySelectorAll(":scope > br").forEach((y) => y.remove()), this.#t.insertAdjacentHTML(
|
|
966
967
|
"beforeend",
|
|
967
|
-
t.slice(this.#w).join("").replaceAll(/[\n\t]/g, "") +
|
|
968
|
+
t.slice(this.#w).join("").replaceAll(/[\n\t]/g, "") + w.#v
|
|
968
969
|
// 末尾改行削除挙動対策
|
|
969
970
|
);
|
|
970
|
-
this.#t.querySelectorAll(".sn_ch:has(> ruby)").forEach((
|
|
971
|
-
|
|
971
|
+
this.#t.querySelectorAll(".sn_ch:has(> ruby)").forEach((y) => {
|
|
972
|
+
y.style.background = "";
|
|
972
973
|
}), this.#w = t.length;
|
|
973
974
|
const n = this.sys.cvsScale, a = this.#t.getBoundingClientRect(), o = a.left + this.#i.pad_left, r = a.top + this.#i.pad_top;
|
|
974
|
-
let
|
|
975
|
-
if (n === 1)
|
|
976
|
-
const
|
|
975
|
+
let l;
|
|
976
|
+
if (n === 1) l = (y, g) => {
|
|
977
|
+
const k = y.getBoundingClientRect();
|
|
977
978
|
return new Y(
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
979
|
+
k.left - o,
|
|
980
|
+
k.top - r,
|
|
981
|
+
k.width,
|
|
982
|
+
k.height + ("gjqy".includes(g) ? this.#d : 0)
|
|
982
983
|
);
|
|
983
984
|
};
|
|
984
985
|
else {
|
|
985
|
-
const
|
|
986
|
-
|
|
987
|
-
const b =
|
|
986
|
+
const y = this.sys.ofsPadLeft_Dom2PIXI + a.left * (1 - n), g = this.sys.ofsPadTop_Dom2PIXI + a.top * (1 - n);
|
|
987
|
+
l = (k, m) => {
|
|
988
|
+
const b = k.getBoundingClientRect();
|
|
988
989
|
return new Y(
|
|
989
|
-
(b.left -
|
|
990
|
-
(b.top -
|
|
990
|
+
(b.left - y) / n - o,
|
|
991
|
+
(b.top - g) / n - r,
|
|
991
992
|
b.width / n,
|
|
992
|
-
(b.height + ("gjqy".includes(
|
|
993
|
+
(b.height + ("gjqy".includes(m) ? this.#d : 0)) / n
|
|
993
994
|
);
|
|
994
995
|
};
|
|
995
996
|
}
|
|
996
|
-
const [
|
|
997
|
-
this.#k =
|
|
997
|
+
const [d, c] = this.#c.hyph(this.#t, l, this.#a, s, i);
|
|
998
|
+
this.#k = d;
|
|
998
999
|
const p = B.ease(this.#$);
|
|
999
|
-
for (let
|
|
1000
|
-
const
|
|
1001
|
-
if (this.#x(
|
|
1000
|
+
for (let y = s; y < c; ++y) {
|
|
1001
|
+
const g = this.#k[y], { elm: { dataset: k, parentElement: m }, rect: b } = g, N = JSON.parse(k.arg ?? '{"delay": 0}'), _ = JSON.parse(k.add ?? "{}"), T = w.#F[_.ch_in_style];
|
|
1002
|
+
if (this.#x(g), k.cmd === "grp") {
|
|
1002
1003
|
const $ = new W();
|
|
1003
|
-
this.#l.addChild($), new
|
|
1004
|
-
this.#E($,
|
|
1004
|
+
this.#l.addChild($), new u(N.pic, $, (v) => {
|
|
1005
|
+
this.#E($, N, _, b, p, T ?? {}), $.parent || $.removeChild(v);
|
|
1005
1006
|
});
|
|
1006
1007
|
}
|
|
1007
|
-
if (
|
|
1008
|
-
const $ =
|
|
1009
|
-
|
|
1010
|
-
const
|
|
1011
|
-
this.#E(
|
|
1012
|
-
const O =
|
|
1008
|
+
if (k.lnk) {
|
|
1009
|
+
const $ = m.closest("[data-arg]"), v = JSON.parse($.dataset.arg ?? "{}");
|
|
1010
|
+
v.key = `lnk=[${String(y)}] ` + this.name;
|
|
1011
|
+
const E = new j();
|
|
1012
|
+
this.#E(E, v, _, b, p, T ?? {});
|
|
1013
|
+
const O = v.style ?? "", M = O + (v.style_hover ?? ""), I = O + (v.style_clicked ?? ""), K = v.r_style ?? "", lt = K + (v.r_style_hover ?? ""), Ct = K + (v.r_style_clicked ?? ""), yt = Array.from($.getElementsByTagName("rt"));
|
|
1013
1014
|
for (const at of yt) at.dataset.st_r_bk = at.style.cssText;
|
|
1014
1015
|
const Et = $.style.cssText, nt = (at, Nt) => {
|
|
1015
1016
|
$.style.cssText = Et + at;
|
|
1016
1017
|
for (const mt of yt) mt.style.cssText = mt.dataset.st_r_bk + Nt;
|
|
1017
1018
|
};
|
|
1018
|
-
R(
|
|
1019
|
-
|
|
1020
|
-
|
|
1019
|
+
R(v, "enabled", !0) ? w.#n.button(
|
|
1020
|
+
v,
|
|
1021
|
+
E,
|
|
1021
1022
|
() => nt(O, K),
|
|
1022
1023
|
() => this.canFocus() ? (nt(M, lt), !0) : !1,
|
|
1023
1024
|
() => nt(I, Ct)
|
|
1024
1025
|
) : nt(
|
|
1025
|
-
O + (
|
|
1026
|
-
K + (
|
|
1027
|
-
), this.#l.addChild(
|
|
1026
|
+
O + (v.style_disable ?? "color: gray;"),
|
|
1027
|
+
K + (v.r_style_disable ?? "color: gray;")
|
|
1028
|
+
), this.#l.addChild(E);
|
|
1028
1029
|
}
|
|
1029
1030
|
}
|
|
1030
|
-
const
|
|
1031
|
+
const f = Array.from(this.#t.getElementsByClassName("sn_ch_yet"));
|
|
1031
1032
|
this.#b = () => {
|
|
1032
1033
|
this.#b = () => !1;
|
|
1033
|
-
for (const
|
|
1034
|
-
|
|
1034
|
+
for (const g of f) g.className = "sn_ch";
|
|
1035
|
+
w.#H.position.set(
|
|
1035
1036
|
this.#c.break_fixed_left,
|
|
1036
1037
|
this.#c.break_fixed_top
|
|
1037
|
-
),
|
|
1038
|
-
const
|
|
1039
|
-
return this.#I.length > 0 &&
|
|
1038
|
+
), w.#H.visible = !0, this.noticeCompTxt();
|
|
1039
|
+
const y = this.#I.shift();
|
|
1040
|
+
return this.#I.length > 0 && y(), !0;
|
|
1040
1041
|
};
|
|
1041
|
-
for (const
|
|
1042
|
+
for (const y of f) y.className = y.className.replace("sn_ch_yet sn", "go");
|
|
1042
1043
|
s > 0 && ++s;
|
|
1043
1044
|
let h;
|
|
1044
|
-
for (let
|
|
1045
|
-
const { elm:
|
|
1046
|
-
if (
|
|
1047
|
-
h =
|
|
1045
|
+
for (let y = c - 2; y >= 0; --y) {
|
|
1046
|
+
const { elm: g } = this.#k[y];
|
|
1047
|
+
if (g.tagName === "SPAN") {
|
|
1048
|
+
h = g.parentElement?.tagName === "RUBY" ? g.parentElement.parentElement ?? g : g;
|
|
1048
1049
|
break;
|
|
1049
1050
|
}
|
|
1050
1051
|
}
|
|
1051
|
-
if (!h || e || s ===
|
|
1052
|
+
if (!h || e || s === c) {
|
|
1052
1053
|
this.#b();
|
|
1053
1054
|
return;
|
|
1054
1055
|
}
|
|
@@ -1083,21 +1084,21 @@ $1
|
|
|
1083
1084
|
static #z = /[{\s.,*{]/;
|
|
1084
1085
|
// https://regex101.com/r/APC91I/1
|
|
1085
1086
|
static initChStyle() {
|
|
1086
|
-
|
|
1087
|
+
w.#F = /* @__PURE__ */ Object.create(null), w.#j = /* @__PURE__ */ Object.create(null);
|
|
1087
1088
|
}
|
|
1088
1089
|
static getChInStyle(t) {
|
|
1089
|
-
return
|
|
1090
|
+
return w.#F[t];
|
|
1090
1091
|
}
|
|
1091
1092
|
static ch_in_style(t) {
|
|
1092
1093
|
const { name: e } = t;
|
|
1093
1094
|
if (!e) throw "nameは必須です";
|
|
1094
|
-
if (
|
|
1095
|
-
if (e in
|
|
1095
|
+
if (w.#z.test(e)) throw `name【${e}】に使えない文字が含まれます`;
|
|
1096
|
+
if (e in w.#F) throw `name【${e}】はすでにあります`;
|
|
1096
1097
|
const s = String(t.x ?? "=0"), i = String(t.y ?? "=0");
|
|
1097
|
-
return
|
|
1098
|
-
wait:
|
|
1098
|
+
return w.#F[e] = {
|
|
1099
|
+
wait: x(t, "wait", 500),
|
|
1099
1100
|
// アニメ・FI時間
|
|
1100
|
-
alpha:
|
|
1101
|
+
alpha: x(t, "alpha", 0),
|
|
1101
1102
|
x: s,
|
|
1102
1103
|
// 初期x値
|
|
1103
1104
|
y: i,
|
|
@@ -1109,9 +1110,9 @@ $1
|
|
|
1109
1110
|
// {x:'=250,500'} +250から+500までの間でランダムな値を現在のX位置に加算
|
|
1110
1111
|
nx: parseFloat(s.at(0) === "=" ? s.slice(1) : s),
|
|
1111
1112
|
ny: parseFloat(i.at(0) === "=" ? i.slice(1) : i),
|
|
1112
|
-
scale_x:
|
|
1113
|
-
scale_y:
|
|
1114
|
-
rotate:
|
|
1113
|
+
scale_x: x(t, "scale_x", 1),
|
|
1114
|
+
scale_y: x(t, "scale_y", 1),
|
|
1115
|
+
rotate: x(t, "rotate", 0),
|
|
1115
1116
|
join: R(t, "join", !0),
|
|
1116
1117
|
// 文字を順番に出すか(true)同時か(false)
|
|
1117
1118
|
ease: t.ease ?? "ease-out"
|
|
@@ -1120,18 +1121,18 @@ $1
|
|
|
1120
1121
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
1121
1122
|
static #j = /* @__PURE__ */ Object.create(null);
|
|
1122
1123
|
static getChOutStyle(t) {
|
|
1123
|
-
return
|
|
1124
|
+
return w.#j[t];
|
|
1124
1125
|
}
|
|
1125
1126
|
static ch_out_style(t) {
|
|
1126
1127
|
const { name: e } = t;
|
|
1127
1128
|
if (!e) throw "nameは必須です";
|
|
1128
|
-
if (
|
|
1129
|
-
if (e in
|
|
1129
|
+
if (w.#z.test(e)) throw `name【${e}】に使えない文字が含まれます`;
|
|
1130
|
+
if (e in w.#j) throw `name【${e}】はすでにあります`;
|
|
1130
1131
|
const s = String(t.x ?? "=0"), i = String(t.y ?? "=0");
|
|
1131
|
-
return
|
|
1132
|
-
wait:
|
|
1132
|
+
return w.#j[e] = {
|
|
1133
|
+
wait: x(t, "wait", 500),
|
|
1133
1134
|
// アニメ・FI時間
|
|
1134
|
-
alpha:
|
|
1135
|
+
alpha: x(t, "alpha", 0),
|
|
1135
1136
|
x: s,
|
|
1136
1137
|
// 初期x値
|
|
1137
1138
|
y: i,
|
|
@@ -1143,26 +1144,26 @@ $1
|
|
|
1143
1144
|
// {x:'=250,500'} +250から+500までの間でランダムな値を現在のX位置に加算
|
|
1144
1145
|
nx: parseFloat(s.at(0) === "=" ? s.slice(1) : s),
|
|
1145
1146
|
ny: parseFloat(i.at(0) === "=" ? i.slice(1) : i),
|
|
1146
|
-
scale_x:
|
|
1147
|
-
scale_y:
|
|
1148
|
-
rotate:
|
|
1147
|
+
scale_x: x(t, "scale_x", 1),
|
|
1148
|
+
scale_y: x(t, "scale_y", 1),
|
|
1149
|
+
rotate: x(t, "rotate", 0),
|
|
1149
1150
|
join: R(t, "join", !1),
|
|
1150
1151
|
// 文字を順番に出すか(true)同時か(false)
|
|
1151
1152
|
ease: t.ease ?? "ease-out"
|
|
1152
1153
|
};
|
|
1153
1154
|
}
|
|
1154
1155
|
static #H = new W();
|
|
1155
|
-
static #O = new
|
|
1156
|
+
static #O = new u();
|
|
1156
1157
|
dispBreak(t) {
|
|
1157
|
-
|
|
1158
|
-
const e =
|
|
1159
|
-
e.visible = !1, this.addChild(e),
|
|
1160
|
-
e.parent ? (s.x =
|
|
1158
|
+
w.delBreak();
|
|
1159
|
+
const e = w.#H;
|
|
1160
|
+
e.visible = !1, this.addChild(e), w.#O.destroy(), w.#O = new u(t.pic, e, (s) => {
|
|
1161
|
+
e.parent ? (s.x = x(t, "x", 0), s.y = x(t, "y", 0), s.width = x(t, "width", this.#i.fontsize), s.height = x(t, "height", this.#i.fontsize)) : e.removeChild(s);
|
|
1161
1162
|
});
|
|
1162
1163
|
}
|
|
1163
1164
|
static delBreak() {
|
|
1164
|
-
const t =
|
|
1165
|
-
t.parent?.removeChild(t),
|
|
1165
|
+
const t = w.#H;
|
|
1166
|
+
t.parent?.removeChild(t), w.#O.destroy();
|
|
1166
1167
|
}
|
|
1167
1168
|
#$ = "Quadratic.Out";
|
|
1168
1169
|
#N = "Quadratic.Out";
|
|
@@ -1181,7 +1182,7 @@ $1
|
|
|
1181
1182
|
// 縦中横
|
|
1182
1183
|
);
|
|
1183
1184
|
if (!o.ch_out_style) return;
|
|
1184
|
-
const r =
|
|
1185
|
+
const r = w.#j[o.ch_out_style];
|
|
1185
1186
|
if (r) {
|
|
1186
1187
|
if (r.wait === 0) {
|
|
1187
1188
|
a.style.display = "none";
|
|
@@ -1193,13 +1194,13 @@ $1
|
|
|
1193
1194
|
const n = () => {
|
|
1194
1195
|
e.parentElement.removeChild(e);
|
|
1195
1196
|
for (const a of this.#l.removeChildren())
|
|
1196
|
-
a instanceof W &&
|
|
1197
|
+
a instanceof W && w.#n.unButton(a), a.destroy();
|
|
1197
1198
|
};
|
|
1198
1199
|
i === 0 ? (this.#t.textContent = "", n()) : e.lastElementChild?.addEventListener("animationend", n, { once: !0 }), this.#t = t;
|
|
1199
1200
|
}
|
|
1200
1201
|
reNew() {
|
|
1201
1202
|
this.#_();
|
|
1202
|
-
const t = new
|
|
1203
|
+
const t = new w(this.ctn, () => this.canFocus(), this.sys);
|
|
1203
1204
|
return t.#i = this.#i, t.#t.style.cssText = this.#t.style.cssText, t.#y = this.#y, t.name = this.name, t.#f(), t.#W = this.#W, t.#$ = this.#$, t.#N = this.#N, this.#c.reNew(t.#c), this.destroy(), t;
|
|
1204
1205
|
}
|
|
1205
1206
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1254,7 +1255,7 @@ $1
|
|
|
1254
1255
|
return `"txt":"${this.#t.textContent.replaceAll(/(["\\])/g, "\\$1")}", "style":{${t.join(",")}}`;
|
|
1255
1256
|
}
|
|
1256
1257
|
destroy() {
|
|
1257
|
-
|
|
1258
|
+
w.delBreak(), this.#t.parentElement.removeChild(this.#t), this.removeChild(this.#l), this.removeChild(this.#p), super.destroy();
|
|
1258
1259
|
}
|
|
1259
1260
|
}
|
|
1260
1261
|
class z extends W {
|
|
@@ -1264,31 +1265,31 @@ class z extends W {
|
|
|
1264
1265
|
enabled: R(t, "enabled", !0),
|
|
1265
1266
|
x: this.x = V(t.left ?? 0),
|
|
1266
1267
|
y: this.y = V(t.top ?? 0),
|
|
1267
|
-
rotation: this.angle =
|
|
1268
|
+
rotation: this.angle = x(t, "rotation", this.angle),
|
|
1268
1269
|
// flash : rotation is in degrees.
|
|
1269
1270
|
// pixijs: rotation is in radians, angle is in degrees.
|
|
1270
|
-
pivot_x: this.pivot.x =
|
|
1271
|
-
pivot_y: this.pivot.y =
|
|
1272
|
-
scale_x: this.scale.x =
|
|
1273
|
-
scale_y: this.scale.y =
|
|
1271
|
+
pivot_x: this.pivot.x = x(t, "pivot_x", this.pivot.x),
|
|
1272
|
+
pivot_y: this.pivot.y = x(t, "pivot_y", this.pivot.y),
|
|
1273
|
+
scale_x: this.scale.x = x(t, "scale_x", this.scale.x),
|
|
1274
|
+
scale_y: this.scale.y = x(t, "scale_y", this.scale.y),
|
|
1274
1275
|
alpha: 1,
|
|
1275
1276
|
text: "",
|
|
1276
1277
|
b_pic: "",
|
|
1277
1278
|
width: 0,
|
|
1278
1279
|
height: 0
|
|
1279
1280
|
}, this.getBtnBounds = () => (this.#n.x = this.#t.x, this.#n.y = this.#t.y, this.#n), this.#t.enabled && e.button(t, this, () => this.normal(), () => this.#p(), () => this.#u()), t.pic) {
|
|
1280
|
-
this.#t.type = "pic", this.#r = new
|
|
1281
|
+
this.#t.type = "pic", this.#r = new u(
|
|
1281
1282
|
t.pic,
|
|
1282
1283
|
this,
|
|
1283
|
-
(
|
|
1284
|
-
this.#c(
|
|
1284
|
+
(c) => {
|
|
1285
|
+
this.#c(c), this.#n.width = c.width * this.#t.scale_x, this.#n.height = c.height * this.#t.scale_y;
|
|
1285
1286
|
},
|
|
1286
|
-
(
|
|
1287
|
+
(c) => s()
|
|
1287
1288
|
);
|
|
1288
1289
|
return;
|
|
1289
1290
|
}
|
|
1290
1291
|
if (!t.text) throw "textまたはpic属性は必須です";
|
|
1291
|
-
const n =
|
|
1292
|
+
const n = x(t, "height", 30), a = new Tt({
|
|
1292
1293
|
align: "center",
|
|
1293
1294
|
dropShadow: !0,
|
|
1294
1295
|
dropShadowAlpha: 0.7,
|
|
@@ -1301,15 +1302,15 @@ class z extends W {
|
|
|
1301
1302
|
padding: 5
|
|
1302
1303
|
});
|
|
1303
1304
|
if (t.style) try {
|
|
1304
|
-
const
|
|
1305
|
-
for (const [p,
|
|
1306
|
-
this.#t = { ...this.#t, ...
|
|
1307
|
-
} catch (
|
|
1308
|
-
throw
|
|
1305
|
+
const c = JSON.parse(t.style);
|
|
1306
|
+
for (const [p, f] of Object.entries(c)) a[p] = f;
|
|
1307
|
+
this.#t = { ...this.#t, ...c };
|
|
1308
|
+
} catch (c) {
|
|
1309
|
+
throw c instanceof SyntaxError ? new Error(dt(t, "style", c.message)) : "fn:Button.ts style";
|
|
1309
1310
|
}
|
|
1310
1311
|
const o = new Pt(t.text ?? "", a);
|
|
1311
|
-
o.alpha =
|
|
1312
|
-
o.text =
|
|
1312
|
+
o.alpha = x(t, "alpha", o.alpha), o.width = x(t, "width", 100), o.height = t.height = n, this.setText = (c) => {
|
|
1313
|
+
o.text = c;
|
|
1313
1314
|
}, this.#t = {
|
|
1314
1315
|
...this.#t,
|
|
1315
1316
|
type: "text",
|
|
@@ -1320,39 +1321,39 @@ class z extends W {
|
|
|
1320
1321
|
height: o.height
|
|
1321
1322
|
};
|
|
1322
1323
|
let r = !1;
|
|
1323
|
-
if (this.#t.width = this.width, this.#t.height = this.height, t.b_pic && (this.#t.b_pic = t.b_pic, this.#r = new
|
|
1324
|
+
if (this.#t.width = this.width, this.#t.height = this.height, t.b_pic && (this.#t.b_pic = t.b_pic, this.#r = new u(
|
|
1324
1325
|
t.b_pic,
|
|
1325
1326
|
this,
|
|
1326
|
-
(
|
|
1327
|
-
this.#l(
|
|
1327
|
+
(c) => {
|
|
1328
|
+
this.#l(c, o), this.#t.width = this.width, this.#t.height = this.height, o.name = JSON.stringify(this.#t);
|
|
1328
1329
|
},
|
|
1329
|
-
(
|
|
1330
|
-
H.setBlendmode(this, t),
|
|
1330
|
+
(c) => {
|
|
1331
|
+
H.setBlendmode(this, t), c && s();
|
|
1331
1332
|
}
|
|
1332
1333
|
), r = this.#r.ret), o.name = JSON.stringify(this.#t), this.addChild(o), this.#n.width = o.width, this.#n.height = o.height, t.b_pic || H.setBlendmode(this, t), z.#s(this, o), !this.#t.enabled) {
|
|
1333
1334
|
r || s();
|
|
1334
1335
|
return;
|
|
1335
1336
|
}
|
|
1336
|
-
const
|
|
1337
|
+
const l = a.clone();
|
|
1337
1338
|
if (t.style_hover) try {
|
|
1338
|
-
const
|
|
1339
|
-
for (const [p,
|
|
1340
|
-
} catch (
|
|
1341
|
-
throw
|
|
1339
|
+
const c = JSON.parse(t.style_hover);
|
|
1340
|
+
for (const [p, f] of Object.entries(c)) l[p] = f;
|
|
1341
|
+
} catch (c) {
|
|
1342
|
+
throw c instanceof SyntaxError ? new Error(dt(t, "style_hover", c.message)) : "fn:Button.ts style_hover";
|
|
1342
1343
|
}
|
|
1343
|
-
else
|
|
1344
|
-
const
|
|
1344
|
+
else l.fill = "white";
|
|
1345
|
+
const d = l.clone();
|
|
1345
1346
|
if (t.style_clicked) try {
|
|
1346
|
-
const
|
|
1347
|
-
for (const [p,
|
|
1348
|
-
} catch (
|
|
1349
|
-
throw
|
|
1347
|
+
const c = JSON.parse(t.style_clicked);
|
|
1348
|
+
for (const [p, f] of Object.entries(c)) d[p] = f;
|
|
1349
|
+
} catch (c) {
|
|
1350
|
+
throw c instanceof SyntaxError ? new Error(dt(t, "style_clicked", c.message)) : "fn:Button.ts style_clicked";
|
|
1350
1351
|
}
|
|
1351
|
-
else
|
|
1352
|
+
else d.dropShadow = !1;
|
|
1352
1353
|
this.normal = () => {
|
|
1353
1354
|
o.style = a;
|
|
1354
|
-
}, this.#p = () => i() ? (o.style =
|
|
1355
|
-
o.style =
|
|
1355
|
+
}, this.#p = () => i() ? (o.style = l, !0) : !1, this.#u = () => {
|
|
1356
|
+
o.style = d;
|
|
1356
1357
|
}, r || s();
|
|
1357
1358
|
}
|
|
1358
1359
|
static fontFamily = "'Hiragino Sans', 'Hiragino Kaku Gothic ProN', '游ゴシック Medium', meiryo, sans-serif";
|
|
@@ -1372,7 +1373,7 @@ class z extends W {
|
|
|
1372
1373
|
getBtnBounds = () => this.#n;
|
|
1373
1374
|
// 文字ボタンは背景画像を含まない位置指定なので、その当たり判定用
|
|
1374
1375
|
#n = new Y();
|
|
1375
|
-
#r = new
|
|
1376
|
+
#r = new u();
|
|
1376
1377
|
// #idc : DesignCast;
|
|
1377
1378
|
#t;
|
|
1378
1379
|
destroy() {
|
|
@@ -1404,11 +1405,11 @@ class z extends W {
|
|
|
1404
1405
|
#u = () => {
|
|
1405
1406
|
};
|
|
1406
1407
|
#c(t) {
|
|
1407
|
-
this.#t.alpha = t.alpha =
|
|
1408
|
-
const e = t.width / 3, s = this.#t.enabled ? e : t.width, i = t.height, n = t.texture.baseTexture, a = new J(n, new Y(0, 0, e, i)), o = new J(n, new Y(e, 0, e, i)), r = new J(n, new Y(e * 2, 0, e, i)),
|
|
1408
|
+
this.#t.alpha = t.alpha = x(this.hArg, "alpha", t.alpha);
|
|
1409
|
+
const e = t.width / 3, s = this.#t.enabled ? e : t.width, i = t.height, n = t.texture.baseTexture, a = new J(n, new Y(0, 0, e, i)), o = new J(n, new Y(e, 0, e, i)), r = new J(n, new Y(e * 2, 0, e, i)), l = () => {
|
|
1409
1410
|
t.texture = a;
|
|
1410
1411
|
};
|
|
1411
|
-
this.#t.enabled &&
|
|
1412
|
+
this.#t.enabled && l(), this.normal = l, this.#p = () => this.canFocus() ? (t.texture = r, !0) : !1, this.#u = () => {
|
|
1412
1413
|
t.texture = o;
|
|
1413
1414
|
}, "width" in this.hArg ? (this.#t.width = V(this.hArg.width), this.scale.x *= this.#t.width / s) : this.#t.width = s, "height" in this.hArg ? (this.#t.height = V(this.hArg.height), this.scale.y *= this.#t.height / i) : this.#t.height = i, t.name = JSON.stringify(this.#t), z.#e(this, t, s, i);
|
|
1414
1415
|
}
|
|
@@ -1419,7 +1420,7 @@ class P extends H {
|
|
|
1419
1420
|
static #n;
|
|
1420
1421
|
static #r;
|
|
1421
1422
|
static init(t, e, s, i, n, a) {
|
|
1422
|
-
this.#s = t,
|
|
1423
|
+
this.#s = t, w.init(t, a), this.#e = s, this.#r = i, this.#n = n, s.setDoRecProc((o) => this.chgDoRec(o)), e.autowc = (o) => this.#i(o), e.autowc({ enabled: !1, text: "", time: 0 }), e.ch_in_style = (o) => this.#t(o), e.ch_out_style = (o) => this.#l(o), w.initChStyle(), Ft(), ot(
|
|
1423
1424
|
t.matchPath(".+", Z.FONT).flatMap((o) => Object.values(o).map((r) => `
|
|
1424
1425
|
@font-face {
|
|
1425
1426
|
font-family: '${r}';
|
|
@@ -1464,7 +1465,7 @@ class P extends H {
|
|
|
1464
1465
|
}
|
|
1465
1466
|
// 文字出現演出
|
|
1466
1467
|
static #t(t) {
|
|
1467
|
-
const e =
|
|
1468
|
+
const e = w.ch_in_style(t), s = e.x.startsWith("=") ? `${e.nx * 100}%` : `${e.nx}px`, i = e.y.startsWith("=") ? `${e.ny * 100}%` : `${e.ny}px`, { name: n } = t;
|
|
1468
1469
|
return ot(`
|
|
1469
1470
|
.sn_ch_in_${n} {
|
|
1470
1471
|
position: relative;
|
|
@@ -1484,7 +1485,7 @@ class P extends H {
|
|
|
1484
1485
|
}
|
|
1485
1486
|
// 文字消去演出
|
|
1486
1487
|
static #l(t) {
|
|
1487
|
-
const e =
|
|
1488
|
+
const e = w.ch_out_style(t), s = e.x.startsWith("=") ? `${e.nx * 100}%` : `${e.nx}px`, i = e.y.startsWith("=") ? `${e.ny * 100}%` : `${e.ny}px`, { name: n } = t;
|
|
1488
1489
|
return ot(`
|
|
1489
1490
|
.go_ch_out_${n} {
|
|
1490
1491
|
position: relative;
|
|
@@ -1501,7 +1502,7 @@ class P extends H {
|
|
|
1501
1502
|
static #p;
|
|
1502
1503
|
static #u;
|
|
1503
1504
|
static setEvtMng(t, e, s) {
|
|
1504
|
-
this.#p = t, this.#u = e,
|
|
1505
|
+
this.#p = t, this.#u = e, w.setEvtMng(t, s);
|
|
1505
1506
|
}
|
|
1506
1507
|
// 文字ごとのウェイト
|
|
1507
1508
|
static #c = !1;
|
|
@@ -1528,7 +1529,7 @@ class P extends H {
|
|
|
1528
1529
|
#g = "";
|
|
1529
1530
|
// 背景画像無し(=単色塗り)
|
|
1530
1531
|
// 文字表示
|
|
1531
|
-
#o = new
|
|
1532
|
+
#o = new w(this.ctn, () => this.canFocus(), P.#u);
|
|
1532
1533
|
#I = new pt();
|
|
1533
1534
|
#k = document.createElement("span");
|
|
1534
1535
|
// cssチェック・保存用
|
|
@@ -1583,8 +1584,8 @@ class P extends H {
|
|
|
1583
1584
|
it.myTrace(`${r}は指定できません`, "W");
|
|
1584
1585
|
continue;
|
|
1585
1586
|
}
|
|
1586
|
-
const
|
|
1587
|
-
|
|
1587
|
+
const l = i.style[r];
|
|
1588
|
+
l && (a[r] = l);
|
|
1588
1589
|
}
|
|
1589
1590
|
} else this.#k.style.cssText = "";
|
|
1590
1591
|
if ("alpha" in t) for (const i of this.#v.children) i.alpha = this.ctn.alpha;
|
|
@@ -1597,7 +1598,7 @@ class P extends H {
|
|
|
1597
1598
|
#h(t) {
|
|
1598
1599
|
const { in_style: e } = t;
|
|
1599
1600
|
if (!e) return;
|
|
1600
|
-
const s =
|
|
1601
|
+
const s = w.getChInStyle(e);
|
|
1601
1602
|
if (!s) throw `存在しないin_style【${e}】です`;
|
|
1602
1603
|
this.#b = e, this.#E = s.join;
|
|
1603
1604
|
}
|
|
@@ -1612,19 +1613,19 @@ class P extends H {
|
|
|
1612
1613
|
#V(t) {
|
|
1613
1614
|
const { out_style: e } = t;
|
|
1614
1615
|
if (!e) return;
|
|
1615
|
-
if (!
|
|
1616
|
+
if (!w.getChOutStyle(e)) throw `存在しないout_style【${e}】です`;
|
|
1616
1617
|
this.#F = e;
|
|
1617
1618
|
}
|
|
1618
1619
|
#F = "";
|
|
1619
|
-
#z = new
|
|
1620
|
+
#z = new u();
|
|
1620
1621
|
#j(t, e) {
|
|
1621
1622
|
if ("back_clear" in t)
|
|
1622
1623
|
return R(t, "back_clear", !1) && (this.#d = 0, this.#f = 0, this.#y = !1, this.#g = ""), e(!1), !1;
|
|
1623
|
-
this.#f =
|
|
1624
|
+
this.#f = x(t, "b_alpha", this.#f), this.#y = R(t, "b_alpha_isfixed", this.#y);
|
|
1624
1625
|
const s = (this.#y ? 1 : Number(P.#e.getVal("sys:TextLayer.Back.Alpha"))) * this.#f;
|
|
1625
1626
|
if (t.b_pic) {
|
|
1626
1627
|
if (this.#g !== t.b_pic)
|
|
1627
|
-
return this.#g = t.b_pic, this.#a && (this.ctn.removeChild(this.#a), this.#a.destroy()), this.#z = new
|
|
1628
|
+
return this.#g = t.b_pic, this.#a && (this.ctn.removeChild(this.#a), this.#a.destroy()), this.#z = new u(this.#g, this.ctn, (i) => {
|
|
1628
1629
|
this.#a = i, i.name = "back(pic)", i.visible = s > 0, i.alpha = s, this.#o.setMySize(i.width, i.height), this.ctn.setChildIndex(i, 0), e(!0);
|
|
1629
1630
|
}), this.#z.ret;
|
|
1630
1631
|
} else "b_color" in t && (this.#d = vt(t, "b_color", 0), this.#a && (this.ctn.removeChild(this.#a), this.#a.destroy()), this.#g = "", this.ctn.addChildAt(
|
|
@@ -1764,8 +1765,8 @@ class P extends H {
|
|
|
1764
1765
|
// breakではない
|
|
1765
1766
|
case "add":
|
|
1766
1767
|
{
|
|
1767
|
-
const
|
|
1768
|
-
this.#C.push(`<span${p} style='${
|
|
1768
|
+
const l = JSON.parse(r), { style: d = "", wait: c = null } = l, { cl: p, sty: f } = this.#U(!0, c ? V(c) : null);
|
|
1769
|
+
this.#C.push(`<span${p} style='${f} display: inline; ${d}'>`), delete l.style, this.#P(l);
|
|
1769
1770
|
}
|
|
1770
1771
|
return;
|
|
1771
1772
|
// breakではない
|
|
@@ -1776,37 +1777,37 @@ class P extends H {
|
|
|
1776
1777
|
case "grp":
|
|
1777
1778
|
this.#R = !0;
|
|
1778
1779
|
{
|
|
1779
|
-
const
|
|
1780
|
-
if (
|
|
1781
|
-
this.#o.dispBreak(
|
|
1780
|
+
const l = JSON.parse(r);
|
|
1781
|
+
if (l.id ??= String(this.#C.length), l.id === "break") {
|
|
1782
|
+
this.#o.dispBreak(l);
|
|
1782
1783
|
return;
|
|
1783
1784
|
}
|
|
1784
|
-
this.#B = !1,
|
|
1785
|
-
const { r:
|
|
1786
|
-
n = `<span${
|
|
1785
|
+
this.#B = !1, l.delay = this.#J, l.r ??= "", l.style ??= "", l.r_style ??= "";
|
|
1786
|
+
const { r: d, wait: c = null, r_style: p } = l, { cl: f, sty: h, lnk: y } = this.#U(!0, c ? V(c) : null);
|
|
1787
|
+
n = `<span${f} style='${h} ${l.style}'><ruby><span data-cmd='grp' data-arg='${JSON.stringify(l)}'${y} style='${h} display: inline;'> </span><rt${y}${this.#L(
|
|
1787
1788
|
" ",
|
|
1788
|
-
|
|
1789
|
+
d,
|
|
1789
1790
|
this.#S,
|
|
1790
1791
|
this.#k.style.cssText + (this.#T.at(-1)?.o.r_style ?? "") + p
|
|
1791
|
-
)}>${
|
|
1792
|
+
)}>${l.r}</rt></ruby></span>`;
|
|
1792
1793
|
}
|
|
1793
1794
|
break;
|
|
1794
1795
|
case "tcy":
|
|
1795
1796
|
this.#B = !1, this.#R = !0;
|
|
1796
1797
|
{
|
|
1797
|
-
const { t:
|
|
1798
|
-
P.#e.doRecLog() && (this.#q += t + (s ? `《${s}》` : ""), this.#D +=
|
|
1799
|
-
const h = S.isSafari ?
|
|
1800
|
-
n = `<span${
|
|
1801
|
-
|
|
1798
|
+
const { t: l = "", r: d = "", wait: c = null, style: p = "", r_style: f = "" } = JSON.parse(r);
|
|
1799
|
+
P.#e.doRecLog() && (this.#q += t + (s ? `《${s}》` : ""), this.#D += l);
|
|
1800
|
+
const h = S.isSafari ? d.replaceAll(/[A-Za-z0-9]/g, (m) => String.fromCharCode(m.charCodeAt(0) + 65248)) : d, { cl: y, sty: g, lnk: k } = this.#U(!0, c ? V(c) : null);
|
|
1801
|
+
n = `<span${y} style='${g}${this.#$(l)} ${p}'><ruby><span${k} style='${g} display: inline; text-combine-upright: all;'>${l}</span><rt${k}${this.#L(
|
|
1802
|
+
l,
|
|
1802
1803
|
h,
|
|
1803
1804
|
this.#S,
|
|
1804
|
-
this.#k.style.cssText + (this.#T.at(-1)?.o.r_style ?? "") +
|
|
1805
|
+
this.#k.style.cssText + (this.#T.at(-1)?.o.r_style ?? "") + f
|
|
1805
1806
|
)}>${h}</rt></ruby></span>`;
|
|
1806
1807
|
}
|
|
1807
1808
|
break;
|
|
1808
1809
|
case "del":
|
|
1809
|
-
|
|
1810
|
+
w.delBreak();
|
|
1810
1811
|
return;
|
|
1811
1812
|
// breakではない
|
|
1812
1813
|
case "span":
|
|
@@ -1816,10 +1817,10 @@ class P extends H {
|
|
|
1816
1817
|
case "link":
|
|
1817
1818
|
this.#R = !0;
|
|
1818
1819
|
{
|
|
1819
|
-
const
|
|
1820
|
-
|
|
1821
|
-
const { cl:
|
|
1822
|
-
this.#C.push(`<span${
|
|
1820
|
+
const l = JSON.parse(r);
|
|
1821
|
+
l[":link"] = " data-lnk='@'";
|
|
1822
|
+
const { cl: d, sty: c, curpos: p } = this.#U(!1, l.wait ? V(l.wait) : null);
|
|
1823
|
+
this.#C.push(`<span${d} style='${c} display: inline; ${l.style ?? ""}' ${p} data-arg='${r}'>`), delete l.style, this.#K(l);
|
|
1823
1824
|
}
|
|
1824
1825
|
return;
|
|
1825
1826
|
// breakではない
|
|
@@ -1839,7 +1840,7 @@ class P extends H {
|
|
|
1839
1840
|
P.#e.doRecLog() && (this.#q += i + (e ? `《${e}》` : ""), t !== " " && (this.#D += t));
|
|
1840
1841
|
const { cl: n, sty: a, lnk: o } = this.#U(!0, null, t);
|
|
1841
1842
|
return e ? `<span${n} style='${a} ${this.#$(t)}'><ruby>${// 文字個別に出現させるため以下にも ${cl} が必要
|
|
1842
|
-
Array.from(t).map((r,
|
|
1843
|
+
Array.from(t).map((r, l) => `<span${n}${o} style='${l > 0 ? this.#U(!0, null, t).sty : a} display: inline;'>${r === " " ? " " : r === " " ? " " : r}</span>`).join("")}<rt${o}${this.#L(
|
|
1843
1844
|
t,
|
|
1844
1845
|
e,
|
|
1845
1846
|
s,
|
|
@@ -2011,32 +2012,32 @@ class C {
|
|
|
2011
2012
|
if (!s) throw "srcは必須です";
|
|
2012
2013
|
const r = "const.sn.frm." + e;
|
|
2013
2014
|
if (this.val.getVal(`tmp:${r}`)) throw `frame【${e}】はすでにあります`;
|
|
2014
|
-
const
|
|
2015
|
-
C.#n.cvs.insertAdjacentHTML("beforebegin", `<iframe id="${e}" style="opacity: ${i}; ${
|
|
2015
|
+
const l = R(t, "visible", !0), d = t.b_color ? ` background-color: ${t.b_color};` : "", c = this.#c(t);
|
|
2016
|
+
C.#n.cvs.insertAdjacentHTML("beforebegin", `<iframe id="${e}" style="opacity: ${i}; ${d} position: absolute; left:${C.#e.ofsLeft4elm + c.x * C.#e.cvsScale}px; top: ${C.#e.ofsTop4elm + c.y * C.#e.cvsScale}px; z-index: 1; border: 0px; overflow: hidden; display: ${l ? "inline" : "none"}; transform: scale(${n}, ${a}) rotate(${o}deg);" width="${c.width * C.#e.cvsScale}" height="${c.height * C.#e.cvsScale}"></iframe>`);
|
|
2016
2017
|
const p = F.procID + `add_frame id:${e}`;
|
|
2017
2018
|
F.beginProc(p);
|
|
2018
|
-
const
|
|
2019
|
+
const f = C.#s.searchPath(s, Z.HTML), h = new Q().add({ name: s, url: f, xhrType: D.XHR_RESPONSE_TYPE.TEXT });
|
|
2019
2020
|
return C.#e.arg.crypto && h.use(
|
|
2020
2021
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
2021
|
-
(
|
|
2022
|
-
|
|
2023
|
-
}).catch((
|
|
2024
|
-
C.#n.errScript(`[add_frame]Html ロード失敗です src:${
|
|
2022
|
+
(y, g) => void C.#e.dec(y.extension, y.data).then((k) => {
|
|
2023
|
+
y.data = k, g();
|
|
2024
|
+
}).catch((k) => {
|
|
2025
|
+
C.#n.errScript(`[add_frame]Html ロード失敗です src:${y.name} ${k}`, !1), g();
|
|
2025
2026
|
})
|
|
2026
|
-
), h.load((
|
|
2027
|
-
const
|
|
2028
|
-
this.#t[e] =
|
|
2029
|
-
const
|
|
2030
|
-
|
|
2027
|
+
), h.load((y, g) => {
|
|
2028
|
+
const k = document.getElementById(e);
|
|
2029
|
+
this.#t[e] = k, this.#u[e] = !1;
|
|
2030
|
+
const m = f.lastIndexOf("/") + 1, b = f.slice(0, m), N = b.slice(0, m);
|
|
2031
|
+
k.srcdoc = String(g[s]?.data).replace("sn_repRes();", "").replaceAll(
|
|
2031
2032
|
/\s(?:src|href)=(["'])(\S+?)\1/g,
|
|
2032
2033
|
// 【\s】が大事、data-src弾く
|
|
2033
|
-
(_, T, $) => $.startsWith("../") ?
|
|
2034
|
-
),
|
|
2034
|
+
(_, T, $) => $.startsWith("../") ? N + _.slice(3) : _.replace("./", "").replace(T, T + b)
|
|
2035
|
+
), k.srcdoc.includes("true/*WEBP*/;") && (k.srcdoc = k.srcdoc.replaceAll(
|
|
2035
2036
|
/data-src="(.+?\.)(?:jpe?g|png)/g,
|
|
2036
2037
|
(_, T) => `data-src="${T}webp`
|
|
2037
|
-
)),
|
|
2038
|
-
F.endProc(p), this.val.setVal_Nochk("tmp", r, !0), this.val.setVal_Nochk("tmp", r + ".alpha", i), this.val.setVal_Nochk("tmp", r + ".x",
|
|
2039
|
-
const _ =
|
|
2038
|
+
)), k.onload = () => {
|
|
2039
|
+
F.endProc(p), this.val.setVal_Nochk("tmp", r, !0), this.val.setVal_Nochk("tmp", r + ".alpha", i), this.val.setVal_Nochk("tmp", r + ".x", c.x), this.val.setVal_Nochk("tmp", r + ".y", c.y), this.val.setVal_Nochk("tmp", r + ".scale_x", n), this.val.setVal_Nochk("tmp", r + ".scale_y", a), this.val.setVal_Nochk("tmp", r + ".rotate", o), this.val.setVal_Nochk("tmp", r + ".width", c.width), this.val.setVal_Nochk("tmp", r + ".height", c.height), this.val.setVal_Nochk("tmp", r + ".visible", l);
|
|
2040
|
+
const _ = k.contentWindow;
|
|
2040
2041
|
this.#r.resvFlameEvent(_.document.body), _.sn_repRes?.((T) => C.#x(T.dataset.src ?? "", T));
|
|
2041
2042
|
};
|
|
2042
2043
|
}), !0;
|
|
@@ -2049,10 +2050,10 @@ class C {
|
|
|
2049
2050
|
#c(t) {
|
|
2050
2051
|
const e = { ...t }, s = C.#e.resolution;
|
|
2051
2052
|
return new DOMRect(
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2053
|
+
x(e, "x", 0) * s,
|
|
2054
|
+
x(e, "y", 0) * s,
|
|
2055
|
+
x(e, "width", S.stageW) * s,
|
|
2056
|
+
x(e, "height", S.stageH) * s
|
|
2056
2057
|
);
|
|
2057
2058
|
}
|
|
2058
2059
|
static #x(t, e, s) {
|
|
@@ -2067,23 +2068,23 @@ class C {
|
|
|
2067
2068
|
return;
|
|
2068
2069
|
}
|
|
2069
2070
|
this.#i[t] = [e];
|
|
2070
|
-
const [a = "", o = ""] = t.split("?"), r = C.#s.searchPath(a, Z.SP_GSM),
|
|
2071
|
-
C.#e.use4ViteElectron(t, r,
|
|
2072
|
-
if (
|
|
2073
|
-
|
|
2071
|
+
const [a = "", o = ""] = t.split("?"), r = C.#s.searchPath(a, Z.SP_GSM), l = new Q().add({ name: t, url: r, xhrType: D.XHR_RESPONSE_TYPE.BUFFER });
|
|
2072
|
+
C.#e.use4ViteElectron(t, r, l, C.#n) || C.#e.arg.crypto && r.endsWith(".bin") && l.use((d, c) => {
|
|
2073
|
+
if (d.extension !== "bin") {
|
|
2074
|
+
c();
|
|
2074
2075
|
return;
|
|
2075
2076
|
}
|
|
2076
|
-
C.#e.decAB(
|
|
2077
|
-
|
|
2077
|
+
C.#e.decAB(d.data).then((p) => {
|
|
2078
|
+
d.data = p, p instanceof HTMLImageElement && (d.type = D.TYPE.IMAGE), c();
|
|
2078
2079
|
}).catch((p) => {
|
|
2079
|
-
C.#n.errScript(`FrameMng loadPic ロード失敗です fn:${
|
|
2080
|
+
C.#n.errScript(`FrameMng loadPic ロード失敗です fn:${d.name} ${p}`, !1), c();
|
|
2080
2081
|
});
|
|
2081
|
-
}),
|
|
2082
|
-
for (const [p, { data: { src:
|
|
2083
|
-
const h = this.#d[p] =
|
|
2084
|
-
(
|
|
2085
|
-
if (
|
|
2086
|
-
|
|
2082
|
+
}), l.load((d, c) => {
|
|
2083
|
+
for (const [p, { data: { src: f } }] of Object.entries(c)) {
|
|
2084
|
+
const h = this.#d[p] = f + // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
2085
|
+
(f.startsWith("blob:") || f.startsWith("data:") ? "" : o ? "?" + o : ""), y = this.#i[p];
|
|
2086
|
+
if (y) for (const g of y)
|
|
2087
|
+
g.src = h, s && (g.onload = () => s(g));
|
|
2087
2088
|
delete this.#i[p];
|
|
2088
2089
|
}
|
|
2089
2090
|
});
|
|
@@ -2139,14 +2140,14 @@ class C {
|
|
|
2139
2140
|
const i = "const.sn.frm." + e;
|
|
2140
2141
|
if (!this.val.getVal("tmp:" + i)) throw `frame【${e}】が読み込まれていません`;
|
|
2141
2142
|
const n = s.style;
|
|
2142
|
-
if (R(t, "float", !1) ? n.zIndex = `${++this.#a}` : "index" in t ? n.zIndex = `${
|
|
2143
|
+
if (R(t, "float", !1) ? n.zIndex = `${++this.#a}` : "index" in t ? n.zIndex = `${x(t, "index", 0)}` : t.dive && (n.zIndex = `-${++this.#a}`), "alpha" in t) {
|
|
2143
2144
|
const o = n.opacity = String(t.alpha);
|
|
2144
2145
|
this.val.setVal_Nochk("tmp", i + ".alpha", o);
|
|
2145
2146
|
}
|
|
2146
2147
|
const a = this.#c(t);
|
|
2147
2148
|
if (("x" in t || "y" in t) && (n.left = `${C.#e.ofsLeft4elm + a.x * C.#e.cvsScale}px`, n.top = `${C.#e.ofsTop4elm + a.y * C.#e.cvsScale}px`, this.val.setVal_Nochk("tmp", i + ".x", a.x), this.val.setVal_Nochk("tmp", i + ".y", a.y)), "scale_x" in t || "scale_y" in t || "rotate" in t) {
|
|
2148
|
-
const o =
|
|
2149
|
-
n.transform = `scale(${o}, ${r}) rotate(${
|
|
2149
|
+
const o = x(t, "scale_x", 1), r = x(t, "scale_y", 1), l = x(t, "rotate", 0);
|
|
2150
|
+
n.transform = `scale(${o}, ${r}) rotate(${l}deg)`, this.val.setVal_Nochk("tmp", i + ".scale_x", o), this.val.setVal_Nochk("tmp", i + ".scale_y", r), this.val.setVal_Nochk("tmp", i + ".rotate", l);
|
|
2150
2151
|
}
|
|
2151
2152
|
if ("width" in t && (s.width = String(a.width * C.#e.cvsScale), this.val.setVal_Nochk("tmp", i + ".width", a.width)), "height" in t && (s.height = String(a.height * C.#e.cvsScale), this.val.setVal_Nochk("tmp", i + ".height", a.height)), "visible" in t) {
|
|
2152
2153
|
const o = R(t, "visible", !0);
|
|
@@ -2154,49 +2155,49 @@ class C {
|
|
|
2154
2155
|
}
|
|
2155
2156
|
if ("b_color" in t && (n.backgroundColor = t.b_color), "disabled" in t) {
|
|
2156
2157
|
const o = this.#u[e] = R(t, "disabled", !0), r = s.contentDocument.body;
|
|
2157
|
-
for (const
|
|
2158
|
+
for (const l of [
|
|
2158
2159
|
...Array.from(r.getElementsByTagName("input")),
|
|
2159
2160
|
...Array.from(r.getElementsByTagName("select"))
|
|
2160
|
-
])
|
|
2161
|
+
]) l.disabled = o;
|
|
2161
2162
|
}
|
|
2162
2163
|
return !1;
|
|
2163
2164
|
}
|
|
2164
2165
|
// フレームをトゥイーン開始
|
|
2165
2166
|
#o(t) {
|
|
2166
|
-
const { id: e, alpha: s, x: i, y: n, scale_x: a, scale_y: o, rotate: r, width:
|
|
2167
|
+
const { id: e, alpha: s, x: i, y: n, scale_x: a, scale_y: o, rotate: r, width: l, height: d } = t;
|
|
2167
2168
|
if (!e) throw "idは必須です";
|
|
2168
|
-
const
|
|
2169
|
-
if (!
|
|
2169
|
+
const c = document.getElementById(e);
|
|
2170
|
+
if (!c) throw `id【${e}】はフレームではありません`;
|
|
2170
2171
|
const p = "const.sn.frm." + e;
|
|
2171
2172
|
if (!this.val.getVal(`tmp:${p}`, 0)) throw `frame【${e}】が読み込まれていません`;
|
|
2172
|
-
const
|
|
2173
|
-
s && (
|
|
2174
|
-
const h = B.cnvTweenArg(t,
|
|
2175
|
-
let
|
|
2173
|
+
const f = {};
|
|
2174
|
+
s && (f.a = Number(c.style.opacity)), (i || n || a || o || r) && (f.x = Number(this.val.getVal(`tmp:${p}.x`)), f.y = Number(this.val.getVal(`tmp:${p}.y`)), f.sx = Number(this.val.getVal(`tmp:${p}.scale_x`)), f.sy = Number(this.val.getVal(`tmp:${p}.scale_y`)), f.r = Number(this.val.getVal(`tmp:${p}.rotate`))), l && (f.w = Number(this.val.getVal(`tmp:${p}.width`))), d && (f.h = Number(this.val.getVal(`tmp:${p}.height`)));
|
|
2175
|
+
const h = B.cnvTweenArg(t, f);
|
|
2176
|
+
let y = () => {
|
|
2176
2177
|
};
|
|
2177
|
-
s && (
|
|
2178
|
-
|
|
2178
|
+
s && (x(h, "alpha", 0), y = () => {
|
|
2179
|
+
c.style.opacity = String(f.a), this.val.setVal_Nochk("tmp", "alpha", f.a);
|
|
2179
2180
|
});
|
|
2180
|
-
let
|
|
2181
|
+
let g = () => {
|
|
2181
2182
|
};
|
|
2182
|
-
const
|
|
2183
|
-
(i || n || a || o || r) && (
|
|
2184
|
-
|
|
2185
|
-
C.#e.ofsLeft4elm +
|
|
2186
|
-
C.#e.ofsTop4elm +
|
|
2183
|
+
const k = this.#c(h);
|
|
2184
|
+
(i || n || a || o || r) && (k.x, k.y, x(h, "scale_x", 1), x(h, "scale_y", 1), x(h, "rotate", 0), g = () => {
|
|
2185
|
+
c.style.left = `${// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2186
|
+
C.#e.ofsLeft4elm + f.x * C.#e.cvsScale} px`, c.style.top = `${// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2187
|
+
C.#e.ofsTop4elm + f.y * C.#e.cvsScale} px`, c.style.transform = `scale(${f.sx}, ${f.sy}) rotate(${f.r}deg)`, this.val.setVal_Nochk("tmp", p + ".x", f.x), this.val.setVal_Nochk("tmp", p + ".y", f.y), this.val.setVal_Nochk("tmp", p + ".scale_x", f.sx), this.val.setVal_Nochk("tmp", p + ".scale_y", f.sy), this.val.setVal_Nochk("tmp", p + ".rotate", f.r);
|
|
2187
2188
|
});
|
|
2188
|
-
let
|
|
2189
|
+
let m = () => {
|
|
2189
2190
|
};
|
|
2190
|
-
|
|
2191
|
-
|
|
2191
|
+
l && (k.width, m = () => {
|
|
2192
|
+
c.width = `${f.w * C.#e.cvsScale} px`, this.val.setVal_Nochk("tmp", p + ".width", f.w);
|
|
2192
2193
|
});
|
|
2193
2194
|
let b = () => {
|
|
2194
2195
|
};
|
|
2195
|
-
return
|
|
2196
|
-
|
|
2196
|
+
return d && (k.height, b = () => {
|
|
2197
|
+
c.height = `${f.h * C.#e.cvsScale} px`, this.val.setVal_Nochk("tmp", p + ".height", f.h);
|
|
2197
2198
|
}), this.appPixi.stage.interactive = !1, B.tween(`frm
|
|
2198
|
-
${e}`, t,
|
|
2199
|
-
|
|
2199
|
+
${e}`, t, f, B.cnvTweenArg(t, f), () => {
|
|
2200
|
+
y(), g(), m(), b();
|
|
2200
2201
|
}, () => {
|
|
2201
2202
|
this.appPixi.stage.interactive = !0;
|
|
2202
2203
|
}, () => {
|
|
@@ -2269,9 +2270,9 @@ function X(q) {
|
|
|
2269
2270
|
}
|
|
2270
2271
|
class G {
|
|
2271
2272
|
//MARK: コンストラクタ
|
|
2272
|
-
constructor(t, e, s, i, n, a, o, r,
|
|
2273
|
+
constructor(t, e, s, i, n, a, o, r, l) {
|
|
2273
2274
|
this.cfg = t, this.hTag = e, this.appPixi = s, this.val = i, this.main = n, this.scrItr = a, this.sys = o;
|
|
2274
|
-
const
|
|
2275
|
+
const d = () => {
|
|
2275
2276
|
if (o.cvsResize(), this.cvsResizeDesign(), this.#x) for (const h of this.#b)
|
|
2276
2277
|
this.#h[h].fore.cvsResizeChildren();
|
|
2277
2278
|
else for (const h of this.#b)
|
|
@@ -2279,31 +2280,31 @@ class G {
|
|
|
2279
2280
|
this.#r.cvsResize(), this.#f.cvsResize();
|
|
2280
2281
|
};
|
|
2281
2282
|
if (S.isMobile)
|
|
2282
|
-
this.#p.add(globalThis, "orientationchange",
|
|
2283
|
+
this.#p.add(globalThis, "orientationchange", d, { passive: !0 });
|
|
2283
2284
|
else {
|
|
2284
2285
|
let h;
|
|
2285
2286
|
this.#p.add(globalThis, "resize", () => {
|
|
2286
2287
|
h || (h = setTimeout(() => {
|
|
2287
|
-
h = void 0,
|
|
2288
|
+
h = void 0, d();
|
|
2288
2289
|
}, 1e3 / 60 * 10));
|
|
2289
2290
|
}, { passive: !0 });
|
|
2290
2291
|
}
|
|
2291
|
-
o.cvsResize(), this.#l = new Gt(this.cfg.oCfg, e, i), P.init(t, e, i, this.#l, (h) => this.#h[h.layname].fore === h, s), L.init(n, t, s, o, r, i), C.init(t, o, n), z.init(t), this.#r = new C(e, s, i), o.hFactoryCls.grp = () => new L(), o.hFactoryCls.txt = () => new P(), e.loadplugin = (h) => this.#w(h), e.snapshot = (h) => this.#g(h), this.#o = this.sys.isApp ? (h,
|
|
2292
|
+
o.cvsResize(), this.#l = new Gt(this.cfg.oCfg, e, i), P.init(t, e, i, this.#l, (h) => this.#h[h.layname].fore === h, s), L.init(n, t, s, o, r, i), C.init(t, o, n), z.init(t), this.#r = new C(e, s, i), o.hFactoryCls.grp = () => new L(), o.hFactoryCls.txt = () => new P(), e.loadplugin = (h) => this.#w(h), e.snapshot = (h) => this.#g(h), this.#o = this.sys.isApp ? (h, y, g, k, m) => this.#I(h, y, g, k, m) : (h, y, g, k, m) => this.#k(h, y, g, k, m), e.add_lay = (h) => this.#v(h), e.clear_lay = (h) => this.#j(h), e.finish_trans = () => !1, e.lay = (h) => this.#F(h), e.trans = (h) => this.#W(h), e.wt = (h) => B.wt(h), e.quake = (h) => this.#M(h), e.stop_quake = e.finish_trans, e.wq = e.wt, e.pause_tsy = (h) => B.pause_tsy(h), e.resume_tsy = (h) => B.resume_tsy(h), e.stop_tsy = (h) => B.stop_tsy(h), e.tsy = (h) => this.#R(h), e.wait_tsy = (h) => B.wait_tsy(h), e.add_filter = (h) => this.#Q(h), e.clear_filter = (h) => this.#U(h), e.enable_filter = (h) => this.#J(h), e.ch = (h) => this.#T(h), e.clear_text = (h) => this.#A(h), e.current = (h) => this.#K(h), e.endlink = (h) => this.#tt(h), e.er = (h) => this.#et(h), e.graph = (h) => this.#st(h), e.link = (h) => this.#it(h), e.r = (h) => this.#nt(h), e.ruby2 = (h) => this.#at(h), e.span = (h) => this.#ot(h), e.tcy = (h) => this.#rt(h), e.add_face = (h) => u.add_face(h), e.wv = (h) => u.wv(h), e.dump_lay = (h) => this.#ht(h), e.enable_event = (h) => this.#lt(h), e.button = (h) => this.#ct(h), t.existsBreakline && (this.breakLine = (h) => {
|
|
2292
2293
|
delete h.visible, h.id = "break", h.pic = "breakline", this.#a("grp|" + X(h));
|
|
2293
2294
|
}), t.existsBreakpage && (this.breakPage = (h) => {
|
|
2294
2295
|
delete h.visible, h.id = "break", h.pic = "breakpage", this.#a("grp|" + X(h));
|
|
2295
2296
|
}), this.#t = Ot(String(t.oCfg.init.bg_color));
|
|
2296
|
-
const
|
|
2297
|
-
|
|
2298
|
-
const p = (h,
|
|
2299
|
-
this.#y(Number(
|
|
2297
|
+
const c = new U();
|
|
2298
|
+
c.beginFill(this.#t).lineStyle(0, this.#t).drawRect(0, 0, S.stageW, S.stageH).endFill(), this.#e.addChild(c.clone()), this.#n.addChild(c), this.#n.visible = !1, this.#e.name = "page:A", this.#n.name = "page:B", this.#s = s.stage, this.#s.addChild(this.#n), this.#s.addChild(this.#e), this.#s.addChild(this.#$), this.#s.addChild(this.#_), this.#s.name = "stage";
|
|
2299
|
+
const p = (h, y) => {
|
|
2300
|
+
this.#y(Number(y));
|
|
2300
2301
|
};
|
|
2301
2302
|
p("", i.getVal("sys:TextLayer.Back.Alpha", 1)), i.defValTrg("sys:TextLayer.Back.Alpha", p);
|
|
2302
|
-
const
|
|
2303
|
-
z.fontFamily =
|
|
2303
|
+
const f = (h, y) => {
|
|
2304
|
+
z.fontFamily = y;
|
|
2304
2305
|
};
|
|
2305
|
-
|
|
2306
|
-
this.#u[h]?.(h,
|
|
2306
|
+
f("", i.getVal("tmp:sn.button.fontFamily", z.fontFamily)), i.defValTrg("tmp:sn.button.fontFamily", f), i.defTmp("const.sn.last_page_text", () => this.currentTxtlayFore?.pageText ?? ""), i.defTmp("const.sn.last_page_plain_text", () => this.currentTxtlayFore?.pagePlainText ?? ""), S.isDbg && (ut.init(s, o, a, l, t, this.#h), this.cvsResizeDesign = () => ut.cvsResizeDesign(), o.addHook((h, y) => {
|
|
2307
|
+
this.#u[h]?.(h, y) && delete this.#u[h];
|
|
2307
2308
|
}));
|
|
2308
2309
|
}
|
|
2309
2310
|
#s;
|
|
@@ -2346,11 +2347,11 @@ class G {
|
|
|
2346
2347
|
}
|
|
2347
2348
|
#f;
|
|
2348
2349
|
setEvtMng(t) {
|
|
2349
|
-
this.#f = t, this.#r.setEvtMng(t),
|
|
2350
|
+
this.#f = t, this.#r.setEvtMng(t), u.setEvtMng(t), B.init(t, this.appPixi);
|
|
2350
2351
|
}
|
|
2351
2352
|
destroy() {
|
|
2352
2353
|
for (const t of Object.values(this.#h)) t.destroy();
|
|
2353
|
-
this.#p.clear(), L.destroy(), pt.destroy(),
|
|
2354
|
+
this.#p.clear(), L.destroy(), pt.destroy(), w.destroy(), P.destroy(), this.#r.destroy(), B.destroy(), G.#C = 10;
|
|
2354
2355
|
}
|
|
2355
2356
|
// 既存の全文字レイヤの実際のバック不透明度、を再計算
|
|
2356
2357
|
#y(t) {
|
|
@@ -2378,7 +2379,7 @@ class G {
|
|
|
2378
2379
|
// // システム
|
|
2379
2380
|
//MARK: スナップショット
|
|
2380
2381
|
#g(t) {
|
|
2381
|
-
const e = Bt("-", "_", "", "_"), s = t.fn ? t.fn.startsWith(It) ? t.fn : `${_t + t.fn + e}.png` : `${_t}snapshot${e}.png`, i = this.cfg.searchPath(s), n =
|
|
2382
|
+
const e = Bt("-", "_", "", "_"), s = t.fn ? t.fn.startsWith(It) ? t.fn : `${_t + t.fn + e}.png` : `${_t}snapshot${e}.png`, i = this.cfg.searchPath(s), n = x(t, "width", S.stageW), a = x(t, "height", S.stageH);
|
|
2382
2383
|
return this.#o(t, i, n, a, `snapshot dt:${e}`);
|
|
2383
2384
|
}
|
|
2384
2385
|
#o = () => !1;
|
|
@@ -2388,8 +2389,8 @@ class G {
|
|
|
2388
2389
|
this.#r.restoreAllFrame(), F.endProc(n);
|
|
2389
2390
|
}), !0;
|
|
2390
2391
|
const a = this.#b.map((o) => {
|
|
2391
|
-
const { ctn: r } = this.#h[o].fore,
|
|
2392
|
-
return r.visible = !1,
|
|
2392
|
+
const { ctn: r } = this.#h[o].fore, l = [r, r.visible];
|
|
2393
|
+
return r.visible = !1, l;
|
|
2393
2394
|
});
|
|
2394
2395
|
for (const o of this.#m(t)) this.#h[o].fore.ctn.visible = !0;
|
|
2395
2396
|
return this.sys.capturePage(e, s, i, () => {
|
|
@@ -2407,19 +2408,19 @@ class G {
|
|
|
2407
2408
|
preserveDrawingBuffer: !0,
|
|
2408
2409
|
backgroundColor: a & 16777215,
|
|
2409
2410
|
autoDensity: !0
|
|
2410
|
-
}), r = t.page !== "back" ? "fore" : "back", { layer:
|
|
2411
|
+
}), r = t.page !== "back" ? "fore" : "back", { layer: l } = t;
|
|
2411
2412
|
return Promise.allSettled(
|
|
2412
|
-
this.#m(
|
|
2413
|
-
(
|
|
2413
|
+
this.#m(l).map((d) => new Promise(
|
|
2414
|
+
(c) => this.#h[d][r].snapshot(o, c)
|
|
2414
2415
|
))
|
|
2415
2416
|
).then(async () => {
|
|
2416
|
-
const
|
|
2417
|
-
o.render(this.#s, { renderTexture:
|
|
2417
|
+
const d = tt.create({ width: o.width, height: o.height });
|
|
2418
|
+
o.render(this.#s, { renderTexture: d }), await this.sys.savePic(
|
|
2418
2419
|
e,
|
|
2419
2420
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
2420
|
-
o.plugins.extract.base64(
|
|
2421
|
-
),
|
|
2422
|
-
for (const
|
|
2421
|
+
o.plugins.extract.base64(d)
|
|
2422
|
+
), d.destroy();
|
|
2423
|
+
for (const c of this.#m(l)) this.#h[c][r].snapshot_end();
|
|
2423
2424
|
o.destroy(!0), F.endProc(n);
|
|
2424
2425
|
}), !0;
|
|
2425
2426
|
}
|
|
@@ -2475,15 +2476,15 @@ class G {
|
|
|
2475
2476
|
if (R(t, "float", !1))
|
|
2476
2477
|
this.#n.setChildIndex(i, this.#n.children.length - 1), this.#e.setChildIndex(n, this.#e.children.length - 1), this.#z();
|
|
2477
2478
|
else if (t.index)
|
|
2478
|
-
|
|
2479
|
+
x(t, "index", 0) && (this.#n.setChildIndex(i, t.index), this.#e.setChildIndex(n, t.index), this.#z());
|
|
2479
2480
|
else if (t.dive) {
|
|
2480
2481
|
const { dive: a } = t;
|
|
2481
2482
|
let o = 0;
|
|
2482
2483
|
if (e === a) throw "[lay] 属性 layerとdiveが同じ【" + a + "】です";
|
|
2483
2484
|
const r = this.#h[a];
|
|
2484
2485
|
if (!r) throw "[lay] 属性 dive【" + a + "】が不正です。レイヤーがありません";
|
|
2485
|
-
const
|
|
2486
|
-
o =
|
|
2486
|
+
const l = r.back, d = r.fore, c = this.#n.getChildIndex(l.ctn), p = this.#e.getChildIndex(d.ctn);
|
|
2487
|
+
o = c < p ? c : p, o > this.#n.getChildIndex(i) && --o, this.#e.setChildIndex(n, o), this.#n.setChildIndex(i, o), this.#z();
|
|
2487
2488
|
}
|
|
2488
2489
|
return t[":id_tag"] = s.fore.name.slice(0, -7), this.scrItr.recodeDesign(t), s.lay(t);
|
|
2489
2490
|
}
|
|
@@ -2565,73 +2566,73 @@ void main() {
|
|
|
2565
2566
|
$.transPage(_);
|
|
2566
2567
|
continue;
|
|
2567
2568
|
}
|
|
2568
|
-
const { fore: { ctn:
|
|
2569
|
-
this.#e.removeChild(
|
|
2569
|
+
const { fore: { ctn: v }, back: { ctn: E } } = $, O = this.#e.getChildIndex(E);
|
|
2570
|
+
this.#e.removeChild(E), this.#n.removeChild(v), this.#e.addChildAt(v, O), this.#n.addChildAt(E, O);
|
|
2570
2571
|
}
|
|
2571
2572
|
Promise.allSettled(_).then(() => {
|
|
2572
2573
|
this.#e.visible = !0, this.#n.visible = !1, this.#$.visible = !1, this.#_.visible = !1, F.notifyEndProc(xt + A);
|
|
2573
2574
|
});
|
|
2574
2575
|
};
|
|
2575
|
-
if (this.#_.filters = [], this.#_.alpha = 1,
|
|
2576
|
+
if (this.#_.filters = [], this.#_.alpha = 1, x(t, "time", 0) === 0 || this.#f.isSkipping)
|
|
2576
2577
|
return F.beginProc(xt + A, () => {
|
|
2577
2578
|
}), queueMicrotask(() => n()), !0;
|
|
2578
2579
|
const o = [], r = this.#b.map((_) => {
|
|
2579
|
-
const { fore: T, back: $ } = this.#h[_],
|
|
2580
|
-
return
|
|
2581
|
-
}), { ticker:
|
|
2582
|
-
|
|
2583
|
-
let
|
|
2584
|
-
for (const _ of o)
|
|
2580
|
+
const { fore: T, back: $ } = this.#h[_], v = s.has(_) ? $ : T;
|
|
2581
|
+
return v.ctn.visible && o.push(v.ctn), v;
|
|
2582
|
+
}), { ticker: l, renderer: d } = this.appPixi;
|
|
2583
|
+
d.render(this.#n, { renderTexture: this.#O });
|
|
2584
|
+
let c = () => {
|
|
2585
|
+
for (const _ of o) d.render(
|
|
2585
2586
|
_,
|
|
2586
2587
|
{ renderTexture: this.#O, clear: !1 }
|
|
2587
2588
|
);
|
|
2588
2589
|
};
|
|
2589
2590
|
if (!r.some((_) => _.containMovement)) {
|
|
2590
|
-
const _ =
|
|
2591
|
-
|
|
2592
|
-
|
|
2591
|
+
const _ = c;
|
|
2592
|
+
c = () => {
|
|
2593
|
+
c = () => {
|
|
2593
2594
|
}, _();
|
|
2594
2595
|
};
|
|
2595
2596
|
}
|
|
2596
|
-
const p = () =>
|
|
2597
|
+
const p = () => d.render(this.#e, { renderTexture: this.#N });
|
|
2597
2598
|
p();
|
|
2598
|
-
let
|
|
2599
|
+
let f = () => {
|
|
2599
2600
|
this.#e.visible = !0, p(), this.#e.visible = !1;
|
|
2600
2601
|
};
|
|
2601
2602
|
if (!i.some((_) => _.containMovement)) {
|
|
2602
|
-
const _ =
|
|
2603
|
-
|
|
2604
|
-
|
|
2603
|
+
const _ = f;
|
|
2604
|
+
f = () => {
|
|
2605
|
+
f = () => {
|
|
2605
2606
|
}, _();
|
|
2606
2607
|
};
|
|
2607
2608
|
}
|
|
2608
2609
|
const h = () => {
|
|
2609
|
-
|
|
2610
|
-
}, { glsl:
|
|
2611
|
-
|
|
2610
|
+
c(), this.#$.visible = !0, f(), this.#_.visible = !0;
|
|
2611
|
+
}, { glsl: y, rule: g } = t, k = () => {
|
|
2612
|
+
l.remove(h), n();
|
|
2612
2613
|
};
|
|
2613
|
-
if (!
|
|
2614
|
+
if (!y && !g)
|
|
2614
2615
|
return B.tween(A, t, this.#_, { alpha: 0 }, () => {
|
|
2615
|
-
},
|
|
2616
|
-
}),
|
|
2617
|
-
const
|
|
2616
|
+
}, k, () => {
|
|
2617
|
+
}), l.add(h), !1;
|
|
2618
|
+
const m = {
|
|
2618
2619
|
rule: J.EMPTY,
|
|
2619
|
-
vague:
|
|
2620
|
+
vague: x(t, "vague", 0.04),
|
|
2620
2621
|
tick: 0
|
|
2621
2622
|
};
|
|
2622
2623
|
this.#_.filters = [new jt(
|
|
2623
2624
|
void 0,
|
|
2624
|
-
|
|
2625
|
-
|
|
2625
|
+
y ?? G.#H,
|
|
2626
|
+
m
|
|
2626
2627
|
)];
|
|
2627
|
-
const b = B.tween(A, t,
|
|
2628
|
-
},
|
|
2629
|
-
}, !
|
|
2630
|
-
return
|
|
2631
|
-
|
|
2628
|
+
const b = B.tween(A, t, m, { tick: 1 }, () => {
|
|
2629
|
+
}, k, () => {
|
|
2630
|
+
}, !g);
|
|
2631
|
+
return g ? new u(g, void 0, (_) => {
|
|
2632
|
+
m.rule = _.texture, _.destroy(), b.start(), l.add(h);
|
|
2632
2633
|
}, (_) => {
|
|
2633
2634
|
_ && this.main.resume();
|
|
2634
|
-
}).ret : (
|
|
2635
|
+
}).ret : (l.add(h), !1);
|
|
2635
2636
|
}
|
|
2636
2637
|
#m(t = "") {
|
|
2637
2638
|
return t ? t.split(",") : this.#b;
|
|
@@ -2659,27 +2660,27 @@ void main() {
|
|
|
2659
2660
|
}
|
|
2660
2661
|
//MARK: 画面を揺らす
|
|
2661
2662
|
#M(t) {
|
|
2662
|
-
if (
|
|
2663
|
-
const e = this.#m(t.layer).map((
|
|
2663
|
+
if (x(t, "time", NaN) === 0) return !1;
|
|
2664
|
+
const e = this.#m(t.layer).map((d) => this.#h[d].fore.ctn), { renderer: s, ticker: i } = this.appPixi;
|
|
2664
2665
|
this.#N.resize(S.stageW, S.stageH);
|
|
2665
2666
|
const n = () => {
|
|
2666
2667
|
this.#e.visible = !0;
|
|
2667
|
-
for (const
|
|
2668
|
-
|
|
2668
|
+
for (const d of e) s.render(
|
|
2669
|
+
d,
|
|
2669
2670
|
{ renderTexture: this.#N, clear: !1 }
|
|
2670
2671
|
);
|
|
2671
2672
|
this.#e.visible = !1;
|
|
2672
2673
|
};
|
|
2673
2674
|
this.#_.visible = !0, this.#_.alpha = 1;
|
|
2674
|
-
const a = V(
|
|
2675
|
+
const a = V(x(t, "hmax", 10)), o = V(x(t, "vmax", 10)), r = a === 0 ? () => {
|
|
2675
2676
|
} : () => {
|
|
2676
2677
|
this.#_.x = Math.round(Math.random() * a * 2) - a;
|
|
2677
|
-
},
|
|
2678
|
+
}, l = o === 0 ? () => {
|
|
2678
2679
|
} : () => {
|
|
2679
2680
|
this.#_.y = Math.round(Math.random() * o * 2) - o;
|
|
2680
2681
|
};
|
|
2681
2682
|
return this.#_.filters = [], B.tween(A, t, this.#_, { x: 0, y: 0 }, () => {
|
|
2682
|
-
r(),
|
|
2683
|
+
r(), l();
|
|
2683
2684
|
}, () => {
|
|
2684
2685
|
i.remove(n), this.#e.visible = !0, this.#_.visible = !1, this.#_.x = 0, this.#_.y = 0;
|
|
2685
2686
|
}, () => {
|
|
@@ -2693,10 +2694,10 @@ void main() {
|
|
|
2693
2694
|
let o = () => {
|
|
2694
2695
|
};
|
|
2695
2696
|
s && !this.#f.isSkipping && (a.renderStart(), o = () => a.renderEnd());
|
|
2696
|
-
const r = B.cnvTweenArg(t, a),
|
|
2697
|
+
const r = B.cnvTweenArg(t, a), l = R(t, "arrive", !1), d = R(t, "backlay", !1), c = n.back.ctn;
|
|
2697
2698
|
return B.tween(i ?? e, t, a, B.cnvTweenArg(t, a), () => {
|
|
2698
2699
|
}, o, () => {
|
|
2699
|
-
if (
|
|
2700
|
+
if (l && Object.assign(a, r), d) for (const p of Object.keys(B.hMemberCnt)) c[p] = a[p];
|
|
2700
2701
|
}), "filter" in t && (a.ctn.filters = [H.bldFilters(t)], a.aFltHArg = [t]), !1;
|
|
2701
2702
|
}
|
|
2702
2703
|
//MARK: フィルター追加
|
|
@@ -2743,7 +2744,7 @@ void main() {
|
|
|
2743
2744
|
#B(t, e) {
|
|
2744
2745
|
const s = t.ctn;
|
|
2745
2746
|
if (!s.filters) throw "フィルターがありません";
|
|
2746
|
-
const i = V(
|
|
2747
|
+
const i = V(x(e, "index", 0)), n = s.filters.length;
|
|
2747
2748
|
if (n <= i) throw `フィルターの個数(${String(n)})を越えています`;
|
|
2748
2749
|
t.aFltHArg[i].enabled = s.filters[i].enabled = R(e, "enabled", !0);
|
|
2749
2750
|
}
|
|
@@ -2757,7 +2758,7 @@ void main() {
|
|
|
2757
2758
|
const { text: e } = t;
|
|
2758
2759
|
if (!e) throw "textは必須です";
|
|
2759
2760
|
const s = this.#P(t);
|
|
2760
|
-
delete t.text, this.setNormalChWait(), this.#f.isSkipping ? t.wait = 0 : "wait" in t &&
|
|
2761
|
+
delete t.text, this.setNormalChWait(), this.#f.isSkipping ? t.wait = 0 : "wait" in t && x(t, "wait", NaN), this.#a("add|" + X(t), s);
|
|
2761
2762
|
const i = R(t, "record", !0), n = this.val.doRecLog();
|
|
2762
2763
|
return i || this.val.setVal_Nochk("save", "sn.doRecLog", i), s.tagCh(e.replaceAll("[r]", `
|
|
2763
2764
|
`)), this.val.setVal_Nochk("save", "sn.doRecLog", n), this.#a("add_close|", s), !1;
|
|
@@ -2895,18 +2896,18 @@ void main() {
|
|
|
2895
2896
|
playback(t) {
|
|
2896
2897
|
this.#l.playback();
|
|
2897
2898
|
const e = [], s = [];
|
|
2898
|
-
for (const [n, { fore: a, fore: { idx: o }, back: r, cls:
|
|
2899
|
+
for (const [n, { fore: a, fore: { idx: o }, back: r, cls: l }] of Object.entries(t)) {
|
|
2899
2900
|
s.push({ ln: n, idx: o });
|
|
2900
|
-
const
|
|
2901
|
-
|
|
2901
|
+
const d = this.#h[n] ??= new et(n, l, this.#e, this.#n, {}, this.sys, this.val, { isWait: !1 });
|
|
2902
|
+
d.fore.playback(a, e), d.back.playback(r, e);
|
|
2902
2903
|
}
|
|
2903
2904
|
const i = this.#e.children.length;
|
|
2904
2905
|
return e.push(new Promise((n) => {
|
|
2905
|
-
for (const { ln: a, idx: o } of s.sort(({ idx: r }, { idx:
|
|
2906
|
+
for (const { ln: a, idx: o } of s.sort(({ idx: r }, { idx: l }) => r === l ? 0 : r < l ? -1 : 1)) {
|
|
2906
2907
|
const r = this.#h[a];
|
|
2907
2908
|
if (!r) continue;
|
|
2908
|
-
const
|
|
2909
|
-
this.#e.setChildIndex(
|
|
2909
|
+
const l = i > o ? o : i - 1, { fore: d, back: c } = r;
|
|
2910
|
+
this.#e.setChildIndex(d.ctn, l), this.#n.setChildIndex(c.ctn, l);
|
|
2910
2911
|
}
|
|
2911
2912
|
n();
|
|
2912
2913
|
})), e;
|