@famibee/skynovel 1.64.11 → 1.64.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/CmnTween.js +118 -125
- package/dist/CmnTween.js.map +1 -1
- package/dist/EventMng.js +91 -92
- package/dist/EventMng.js.map +1 -1
- package/dist/GrpLayer.js +16 -11
- package/dist/GrpLayer.js.map +1 -1
- package/dist/LayerMng.js +92 -93
- package/dist/LayerMng.js.map +1 -1
- package/dist/Main.js.map +1 -1
- package/dist/PropParser.js +60 -58
- package/dist/PropParser.js.map +1 -1
- package/dist/Reading.js +5 -4
- package/dist/Reading.js.map +1 -1
- package/dist/ScriptIterator.js +97 -97
- package/dist/ScriptIterator.js.map +1 -1
- package/dist/SndBuf.js +37 -35
- package/dist/SndBuf.js.map +1 -1
- package/dist/Variable.js +89 -94
- package/dist/Variable.js.map +1 -1
- package/dist/sn/CmnTween.d.ts +4 -15
- package/dist/sn/CmnTween.d.ts.map +1 -1
- package/dist/sn/EventMng.d.ts.map +1 -1
- package/dist/sn/GrpLayer.d.ts +1 -1
- package/dist/sn/GrpLayer.d.ts.map +1 -1
- package/dist/sn/Layer.d.ts +1 -1
- package/dist/sn/Layer.d.ts.map +1 -1
- package/dist/sn/LayerMng.d.ts.map +1 -1
- package/dist/sn/Main.d.ts.map +1 -1
- package/dist/sn/PropParser.d.ts +7 -4
- package/dist/sn/PropParser.d.ts.map +1 -1
- package/dist/sn/Reading.d.ts +1 -1
- package/dist/sn/Reading.d.ts.map +1 -1
- package/dist/sn/ScriptIterator.d.ts.map +1 -1
- package/dist/sn/SndBuf.d.ts.map +1 -1
- package/dist/sn/Variable.d.ts.map +1 -1
- package/dist/web2.js +3 -3
- package/dist/web2.js.map +1 -1
- package/dist_app/CmnTween.js +118 -125
- package/dist_app/CmnTween.js.map +1 -1
- package/dist_app/EventMng.js +244 -245
- package/dist_app/EventMng.js.map +1 -1
- package/dist_app/GrpLayer.js +16 -11
- package/dist_app/GrpLayer.js.map +1 -1
- package/dist_app/LayerMng.js +59 -60
- package/dist_app/LayerMng.js.map +1 -1
- package/dist_app/Main.js.map +1 -1
- package/dist_app/PropParser.js +37 -35
- package/dist_app/PropParser.js.map +1 -1
- package/dist_app/Reading.js +5 -4
- package/dist_app/Reading.js.map +1 -1
- package/dist_app/ScriptIterator.js +151 -151
- package/dist_app/ScriptIterator.js.map +1 -1
- package/dist_app/SndBuf.js +37 -35
- package/dist_app/SndBuf.js.map +1 -1
- package/dist_app/Variable.js +89 -94
- package/dist_app/Variable.js.map +1 -1
- package/dist_app/app2.js +3 -3
- package/dist_app/app2.js.map +1 -1
- package/dist_app/sn/CmnTween.d.ts +4 -15
- package/dist_app/sn/CmnTween.d.ts.map +1 -1
- package/dist_app/sn/EventMng.d.ts.map +1 -1
- package/dist_app/sn/GrpLayer.d.ts +1 -1
- package/dist_app/sn/GrpLayer.d.ts.map +1 -1
- package/dist_app/sn/Layer.d.ts +1 -1
- package/dist_app/sn/Layer.d.ts.map +1 -1
- package/dist_app/sn/LayerMng.d.ts.map +1 -1
- package/dist_app/sn/Main.d.ts.map +1 -1
- package/dist_app/sn/PropParser.d.ts +7 -4
- package/dist_app/sn/PropParser.d.ts.map +1 -1
- package/dist_app/sn/Reading.d.ts +1 -1
- package/dist_app/sn/Reading.d.ts.map +1 -1
- package/dist_app/sn/ScriptIterator.d.ts.map +1 -1
- package/dist_app/sn/SndBuf.d.ts.map +1 -1
- package/dist_app/sn/Variable.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/GrpLayer.js
CHANGED
|
@@ -94,24 +94,29 @@ class r extends c {
|
|
|
94
94
|
get height() {
|
|
95
95
|
return this.#p;
|
|
96
96
|
}
|
|
97
|
-
renderStart() {
|
|
97
|
+
renderStart(t) {
|
|
98
|
+
if (t) {
|
|
99
|
+
const e = this.ctn.alpha;
|
|
100
|
+
this.ctn.alpha = 1, this.ctn.alpha = e;
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
98
103
|
this.#t = new f(this.#h), this.#t.visible = !1, this.ctn.addChildAt(this.#t, 0), this.#t.position.set(-this.ctn.x, -this.ctn.y);
|
|
99
|
-
let
|
|
100
|
-
const
|
|
104
|
+
let s = () => {
|
|
105
|
+
const e = this.ctn.alpha;
|
|
101
106
|
this.ctn.alpha = 1;
|
|
102
|
-
for (const
|
|
103
|
-
this.#t.visible = !1, r.#r.renderer.render(this.ctn, { renderTexture: this.#h }), this.ctn.alpha =
|
|
104
|
-
for (const
|
|
107
|
+
for (const i of this.ctn.children) i.visible = !0;
|
|
108
|
+
this.#t.visible = !1, r.#r.renderer.render(this.ctn, { renderTexture: this.#h }), this.ctn.alpha = e;
|
|
109
|
+
for (const i of this.ctn.children) i.visible = !1;
|
|
105
110
|
};
|
|
106
111
|
if (!this.containMovement) {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
},
|
|
112
|
+
const e = s;
|
|
113
|
+
s = () => {
|
|
114
|
+
s = () => {
|
|
115
|
+
}, e();
|
|
111
116
|
};
|
|
112
117
|
}
|
|
113
118
|
this.#a = () => {
|
|
114
|
-
|
|
119
|
+
s(), this.#t.visible = !0;
|
|
115
120
|
}, r.#r.ticker.add(this.#a);
|
|
116
121
|
}
|
|
117
122
|
#h = u.create({
|
package/dist/GrpLayer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GrpLayer.js","sources":["../src/sn/DesignCast.ts","../src/sn/GrpLayer.ts"],"sourcesContent":["/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2021-2025 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport type {TArg} from './Grammar';\nimport type {T_PropParser} from './CmnInterface';\nimport type {SysBase} from './SysBase';\nimport type {ScriptIterator} from './ScriptIterator';\nimport type {HPage} from './LayerMng';\nimport type {HPRM} from './AnalyzeTagArg';\nimport type {TxtStage} from './TxtStage';\nimport type {Button} from './Button';\nimport type {GrpLayer} from './GrpLayer';\nimport type {Config} from './Config';\n\nimport type {Application, Text, Sprite} from 'pixi.js';\n\n\nexport class DesignCast {\n\tstatic\tinit(_appPixi: Application, _sys: SysBase, _scrItr: ScriptIterator, _prpPrs: T_PropParser, _cfg: Config, _hPages: HPage) { /* empty */ }\n\tstatic\tcvsResizeDesign() { /* empty */ }\n//\tstatic\treadonly\t#alzTagArg\t= new AnalyzeTagArg;\n\n\n\tconstructor(readonly bg_col: string, readonly isLay = false) {}\n\tdestroy() { /* empty */ }\n\n\tgethArg(): TArg {return this.hArg}\n\tprotected\thArg\t: TArg\t= {};\n\tsethArg(hArg: TArg): void {\n\t\tthis.hArg = hArg;\n\t}\n\n\tsetOther(_hPrm: HPRM) { /* empty */ }\n\n\tadopt(_idcCh: DesignCast) {\t// 養子縁組\n\t}\n\n\tstatic\tenterMode() { /* empty */ }\n\tstatic\tallHide() { /* empty */ }\n\tset visible(_v: boolean) { /* empty */ }\n\tstatic\tleaveMode() { /* empty */ }\n\n\n\tcvsResize() { /* empty */ }\n\tmake() { /* empty */ }\n\tstatic replaceToken(_o: unknown) { /* empty */ }\n\n}\n\n\n// 画像レイヤ\nexport class GrpLayDesignCast extends DesignCast {\n\tconstructor(_ctn: Sprite, _gl: GrpLayer) {super('#29e', true)}\n\tsetSp(_sp: Sprite) { /* empty */ }\n}\n\n// 文字レイヤ\nexport class TxtLayDesignCast extends DesignCast {\n\tconstructor(_ctn: Sprite, _ts: TxtStage) {\n\t\tsuper('#29e', true);\n\t}\n}\n// 文字レイヤ・パディング\nexport class TxtLayPadDesignCast extends DesignCast {\n\tconstructor(_ts: TxtStage) {super('#9e2')}\n}\n\n// 文字レイヤ・ボタン基本\nexport class BtnDesignCast extends DesignCast {\n\tconstructor(protected readonly btn: Button, override readonly hArg: TArg) {\n\t\tsuper('#e92');\n\t}\n}\n// 文字レイヤ・文字ボタン\nexport class TxtBtnDesignCast extends BtnDesignCast {\n\tconstructor(btn: Button, hArg: TArg, _txt: Text) {\n\t\tsuper(btn, hArg);\n\t}\n}\n\n// 文字レイヤ・画像ボタン\nexport class PicBtnDesignCast extends BtnDesignCast {\n\tsetSp(_sp: Sprite) { /* empty */ }\n}\n","/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2018-2025 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport {Layer, type T_RecordPlayBack_lay} from './Layer';\n\nimport {CmnLib, argChk_Boolean, argChk_Num} from './CmnLib';\nimport type {TArg} from './Grammar';\nimport type {T_Main, T_Variable} from './CmnInterface';\nimport type {Config} from './Config';\nimport type {SysBase} from './SysBase';\nimport {EventListenerCtn} from './EventListenerCtn';\nimport type {SoundMng} from './SoundMng';\nimport type {IMakeDesignCast} from './LayerMng';\nimport {GrpLayDesignCast} from './DesignCast';\nimport {SpritesMng} from './SpritesMng';\nimport {Reading} from './Reading';\n\nimport {Sprite, AnimatedSprite, RenderTexture, type Application} from 'pixi.js';\n\n\nexport type T_RP_layGrp = T_RecordPlayBack_lay & {\n\tsBkFn\t: string;\n\tsBkFace\t: string;\n}\n\n\nexport class GrpLayer extends Layer {\n\tstatic\treadonly\t#elc\t= new EventListenerCtn;\n\n\tstatic\t#appPixi: Application;\n\tstatic\tinit(main: T_Main, cfg: Config, appPixi: Application, sys: SysBase, sndMng: SoundMng, val: T_Variable): void {\n\t\tGrpLayer.#appPixi = appPixi;\n\t\tSpritesMng.init(cfg, val, sys, main, sndMng);\n\t}\n\tstatic\tdestroy() {GrpLayer.#elc.clear(); SpritesMng.destroy()}\n\n\treadonly\t#idc\t= new GrpLayDesignCast(this.ctn, this);\n\tconstructor() {\n\t\tsuper();\n\t\tif (CmnLib.isDbg) {\n\t\t\tthis.#setIdcSp = sp=> this.#idc.setSp(sp);\n\t\t\tthis.cvsResize = ()=> {super.cvsResize(); this.#idc.cvsResize()}\n\t\t}\n\t}\n\t#setIdcSp\t: (sp: Sprite)=> void\t= ()=> { /* empty */ };\n\n\t#csvFn\t\t= '';\n\t#sBkFn\t\t= '';\n\t#sBkFace\t= '';\n\toverride readonly\tlay = (hArg: TArg)=> {\n\t\tconst RPN_GRP_LAY = Reading.procID +`GrpLayer lay name:${this.name_}`;\n\t\tconst ret = this.#laySub(hArg, isStop=> {\n\t\t\tif (isStop) Reading.endProc(RPN_GRP_LAY);\n\t\t});\n\t\tif (ret) Reading.beginProc(RPN_GRP_LAY);\n\t\treturn ret;\n\t}\n\t#laySub(hArg: TArg, resolve: (isStop: boolean)=> void): boolean {\n\t\tconst {fn, face = ''} = hArg;\n\t\tthis.#idc.sethArg(hArg);\n\t\tif (! fn) {\n\t\t\tsuper.lay(hArg);\n\n\t\t\tif (this.ctn.children.length > 0) this.setPos(hArg);\n\t\t\tthis.#sBkFn = '';\n\t\t\tthis.#csvFn = this.#sBkFace = face;\n\t\t\tresolve(false);\n\t\t\treturn false;\n\t\t}\n\n\t\tconst inFn = 'fn' in hArg;\n\t\tconst inFace = 'face' in hArg;\n\n\t\tthis.clearLay({clear_filter: argChk_Boolean(hArg, 'clear_filter', true)});\n\t\tif (inFn) this.#sBkFn = fn;\t// clearLay()後に置く事\n\t\tif (inFace) this.#sBkFace = face;\n\t\tsuper.lay(hArg);\t// filter設定してる場合も\n\n\t\thArg.dx = 0;\n\t\thArg.dy = 0;\n\n\t\tthis.#sps.destroy();\n\t\tthis.#sps = new SpritesMng(\n\t\t\tthis.#csvFn = fn + (face ?','+ face :''),\n\t\t\tthis.ctn,\n\t\t\tsp=> {\n\t\t\t\tif ('width' in hArg || 'height' in hArg) {\n\t\t\t\t\tsp.width = argChk_Num(hArg, 'width', 0);\n\t\t\t\t\tsp.height = argChk_Num(hArg, 'height', 0);\n\t\t\t\t}\n\t\t\t\tthis.#width = sp.width;\n\t\t\t\tthis.#height = sp.height;\n\t\t\t\tLayer.setXY(sp, hArg, this.ctn, true);\n\t\t\t\tLayer.setBlendmode(this.ctn, hArg);\n\t\t\t//\tif (hArg.page === 'fore') this.rsvEvent(sp);\t// ======\n\t\t\t\t\t// [lay page=fore]のみswfアニメ終了イベント発生\n\t\t\t\tthis.#setIdcSp(sp);\n\t\t\t},\n\t\t\tisStop=> resolve(isStop),\n\t\t);\n\t\treturn this.#sps.ret;\n\t}\n\t#sps\t= new SpritesMng;\n\t#width\t= 0;\n\t#height\t= 0;\n\toverride\tget\twidth() {return this.#width}\n\toverride\tget\theight() {return this.#height}\n\n\n\toverride\trenderStart() {\n\t\tthis.#spTsy = new Sprite(this.#rtTsy);\n\t\tthis.#spTsy.visible = false;\n\t\tthis.ctn.addChildAt(this.#spTsy, 0);\n\t\tthis.#spTsy.position.set(-this.ctn.x, -this.ctn.y);\n\n\t\tlet fncRenderFore = ()=> {\n\t\t\tconst a = this.ctn.alpha;\n\t\t\tthis.ctn.alpha = 1;\n\t\t\tfor (const s of this.ctn.children) s.visible = true;\n\t\t\tthis.#spTsy.visible = false;\n\t\t\tGrpLayer.#appPixi.renderer.render(this.ctn, {renderTexture: this.#rtTsy});\t// clear: true\n\t\t\tthis.ctn.alpha = a;\n\t\t\tfor (const s of this.ctn.children) s.visible = false;\n\t\t}\n\t\tif (! this.containMovement) {\n\t\t\tconst oldFnc = fncRenderFore;\t// 動きがないなら最初に一度\n\t\t\tfncRenderFore = ()=> {fncRenderFore = ()=> { /* empty */ }; oldFnc()};\n\t\t}\n\t\tthis.#fncRender = ()=> {\n\t\t\tfncRenderFore();\n\t\t\tthis.#spTsy.visible = true;\n\t\t};\n\t\tGrpLayer.#appPixi.ticker.add(this.#fncRender);\n\t}\n\t#rtTsy\t= RenderTexture.create({\n\t\twidth\t: CmnLib.stageW,\n\t\theight\t: CmnLib.stageH,\n\t});\n\t#spTsy\t= new Sprite;\n\t#fncRender = ()=> { /* empty */ };\n\toverride\trenderEnd() {\n\t\tGrpLayer.#appPixi.ticker.remove(this.#fncRender);\n\t\tthis.ctn.removeChild(this.#spTsy);\n\t\tfor (const s of this.ctn.children) s.visible = true;\n\t\tthis.#spTsy.destroy(true);\n\n\t\tthis.#rtTsy = RenderTexture.create({\n\t\t\twidth\t: CmnLib.stageW,\n\t\t\theight\t: CmnLib.stageH,\n\t\t});\n\t}\n\n\n\tsetPos(hArg: TArg): void {\n\t\tLayer.setXY(\n\t\t\tthis.ctn.children[0] ?? this.ctn,\n\t\t\thArg,\n\t\t\tthis.ctn,\n\t\t\ttrue\n\t\t);\n\t}\n\n\t// アニメ・動画を含むか\n\toverride get containMovement() {\n\t\tif (this.#csvFn === '') return false;\n\n\t\tconst c = this.ctn.children;\n\t\treturn this.#csvFn.split(',').some(\n\t\t\t(fn, i)=> c[i] instanceof AnimatedSprite || SpritesMng.getHFn2VElm(fn)\n\t\t);\n\t}\n\n\toverride clearLay(hArg: TArg): void {\n\t\tsuper.clearLay(hArg);\n\t\tthis.#sps.destroy();\n\t\tthis.#sBkFn\t\t= '';\n\t\tthis.#sBkFace\t= '';\n\t\tthis.#csvFn\t\t= '';\n\t}\n\toverride readonly record = ()=> ({...super.record(),\n\t\tsBkFn\t\t: this.#sBkFn,\n\t\tsBkFace\t\t: this.#sBkFace,\n//\t\tidc_hArg\t: this.#idc.gethArg(),\n\t});\n\toverride playback(hLay: T_RP_layGrp, aPrm: Promise<void>[]): void {\n\t\tsuper.playback(hLay, aPrm);\n\t\tif (hLay.sBkFn === '' && hLay.sBkFace === '') {\n\t\t\tthis.#sBkFn\t\t= '';\n\t\t\tthis.#sBkFace\t= '';\n//\t\t\tthis.#idc.sethArg(hLay.idc_hArg);\n\t\t\treturn;\n\t\t}\n\n\t\taPrm.push(new Promise(re=> this.#laySub(\n\t\t\t{fn: hLay.sBkFn, face: hLay.sBkFace, left: hLay.x, top: hLay.y, alpha: hLay.alpha, blendmode: Layer.getNum2Blendmode(hLay.blendMode), rotation: hLay.rotation, scale_x: hLay.scale_x, scale_y: hLay.scale_y},\n\t\t\t_isStop=> {this.ctn.position.set(hLay.x, hLay.y); re()},\n\t\t\t\t// Layer.setXY()の後に再度移動\n\t\t)));\n\t}\n\n\toverride makeDesignCast(gdc: IMakeDesignCast) {\n\t\tif (! this.ctn.visible) return;\n\t\tgdc(this.#idc);\n\t}\n\t//makeDesignCastChildren(_gdc: IMakeDesignCast) {}\n\n\toverride cvsResize() {super.cvsResize()}\n\n\toverride showDesignCast() {this.#idc.visible = true}\n\t//showDesignCastChildren() {}\n\n\toverride readonly dump = ()=> super.dump() +`, \"pic\":\"${this.#csvFn}\"`;\n\n}\n"],"names":["DesignCast","bg_col","isLay","_appPixi","_sys","_scrItr","_prpPrs","_cfg","_hPages","hArg","_hPrm","_idcCh","_v","_o","GrpLayDesignCast","_ctn","_gl","_sp","GrpLayer","Layer","#elc","EventListenerCtn","#appPixi","main","cfg","appPixi","sys","sndMng","val","SpritesMng","#idc","CmnLib","#setIdcSp","sp","#csvFn","#sBkFn","#sBkFace","RPN_GRP_LAY","Reading","ret","#laySub","isStop","resolve","fn","face","inFn","inFace","argChk_Boolean","#sps","argChk_Num","#width","#height","#spTsy","Sprite","#rtTsy","fncRenderFore","a","s","oldFnc","#fncRender","RenderTexture","c","i","AnimatedSprite","hLay","aPrm","re","_isStop","gdc"],"mappings":";;;AAqBO,MAAMA,EAAW;AAAA;AAAA,EAMvB,YAAqBC,GAAyBC,IAAQ,IAAO;AAAxC,SAAA,SAAAD,GAAyB,KAAA,QAAAC;AAAA,EAAgB;AAAA,EAL9D,OAAO,KAAKC,GAAuBC,GAAeC,GAAyBC,GAAuBC,GAAcC,GAAgB;AAAA,EAAc;AAAA,EAC9I,OAAO,kBAAkB;AAAA,EAAc;AAAA,EAKvC,UAAU;AAAA,EAAc;AAAA,EAExB,UAAgB;AAAC,WAAO,KAAK;AAAA,EAAI;AAAA,EACvB,OAAc,CAAA;AAAA,EACxB,QAAQC,GAAkB;AACzB,SAAK,OAAOA;AAAA,EACb;AAAA,EAEA,SAASC,GAAa;AAAA,EAAc;AAAA,EA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AAKA,EAAK,GAAG,OAAOA,EAAK,OAAO,WAAW7C,EAAM,iBAAiB6C,EAAK,SAAS,GAAG,UAAUA,EAAK,UAAU,SAASA,EAAK,SAAS,SAASA,EAAK,QAAA;AAAA,MACpM,CAAAG,MAAU;AAAC,aAAK,IAAI,SAAS,IAAIH,EAAK,GAAGA,EAAK,CAAC,GAAGE,EAAA;AAAA,MAAI;AAAA;AAAA,IAAA,CAEtD,CAAC;AAAA,EACH;AAAA,EAES,eAAeE,GAAsB;AAC7C,IAAM,KAAK,IAAI,WACfA,EAAI,KAAKtC,EAAI;AAAA,EACd;AAAA;AAAA,EAGS,YAAY;AAAC,UAAM,UAAA;AAAA,EAAW;AAAA,EAE9B,iBAAiB;AAAC,SAAKA,GAAK,UAAU;AAAA,EAAI;AAAA;AAAA,EAGjC,OAAO,MAAK,MAAM,SAAQ,YAAY,KAAKI,EAAM;AAEpE;;;;;"}
|
|
1
|
+
{"version":3,"file":"GrpLayer.js","sources":["../src/sn/DesignCast.ts","../src/sn/GrpLayer.ts"],"sourcesContent":["/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2021-2025 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport type {TArg} from './Grammar';\nimport type {T_PropParser} from './CmnInterface';\nimport type {SysBase} from './SysBase';\nimport type {ScriptIterator} from './ScriptIterator';\nimport type {HPage} from './LayerMng';\nimport type {HPRM} from './AnalyzeTagArg';\nimport type {TxtStage} from './TxtStage';\nimport type {Button} from './Button';\nimport type {GrpLayer} from './GrpLayer';\nimport type {Config} from './Config';\n\nimport type {Application, Text, Sprite} from 'pixi.js';\n\n\nexport class DesignCast {\n\tstatic\tinit(_appPixi: Application, _sys: SysBase, _scrItr: ScriptIterator, _prpPrs: T_PropParser, _cfg: Config, _hPages: HPage) { /* empty */ }\n\tstatic\tcvsResizeDesign() { /* empty */ }\n//\tstatic\treadonly\t#alzTagArg\t= new AnalyzeTagArg;\n\n\n\tconstructor(readonly bg_col: string, readonly isLay = false) {}\n\tdestroy() { /* empty */ }\n\n\tgethArg(): TArg {return this.hArg}\n\tprotected\thArg\t: TArg\t= {};\n\tsethArg(hArg: TArg): void {\n\t\tthis.hArg = hArg;\n\t}\n\n\tsetOther(_hPrm: HPRM) { /* empty */ }\n\n\tadopt(_idcCh: DesignCast) {\t// 養子縁組\n\t}\n\n\tstatic\tenterMode() { /* empty */ }\n\tstatic\tallHide() { /* empty */ }\n\tset visible(_v: boolean) { /* empty */ }\n\tstatic\tleaveMode() { /* empty */ }\n\n\n\tcvsResize() { /* empty */ }\n\tmake() { /* empty */ }\n\tstatic replaceToken(_o: unknown) { /* empty */ }\n\n}\n\n\n// 画像レイヤ\nexport class GrpLayDesignCast extends DesignCast {\n\tconstructor(_ctn: Sprite, _gl: GrpLayer) {super('#29e', true)}\n\tsetSp(_sp: Sprite) { /* empty */ }\n}\n\n// 文字レイヤ\nexport class TxtLayDesignCast extends DesignCast {\n\tconstructor(_ctn: Sprite, _ts: TxtStage) {\n\t\tsuper('#29e', true);\n\t}\n}\n// 文字レイヤ・パディング\nexport class TxtLayPadDesignCast extends DesignCast {\n\tconstructor(_ts: TxtStage) {super('#9e2')}\n}\n\n// 文字レイヤ・ボタン基本\nexport class BtnDesignCast extends DesignCast {\n\tconstructor(protected readonly btn: Button, override readonly hArg: TArg) {\n\t\tsuper('#e92');\n\t}\n}\n// 文字レイヤ・文字ボタン\nexport class TxtBtnDesignCast extends BtnDesignCast {\n\tconstructor(btn: Button, hArg: TArg, _txt: Text) {\n\t\tsuper(btn, hArg);\n\t}\n}\n\n// 文字レイヤ・画像ボタン\nexport class PicBtnDesignCast extends BtnDesignCast {\n\tsetSp(_sp: Sprite) { /* empty */ }\n}\n","/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2018-2025 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport {Layer, type T_RecordPlayBack_lay} from './Layer';\n\nimport {CmnLib, argChk_Boolean, argChk_Num} from './CmnLib';\nimport type {TArg} from './Grammar';\nimport type {T_Main, T_Variable} from './CmnInterface';\nimport type {Config} from './Config';\nimport type {SysBase} from './SysBase';\nimport {EventListenerCtn} from './EventListenerCtn';\nimport type {SoundMng} from './SoundMng';\nimport type {IMakeDesignCast} from './LayerMng';\nimport {GrpLayDesignCast} from './DesignCast';\nimport {SpritesMng} from './SpritesMng';\nimport {Reading} from './Reading';\n\nimport {Sprite, AnimatedSprite, RenderTexture, type Application} from 'pixi.js';\n\n\nexport type T_RP_layGrp = T_RecordPlayBack_lay & {\n\tsBkFn\t: string;\n\tsBkFace\t: string;\n}\n\n\nexport class GrpLayer extends Layer {\n\tstatic\treadonly\t#elc\t= new EventListenerCtn;\n\n\tstatic\t#appPixi: Application;\n\tstatic\tinit(main: T_Main, cfg: Config, appPixi: Application, sys: SysBase, sndMng: SoundMng, val: T_Variable): void {\n\t\tGrpLayer.#appPixi = appPixi;\n\t\tSpritesMng.init(cfg, val, sys, main, sndMng);\n\t}\n\tstatic\tdestroy() {GrpLayer.#elc.clear(); SpritesMng.destroy()}\n\n\treadonly\t#idc\t= new GrpLayDesignCast(this.ctn, this);\n\tconstructor() {\n\t\tsuper();\n\t\tif (CmnLib.isDbg) {\n\t\t\tthis.#setIdcSp = sp=> this.#idc.setSp(sp);\n\t\t\tthis.cvsResize = ()=> {super.cvsResize(); this.#idc.cvsResize()}\n\t\t}\n\t}\n\t#setIdcSp\t: (sp: Sprite)=> void\t= ()=> { /* empty */ };\n\n\t#csvFn\t\t= '';\n\t#sBkFn\t\t= '';\n\t#sBkFace\t= '';\n\toverride readonly\tlay = (hArg: TArg)=> {\n\t\tconst RPN_GRP_LAY = Reading.procID +`GrpLayer lay name:${this.name_}`;\n\t\tconst ret = this.#laySub(hArg, isStop=> {\n\t\t\tif (isStop) Reading.endProc(RPN_GRP_LAY);\n\t\t});\n\t\tif (ret) Reading.beginProc(RPN_GRP_LAY);\n\t\treturn ret;\n\t}\n\t#laySub(hArg: TArg, resolve: (isStop: boolean)=> void): boolean {\n\t\tconst {fn, face = ''} = hArg;\n\t\tthis.#idc.sethArg(hArg);\n\t\tif (! fn) {\n\t\t\tsuper.lay(hArg);\n\n\t\t\tif (this.ctn.children.length > 0) this.setPos(hArg);\n\t\t\tthis.#sBkFn = '';\n\t\t\tthis.#csvFn = this.#sBkFace = face;\n\t\t\tresolve(false);\n\t\t\treturn false;\n\t\t}\n\n\t\tconst inFn = 'fn' in hArg;\n\t\tconst inFace = 'face' in hArg;\n\n\t\tthis.clearLay({clear_filter: argChk_Boolean(hArg, 'clear_filter', true)});\n\t\tif (inFn) this.#sBkFn = fn;\t// clearLay()後に置く事\n\t\tif (inFace) this.#sBkFace = face;\n\t\tsuper.lay(hArg);\t// filter設定してる場合も\n\n\t\thArg.dx = 0;\n\t\thArg.dy = 0;\n\n\t\tthis.#sps.destroy();\n\t\tthis.#sps = new SpritesMng(\n\t\t\tthis.#csvFn = fn + (face ?','+ face :''),\n\t\t\tthis.ctn,\n\t\t\tsp=> {\n\t\t\t\tif ('width' in hArg || 'height' in hArg) {\n\t\t\t\t\tsp.width = argChk_Num(hArg, 'width', 0);\n\t\t\t\t\tsp.height = argChk_Num(hArg, 'height', 0);\n\t\t\t\t}\n\t\t\t\tthis.#width = sp.width;\n\t\t\t\tthis.#height = sp.height;\n\t\t\t\tLayer.setXY(sp, hArg, this.ctn, true);\n\t\t\t\tLayer.setBlendmode(this.ctn, hArg);\n\t\t\t//\tif (hArg.page === 'fore') this.rsvEvent(sp);\t// ======\n\t\t\t\t\t// [lay page=fore]のみswfアニメ終了イベント発生\n\t\t\t\tthis.#setIdcSp(sp);\n\t\t\t},\n\t\t\tisStop=> resolve(isStop),\n\t\t);\n\t\treturn this.#sps.ret;\n\t}\n\t#sps\t= new SpritesMng;\n\t#width\t= 0;\n\t#height\t= 0;\n\toverride\tget\twidth() {return this.#width}\n\toverride\tget\theight() {return this.#height}\n\n\n\toverride\trenderStart(isSkipping: boolean) {\n\t\tif (isSkipping) {\n\t\t\tconst a = this.ctn.alpha;\n\t\t\tthis.ctn.alpha = 1;\t// 無意味に思えるが、pixi部の挙動が変わるので一度やる\n\t\t\tthis.ctn.alpha = a;\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#spTsy = new Sprite(this.#rtTsy);\n\t\tthis.#spTsy.visible = false;\n\t\tthis.ctn.addChildAt(this.#spTsy, 0);\n\t\tthis.#spTsy.position.set(-this.ctn.x, -this.ctn.y);\n\n\t\tlet fncRenderFore = ()=> {\n\t\t\tconst a = this.ctn.alpha;\n\t\t\tthis.ctn.alpha = 1;\n\t\t\tfor (const s of this.ctn.children) s.visible = true;\n\t\t\tthis.#spTsy.visible = false;\n\t\t\tGrpLayer.#appPixi.renderer.render(this.ctn, {renderTexture: this.#rtTsy});\t// clear: true\n\t\t\tthis.ctn.alpha = a;\n\t\t\tfor (const s of this.ctn.children) s.visible = false;\n\t\t}\n\t\tif (! this.containMovement) {\n\t\t\tconst oldFnc = fncRenderFore;\t// 動きがないなら最初に一度\n\t\t\tfncRenderFore = ()=> {fncRenderFore = ()=> { /* empty */ }; oldFnc()};\n\t\t}\n\t\tthis.#fncRender = ()=> {\n\t\t\tfncRenderFore();\n\t\t\tthis.#spTsy.visible = true;\n\t\t};\n\t\tGrpLayer.#appPixi.ticker.add(this.#fncRender);\n\t}\n\t#rtTsy\t= RenderTexture.create({\n\t\twidth\t: CmnLib.stageW,\n\t\theight\t: CmnLib.stageH,\n\t});\n\t#spTsy\t= new Sprite;\n\t#fncRender = ()=> { /* empty */ };\n\toverride\trenderEnd() {\n\t\tGrpLayer.#appPixi.ticker.remove(this.#fncRender);\n\t\tthis.ctn.removeChild(this.#spTsy);\n\t\tfor (const s of this.ctn.children) s.visible = true;\n\t\tthis.#spTsy.destroy(true);\n\n\t\tthis.#rtTsy = RenderTexture.create({\n\t\t\twidth\t: CmnLib.stageW,\n\t\t\theight\t: CmnLib.stageH,\n\t\t});\n\t}\n\n\n\tsetPos(hArg: TArg): void {\n\t\tLayer.setXY(\n\t\t\tthis.ctn.children[0] ?? this.ctn,\n\t\t\thArg,\n\t\t\tthis.ctn,\n\t\t\ttrue\n\t\t);\n\t}\n\n\t// アニメ・動画を含むか\n\toverride get containMovement() {\n\t\tif (this.#csvFn === '') return false;\n\n\t\tconst c = this.ctn.children;\n\t\treturn this.#csvFn.split(',').some(\n\t\t\t(fn, i)=> c[i] instanceof AnimatedSprite || SpritesMng.getHFn2VElm(fn)\n\t\t);\n\t}\n\n\toverride clearLay(hArg: TArg): void {\n\t\tsuper.clearLay(hArg);\n\t\tthis.#sps.destroy();\n\t\tthis.#sBkFn\t\t= '';\n\t\tthis.#sBkFace\t= '';\n\t\tthis.#csvFn\t\t= '';\n\t}\n\toverride readonly record = ()=> ({...super.record(),\n\t\tsBkFn\t\t: this.#sBkFn,\n\t\tsBkFace\t\t: this.#sBkFace,\n//\t\tidc_hArg\t: this.#idc.gethArg(),\n\t});\n\toverride playback(hLay: T_RP_layGrp, aPrm: Promise<void>[]): void {\n\t\tsuper.playback(hLay, aPrm);\n\t\tif (hLay.sBkFn === '' && hLay.sBkFace === '') {\n\t\t\tthis.#sBkFn\t\t= '';\n\t\t\tthis.#sBkFace\t= '';\n//\t\t\tthis.#idc.sethArg(hLay.idc_hArg);\n\t\t\treturn;\n\t\t}\n\n\t\taPrm.push(new Promise(re=> this.#laySub(\n\t\t\t{fn: hLay.sBkFn, face: hLay.sBkFace, left: hLay.x, top: hLay.y, alpha: hLay.alpha, blendmode: Layer.getNum2Blendmode(hLay.blendMode), rotation: hLay.rotation, scale_x: hLay.scale_x, scale_y: hLay.scale_y},\n\t\t\t_isStop=> {this.ctn.position.set(hLay.x, hLay.y); re()},\n\t\t\t\t// Layer.setXY()の後に再度移動\n\t\t)));\n\t}\n\n\toverride makeDesignCast(gdc: IMakeDesignCast) {\n\t\tif (! this.ctn.visible) return;\n\t\tgdc(this.#idc);\n\t}\n\t//makeDesignCastChildren(_gdc: IMakeDesignCast) {}\n\n\toverride cvsResize() {super.cvsResize()}\n\n\toverride showDesignCast() {this.#idc.visible = true}\n\t//showDesignCastChildren() {}\n\n\toverride readonly dump = ()=> super.dump() +`, \"pic\":\"${this.#csvFn}\"`;\n\n}\n"],"names":["DesignCast","bg_col","isLay","_appPixi","_sys","_scrItr","_prpPrs","_cfg","_hPages","hArg","_hPrm","_idcCh","_v","_o","GrpLayDesignCast","_ctn","_gl","_sp","GrpLayer","Layer","#elc","EventListenerCtn","#appPixi","main","cfg","appPixi","sys","sndMng","val","SpritesMng","#idc","CmnLib","#setIdcSp","sp","#csvFn","#sBkFn","#sBkFace","RPN_GRP_LAY","Reading","ret","#laySub","isStop","resolve","fn","face","inFn","inFace","argChk_Boolean","#sps","argChk_Num","#width","#height","isSkipping","a","#spTsy","Sprite","#rtTsy","fncRenderFore","s","oldFnc","#fncRender","RenderTexture","c","i","AnimatedSprite","hLay","aPrm","re","_isStop","gdc"],"mappings":";;;AAqBO,MAAMA,EAAW;AAAA;AAAA,EAMvB,YAAqBC,GAAyBC,IAAQ,IAAO;AAAxC,SAAA,SAAAD,GAAyB,KAAA,QAAAC;AAAA,EAAgB;AAAA,EAL9D,OAAO,KAAKC,GAAuBC,GAAeC,GAAyBC,GAAuBC,GAAcC,GAAgB;AAAA,EAAc;AAAA,EAC9I,OAAO,kBAAkB;AAAA,EAAc;AAAA,EAKvC,UAAU;AAAA,EAAc;AAAA,EAExB,UAAgB;AAAC,WAAO,KAAK;AAAA,EAAI;AAAA,EACvB,OAAc,CAAA;AAAA,EACxB,QAAQC,GAAkB;AACzB,SAAK,OAAOA;AAAA,EACb;AAAA,EAEA,SAASC,GAAa;AAAA,EAAc;AAAA,EAEpC,MAAMC,GAAoB;AAAA,EAC1B;AAAA,EAEA,OAAO,YAAY;AAAA,EAAc;AAAA,EACjC,OAAO,UAAU;AAA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,EAAK,SAAS,MAAMA,EAAK,GAAG,KAAKA,EAAK,GAAG,OAAOA,EAAK,OAAO,WAAW9C,EAAM,iBAAiB8C,EAAK,SAAS,GAAG,UAAUA,EAAK,UAAU,SAASA,EAAK,SAAS,SAASA,EAAK,QAAA;AAAA,MACpM,CAAAG,MAAU;AAAC,aAAK,IAAI,SAAS,IAAIH,EAAK,GAAGA,EAAK,CAAC,GAAGE,EAAA;AAAA,MAAI;AAAA;AAAA,IAAA,CAEtD,CAAC;AAAA,EACH;AAAA,EAES,eAAeE,GAAsB;AAC7C,IAAM,KAAK,IAAI,WACfA,EAAI,KAAKvC,EAAI;AAAA,EACd;AAAA;AAAA,EAGS,YAAY;AAAC,UAAM,UAAA;AAAA,EAAW;AAAA,EAE9B,iBAAiB;AAAC,SAAKA,GAAK,UAAU;AAAA,EAAI;AAAA;AAAA,EAGjC,OAAO,MAAK,MAAM,SAAQ,YAAY,KAAKI,EAAM;AAEpE;;;;;"}
|
package/dist/LayerMng.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { e as w, S as H, L as F, n as D, l as v, a as
|
|
2
|
-
import { C as _, T as
|
|
3
|
-
import { G as X, D as
|
|
1
|
+
import { e as w, S as H, L as F, n as D, l as v, a as k, p as M, G, q as U, E as A, f as tt, r as et, t as st, v as B, w as it, x as q, y as at, F as nt, u as W, z as J } from "./web2.js";
|
|
2
|
+
import { C as _, T as R } from "./CmnTween.js";
|
|
3
|
+
import { G as X, D as Y } from "./GrpLayer.js";
|
|
4
4
|
import { S as I } from "./SpritesMng.js";
|
|
5
|
-
import { T as
|
|
6
|
-
import { R as
|
|
7
|
-
import { P as
|
|
8
|
-
import { a as
|
|
9
|
-
import { Button as
|
|
10
|
-
class
|
|
5
|
+
import { T as C, a as rt } from "./TxtLayer.js";
|
|
6
|
+
import { R as ot } from "./RubySpliter.js";
|
|
7
|
+
import { P as ct, b as K } from "./Main.js";
|
|
8
|
+
import { a as $ } from "./Reading.js";
|
|
9
|
+
import { Button as Q } from "./Button.js";
|
|
10
|
+
class P {
|
|
11
11
|
constructor(t, e, s, i, n, o, r, l) {
|
|
12
12
|
this.cls = e, this.hArg = n, this.sys = o, this.val = r, this.ret = l;
|
|
13
13
|
const f = o.hFactoryCls[e];
|
|
@@ -24,7 +24,7 @@ class R {
|
|
|
24
24
|
this.#e.fore.destroy(), this.#e.back.destroy();
|
|
25
25
|
}
|
|
26
26
|
lay = (t) => this.getPage(t).lay(t);
|
|
27
|
-
getPage = (t) =>
|
|
27
|
+
getPage = (t) => P.argChk_page(t, "fore") !== "back" ? this.#e.fore : this.#e.back;
|
|
28
28
|
static argChk_page(t, e) {
|
|
29
29
|
const s = t.page ?? e;
|
|
30
30
|
if (s === "fore" || s === "back")
|
|
@@ -43,7 +43,7 @@ class R {
|
|
|
43
43
|
}
|
|
44
44
|
class u {
|
|
45
45
|
constructor(t, e, s) {
|
|
46
|
-
this.appPixi = e, this.val = s, t.add_frame = (i) => this.#
|
|
46
|
+
this.appPixi = e, this.val = s, t.add_frame = (i) => this.#k(i), t.let_frame = (i) => this.#d(i), t.set_frame = (i) => this.#N(i), t.frame = (i) => this.#S(i), t.tsy_frame = (i) => this.#w(i);
|
|
47
47
|
}
|
|
48
48
|
static #e;
|
|
49
49
|
static #t;
|
|
@@ -76,7 +76,7 @@ class u {
|
|
|
76
76
|
}
|
|
77
77
|
// HTMLフレーム
|
|
78
78
|
// フレーム追加
|
|
79
|
-
#
|
|
79
|
+
#k(t) {
|
|
80
80
|
const { id: e, src: s, alpha: i = 1, scale_x: n = 1, scale_y: o = 1, rotate: r = 0 } = t;
|
|
81
81
|
if (!e) throw "idは必須です";
|
|
82
82
|
if (!s) throw "srcは必須です";
|
|
@@ -84,21 +84,21 @@ class u {
|
|
|
84
84
|
if (this.val.getVal(`tmp:${l}`)) throw `frame【${e}】はすでにあります`;
|
|
85
85
|
const f = w(t, "visible", !0), d = t.b_color ? ` background-color: ${t.b_color};` : "", h = this.#b(t);
|
|
86
86
|
u.#i.cvs.insertAdjacentHTML("beforebegin", `<iframe id="${e}" style="opacity: ${i}; ${d} position: absolute; left:${u.#t.ofsLeft4elm + h.x * u.#t.cvsScale}px; top: ${u.#t.ofsTop4elm + h.y * u.#t.cvsScale}px; z-index: 1; border: 0px; overflow: hidden; display: ${f ? "inline" : "none"}; transform: scale(${n}, ${o}) rotate(${r}deg);" width="${h.width * u.#t.cvsScale}" height="${h.height * u.#t.cvsScale}"></iframe>`);
|
|
87
|
-
const p =
|
|
88
|
-
|
|
87
|
+
const p = $.procID + `add_frame id:${e}`;
|
|
88
|
+
$.beginProc(p);
|
|
89
89
|
const c = u.#e.searchPath(s, H.HTML), a = new F().add({ name: s, url: c, xhrType: D.XHR_RESPONSE_TYPE.TEXT });
|
|
90
90
|
return u.#t.arg.crypto && a.use(
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
92
|
-
(y,
|
|
93
|
-
y.data = b,
|
|
92
|
+
(y, x) => void u.#t.dec(y.extension, y.data).then((b) => {
|
|
93
|
+
y.data = b, x();
|
|
94
94
|
}).catch((b) => {
|
|
95
|
-
u.#i.errScript(`[add_frame]Html ロード失敗です src:${y.name} ${b}`, !1),
|
|
95
|
+
u.#i.errScript(`[add_frame]Html ロード失敗です src:${y.name} ${b}`, !1), x();
|
|
96
96
|
})
|
|
97
|
-
), a.load((y,
|
|
97
|
+
), a.load((y, x) => {
|
|
98
98
|
const b = document.getElementById(e);
|
|
99
99
|
this.#c[e] = b, this.#y[e] = !1;
|
|
100
100
|
const g = c.lastIndexOf("/") + 1, S = c.slice(0, g), j = S.slice(0, g);
|
|
101
|
-
b.srcdoc = String(
|
|
101
|
+
b.srcdoc = String(x[s]?.data).replace("sn_repRes();", "").replaceAll(
|
|
102
102
|
/\s(?:src|href)=(["'])(\S+?)\1/g,
|
|
103
103
|
// 【\s】が大事、data-src弾く
|
|
104
104
|
(m, N, L) => L.startsWith("../") ? j + m.slice(3) : m.replace("./", "").replace(N, N + S)
|
|
@@ -106,7 +106,7 @@ class u {
|
|
|
106
106
|
/data-src="(.+?\.)(?:jpe?g|png)/g,
|
|
107
107
|
(m, N) => `data-src="${N}webp`
|
|
108
108
|
)), b.onload = () => {
|
|
109
|
-
|
|
109
|
+
$.endProc(p), this.val.setVal_Nochk("tmp", l, !0), this.val.setVal_Nochk("tmp", l + ".alpha", i), this.val.setVal_Nochk("tmp", l + ".x", h.x), this.val.setVal_Nochk("tmp", l + ".y", h.y), this.val.setVal_Nochk("tmp", l + ".scale_x", n), this.val.setVal_Nochk("tmp", l + ".scale_y", o), this.val.setVal_Nochk("tmp", l + ".rotate", r), this.val.setVal_Nochk("tmp", l + ".width", h.width), this.val.setVal_Nochk("tmp", l + ".height", h.height), this.val.setVal_Nochk("tmp", l + ".visible", f);
|
|
110
110
|
const m = b.contentWindow;
|
|
111
111
|
this.#o.resvFlameEvent(m.document.body), m.sn_repRes?.((N) => u.#_(N.dataset.src ?? "", N));
|
|
112
112
|
};
|
|
@@ -122,8 +122,8 @@ class u {
|
|
|
122
122
|
return new DOMRect(
|
|
123
123
|
v(e, "x", 0),
|
|
124
124
|
v(e, "y", 0),
|
|
125
|
-
v(e, "width",
|
|
126
|
-
v(e, "height",
|
|
125
|
+
v(e, "width", k.stageW),
|
|
126
|
+
v(e, "height", k.stageH)
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
129
|
static #_(t, e, s) {
|
|
@@ -153,8 +153,8 @@ class u {
|
|
|
153
153
|
for (const [p, { data: { src: c } }] of Object.entries(h)) {
|
|
154
154
|
const a = this.#f[p] = c + // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
155
155
|
(c.startsWith("blob:") || c.startsWith("data:") ? "" : r ? "?" + r : ""), y = this.#m[p];
|
|
156
|
-
if (y) for (const
|
|
157
|
-
|
|
156
|
+
if (y) for (const x of y)
|
|
157
|
+
x.src = a, s && (x.onload = () => s(x));
|
|
158
158
|
delete this.#m[p];
|
|
159
159
|
}
|
|
160
160
|
});
|
|
@@ -248,10 +248,10 @@ class u {
|
|
|
248
248
|
s && (v(a, "alpha", 0), y = () => {
|
|
249
249
|
h.style.opacity = String(c.a), this.val.setVal_Nochk("tmp", "alpha", c.a);
|
|
250
250
|
});
|
|
251
|
-
let
|
|
251
|
+
let x = () => {
|
|
252
252
|
};
|
|
253
253
|
const b = this.#b(a);
|
|
254
|
-
(i || n || o || r || l) && (b.x, b.y, v(a, "scale_x", 1), v(a, "scale_y", 1), v(a, "rotate", 0),
|
|
254
|
+
(i || n || o || r || l) && (b.x, b.y, v(a, "scale_x", 1), v(a, "scale_y", 1), v(a, "rotate", 0), x = () => {
|
|
255
255
|
h.style.left = `${// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
256
256
|
u.#t.ofsLeft4elm + c.x * u.#t.cvsScale} px`, h.style.top = `${// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
257
257
|
u.#t.ofsTop4elm + c.y * u.#t.cvsScale} px`, h.style.transform = `scale(${c.sx}, ${c.sy}) rotate(${c.r}deg)`, this.val.setVal_Nochk("tmp", p + ".x", c.x), this.val.setVal_Nochk("tmp", p + ".y", c.y), this.val.setVal_Nochk("tmp", p + ".scale_x", c.sx), this.val.setVal_Nochk("tmp", p + ".scale_y", c.sy), this.val.setVal_Nochk("tmp", p + ".rotate", c.r);
|
|
@@ -267,14 +267,14 @@ class u {
|
|
|
267
267
|
h.height = `${c.h * u.#t.cvsScale} px`, this.val.setVal_Nochk("tmp", p + ".height", c.h);
|
|
268
268
|
}), this.appPixi.stage.interactive = !1, _.tween(`frm
|
|
269
269
|
${e}`, t, c, _.cnvTweenArg(t, c), () => {
|
|
270
|
-
y(),
|
|
270
|
+
y(), x(), g(), S();
|
|
271
271
|
}, () => {
|
|
272
272
|
this.appPixi.stage.interactive = !0;
|
|
273
273
|
}, () => {
|
|
274
274
|
}), !1;
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
class
|
|
277
|
+
class lt {
|
|
278
278
|
// 🍚
|
|
279
279
|
constructor(t, e, s) {
|
|
280
280
|
this.oCfg = t, this.hTag = e, this.val = s, e.rec_ch = (i) => this.#i(i), e.rec_r = (i) => this.#o(i), e.reset_rec = (i) => this.#c(i), s.defTmp("const.sn.log.json", () => {
|
|
@@ -338,7 +338,7 @@ class ht {
|
|
|
338
338
|
function V(O) {
|
|
339
339
|
return encodeURIComponent(JSON.stringify(O));
|
|
340
340
|
}
|
|
341
|
-
class
|
|
341
|
+
class Z {
|
|
342
342
|
//MARK: コンストラクタ
|
|
343
343
|
constructor(t, e, s, i, n, o, r, l, f) {
|
|
344
344
|
this.cfg = t, this.hTag = e, this.appPixi = s, this.val = i, this.main = n, this.scrItr = o, this.sys = r;
|
|
@@ -349,31 +349,31 @@ class M {
|
|
|
349
349
|
this.#s[a].fore.cvsResize();
|
|
350
350
|
this.#o.cvsResize(), this.#d.cvsResize();
|
|
351
351
|
};
|
|
352
|
-
if (
|
|
353
|
-
this.#
|
|
352
|
+
if (k.isMobile)
|
|
353
|
+
this.#k.add(globalThis, "orientationchange", d, { passive: !0 });
|
|
354
354
|
else {
|
|
355
355
|
let a;
|
|
356
|
-
this.#
|
|
356
|
+
this.#k.add(globalThis, "resize", () => {
|
|
357
357
|
a || (a = setTimeout(() => {
|
|
358
358
|
a = void 0, d();
|
|
359
359
|
}, 1e3 / 60 * 10));
|
|
360
360
|
}, { passive: !0 });
|
|
361
361
|
}
|
|
362
|
-
r.cvsResize(), this.#l = new
|
|
362
|
+
r.cvsResize(), this.#l = new lt(this.cfg.oCfg, e, i), C.init(t, e, i, this.#l, (a) => this.#s[a.layname].fore === a, s), X.init(n, t, s, r, l, i), u.init(t, r, n), this.#o = new u(e, s, i), e.loadplugin = (a) => this.#O(a), e.snapshot = (a) => this.#S(a), this.#w = this.sys.isApp ? (a, y, x, b, g) => this.#B(a, y, x, b, g) : (a, y, x, b, g) => this.#W(a, y, x, b, g), e.add_lay = (a) => this.#j(a), e.clear_lay = (a) => this.#H(a), e.finish_trans = () => !1, e.lay = (a) => this.#z(a), e.trans = (a) => this.#G(a), e.wt = (a) => _.wt(a), e.quake = (a) => this.#q(a), e.stop_quake = e.finish_trans, e.wq = e.wt, e.pause_tsy = (a) => _.pause_tsy(a), e.resume_tsy = (a) => _.resume_tsy(a), e.stop_tsy = (a) => _.stop_tsy(a), e.tsy = (a) => this.#J(a), e.wait_tsy = (a) => _.wait_tsy(a), e.add_filter = (a) => this.#X(a), e.clear_filter = (a) => this.#Y(a), e.enable_filter = (a) => this.#K(a), e.ch = (a) => this.#I(a), e.clear_text = (a) => this.#M(a), e.current = (a) => this.#D(a), e.endlink = (a) => this.#A(a), e.er = (a) => this.#tt(a), e.graph = (a) => this.#et(a), e.link = (a) => this.#st(a), e.r = (a) => this.#it(a), e.ruby2 = (a) => this.#at(a), e.span = (a) => this.#nt(a), e.tcy = (a) => this.#rt(a), e.add_face = (a) => I.add_face(a), e.wv = (a) => I.wv(a), e.dump_lay = (a) => this.#ot(a), e.enable_event = (a) => this.#ct(a), e.button = (a) => this.#lt(a), t.existsBreakline && (this.breakLine = (a) => {
|
|
363
363
|
delete a.visible, a.id = "break", a.pic = "breakline", this.#n("grp|" + V(a));
|
|
364
364
|
}), t.existsBreakpage && (this.breakPage = (a) => {
|
|
365
365
|
delete a.visible, a.id = "break", a.pic = "breakpage", this.#n("grp|" + V(a));
|
|
366
|
-
}), this.#c =
|
|
366
|
+
}), this.#c = M(String(t.oCfg.init.bg_color));
|
|
367
367
|
const h = new G();
|
|
368
|
-
h.beginFill(this.#c).lineStyle(0, this.#c).drawRect(0, 0,
|
|
368
|
+
h.beginFill(this.#c).lineStyle(0, this.#c).drawRect(0, 0, k.stageW, k.stageH).endFill(), this.#t.addChild(h.clone()), this.#i.addChild(h), this.#i.visible = !1, this.#t.name = "page:A", this.#i.name = "page:B", this.#e = s.stage, this.#e.addChild(this.#i), this.#e.addChild(this.#t), this.#e.addChild(this.#T), this.#e.addChild(this.#a), this.#e.name = "stage";
|
|
369
369
|
const p = (a, y) => {
|
|
370
370
|
this.#N(Number(y));
|
|
371
371
|
};
|
|
372
372
|
p("", i.getVal("sys:TextLayer.Back.Alpha", 1)), i.defValTrg("sys:TextLayer.Back.Alpha", p);
|
|
373
373
|
const c = (a, y) => {
|
|
374
|
-
|
|
374
|
+
Q.fontFamily = y;
|
|
375
375
|
};
|
|
376
|
-
c("", i.getVal("tmp:sn.button.fontFamily",
|
|
376
|
+
c("", i.getVal("tmp:sn.button.fontFamily", Q.fontFamily)), i.defValTrg("tmp:sn.button.fontFamily", c), i.defTmp("const.sn.last_page_text", () => this.currentTxtlayFore?.pageText ?? ""), i.defTmp("const.sn.last_page_plain_text", () => this.currentTxtlayFore?.pagePlainText ?? ""), k.isDbg && (Y.init(s, r, o, f, t, this.#s), this.cvsResizeDesign = () => Y.cvsResizeDesign(), r.addHook((a, y) => {
|
|
377
377
|
this.#y[a]?.(a, y) && delete this.#y[a];
|
|
378
378
|
}));
|
|
379
379
|
}
|
|
@@ -383,7 +383,7 @@ class M {
|
|
|
383
383
|
#o;
|
|
384
384
|
#c;
|
|
385
385
|
#l;
|
|
386
|
-
#
|
|
386
|
+
#k = new A();
|
|
387
387
|
cvsResizeDesign() {
|
|
388
388
|
}
|
|
389
389
|
#y = {
|
|
@@ -412,7 +412,7 @@ class M {
|
|
|
412
412
|
#f = void 0;
|
|
413
413
|
cover(t, e = 0) {
|
|
414
414
|
this.#f && (this.#e.removeChild(this.#f), this.#f.destroy(), this.#f = void 0), t && this.#e.addChild(
|
|
415
|
-
(this.#f = new G()).beginFill(e).lineStyle(0, e).drawRect(0, 0,
|
|
415
|
+
(this.#f = new G()).beginFill(e).lineStyle(0, e).drawRect(0, 0, k.stageW, k.stageH).endFill()
|
|
416
416
|
);
|
|
417
417
|
}
|
|
418
418
|
#d;
|
|
@@ -421,13 +421,13 @@ class M {
|
|
|
421
421
|
}
|
|
422
422
|
destroy() {
|
|
423
423
|
for (const t of Object.values(this.#s)) t.destroy();
|
|
424
|
-
this.#
|
|
424
|
+
this.#k.clear(), X.destroy(), ot.destroy(), rt.destroy(), C.destroy(), this.#o.destroy(), _.destroy(), C.msecChWait = 10;
|
|
425
425
|
}
|
|
426
426
|
// 既存の全文字レイヤの実際のバック不透明度、を再計算
|
|
427
427
|
#N(t) {
|
|
428
428
|
for (const e of this.#r) {
|
|
429
429
|
const { fore: s, back: i } = this.#s[e];
|
|
430
|
-
s instanceof
|
|
430
|
+
s instanceof C && (s.chgBackAlpha(t), i.chgBackAlpha(t));
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
#n = (t, e = this.currentTxtlayForeNeedErr, s = !0) => e.tagCh("| 《" + t + "》");
|
|
@@ -444,19 +444,19 @@ class M {
|
|
|
444
444
|
this.currentTxtlayFore && (this.clearBreak = () => this.#n("del|break"), this.clearBreak());
|
|
445
445
|
}
|
|
446
446
|
clickTxtLay() {
|
|
447
|
-
return this.currentTxtlayFore ? this.#r.map((t) => this.#s[t].fore).some((t) => t instanceof
|
|
447
|
+
return this.currentTxtlayFore ? this.#r.map((t) => this.#s[t].fore).some((t) => t instanceof C && t.click()) : !1;
|
|
448
448
|
}
|
|
449
449
|
// // システム
|
|
450
450
|
//MARK: スナップショット
|
|
451
451
|
#S(t) {
|
|
452
|
-
const e =
|
|
452
|
+
const e = tt("-", "_", "", "_"), s = t.fn ? t.fn.startsWith(ct) ? t.fn : `${K + t.fn + e}.png` : `${K}snapshot${e}.png`, i = this.cfg.searchPath(s), n = v(t, "width", k.stageW), o = v(t, "height", k.stageH);
|
|
453
453
|
return this.#w(t, i, n, o, `snapshot dt:${e}`);
|
|
454
454
|
}
|
|
455
455
|
#w = () => !1;
|
|
456
456
|
#B({ layer: t }, e, s, i, n) {
|
|
457
|
-
if (this.#o.hideAllFrame(),
|
|
457
|
+
if (this.#o.hideAllFrame(), $.beginProc(n), !t)
|
|
458
458
|
return this.sys.capturePage(e, s, i, () => {
|
|
459
|
-
this.#o.restoreAllFrame(),
|
|
459
|
+
this.#o.restoreAllFrame(), $.endProc(n);
|
|
460
460
|
}), !0;
|
|
461
461
|
const o = this.#r.map((r) => {
|
|
462
462
|
const { ctn: l } = this.#s[r].fore, f = [l, l.visible];
|
|
@@ -465,12 +465,12 @@ class M {
|
|
|
465
465
|
for (const r of this.#p(t)) this.#s[r].fore.ctn.visible = !0;
|
|
466
466
|
return this.sys.capturePage(e, s, i, () => {
|
|
467
467
|
for (const [r, l] of o) r.visible = l;
|
|
468
|
-
this.#o.restoreAllFrame(),
|
|
468
|
+
this.#o.restoreAllFrame(), $.endProc(n);
|
|
469
469
|
}), !0;
|
|
470
470
|
}
|
|
471
471
|
#W(t, e, s, i, n) {
|
|
472
|
-
|
|
473
|
-
const o =
|
|
472
|
+
$.beginProc(n);
|
|
473
|
+
const o = et(t, "b_color", this.#c), r = st({
|
|
474
474
|
width: s,
|
|
475
475
|
height: i,
|
|
476
476
|
backgroundAlpha: o > 16777216 && e.endsWith(".png") ? 0 : 1,
|
|
@@ -491,7 +491,7 @@ class M {
|
|
|
491
491
|
r.plugins.extract.base64(d)
|
|
492
492
|
), d.destroy();
|
|
493
493
|
for (const h of this.#p(f)) this.#s[h][l].snapshot_end();
|
|
494
|
-
r.destroy(!0),
|
|
494
|
+
r.destroy(!0), $.endProc(n);
|
|
495
495
|
}), !0;
|
|
496
496
|
}
|
|
497
497
|
//MARK: プラグインの読み込み
|
|
@@ -499,11 +499,11 @@ class M {
|
|
|
499
499
|
const { fn: e } = t;
|
|
500
500
|
if (!e) throw "fnは必須です";
|
|
501
501
|
if (!e.endsWith(".css")) throw "サポートされない拡張子です";
|
|
502
|
-
const s = w(t, "join", !0), i =
|
|
503
|
-
return s &&
|
|
502
|
+
const s = w(t, "join", !0), i = $.procID + `loadplugin fn:${e}`;
|
|
503
|
+
return s && $.beginProc(i), (async () => {
|
|
504
504
|
const n = await fetch(e);
|
|
505
505
|
if (!n.ok) throw new Error("Network response was not ok.");
|
|
506
|
-
|
|
506
|
+
it(await n.text()), s && $.endProc(i);
|
|
507
507
|
})(), s;
|
|
508
508
|
}
|
|
509
509
|
// // レイヤ共通
|
|
@@ -515,14 +515,14 @@ class M {
|
|
|
515
515
|
if (e in this.#s) throw `layer【${e}】はすでにあります`;
|
|
516
516
|
if (!s) throw "clsは必須です";
|
|
517
517
|
const i = { isWait: !1 };
|
|
518
|
-
switch (this.#s[e] = new
|
|
518
|
+
switch (this.#s[e] = new P(e, s, this.#t, this.#i, t, this.sys, this.val, i), this.#r.push(e), s) {
|
|
519
519
|
case "txt":
|
|
520
520
|
this.#v || (this.#$ = () => {
|
|
521
521
|
}, this.#h = (n) => this.#Q(n), this.#D = (n) => this.#Z(n), this.hTag.current({ layer: e }), this.goTxt = () => {
|
|
522
|
-
this.#d.isSkipping ?
|
|
522
|
+
this.#d.isSkipping ? C.msecChWait = 0 : this.setNormalChWait();
|
|
523
523
|
for (const n of this.#r) {
|
|
524
524
|
const o = this.#s[n].fore;
|
|
525
|
-
o instanceof
|
|
525
|
+
o instanceof C && this.#n("gotxt|", o, !1);
|
|
526
526
|
}
|
|
527
527
|
}), this.val.setVal_Nochk("save", "const.sn.layer." + e + ".enabled", !0);
|
|
528
528
|
break;
|
|
@@ -617,13 +617,13 @@ void main() {
|
|
|
617
617
|
> if文はあまり使わない方がいいらしい (処理負荷が高い)
|
|
618
618
|
*/
|
|
619
619
|
#L = B.create({
|
|
620
|
-
width:
|
|
621
|
-
height:
|
|
620
|
+
width: k.stageW,
|
|
621
|
+
height: k.stageH
|
|
622
622
|
});
|
|
623
623
|
#T = new q(this.#L);
|
|
624
624
|
#g = B.create({
|
|
625
|
-
width:
|
|
626
|
-
height:
|
|
625
|
+
width: k.stageW,
|
|
626
|
+
height: k.stageH
|
|
627
627
|
});
|
|
628
628
|
#a = new q(this.#g);
|
|
629
629
|
//MARK: ページ裏表を交換
|
|
@@ -640,12 +640,11 @@ void main() {
|
|
|
640
640
|
this.#t.removeChild(E), this.#i.removeChild(T), this.#t.addChildAt(T, z), this.#i.addChildAt(E, z);
|
|
641
641
|
}
|
|
642
642
|
Promise.allSettled(m).then(() => {
|
|
643
|
-
this.#t.visible = !0, this.#i.visible = !1, this.#T.visible = !1, this.#a.visible = !1,
|
|
643
|
+
this.#t.visible = !0, this.#i.visible = !1, this.#T.visible = !1, this.#a.visible = !1, $.notifyEndProc(R);
|
|
644
644
|
});
|
|
645
645
|
};
|
|
646
646
|
if (this.#a.filters = [], this.#a.alpha = 1, v(t, "time", 0) === 0 || this.#d.isSkipping)
|
|
647
|
-
return
|
|
648
|
-
}), queueMicrotask(() => n()), !0;
|
|
647
|
+
return n(), !1;
|
|
649
648
|
const r = [], l = this.#r.map((m) => {
|
|
650
649
|
const { fore: N, back: L } = this.#s[m], T = s.has(m) ? L : N;
|
|
651
650
|
return T.ctn.visible && r.push(T.ctn), T;
|
|
@@ -678,27 +677,27 @@ void main() {
|
|
|
678
677
|
}
|
|
679
678
|
const a = () => {
|
|
680
679
|
h(), this.#T.visible = !0, c(), this.#a.visible = !0;
|
|
681
|
-
}, { glsl: y, rule:
|
|
680
|
+
}, { glsl: y, rule: x } = t, b = () => {
|
|
682
681
|
f.remove(a), n();
|
|
683
682
|
};
|
|
684
|
-
if (!y && !
|
|
685
|
-
return _.tween(
|
|
683
|
+
if (!y && !x)
|
|
684
|
+
return _.tween(R, t, this.#a, { alpha: 0 }, () => {
|
|
686
685
|
}, b, () => {
|
|
687
686
|
}), f.add(a), !1;
|
|
688
687
|
const g = {
|
|
689
|
-
rule:
|
|
688
|
+
rule: at.EMPTY,
|
|
690
689
|
vague: v(t, "vague", 0.04),
|
|
691
690
|
tick: 0
|
|
692
691
|
};
|
|
693
|
-
this.#a.filters = [new
|
|
692
|
+
this.#a.filters = [new nt(
|
|
694
693
|
void 0,
|
|
695
|
-
y ??
|
|
694
|
+
y ?? Z.#F,
|
|
696
695
|
g
|
|
697
696
|
)];
|
|
698
|
-
const S = _.tween(
|
|
697
|
+
const S = _.tween(R, t, g, { tick: 1 }, () => {
|
|
699
698
|
}, b, () => {
|
|
700
|
-
}, !
|
|
701
|
-
return
|
|
699
|
+
}, !x);
|
|
700
|
+
return x ? new I(x, void 0, (m) => {
|
|
702
701
|
g.rule = m.texture, m.destroy(), S.start(), f.add(a);
|
|
703
702
|
}, (m) => {
|
|
704
703
|
m && this.main.resume();
|
|
@@ -725,14 +724,14 @@ void main() {
|
|
|
725
724
|
setAllStyle2TxtLay(t) {
|
|
726
725
|
for (const e of this.#r) {
|
|
727
726
|
const s = this.#s[e].fore;
|
|
728
|
-
s instanceof
|
|
727
|
+
s instanceof C && s.lay({ style: t });
|
|
729
728
|
}
|
|
730
729
|
}
|
|
731
730
|
//MARK: 画面を揺らす
|
|
732
731
|
#q(t) {
|
|
733
732
|
if (v(t, "time", NaN) === 0) return !1;
|
|
734
733
|
const e = this.#p(t.layer).map((d) => this.#s[d].fore.ctn), { renderer: s, ticker: i } = this.appPixi;
|
|
735
|
-
this.#g.resize(
|
|
734
|
+
this.#g.resize(k.stageW, k.stageH);
|
|
736
735
|
const n = () => {
|
|
737
736
|
this.#t.visible = !0;
|
|
738
737
|
for (const d of e) s.render(
|
|
@@ -749,7 +748,7 @@ void main() {
|
|
|
749
748
|
} : () => {
|
|
750
749
|
this.#a.y = Math.round(Math.random() * r * 2) - r;
|
|
751
750
|
};
|
|
752
|
-
return this.#a.filters = [], _.tween(
|
|
751
|
+
return this.#a.filters = [], _.tween(R, t, this.#a, { x: 0, y: 0 }, () => {
|
|
753
752
|
l(), f();
|
|
754
753
|
}, () => {
|
|
755
754
|
i.remove(n), this.#t.visible = !0, this.#a.visible = !1, this.#a.x = 0, this.#a.y = 0;
|
|
@@ -757,21 +756,21 @@ void main() {
|
|
|
757
756
|
}), i.add(n), !1;
|
|
758
757
|
}
|
|
759
758
|
//MARK: トゥイーン開始
|
|
760
|
-
#
|
|
759
|
+
#J(t) {
|
|
761
760
|
const { layer: e, render: s, name: i } = t;
|
|
762
761
|
if (!e) throw "layerは必須です";
|
|
763
762
|
const n = this.#s[this.#u(t)], o = n.fore;
|
|
764
763
|
let r = () => {
|
|
765
764
|
};
|
|
766
|
-
s &&
|
|
765
|
+
s && (this.#d.isSkipping ? o.renderStart(!0) : (o.renderStart(!1), r = () => o.renderEnd()));
|
|
767
766
|
const l = _.cnvTweenArg(t, o), f = w(t, "arrive", !1), d = w(t, "backlay", !1), h = n.back.ctn;
|
|
768
767
|
return _.tween(i ?? e, t, o, _.cnvTweenArg(t, o), () => {
|
|
769
768
|
}, r, () => {
|
|
770
|
-
if (f && Object.assign(o, l), d) for (const p of
|
|
771
|
-
}), "filter" in t && (o.ctn.filters = [
|
|
769
|
+
if (f && Object.assign(o, l), d) for (const p of _.aLayerPrpNm) h[p] = o[p];
|
|
770
|
+
}), "filter" in t && (o.ctn.filters = [J.bldFilters(t)], o.aFltHArg = [t]), !1;
|
|
772
771
|
}
|
|
773
772
|
//MARK: フィルター追加
|
|
774
|
-
#
|
|
773
|
+
#X(t) {
|
|
775
774
|
return this.#C(t, (e) => {
|
|
776
775
|
const s = this.#s[this.#u({ layer: e })];
|
|
777
776
|
if (t.page === "both") {
|
|
@@ -784,10 +783,10 @@ void main() {
|
|
|
784
783
|
}
|
|
785
784
|
#P(t, e) {
|
|
786
785
|
const s = t.ctn;
|
|
787
|
-
s.filters ??= [], s.filters = [...s.filters,
|
|
786
|
+
s.filters ??= [], s.filters = [...s.filters, J.bldFilters(e)], t.aFltHArg.push(e);
|
|
788
787
|
}
|
|
789
788
|
//MARK: フィルター全削除
|
|
790
|
-
#
|
|
789
|
+
#Y(t) {
|
|
791
790
|
return this.#C(t, (e) => {
|
|
792
791
|
const s = this.#s[this.#u({ layer: e })];
|
|
793
792
|
if (t.page === "both") {
|
|
@@ -834,11 +833,11 @@ void main() {
|
|
|
834
833
|
};
|
|
835
834
|
#Q(t) {
|
|
836
835
|
const e = this.#u(t, this.#v), i = this.#s[e].getPage(t);
|
|
837
|
-
if (!(i instanceof
|
|
836
|
+
if (!(i instanceof C)) throw e + "はTxtLayerではありません";
|
|
838
837
|
return i;
|
|
839
838
|
}
|
|
840
839
|
setNormalChWait() {
|
|
841
|
-
|
|
840
|
+
C.msecChWait = this.scrItr.normalWait;
|
|
842
841
|
}
|
|
843
842
|
//MARK: 操作対象のメッセージレイヤの指定
|
|
844
843
|
#D = (t) => {
|
|
@@ -848,11 +847,11 @@ void main() {
|
|
|
848
847
|
const { layer: e } = t;
|
|
849
848
|
if (!e) throw "[current] layerは必須です";
|
|
850
849
|
const s = this.#s[e];
|
|
851
|
-
if (!s || !(s.getPage(t) instanceof
|
|
852
|
-
this.#
|
|
850
|
+
if (!s || !(s.getPage(t) instanceof C)) throw `${e}はTxtLayerではありません`;
|
|
851
|
+
this.#x = s, this.#l.pagebreak(), this.#v = e, this.val.setVal_Nochk("save", "const.sn.mesLayer", e);
|
|
853
852
|
for (const i of this.#r) {
|
|
854
853
|
const { fore: n, back: o } = this.#s[i];
|
|
855
|
-
n instanceof
|
|
854
|
+
n instanceof C && (n.isCur = o.isCur = i === e);
|
|
856
855
|
}
|
|
857
856
|
return !1;
|
|
858
857
|
}
|
|
@@ -860,9 +859,9 @@ void main() {
|
|
|
860
859
|
return this.#$(), this.currentTxtlayFore;
|
|
861
860
|
}
|
|
862
861
|
get currentTxtlayFore() {
|
|
863
|
-
return this.#
|
|
862
|
+
return this.#x ? this.#x.fore : null;
|
|
864
863
|
}
|
|
865
|
-
#
|
|
864
|
+
#x = void 0;
|
|
866
865
|
// カレントテキストレイヤ
|
|
867
866
|
#$ = () => {
|
|
868
867
|
throw "文字レイヤーがありません。文字表示や操作する前に、[add_lay layer=(レイヤ名) class=txt]で文字レイヤを追加して下さい";
|
|
@@ -887,7 +886,7 @@ void main() {
|
|
|
887
886
|
}
|
|
888
887
|
//MARK: ページ両面の文字消去
|
|
889
888
|
#tt(t) {
|
|
890
|
-
return w(t, "rec_page_break", !0) && this.#l.pagebreak(), this.#
|
|
889
|
+
return w(t, "rec_page_break", !0) && this.#l.pagebreak(), this.#x && (this.#x.fore.clearLay(t), this.#x.back.clearLay(t)), !1;
|
|
891
890
|
}
|
|
892
891
|
//MARK: インライン画像表示
|
|
893
892
|
#et(t) {
|
|
@@ -928,7 +927,7 @@ void main() {
|
|
|
928
927
|
try {
|
|
929
928
|
console.info(
|
|
930
929
|
`%c${s.name.slice(0, -7)} %o`,
|
|
931
|
-
`color:#${
|
|
930
|
+
`color:#${k.isDarkMode ? "49F" : "05A"};`,
|
|
932
931
|
JSON.parse(`{"back":{${i.dump()}}, "fore":{${s.dump()}}}`)
|
|
933
932
|
);
|
|
934
933
|
} catch (n) {
|
|
@@ -944,7 +943,7 @@ void main() {
|
|
|
944
943
|
}
|
|
945
944
|
//MARK: ボタンを表示
|
|
946
945
|
#lt(t) {
|
|
947
|
-
return
|
|
946
|
+
return P.argChk_page(t, "back"), t.fn ??= this.scrItr.scriptFn, this.#h(t).addButton(t), this.scrItr.recodeDesign(t), !1;
|
|
948
947
|
}
|
|
949
948
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
950
949
|
record() {
|
|
@@ -964,7 +963,7 @@ void main() {
|
|
|
964
963
|
const e = [], s = [];
|
|
965
964
|
for (const [n, { fore: o, fore: { idx: r }, back: l, cls: f }] of Object.entries(t)) {
|
|
966
965
|
s.push({ ln: n, idx: r });
|
|
967
|
-
const d = this.#s[n] ??= new
|
|
966
|
+
const d = this.#s[n] ??= new P(n, f, this.#t, this.#i, {}, this.sys, this.val, { isWait: !1 });
|
|
968
967
|
d.fore.playback(o, e), d.back.playback(l, e);
|
|
969
968
|
}
|
|
970
969
|
const i = this.#t.children.length;
|
|
@@ -980,6 +979,6 @@ void main() {
|
|
|
980
979
|
}
|
|
981
980
|
}
|
|
982
981
|
export {
|
|
983
|
-
|
|
982
|
+
Z as LayerMng
|
|
984
983
|
};
|
|
985
984
|
//# sourceMappingURL=LayerMng.js.map
|