@famibee/skynovel 1.64.21 → 1.64.22

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/Button.js CHANGED
@@ -1,8 +1,8 @@
1
- import { q as b, l as n, u as f, e as v, O as k, K as m, P as C, z as g, G as S, M as p, y as u } from "./web2.js";
1
+ import { q as S, l as n, u as f, e as v, O as k, K as m, P as C, z as b, G as g, M as p, y as u } from "./web2.js";
2
2
  import { S as _ } from "./SpritesMng.js";
3
- class c extends b {
4
- constructor(t, e, h, a) {
5
- if (super(), this.hArg = t, this.evtMng = e, this.resolve = h, this.canFocus = a, this.#t = {
3
+ class r extends S {
4
+ constructor(t, i, h, a) {
5
+ if (super(), this.hArg = t, this.evtMng = i, this.resolve = h, this.canFocus = a, this.#t = {
6
6
  type: "pic",
7
7
  enabled: v(t, "enabled", !0),
8
8
  x: this.x = f(t.left ?? 0),
@@ -19,19 +19,19 @@ class c extends b {
19
19
  b_pic: "",
20
20
  width: 0,
21
21
  height: 0
22
- }, this.getBtnBounds = () => (this.#i.x = this.#t.x, this.#i.y = this.#t.y, this.#i), this.#t.enabled && e.button(t, this, () => this.normal(), () => this.#s(), () => this.#h()), t.pic) {
23
- this.#t.type = "pic", this.#e = new _(
22
+ }, this.getBtnBounds = () => (this.#e.x = this.#t.x, this.#e.y = this.#t.y, this.#e), this.#t.enabled && i.button(t, this, () => this.normal(), () => this.#s(), () => this.#h()), t.pic) {
23
+ this.#t.type = "pic", this.#i = new _(
24
24
  t.pic,
25
25
  this,
26
- (i) => {
27
- this.#l(i), this.#i.width = i.width * this.#t.scale_x, this.#i.height = i.height * this.#t.scale_y;
26
+ (e) => {
27
+ this.#l(e), this.#e.width = e.width * this.#t.scale_x, this.#e.height = e.height * this.#t.scale_y;
28
28
  },
29
- (i) => h()
29
+ (e) => h()
30
30
  );
31
31
  return;
32
32
  }
33
33
  if (!t.text) throw "textまたはpic属性は必須です";
34
- const o = n(t, "height", 30), r = new k({
34
+ const o = n(t, "height", 30), c = new k({
35
35
  align: "center",
36
36
  dropShadow: !0,
37
37
  dropShadowAlpha: 0.7,
@@ -39,20 +39,20 @@ class c extends b {
39
39
  dropShadowBlur: 7,
40
40
  dropShadowDistance: 0,
41
41
  fill: this.#t.enabled ? "black" : "gray",
42
- fontFamily: c.fontFamily,
42
+ fontFamily: r.fontFamily,
43
43
  fontSize: o,
44
44
  padding: 5
45
45
  });
46
46
  if (t.style) try {
47
- const i = JSON.parse(t.style);
48
- for (const [w, y] of Object.entries(i)) r[w] = y;
49
- this.#t = { ...this.#t, ...i };
50
- } catch (i) {
51
- throw i instanceof SyntaxError ? new Error(m(t, "style", i.message)) : "fn:Button.ts style";
47
+ const e = JSON.parse(t.style);
48
+ for (const [w, y] of Object.entries(e)) c[w] = y;
49
+ this.#t = { ...this.#t, ...e };
50
+ } catch (e) {
51
+ throw e instanceof SyntaxError ? new Error(m(t, "style", e.message)) : "fn:Button.ts style";
52
52
  }
53
- const s = new C(t.text ?? "", r);
54
- s.alpha = n(t, "alpha", s.alpha), s.width = n(t, "width", 100), s.height = t.height = o, this.setText = (i) => {
55
- s.text = i;
53
+ const s = new C(t.text ?? "", c);
54
+ s.alpha = n(t, "alpha", s.alpha), s.width = n(t, "width", 100), s.height = t.height = o, this.setText = (e) => {
55
+ s.text = e;
56
56
  }, this.#t = {
57
57
  ...this.#t,
58
58
  type: "text",
@@ -63,63 +63,65 @@ class c extends b {
63
63
  height: s.height
64
64
  };
65
65
  let d = !1;
66
- if (this.#t.width = this.width, this.#t.height = this.height, t.b_pic && (this.#t.b_pic = t.b_pic, this.#e = new _(
66
+ if (this.#t.width = this.width, this.#t.height = this.height, t.b_pic && (this.#t.b_pic = t.b_pic, this.#i = new _(
67
67
  t.b_pic,
68
68
  this,
69
- (i) => {
70
- this.#o(i, s), this.#t.width = this.width, this.#t.height = this.height, s.name = JSON.stringify(this.#t);
69
+ (e) => {
70
+ this.#o(e, s), this.#t.width = this.width, this.#t.height = this.height;
71
71
  },
72
- (i) => {
73
- g.setBlendmode(this, t), i && h();
72
+ (e) => {
73
+ b.setBlendmode(this, t), e && h();
74
74
  }
75
- ), d = this.#e.ret), s.name = JSON.stringify(this.#t), this.addChild(s), this.#i.width = s.width, this.#i.height = s.height, t.b_pic || g.setBlendmode(this, t), c.#a(this, s), !this.#t.enabled) {
75
+ ), d = this.#i.ret), this.addChild(s), this.#e.width = s.width, this.#e.height = s.height, t.b_pic || b.setBlendmode(this, t), r.#a(this, s), !this.#t.enabled) {
76
76
  d || h();
77
77
  return;
78
78
  }
79
- const l = r.clone();
79
+ const l = c.clone();
80
80
  if (t.style_hover) try {
81
- const i = JSON.parse(t.style_hover);
82
- for (const [w, y] of Object.entries(i)) l[w] = y;
83
- } catch (i) {
84
- throw i instanceof SyntaxError ? new Error(m(t, "style_hover", i.message)) : "fn:Button.ts style_hover";
81
+ const e = JSON.parse(t.style_hover);
82
+ for (const [w, y] of Object.entries(e)) l[w] = y;
83
+ } catch (e) {
84
+ throw e instanceof SyntaxError ? new Error(m(t, "style_hover", e.message)) : "fn:Button.ts style_hover";
85
85
  }
86
86
  else l.fill = "white";
87
87
  const x = l.clone();
88
88
  if (t.style_clicked) try {
89
- const i = JSON.parse(t.style_clicked);
90
- for (const [w, y] of Object.entries(i)) x[w] = y;
91
- } catch (i) {
92
- throw i instanceof SyntaxError ? new Error(m(t, "style_clicked", i.message)) : "fn:Button.ts style_clicked";
89
+ const e = JSON.parse(t.style_clicked);
90
+ for (const [w, y] of Object.entries(e)) x[w] = y;
91
+ } catch (e) {
92
+ throw e instanceof SyntaxError ? new Error(m(t, "style_clicked", e.message)) : "fn:Button.ts style_clicked";
93
93
  }
94
94
  else x.dropShadow = !1;
95
95
  this.normal = () => {
96
- s.style = r;
96
+ s.style = c;
97
97
  }, this.#s = () => a() ? (s.style = l, !0) : !1, this.#h = () => {
98
98
  s.style = x;
99
99
  }, d || h();
100
100
  }
101
101
  static fontFamily = "'Hiragino Sans', 'Hiragino Kaku Gothic ProN', '游ゴシック Medium', meiryo, sans-serif";
102
- static #a = (t, e) => {
102
+ static #a = (t, i) => {
103
103
  };
104
- static #n = (t, e, h, a) => {
104
+ static #n = (t, i, h, a) => {
105
105
  };
106
106
  static init(t) {
107
- t.oCfg.debug.masume && (c.#a = (e, h) => e.addChild(
108
- new S().beginFill(8926088, 0.2).lineStyle(1, 8926088, 1).drawRect(h.x, h.y, h.width, h.height).endFill()
109
- ), c.#n = (e, h, a, o) => e.addChild(
110
- new S().beginFill(8926088, 0.2).lineStyle(1, 8926088, 1).drawRect(h.x, h.y, a, o).endFill()
107
+ t.oCfg.debug.masume && (r.#a = (i, h) => i.addChild(
108
+ new g().beginFill(8926088, 0.2).lineStyle(1, 8926088, 1).drawRect(h.x, h.y, h.width, h.height).endFill()
109
+ ), r.#n = (i, h, a, o) => i.addChild(
110
+ new g().beginFill(8926088, 0.2).lineStyle(1, 8926088, 1).drawRect(h.x, h.y, a, o).endFill()
111
111
  ));
112
112
  }
113
113
  setText(t) {
114
114
  }
115
- getBtnBounds = () => this.#i;
115
+ getBtnBounds = () => this.#e;
116
116
  // 文字ボタンは背景画像を含まない位置指定なので、その当たり判定用
117
- #i = new p();
118
- #e = new _();
117
+ #e = new p();
118
+ #i = new _();
119
119
  // #idc : DesignCast;
120
120
  #t;
121
121
  destroy() {
122
- this.evtMng.unButton(this), this.#e.destroy(), super.destroy();
122
+ this.normal = () => {
123
+ }, this.#s = () => !1, this.#h = () => {
124
+ }, this.evtMng.unButton(this), this.#i.destroy(), super.destroy();
123
125
  }
124
126
  makeDesignCast(t) {
125
127
  }
@@ -128,18 +130,18 @@ class c extends b {
128
130
  // showDesignCast() {this.#idc.visible = true}
129
131
  cvsResize() {
130
132
  }
131
- #o(t, e) {
132
- this.setChildIndex(t, 0), t.alpha = e.alpha, t.setTransform(
133
- e.x,
134
- e.y,
133
+ #o(t, i) {
134
+ this.setChildIndex(t, 0), t.alpha = i.alpha, t.setTransform(
135
+ i.x,
136
+ i.y,
135
137
  1,
136
138
  1,
137
- e.rotation,
139
+ i.rotation,
138
140
  0,
139
141
  0,
140
- (t.width - e.width) / 2,
141
- (t.height - e.height) / 2
142
- ), t.name = e.name;
142
+ (t.width - i.width) / 2,
143
+ (t.height - i.height) / 2
144
+ ), t.name = i.name;
143
145
  }
144
146
  normal = () => {
145
147
  };
@@ -148,15 +150,15 @@ class c extends b {
148
150
  };
149
151
  #l(t) {
150
152
  this.#t.alpha = t.alpha = n(this.hArg, "alpha", t.alpha);
151
- const e = t.width / 3, h = this.#t.enabled ? e : t.width, a = t.height, o = t.texture.baseTexture, r = new u(o, new p(0, 0, e, a)), s = new u(o, new p(e, 0, e, a)), d = new u(o, new p(e * 2, 0, e, a)), l = () => {
152
- t.texture = r;
153
+ const i = t.width / 3, h = this.#t.enabled ? i : t.width, a = t.height, o = t.texture.baseTexture, c = new u(o, new p(0, 0, i, a)), s = new u(o, new p(i, 0, i, a)), d = new u(o, new p(i * 2, 0, i, a)), l = () => {
154
+ t.texture = c;
153
155
  };
154
156
  this.#t.enabled && l(), this.normal = l, this.#s = () => this.canFocus() ? (t.texture = d, !0) : !1, this.#h = () => {
155
157
  t.texture = s;
156
- }, "width" in this.hArg ? (this.#t.width = f(this.hArg.width), this.scale.x *= this.#t.width / h) : this.#t.width = h, "height" in this.hArg ? (this.#t.height = f(this.hArg.height), this.scale.y *= this.#t.height / a) : this.#t.height = a, t.name = JSON.stringify(this.#t), c.#n(this, t, h, a);
158
+ }, "width" in this.hArg ? (this.#t.width = f(this.hArg.width), this.scale.x *= this.#t.width / h) : this.#t.width = h, "height" in this.hArg ? (this.#t.height = f(this.hArg.height), this.scale.y *= this.#t.height / a) : this.#t.height = a, r.#n(this, t, h, a);
157
159
  }
158
160
  }
159
161
  export {
160
- c as Button
162
+ r as Button
161
163
  };
162
164
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../src/sn/Button.ts"],"sourcesContent":["/* ***** 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 {uint, type IEvtMng, argChk_Boolean, argChk_Num, mesErrJSON} from './CmnLib';\nimport type {TArg} from './Grammar';\nimport {SpritesMng} from './SpritesMng';\nimport {Layer} from './Layer';\nimport type {Config} from './Config';\nimport type {IMakeDesignCast} from './LayerMng';\n//import {DesignCast, TxtBtnDesignCast, PicBtnDesignCast} from './DesignCast';\n\nimport {Container, Text, Rectangle, Texture, TextStyle, type Sprite, Graphics} from 'pixi.js';\n\n\nexport class Button extends Container {\n\tstatic\tfontFamily\t= '\\'Hiragino Sans\\', \\'Hiragino Kaku Gothic ProN\\', \\'游ゴシック Medium\\', meiryo, sans-serif';\n\tstatic\t#procMasume4txt = (_me: Button, _txt: Text)=> { /* empty */ };\n\tstatic\t#procMasume4pic = (_me: Button, _sp: Sprite, _w3: number, _h: number)=> { /* empty */ };\n\tstatic\tinit(cfg: Config) {\n\t\tif (! cfg.oCfg.debug.masume) return;\n\n\t\tButton.#procMasume4txt = (me, txt)=> me.addChild(\n\t\t\t(new Graphics)\n\t\t\t.beginFill(0x883388, 0.2)\n\t\t\t.lineStyle(1, 0x883388, 1)\n\t\t\t.drawRect(txt.x, txt.y, txt.width, txt.height)\n\t\t\t.endFill()\n\t\t);\n\t\tButton.#procMasume4pic = (me, sp, w3, h)=> me.addChild(\n\t\t\t(new Graphics)\n\t\t\t.beginFill(0x883388, 0.2)\n\t\t\t.lineStyle(1, 0x883388, 1)\n\t\t\t.drawRect(sp.x, sp.y, w3, h)\n\t\t\t.endFill()\n\t\t);\n\t}\n\n\tsetText(_text: string) { /* empty */ }\n\tgetBtnBounds = ()=> this.#rctBtnTxt;\n\t\t// 文字ボタンは背景画像を含まない位置指定なので、その当たり判定用\n\t#rctBtnTxt\t= new Rectangle;\n\n\t#sps\t\t= new SpritesMng;\n\n//\t#idc\t\t: DesignCast;\n\treadonly\t#o\t: {\n\t\ttype\t: 'pic'|'text';\n\t\tenabled\t: boolean;\n\t\tx\t\t: number;\n\t\ty\t\t: number;\n\t\trotation: number;\n\t\t\t// flash : rotation is in degrees.\n\t\t\t// pixijs: rotation is in radians, angle is in degrees.\n\t\tpivot_x\t: number;\n\t\tpivot_y\t: number;\n\t\tscale_x\t: number;\n\t\tscale_y\t: number;\n\t\talpha\t: number;\n\t\ttext\t: string;\n\t\tb_pic\t: string;\n\t\twidth\t: number;\n\t\theight\t: number;\n\t};\n\n\tconstructor(private readonly hArg: TArg, readonly evtMng: IEvtMng, readonly resolve: ()=> void, private readonly canFocus: ()=> boolean) {\n\t\tsuper();\n/*\n\t\tif (CmnLib.isDbg) {\n\t\t\tthis.makeDesignCast = gdc=> gdc(this.#idc);\n\t\t\tthis.cvsResize = ()=> this.#idc.cvsResize();\n\t\t}\n*/\n\t\tthis.#o = {\n\t\t\ttype\t: 'pic',\n\t\t\tenabled\t: argChk_Boolean(hArg, 'enabled', true),\n\t\t\tx\t\t: this.x = uint(hArg.left ?? 0),\n\t\t\ty\t\t: this.y = uint(hArg.top ?? 0),\n\t\t\trotation: this.angle = argChk_Num(hArg, 'rotation', this.angle),\n\t\t\t\t// flash : rotation is in degrees.\n\t\t\t\t// pixijs: rotation is in radians, angle is in degrees.\n\t\t\tpivot_x\t: this.pivot.x = argChk_Num(hArg, 'pivot_x', this.pivot.x),\n\t\t\tpivot_y\t: this.pivot.y = argChk_Num(hArg, 'pivot_y', this.pivot.y),\n\t\t\tscale_x\t: this.scale.x = argChk_Num(hArg, 'scale_x', this.scale.x),\n\t\t\tscale_y\t: this.scale.y = argChk_Num(hArg, 'scale_y', this.scale.y),\n\t\t\talpha\t: 1,\n\t\t\ttext\t: '',\n\t\t\tb_pic\t: '',\n\t\t\twidth\t: 0,\n\t\t\theight\t: 0,\n\t\t};\n\t\tthis.getBtnBounds = ()=> {\n\t\t\tthis.#rctBtnTxt.x = this.#o.x;\n\t\t\tthis.#rctBtnTxt.y = this.#o.y;\n\t\t\treturn this.#rctBtnTxt;\n\t\t};\n\n\t\tif (this.#o.enabled) evtMng.button(hArg, this, ()=> this.normal(), ()=> this.#hover(), ()=> this.#clicked());\t// あとで差し替えるのでアロー必須\n\n\t\t// == 画像から生成\n\t\tif (hArg.pic) {\n\t\t\tthis.#o.type = 'pic';\t// dump用\n\t\t\t// this.#idc = new PicBtnDesignCast(this, hArg);\n\n\t\t\tthis.#sps = new SpritesMng(\n\t\t\t\thArg.pic,\n\t\t\t\tthis,\n\t\t\t\tsp=> {\n\t\t\t\t\tthis.#loaded_pic(sp);\n\t\t\t\t\tthis.#rctBtnTxt.width = sp.width * this.#o.scale_x;\n\t\t\t\t\tthis.#rctBtnTxt.height = sp.height * this.#o.scale_y;\n\t\t\t\t},\n\t\t\t\t_isStop=> resolve(),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tif (! hArg.text) throw 'textまたはpic属性は必須です';\n\n\t\t// == 文字列から生成\n\t\tconst height = argChk_Num(hArg, 'height', 30);\n\t\tconst style = new TextStyle({\n\t\t\talign\t\t: 'center',\n\t\t\tdropShadow\t: true,\n\t\t\tdropShadowAlpha\t: 0.7,\n\t\t\tdropShadowColor\t: 'white',\n\t\t\tdropShadowBlur\t: 7,\n\t\t\tdropShadowDistance\t: 0,\n\t\t\tfill\t\t: this.#o.enabled ?'black' :'gray',\n\t\t\tfontFamily\t: Button.fontFamily,\n\t\t\tfontSize\t: height,\n\t\t\tpadding\t\t: 5,\n\t\t});\n\t\tif (hArg.style) try {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\tconst o = JSON.parse(hArg.style);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n\t\t\tfor (const [nm, v] of Object.entries(o)) (<any>style)[nm] = v;\n\t\t//\tstyle = {...style, ...JSON.parse(hArg.style)};\t// 上手くいかない\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\tthis.#o = {...this.#o, ...o};\n\t\t} catch (e) {\n\t\t\tif (e instanceof SyntaxError) throw new Error(mesErrJSON(hArg, 'style', e.message));\n\t\t\telse throw 'fn:Button.ts style';\n\t\t}\n\n\t\tconst txt = new Text(hArg.text ?? '', style);\n\t\ttxt.alpha = argChk_Num(hArg, 'alpha', txt.alpha);\t// 上にまとめない\n\t\ttxt.width = argChk_Num(hArg, 'width', 100);\n\t\ttxt.height = hArg.height = height;\n\t\tthis.setText = text=> {txt.text = text};\n\n\t\tthis.#o = {...this.#o,\n\t\t\ttype\t: 'text',\t// dump用\n\t\t\talpha\t: txt.alpha,\n\t\t\ttext\t: txt.text,\n\t\t\twidth\t: txt.width,\n\t\t\theight\t: txt.height,\n\t\t};\n//\t\tthis.#idc = new TxtBtnDesignCast(this, hArg, txt);\n\n\t\tlet isStop = false;\n\t\tthis.#o.width = this.width;\n\t\tthis.#o.height = this.height;\n\t\tif (hArg.b_pic) {\n\t\t\tthis.#o.b_pic = hArg.b_pic;\n\t\t\tthis.#sps = new SpritesMng(\n\t\t\t\thArg.b_pic,\n\t\t\t\tthis,\n\t\t\t\tsp=> {\n\t\t\t\t\tthis.#loaded_b_pic(sp, txt);\n\t\t\t\t\tthis.#o.width = this.width;\n\t\t\t\t\tthis.#o.height = this.height;\n\t\t\t\t\ttxt.name = JSON.stringify(this.#o);\n\t\t\t\t},\n\t\t\t\tisStop=> {\n\t\t\t\t\tLayer.setBlendmode(this, hArg);\n\t\t\t\t\tif (isStop) resolve();\n\t\t\t\t},\n\t\t\t);\n\t\t\tisStop = this.#sps.ret;\n\t\t}\n\t\ttxt.name = JSON.stringify(this.#o);\n\n\t\tthis.addChild(txt);\n\t\tthis.#rctBtnTxt.width = txt.width;\t// addChild()後に取得すること\n\t\tthis.#rctBtnTxt.height = txt.height;\n\t//x\tthis.#rctBtnTxt = txt.getBounds();\t// 上手くいかない\n\n\t\tif (! hArg.b_pic) Layer.setBlendmode(this, hArg);\t// 重なり順でここ\n\t\tButton.#procMasume4txt(this, txt);\n\t\tif (! this.#o.enabled) {if (! isStop) resolve(); return}\n\n\t\tconst style_hover = style.clone();\n\t\tif (hArg.style_hover) try {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\tconst o = JSON.parse(hArg.style_hover);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n\t\t\tfor (const [nm, v] of Object.entries(o)) (<any>style_hover)[nm] = v;\n\t\t} catch (e) {\n\t\t\tif (e instanceof SyntaxError) throw new Error(mesErrJSON(hArg, 'style_hover', e.message));\n\t\t\telse throw 'fn:Button.ts style_hover';\n\t\t}\n\t\telse style_hover.fill = 'white';\n\n\t\tconst style_clicked = style_hover.clone();\n\t\tif (hArg.style_clicked) try {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\tconst o = JSON.parse(hArg.style_clicked);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n\t\t\tfor (const [nm, v] of Object.entries(o)) (<any>style_clicked)[nm] = v;\n\t\t} catch (e) {\n\t\t\tif (e instanceof SyntaxError) throw new Error(mesErrJSON(hArg, 'style_clicked', e.message));\n\t\t\telse throw 'fn:Button.ts style_clicked';\n\t\t}\n\t\telse style_clicked.dropShadow = false;\n\n\t\tthis.normal = ()=> {txt.style = style};\n\t\tthis.#hover = ()=> {\n\t\t\tif (! canFocus()) return false;\n\t\t\ttxt.style = style_hover;\n\t\t\treturn true;\n\t\t};\n\t\tthis.#clicked = ()=> {txt.style = style_clicked};\n\n\t\tif (! isStop) resolve();\n\t}\n\n\toverride\tdestroy(): void {\n\t\tthis.evtMng.unButton(this);\n\t\tthis.#sps.destroy();\n\t\tsuper.destroy();\n\t}\n\n\tmakeDesignCast(_gdc: IMakeDesignCast) { /* empty */ }\n\tshowDesignCast() { /* empty */ }\n//\tshowDesignCast() {this.#idc.visible = true}\n\tcvsResize() { /* empty */ }\n\n\t#loaded_b_pic(sp: Sprite, txt: Text) {\n\t\tthis.setChildIndex(sp, 0);\n\t\tsp.alpha = txt.alpha;\n\t\tsp.setTransform(\n\t\t\ttxt.x, txt.y,\n\t\t\t1, 1, txt.rotation, 0, 0,\n\t\t\t(sp.width -txt.width) /2,\n\t\t\t(sp.height -txt.height) /2,\n\t\t);\n\n\t\tsp.name = txt.name;\n\t}\n\n\tnormal\t\t: ()=> void\t\t= ()=> { /* empty */ };\n\t#hover\t\t: ()=> boolean\t= ()=> false;\n\t#clicked\t: ()=> void\t\t= ()=> { /* empty */ };\n\t#loaded_pic(sp: Sprite) {\n\t\tthis.#o.alpha = sp.alpha = argChk_Num(this.hArg, 'alpha', sp.alpha);\n//\t\t(this.#idc as PicBtnDesignCast).setSp(sp);\n\n\t\tconst w_3 = sp.width /3;\n\t\tconst w = this.#o.enabled ?w_3 :sp.width;\n\t\tconst h = sp.height;\n\t\tconst tx = sp.texture.baseTexture;\n\t\tconst txNormal = new Texture(tx, new Rectangle(0, 0, w_3, h));\n\t\tconst txClicked = new Texture(tx, new Rectangle(w_3, 0, w_3, h));\n\t\tconst txHover = new Texture(tx, new Rectangle(w_3 *2, 0, w_3, h));\n\t\tconst normal = ()=> {sp.texture = txNormal};\n\t\tif (this.#o.enabled) normal();\n\n\t\tthis.normal\t= normal;\n\t\tthis.#hover\t\t= ()=> {\n\t\t\tif (! this.canFocus()) return false;\n\t\t\tsp.texture = txHover;\n\t\t\treturn true;\n\t\t};\n\t\tthis.#clicked\t= ()=> {sp.texture = txClicked};\n\n\t\tif ('width' in this.hArg) {\n\t\t\tthis.#o.width = uint(this.hArg.width);\n\t\t\tthis.scale.x *= this.#o.width /w;\n\t\t}\n\t\telse this.#o.width = w;\n\t\tif ('height' in this.hArg) {\n\t\t\tthis.#o.height = uint(this.hArg.height);\n\t\t\tthis.scale.y *= this.#o.height /h;\n\t\t}\n\t\telse this.#o.height = h;\n\t\tsp.name = JSON.stringify(this.#o);\t// dump用\n\n\t\tButton.#procMasume4pic(this, sp, w, h);\n\t}\n\n}\n"],"names":["Button","Container","hArg","evtMng","resolve","canFocus","#o","argChk_Boolean","uint","argChk_Num","#rctBtnTxt","#hover","#clicked","#sps","SpritesMng","sp","#loaded_pic","height","style","TextStyle","o","nm","v","e","mesErrJSON","txt","Text","text","isStop","#loaded_b_pic","Layer","#procMasume4txt","style_hover","style_clicked","_me","_txt","#procMasume4pic","_sp","_w3","_h","cfg","me","Graphics","w3","h","_text","Rectangle","_gdc","w_3","w","tx","txNormal","Texture","txClicked","txHover","normal"],"mappings":";;AAkBO,MAAMA,UAAeC,EAAU;AAAA,EAkDrC,YAA6BC,GAAqBC,GAA0BC,GAAqCC,GAAwB;AAmCxI,QAlCA,MAAA,GAD4B,KAAA,OAAAH,GAAqB,KAAA,SAAAC,GAA0B,KAAA,UAAAC,GAAqC,KAAA,WAAAC,GAQhH,KAAKC,KAAK;AAAA,MACT,MAAO;AAAA,MACP,SAAUC,EAAeL,GAAM,WAAW,EAAI;AAAA,MAC9C,GAAK,KAAK,IAAIM,EAAKN,EAAK,QAAQ,CAAC;AAAA,MACjC,GAAK,KAAK,IAAIM,EAAKN,EAAK,OAAO,CAAC;AAAA,MAChC,UAAU,KAAK,QAAQO,EAAWP,GAAM,YAAY,KAAK,KAAK;AAAA;AAAA;AAAA,MAG9D,SAAU,KAAK,MAAM,IAAIO,EAAWP,GAAM,WAAW,KAAK,MAAM,CAAC;AAAA,MACjE,SAAU,KAAK,MAAM,IAAIO,EAAWP,GAAM,WAAW,KAAK,MAAM,CAAC;AAAA,MACjE,SAAU,KAAK,MAAM,IAAIO,EAAWP,GAAM,WAAW,KAAK,MAAM,CAAC;AAAA,MACjE,SAAU,KAAK,MAAM,IAAIO,EAAWP,GAAM,WAAW,KAAK,M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KAAKT,EAAE,GAEhCN,EAAOoC,GAAgB,MAAMrB,GAAIkC,GAAGL,CAAC;AAAA,EACtC;AAED;"}
1
+ {"version":3,"file":"Button.js","sources":["../src/sn/Button.ts"],"sourcesContent":["/* ***** 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 {uint, type IEvtMng, argChk_Boolean, argChk_Num, mesErrJSON} from './CmnLib';\nimport type {TArg} from './Grammar';\nimport {SpritesMng} from './SpritesMng';\nimport {Layer} from './Layer';\nimport type {Config} from './Config';\nimport type {IMakeDesignCast} from './LayerMng';\n//import {DesignCast, TxtBtnDesignCast, PicBtnDesignCast} from './DesignCast';\n\nimport {Container, Text, Rectangle, Texture, TextStyle, type Sprite, Graphics} from 'pixi.js';\n\n\nexport class Button extends Container {\n\tstatic\tfontFamily\t= '\\'Hiragino Sans\\', \\'Hiragino Kaku Gothic ProN\\', \\'游ゴシック Medium\\', meiryo, sans-serif';\n\tstatic\t#procMasume4txt = (_me: Button, _txt: Text)=> { /* empty */ };\n\tstatic\t#procMasume4pic = (_me: Button, _sp: Sprite, _w3: number, _h: number)=> { /* empty */ };\n\tstatic\tinit(cfg: Config) {\n\t\tif (! cfg.oCfg.debug.masume) return;\n\n\t\tButton.#procMasume4txt = (me, txt)=> me.addChild(\n\t\t\t(new Graphics)\n\t\t\t.beginFill(0x883388, 0.2)\n\t\t\t.lineStyle(1, 0x883388, 1)\n\t\t\t.drawRect(txt.x, txt.y, txt.width, txt.height)\n\t\t\t.endFill()\n\t\t);\n\t\tButton.#procMasume4pic = (me, sp, w3, h)=> me.addChild(\n\t\t\t(new Graphics)\n\t\t\t.beginFill(0x883388, 0.2)\n\t\t\t.lineStyle(1, 0x883388, 1)\n\t\t\t.drawRect(sp.x, sp.y, w3, h)\n\t\t\t.endFill()\n\t\t);\n\t}\n\n\tsetText(_text: string) { /* empty */ }\n\tgetBtnBounds = ()=> this.#rctBtnTxt;\n\t\t// 文字ボタンは背景画像を含まない位置指定なので、その当たり判定用\n\t#rctBtnTxt\t= new Rectangle;\n\n\t#sps\t\t= new SpritesMng;\n\n//\t#idc\t\t: DesignCast;\n\treadonly\t#o\t: {\n\t\ttype\t: 'pic'|'text';\n\t\tenabled\t: boolean;\n\t\tx\t\t: number;\n\t\ty\t\t: number;\n\t\trotation: number;\n\t\t\t// flash : rotation is in degrees.\n\t\t\t// pixijs: rotation is in radians, angle is in degrees.\n\t\tpivot_x\t: number;\n\t\tpivot_y\t: number;\n\t\tscale_x\t: number;\n\t\tscale_y\t: number;\n\t\talpha\t: number;\n\t\ttext\t: string;\n\t\tb_pic\t: string;\n\t\twidth\t: number;\n\t\theight\t: number;\n\t};\n\n\tconstructor(private readonly hArg: TArg, readonly evtMng: IEvtMng, readonly resolve: ()=> void, private readonly canFocus: ()=> boolean) {\n\t\tsuper();\n/*\n\t\tif (CmnLib.isDbg) {\n\t\t\tthis.makeDesignCast = gdc=> gdc(this.#idc);\n\t\t\tthis.cvsResize = ()=> this.#idc.cvsResize();\n\t\t}\n*/\n\t\tthis.#o = {\n\t\t\ttype\t: 'pic',\n\t\t\tenabled\t: argChk_Boolean(hArg, 'enabled', true),\n\t\t\tx\t\t: this.x = uint(hArg.left ?? 0),\n\t\t\ty\t\t: this.y = uint(hArg.top ?? 0),\n\t\t\trotation: this.angle = argChk_Num(hArg, 'rotation', this.angle),\n\t\t\t\t// flash : rotation is in degrees.\n\t\t\t\t// pixijs: rotation is in radians, angle is in degrees.\n\t\t\tpivot_x\t: this.pivot.x = argChk_Num(hArg, 'pivot_x', this.pivot.x),\n\t\t\tpivot_y\t: this.pivot.y = argChk_Num(hArg, 'pivot_y', this.pivot.y),\n\t\t\tscale_x\t: this.scale.x = argChk_Num(hArg, 'scale_x', this.scale.x),\n\t\t\tscale_y\t: this.scale.y = argChk_Num(hArg, 'scale_y', this.scale.y),\n\t\t\talpha\t: 1,\n\t\t\ttext\t: '',\n\t\t\tb_pic\t: '',\n\t\t\twidth\t: 0,\n\t\t\theight\t: 0,\n\t\t};\n\t\tthis.getBtnBounds = ()=> {\n\t\t\tthis.#rctBtnTxt.x = this.#o.x;\n\t\t\tthis.#rctBtnTxt.y = this.#o.y;\n\t\t\treturn this.#rctBtnTxt;\n\t\t};\n\n\t\tif (this.#o.enabled) evtMng.button(hArg, this, ()=> this.normal(), ()=> this.#hover(), ()=> this.#clicked());\t// あとで差し替えるのでアロー必須\n\n\t\t// == 画像から生成\n\t\tif (hArg.pic) {\n\t\t\tthis.#o.type = 'pic';\t// dump用\n\t\t\t// this.#idc = new PicBtnDesignCast(this, hArg);\n\n\t\t\tthis.#sps = new SpritesMng(\n\t\t\t\thArg.pic,\n\t\t\t\tthis,\n\t\t\t\tsp=> {\n\t\t\t\t\tthis.#loaded_pic(sp);\n\t\t\t\t\tthis.#rctBtnTxt.width = sp.width * this.#o.scale_x;\n\t\t\t\t\tthis.#rctBtnTxt.height = sp.height * this.#o.scale_y;\n\t\t\t\t},\n\t\t\t\t_isStop=> resolve(),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tif (! hArg.text) throw 'textまたはpic属性は必須です';\n\n\t\t// == 文字列から生成\n\t\tconst height = argChk_Num(hArg, 'height', 30);\n\t\tconst style = new TextStyle({\n\t\t\talign\t\t: 'center',\n\t\t\tdropShadow\t: true,\n\t\t\tdropShadowAlpha\t: 0.7,\n\t\t\tdropShadowColor\t: 'white',\n\t\t\tdropShadowBlur\t: 7,\n\t\t\tdropShadowDistance\t: 0,\n\t\t\tfill\t\t: this.#o.enabled ?'black' :'gray',\n\t\t\tfontFamily\t: Button.fontFamily,\n\t\t\tfontSize\t: height,\n\t\t\tpadding\t\t: 5,\n\t\t});\n\t\tif (hArg.style) try {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\tconst o = JSON.parse(hArg.style);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n\t\t\tfor (const [nm, v] of Object.entries(o)) (<any>style)[nm] = v;\n\t\t//\tstyle = {...style, ...JSON.parse(hArg.style)};\t// 上手くいかない\n\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\tthis.#o = {...this.#o, ...o};\n\t\t} catch (e) {\n\t\t\tif (e instanceof SyntaxError) throw new Error(mesErrJSON(hArg, 'style', e.message));\n\t\t\telse throw 'fn:Button.ts style';\n\t\t}\n\n\t\tconst txt = new Text(hArg.text ?? '', style);\n\t\ttxt.alpha = argChk_Num(hArg, 'alpha', txt.alpha);\t// 上にまとめない\n\t\ttxt.width = argChk_Num(hArg, 'width', 100);\n\t\ttxt.height = hArg.height = height;\n\t\tthis.setText = text=> {txt.text = text};\n\n\t\tthis.#o = {...this.#o,\n\t\t\ttype\t: 'text',\t// dump用\n\t\t\talpha\t: txt.alpha,\n\t\t\ttext\t: txt.text,\n\t\t\twidth\t: txt.width,\n\t\t\theight\t: txt.height,\n\t\t};\n//\t\tthis.#idc = new TxtBtnDesignCast(this, hArg, txt);\n\n\t\tlet isStop = false;\n\t\tthis.#o.width = this.width;\n\t\tthis.#o.height = this.height;\n\t\tif (hArg.b_pic) {\n\t\t\tthis.#o.b_pic = hArg.b_pic;\n\t\t\tthis.#sps = new SpritesMng(\n\t\t\t\thArg.b_pic,\n\t\t\t\tthis,\n\t\t\t\tsp=> {\n\t\t\t\t\tthis.#loaded_b_pic(sp, txt);\n\t\t\t\t\tthis.#o.width = this.width;\n\t\t\t\t\tthis.#o.height = this.height;\n\t\t\t\t\t// txt.name = JSON.stringify(this.#o);\n\t\t\t\t\t// DevTools 【メモリ】【重複する文字列】で悪さするので廃止\n\t\t\t\t},\n\t\t\t\tisStop=> {\n\t\t\t\t\tLayer.setBlendmode(this, hArg);\n\t\t\t\t\tif (isStop) resolve();\n\t\t\t\t},\n\t\t\t);\n\t\t\tisStop = this.#sps.ret;\n\t\t}\n\t\t// txt.name = JSON.stringify(this.#o);\n\t\t// DevTools 【メモリ】【重複する文字列】で悪さするので廃止\n\n\t\tthis.addChild(txt);\n\t\tthis.#rctBtnTxt.width = txt.width;\t// addChild()後に取得すること\n\t\tthis.#rctBtnTxt.height = txt.height;\n\t//x\tthis.#rctBtnTxt = txt.getBounds();\t// 上手くいかない\n\n\t\tif (! hArg.b_pic) Layer.setBlendmode(this, hArg);\t// 重なり順でここ\n\t\tButton.#procMasume4txt(this, txt);\n\t\tif (! this.#o.enabled) {if (! isStop) resolve(); return}\n\n\t\tconst style_hover = style.clone();\n\t\tif (hArg.style_hover) try {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\tconst o = JSON.parse(hArg.style_hover);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n\t\t\tfor (const [nm, v] of Object.entries(o)) (<any>style_hover)[nm] = v;\n\t\t} catch (e) {\n\t\t\tif (e instanceof SyntaxError) throw new Error(mesErrJSON(hArg, 'style_hover', e.message));\n\t\t\telse throw 'fn:Button.ts style_hover';\n\t\t}\n\t\telse style_hover.fill = 'white';\n\n\t\tconst style_clicked = style_hover.clone();\n\t\tif (hArg.style_clicked) try {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\t\tconst o = JSON.parse(hArg.style_clicked);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n\t\t\tfor (const [nm, v] of Object.entries(o)) (<any>style_clicked)[nm] = v;\n\t\t} catch (e) {\n\t\t\tif (e instanceof SyntaxError) throw new Error(mesErrJSON(hArg, 'style_clicked', e.message));\n\t\t\telse throw 'fn:Button.ts style_clicked';\n\t\t}\n\t\telse style_clicked.dropShadow = false;\n\n\t\tthis.normal = ()=> {txt.style = style};\n\t\tthis.#hover = ()=> {\n\t\t\tif (! canFocus()) return false;\n\t\t\ttxt.style = style_hover;\n\t\t\treturn true;\n\t\t};\n\t\tthis.#clicked = ()=> {txt.style = style_clicked};\n\n\t\tif (! isStop) resolve();\n\t}\n\n\toverride\tdestroy(): void {\n\t\tthis.normal\t\t= ()=> { /* empty */ };\n\t\tthis.#hover\t\t= ()=> false;\n\t\tthis.#clicked\t= ()=> { /* empty */ };\n\n\t\tthis.evtMng.unButton(this);\n\t\tthis.#sps.destroy();\n\t\tsuper.destroy();\n\t}\n\n\tmakeDesignCast(_gdc: IMakeDesignCast) { /* empty */ }\n\tshowDesignCast() { /* empty */ }\n//\tshowDesignCast() {this.#idc.visible = true}\n\tcvsResize() { /* empty */ }\n\n\t#loaded_b_pic(sp: Sprite, txt: Text) {\n\t\tthis.setChildIndex(sp, 0);\n\t\tsp.alpha = txt.alpha;\n\t\tsp.setTransform(\n\t\t\ttxt.x, txt.y,\n\t\t\t1, 1, txt.rotation, 0, 0,\n\t\t\t(sp.width -txt.width) /2,\n\t\t\t(sp.height -txt.height) /2,\n\t\t);\n\n\t\tsp.name = txt.name;\n\t}\n\n\tnormal\t\t: ()=> void\t\t= ()=> { /* empty */ };\n\t#hover\t\t: ()=> boolean\t= ()=> false;\n\t#clicked\t: ()=> void\t\t= ()=> { /* empty */ };\n\t#loaded_pic(sp: Sprite) {\n\t\tthis.#o.alpha = sp.alpha = argChk_Num(this.hArg, 'alpha', sp.alpha);\n//\t\t(this.#idc as PicBtnDesignCast).setSp(sp);\n\n\t\tconst w_3 = sp.width /3;\n\t\tconst w = this.#o.enabled ?w_3 :sp.width;\n\t\tconst h = sp.height;\n\t\tconst tx = sp.texture.baseTexture;\n\t\tconst txNormal = new Texture(tx, new Rectangle(0, 0, w_3, h));\n\t\tconst txClicked = new Texture(tx, new Rectangle(w_3, 0, w_3, h));\n\t\tconst txHover = new Texture(tx, new Rectangle(w_3 *2, 0, w_3, h));\n\t\tconst normal = ()=> {sp.texture = txNormal};\n\t\tif (this.#o.enabled) normal();\n\n\t\tthis.normal\t= normal;\n\t\tthis.#hover\t\t= ()=> {\n\t\t\tif (! this.canFocus()) return false;\n\t\t\tsp.texture = txHover;\n\t\t\treturn true;\n\t\t};\n\t\tthis.#clicked\t= ()=> {sp.texture = txClicked};\n\n\t\tif ('width' in this.hArg) {\n\t\t\tthis.#o.width = uint(this.hArg.width);\n\t\t\tthis.scale.x *= this.#o.width /w;\n\t\t}\n\t\telse this.#o.width = w;\n\t\tif ('height' in this.hArg) {\n\t\t\tthis.#o.height = uint(this.hArg.height);\n\t\t\tthis.scale.y *= this.#o.height /h;\n\t\t}\n\t\telse this.#o.height = h;\n\t\t// sp.name = JSON.stringify(this.#o);\t// dump用\n\t\t// DevTools 【メモリ】【重複する文字列】で悪さするので廃止\n\n\t\tButton.#procMasume4pic(this, sp, w, h);\n\t}\n\n}\n"],"names":["Button","Container","hArg","evtMng","resolve","canFocus","#o","argChk_Boolean","uint","argChk_Num","#rctBtnTxt","#hover","#clicked","#sps","SpritesMng","sp","#loaded_pic","height","style","TextStyle","o","nm","v","mesErrJSON","txt","Text","text","isStop","#loaded_b_pic","Layer","#procMasume4txt","style_hover","style_clicked","_me","_txt","#procMasume4pic","_sp","_w3","_h","cfg","me","Graphics","w3","h","_text","Rectangle","_gdc","w_3","w","tx","txNormal","Texture","txClicked","txHover","normal"],"mappings":";;AAkBO,MAAMA,UAAeC,EAAU;AAAA,EAkDrC,YAA6BC,GAAqBC,GAA0BC,GAAqCC,GAAwB;AAmCxI,QAlCA,MAAA,GAD4B,KAAA,OAAAH,GAAqB,KAAA,SAAAC,GAA0B,KAAA,UAAAC,GAAqC,KAAA,WAAAC,GAQhH,KAAKC,KAAK;AAAA,MACT,MAAO;AAAA,MACP,SAAUC,EAAeL,GAAM,WAAW,EAAI;AAAA,MAC9C,GAAK,KAAK,IAAIM,EAAKN,EAAK,QAAQ,CAAC;AAAA,MACjC,GAAK,KAAK,IAAIM,EAA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zC,KAAW,MAAK;AAAC,MAAAG,EAAG,UAAUqC;AAAA,IAAS,GAExC,WAAW,KAAK,QACnB,KAAK9C,GAAG,QAAQE,EAAK,KAAK,KAAK,KAAK,GACpC,KAAK,MAAM,KAAK,KAAKF,GAAG,QAAO0C,KAE3B,KAAK1C,GAAG,QAAQ0C,GACjB,YAAY,KAAK,QACpB,KAAK1C,GAAG,SAASE,EAAK,KAAK,KAAK,MAAM,GACtC,KAAK,MAAM,KAAK,KAAKF,GAAG,SAAQqC,KAE5B,KAAKrC,GAAG,SAASqC,GAItB3C,EAAOmC,GAAgB,MAAMpB,GAAIiC,GAAGL,CAAC;AAAA,EACtC;AAED;"}
package/dist/GrpLayer.js CHANGED
@@ -1,7 +1,7 @@
1
- import { z as c, E as m, a as h, e as v, l as p, x as f, v as u, B as _ } from "./web2.js";
1
+ import { z as c, a as h, e as m, l as p, x as f, v as u, B as _ } from "./web2.js";
2
2
  import { S as a } from "./SpritesMng.js";
3
3
  import { a as d } from "./Reading.js";
4
- class b {
4
+ class v {
5
5
  // static readonly #alzTagArg = new AnalyzeTagArg;
6
6
  constructor(t, s = !1) {
7
7
  this.bg_col = t, this.isLay = s;
@@ -38,7 +38,7 @@ class b {
38
38
  static replaceToken(t) {
39
39
  }
40
40
  }
41
- class k extends b {
41
+ class b extends v {
42
42
  constructor(t, s) {
43
43
  super("#29e", !0);
44
44
  }
@@ -46,15 +46,14 @@ class k extends b {
46
46
  }
47
47
  }
48
48
  class r extends c {
49
- static #f = new m();
50
49
  static #r;
51
50
  static init(t, s, e, i, o, l) {
52
51
  r.#r = e, a.init(s, l, i, t, o);
53
52
  }
54
53
  static destroy() {
55
- r.#f.clear(), a.destroy();
54
+ a.destroy();
56
55
  }
57
- #e = new k(this.ctn, this);
56
+ #e = new b(this.ctn, this);
58
57
  constructor() {
59
58
  super(), h.isDbg && (this.#o = (t) => this.#e.setSp(t), this.cvsResize = () => {
60
59
  super.cvsResize(), this.#e.cvsResize();
@@ -76,7 +75,7 @@ class r extends c {
76
75
  if (this.#e.sethArg(t), !e)
77
76
  return super.lay(t), this.ctn.children.length > 0 && this.setPos(t), this.#i = "", this.#s = this.#n = i, s(!1), !1;
78
77
  const o = "fn" in t, l = "face" in t;
79
- return this.clearLay({ clear_filter: v(t, "clear_filter", !0) }), o && (this.#i = e), l && (this.#n = i), super.lay(t), t.dx = 0, t.dy = 0, this.#c.destroy(), this.#c = new a(
78
+ return this.clearLay({ clear_filter: m(t, "clear_filter", !0) }), o && (this.#i = e), l && (this.#n = i), super.lay(t), t.dx = 0, t.dy = 0, this.#c.destroy(), this.#c = new a(
80
79
  this.#s = e + (i ? "," + i : ""),
81
80
  this.ctn,
82
81
  (n) => {
@@ -185,13 +184,13 @@ class r extends c {
185
184
  //showDesignCastChildren() {}
186
185
  dump = () => super.dump() + `, "pic":"${this.#s}"`;
187
186
  }
188
- const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
187
+ const x = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
189
188
  __proto__: null,
190
189
  GrpLayer: r
191
190
  }, Symbol.toStringTag, { value: "Module" }));
192
191
  export {
193
- b as D,
192
+ v as D,
194
193
  r as G,
195
- F as a
194
+ x as a
196
195
  };
197
196
  //# sourceMappingURL=GrpLayer.js.map
@@ -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(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;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A6B;AAEjE,QADA,MAAM,SAASD,GAAMC,CAAI,GACrBD,EAAK,UAAU,MAAMA,EAAK,YAAY,IAAI;AAC7C,WAAK9B,KAAU,IACf,KAAKC,KAAW;AAEhB;AAAA,IACD;AAEA,IAAA8B,EAAK,KAAK,IAAI,QAAQ,CAAAC,MAAK,KAAK3B;AAAA,MAC/B,EAAC,IAAIyB,EAAK,OAAO,MAAMA,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;;;;;"}
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 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\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() {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","#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,GA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