@famibee/skynovel 2.0.1 → 2.0.3
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 +36 -34
- package/dist/Button.js.map +1 -1
- package/dist/CallStack.js +11 -6
- package/dist/CallStack.js.map +1 -1
- package/dist/CmnInterface.js +13 -11
- package/dist/CmnInterface.js.map +1 -1
- package/dist/CmnLib.js +58 -56
- package/dist/CmnLib.js.map +1 -1
- package/dist/Config.js +9 -7
- package/dist/Config.js.map +1 -1
- package/dist/ConfigBase.js +52 -49
- package/dist/ConfigBase.js.map +1 -1
- package/dist/DebugMng.js +9 -6
- package/dist/DebugMng.js.map +1 -1
- package/dist/EventListenerCtn.js +6 -4
- package/dist/EventListenerCtn.js.map +1 -1
- package/dist/EventMng.js +522 -417
- package/dist/EventMng.js.map +1 -1
- package/dist/Grammar.js +22 -20
- package/dist/Grammar.js.map +1 -1
- package/dist/GrpLayer.js +58 -57
- package/dist/GrpLayer.js.map +1 -1
- package/dist/Layer.js +66 -64
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMng.js +461 -441
- package/dist/LayerMng.js.map +1 -1
- package/dist/Main.js +69 -67
- package/dist/Main.js.map +1 -1
- package/dist/PropParser.js +23 -19
- package/dist/PropParser.js.map +1 -1
- package/dist/Reading.js +422 -418
- package/dist/Reading.js.map +1 -1
- package/dist/RubySpliter.js +6 -4
- package/dist/RubySpliter.js.map +1 -1
- package/dist/ScriptIterator.js +374 -370
- package/dist/ScriptIterator.js.map +1 -1
- package/dist/SndBuf.js +643 -622
- package/dist/SndBuf.js.map +1 -1
- package/dist/SoundMng.js +59 -60
- package/dist/SoundMng.js.map +1 -1
- package/dist/SpritesMng.js +135 -129
- package/dist/SpritesMng.js.map +1 -1
- package/dist/SysBase.js +985 -950
- package/dist/SysBase.js.map +1 -1
- package/dist/TxtLayer.js +558 -551
- package/dist/TxtLayer.js.map +1 -1
- package/dist/Variable.js +47 -45
- package/dist/Variable.js.map +1 -1
- package/dist/chunk.js +11 -9
- package/dist/gamepad.js +396 -660
- package/dist/gamepad.js.map +1 -1
- package/dist/pixi.js +2631 -2593
- package/dist/pixi.js.map +1 -1
- package/dist/platform.js +6 -4
- package/dist/platform.js.map +1 -1
- package/dist/rolldown-runtime.js +20 -0
- package/dist/sn/RubySpliter.d.ts.map +1 -1
- package/dist/web.js +418 -418
- package/dist/web.js.map +1 -1
- package/dist_app/Button.js +36 -34
- package/dist_app/Button.js.map +1 -1
- package/dist_app/CallStack.js +11 -6
- package/dist_app/CallStack.js.map +1 -1
- package/dist_app/CmnInterface.js +13 -11
- package/dist_app/CmnInterface.js.map +1 -1
- package/dist_app/CmnLib.js +58 -56
- package/dist_app/CmnLib.js.map +1 -1
- package/dist_app/Config.js +9 -7
- package/dist_app/Config.js.map +1 -1
- package/dist_app/ConfigBase.js +52 -49
- package/dist_app/ConfigBase.js.map +1 -1
- package/dist_app/DebugMng.js +9 -6
- package/dist_app/DebugMng.js.map +1 -1
- package/dist_app/EventListenerCtn.js +6 -4
- package/dist_app/EventListenerCtn.js.map +1 -1
- package/dist_app/EventMng.js +522 -417
- package/dist_app/EventMng.js.map +1 -1
- package/dist_app/Grammar.js +22 -20
- package/dist_app/Grammar.js.map +1 -1
- package/dist_app/GrpLayer.js +58 -57
- package/dist_app/GrpLayer.js.map +1 -1
- package/dist_app/Layer.js +66 -64
- package/dist_app/Layer.js.map +1 -1
- package/dist_app/LayerMng.js +461 -441
- package/dist_app/LayerMng.js.map +1 -1
- package/dist_app/Main.js +69 -67
- package/dist_app/Main.js.map +1 -1
- package/dist_app/PropParser.js +23 -19
- package/dist_app/PropParser.js.map +1 -1
- package/dist_app/Reading.js +422 -418
- package/dist_app/Reading.js.map +1 -1
- package/dist_app/RubySpliter.js +6 -4
- package/dist_app/RubySpliter.js.map +1 -1
- package/dist_app/ScriptIterator.js +374 -370
- package/dist_app/ScriptIterator.js.map +1 -1
- package/dist_app/SndBuf.js +643 -622
- package/dist_app/SndBuf.js.map +1 -1
- package/dist_app/SoundMng.js +59 -60
- package/dist_app/SoundMng.js.map +1 -1
- package/dist_app/SpritesMng.js +135 -129
- package/dist_app/SpritesMng.js.map +1 -1
- package/dist_app/SysBase.js +985 -950
- package/dist_app/SysBase.js.map +1 -1
- package/dist_app/TxtLayer.js +558 -551
- package/dist_app/TxtLayer.js.map +1 -1
- package/dist_app/Variable.js +47 -45
- package/dist_app/Variable.js.map +1 -1
- package/dist_app/app.js +62 -63
- package/dist_app/app.js.map +1 -1
- package/dist_app/appMain.js +11 -11
- package/dist_app/appMain.js.map +1 -1
- package/dist_app/chunk.js +11 -9
- package/dist_app/gamepad.js +396 -660
- package/dist_app/gamepad.js.map +1 -1
- package/dist_app/pixi.js +2028 -1990
- package/dist_app/pixi.js.map +1 -1
- package/dist_app/platform.js +6 -4
- package/dist_app/platform.js.map +1 -1
- package/dist_app/preload.js +1 -1
- package/dist_app/preload.js.map +1 -1
- package/dist_app/rolldown-runtime.js +20 -0
- package/dist_app/sn/RubySpliter.d.ts.map +1 -1
- package/package.json +20 -21
package/dist/Button.js
CHANGED
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { a as
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { g as e, l as t, m as n, s as r } from "./CmnLib.js";
|
|
2
|
+
import { a as i, f as a, h as o, i as s, m as c, s as l } from "./pixi.js";
|
|
3
|
+
import { t as u } from "./Layer.js";
|
|
4
|
+
import { t as d } from "./SpritesMng.js";
|
|
5
|
+
//#region src/sn/Button.ts
|
|
6
|
+
var f = class f extends c {
|
|
7
|
+
hArg;
|
|
8
|
+
evtMng;
|
|
9
|
+
resolve;
|
|
10
|
+
canFocus;
|
|
10
11
|
static fontFamily = "'Hiragino Sans', 'Hiragino Kaku Gothic ProN', '游ゴシック Medium', meiryo, sans-serif";
|
|
11
12
|
static #e = (e, t) => {};
|
|
12
13
|
static #t = (e, t, n, r) => {};
|
|
13
14
|
static init(e) {
|
|
14
|
-
e.oCfg.debug.masume && (f.#e = (e, t) => e.addChild(new
|
|
15
|
+
e.oCfg.debug.masume && (f.#e = (e, t) => e.addChild(new l().beginFill(8926088, .2).lineStyle(1, 8926088, 1).drawRect(t.x, t.y, t.width, t.height).endFill()), f.#t = (e, t, n, r) => e.addChild(new l().beginFill(8926088, .2).lineStyle(1, 8926088, 1).drawRect(t.x, t.y, n, r).endFill()));
|
|
15
16
|
}
|
|
16
17
|
setText(e) {}
|
|
17
18
|
getBtnBounds = () => this.#n;
|
|
18
|
-
#n = new
|
|
19
|
-
#r = new
|
|
19
|
+
#n = new o();
|
|
20
|
+
#r = new d();
|
|
20
21
|
#i;
|
|
21
22
|
constructor(a, o, c, l) {
|
|
22
23
|
if (super(), this.hArg = a, this.evtMng = o, this.resolve = c, this.canFocus = l, this.#i = {
|
|
23
24
|
type: "pic",
|
|
24
|
-
enabled:
|
|
25
|
-
x: this.x =
|
|
26
|
-
y: this.y =
|
|
27
|
-
rotation: this.angle =
|
|
28
|
-
pivot_x: this.pivot.x =
|
|
29
|
-
pivot_y: this.pivot.y =
|
|
30
|
-
scale_x: this.scale.x =
|
|
31
|
-
scale_y: this.scale.y =
|
|
25
|
+
enabled: r(a, "enabled", !0),
|
|
26
|
+
x: this.x = e(a.left ?? 0),
|
|
27
|
+
y: this.y = e(a.top ?? 0),
|
|
28
|
+
rotation: this.angle = t(a, "rotation", this.angle),
|
|
29
|
+
pivot_x: this.pivot.x = t(a, "pivot_x", this.pivot.x),
|
|
30
|
+
pivot_y: this.pivot.y = t(a, "pivot_y", this.pivot.y),
|
|
31
|
+
scale_x: this.scale.x = t(a, "scale_x", this.scale.x),
|
|
32
|
+
scale_y: this.scale.y = t(a, "scale_y", this.scale.y),
|
|
32
33
|
alpha: 1,
|
|
33
34
|
text: "",
|
|
34
35
|
b_pic: "",
|
|
35
36
|
width: 0,
|
|
36
37
|
height: 0
|
|
37
38
|
}, this.getBtnBounds = () => (this.#n.x = this.#i.x, this.#n.y = this.#i.y, this.#n), this.#i.enabled && o.button(a, this, () => this.normal(), () => this.#o(), () => this.#s()), a.pic) {
|
|
38
|
-
this.#i.type = "pic", this.#r = new
|
|
39
|
+
this.#i.type = "pic", this.#r = new d(a.pic, this, (e) => {
|
|
39
40
|
this.#c(e), this.#n.width = e.width * this.#i.scale_x, this.#n.height = e.height * this.#i.scale_y;
|
|
40
41
|
}, (e) => c());
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
44
|
if (!a.text) throw "textまたはpic属性は必須です";
|
|
44
|
-
let p =
|
|
45
|
+
let p = t(a, "height", 30), m = new i({
|
|
45
46
|
align: "center",
|
|
46
47
|
dropShadow: !0,
|
|
47
48
|
dropShadowAlpha: .7,
|
|
@@ -61,10 +62,10 @@ var Button = class f extends Container {
|
|
|
61
62
|
...e
|
|
62
63
|
};
|
|
63
64
|
} catch (e) {
|
|
64
|
-
throw e instanceof SyntaxError ? Error(
|
|
65
|
+
throw e instanceof SyntaxError ? Error(n(a, "style", e.message)) : "fn:Button.ts style";
|
|
65
66
|
}
|
|
66
|
-
let h = new
|
|
67
|
-
h.alpha =
|
|
67
|
+
let h = new s(a.text ?? "", m);
|
|
68
|
+
h.alpha = t(a, "alpha", h.alpha), h.width = t(a, "width", 100), h.height = a.height = p, this.setText = (e) => {
|
|
68
69
|
h.text = e;
|
|
69
70
|
}, this.#i = {
|
|
70
71
|
...this.#i,
|
|
@@ -75,11 +76,11 @@ var Button = class f extends Container {
|
|
|
75
76
|
height: h.height
|
|
76
77
|
};
|
|
77
78
|
let g = !1;
|
|
78
|
-
if (this.#i.width = this.width, this.#i.height = this.height, a.b_pic && (this.#i.b_pic = a.b_pic, this.#r = new
|
|
79
|
+
if (this.#i.width = this.width, this.#i.height = this.height, a.b_pic && (this.#i.b_pic = a.b_pic, this.#r = new d(a.b_pic, this, (e) => {
|
|
79
80
|
this.#a(e, h), this.#i.width = this.width, this.#i.height = this.height;
|
|
80
81
|
}, (e) => {
|
|
81
|
-
|
|
82
|
-
}), g = this.#r.ret), this.addChild(h), this.#n.width = h.width, this.#n.height = h.height, a.b_pic ||
|
|
82
|
+
u.setBlendmode(this, a), e && c();
|
|
83
|
+
}), g = this.#r.ret), this.addChild(h), this.#n.width = h.width, this.#n.height = h.height, a.b_pic || u.setBlendmode(this, a), f.#e(this, h), !this.#i.enabled) {
|
|
83
84
|
g || c();
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
@@ -88,7 +89,7 @@ var Button = class f extends Container {
|
|
|
88
89
|
let e = JSON.parse(a.style_hover);
|
|
89
90
|
for (let [t, n] of Object.entries(e)) _[t] = n;
|
|
90
91
|
} catch (e) {
|
|
91
|
-
throw e instanceof SyntaxError ? Error(
|
|
92
|
+
throw e instanceof SyntaxError ? Error(n(a, "style_hover", e.message)) : "fn:Button.ts style_hover";
|
|
92
93
|
}
|
|
93
94
|
else _.fill = "white";
|
|
94
95
|
let v = _.clone();
|
|
@@ -96,7 +97,7 @@ var Button = class f extends Container {
|
|
|
96
97
|
let e = JSON.parse(a.style_clicked);
|
|
97
98
|
for (let [t, n] of Object.entries(e)) v[t] = n;
|
|
98
99
|
} catch (e) {
|
|
99
|
-
throw e instanceof SyntaxError ? Error(
|
|
100
|
+
throw e instanceof SyntaxError ? Error(n(a, "style_clicked", e.message)) : "fn:Button.ts style_clicked";
|
|
100
101
|
}
|
|
101
102
|
else v.dropShadow = !1;
|
|
102
103
|
this.normal = () => {
|
|
@@ -118,15 +119,16 @@ var Button = class f extends Container {
|
|
|
118
119
|
#o = () => !1;
|
|
119
120
|
#s = () => {};
|
|
120
121
|
#c(n) {
|
|
121
|
-
this.#i.alpha = n.alpha =
|
|
122
|
-
let r = n.width / 3, i = this.#i.enabled ? r : n.width, s = n.height, c = n.texture.baseTexture, l = new
|
|
122
|
+
this.#i.alpha = n.alpha = t(this.hArg, "alpha", n.alpha);
|
|
123
|
+
let r = n.width / 3, i = this.#i.enabled ? r : n.width, s = n.height, c = n.texture.baseTexture, l = new a(c, new o(0, 0, r, s)), u = new a(c, new o(r, 0, r, s)), d = new a(c, new o(r * 2, 0, r, s)), p = () => {
|
|
123
124
|
n.texture = l;
|
|
124
125
|
};
|
|
125
126
|
this.#i.enabled && p(), this.normal = p, this.#o = () => this.canFocus() ? (n.texture = d, !0) : !1, this.#s = () => {
|
|
126
127
|
n.texture = u;
|
|
127
|
-
}, "width" in this.hArg ? (this.#i.width =
|
|
128
|
+
}, "width" in this.hArg ? (this.#i.width = e(this.hArg.width), this.scale.x *= this.#i.width / i) : this.#i.width = i, "height" in this.hArg ? (this.#i.height = e(this.hArg.height), this.scale.y *= this.#i.height / s) : this.#i.height = s, f.#t(this, n, i, s);
|
|
128
129
|
}
|
|
129
130
|
};
|
|
130
|
-
|
|
131
|
+
//#endregion
|
|
132
|
+
export { f as Button };
|
|
131
133
|
|
|
132
134
|
//# sourceMappingURL=Button.js.map
|
package/dist/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["#procMasume4txt","#procMasume4pic","#rctBtnTxt","#o","hArg: TArg","evtMng: IEvtMng","resolve: ()=> void","canFocus: ()=> boolean","#hover","#clicked","#sps","#loaded_pic","#loaded_b_pic"],"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.#procMas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I,QAAQ,GAAI,IAAI,UAAU,GAAK,GAAG,GAAK,EAAE,CAAC,EAC1D,IAAU,IAAI,QAAQ,GAAI,IAAI,UAAU,IAAK,GAAG,GAAG,GAAK,EAAE,CAAC,EAC3D,UAAc;AAAC,KAAG,UAAU;;AAwBlC,EAvBI,MAAA,EAAQ,WAAS,GAAQ,EAE7B,KAAK,SAAS,GACd,MAAA,UACO,KAAK,UAAU,IACrB,EAAG,UAAU,GACN,MAFuB,IAI/B,MAAA,UAAqB;AAAC,KAAG,UAAU;KAE/B,WAAW,KAAK,QACnB,MAAA,EAAQ,QAAQ,KAAK,KAAK,KAAK,MAAM,EACrC,KAAK,MAAM,KAAK,MAAA,EAAQ,QAAO,KAE3B,MAAA,EAAQ,QAAQ,GACjB,YAAY,KAAK,QACpB,MAAA,EAAQ,SAAS,KAAK,KAAK,KAAK,OAAO,EACvC,KAAK,MAAM,KAAK,MAAA,EAAQ,SAAQ,KAE5B,MAAA,EAAQ,SAAS,GAItB,GAAA,EAAuB,MAAM,GAAI,GAAG,EAAE"}
|
|
1
|
+
{"version":3,"file":"Button.js","names":["#procMasume4txt","#procMasume4pic","#rctBtnTxt","#o","#hover","#clicked","#sps","#loaded_pic","#loaded_b_pic"],"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"],"mappings":";;;;;AAkB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E,IAAM,IAAM,EAAG,QAAO,GAChB,IAAI,KAAKA,GAAG,UAAS,IAAK,EAAG,OAC7B,IAAI,EAAG,QACP,IAAK,EAAG,QAAQ,aAChB,IAAW,IAAI,EAAQ,GAAI,IAAI,EAAU,GAAG,GAAG,GAAK,CAAC,CAAC,GACtD,IAAY,IAAI,EAAQ,GAAI,IAAI,EAAU,GAAK,GAAG,GAAK,CAAC,CAAC,GACzD,IAAU,IAAI,EAAQ,GAAI,IAAI,EAAU,IAAK,GAAG,GAAG,GAAK,CAAC,CAAC,GAC1D,UAAc;GAAC,EAAG,UAAU;EAAQ;EAwB1C,AAvBI,KAAKA,GAAG,WAAS,EAAO,GAE5B,KAAK,SAAS,GACd,KAAKC,WACE,KAAK,SAAS,KACpB,EAAG,UAAU,GACN,MAFuB,IAI/B,KAAKC,WAAgB;GAAC,EAAG,UAAU;EAAS,GAExC,WAAW,KAAK,QACnB,KAAKF,GAAG,QAAQ,EAAK,KAAK,KAAK,KAAK,GACpC,KAAK,MAAM,KAAK,KAAKA,GAAG,QAAO,KAE3B,KAAKA,GAAG,QAAQ,GACjB,YAAY,KAAK,QACpB,KAAKA,GAAG,SAAS,EAAK,KAAK,KAAK,MAAM,GACtC,KAAK,MAAM,KAAK,KAAKA,GAAG,SAAQ,KAE5B,KAAKA,GAAG,SAAS,GAItB,EAAOF,GAAgB,MAAM,GAAI,GAAG,CAAC;CACtC;AAED"}
|
package/dist/CallStack.js
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/sn/CallStack.ts
|
|
2
|
+
function e() {
|
|
2
3
|
return {
|
|
3
4
|
"const.sn.macro": "{}",
|
|
4
5
|
"const.sn.me_call_scriptFn": ""
|
|
5
6
|
};
|
|
6
7
|
}
|
|
7
|
-
function
|
|
8
|
+
function t() {
|
|
8
9
|
return {
|
|
9
10
|
":hEvt1Time": {},
|
|
10
|
-
":hMp":
|
|
11
|
+
":hMp": e(),
|
|
11
12
|
":lenIfStk": 1
|
|
12
13
|
};
|
|
13
14
|
}
|
|
14
|
-
var
|
|
15
|
-
|
|
15
|
+
var n = class {
|
|
16
|
+
fn;
|
|
17
|
+
idx;
|
|
18
|
+
csArg;
|
|
19
|
+
constructor(e = "", n = 0, r = t()) {
|
|
16
20
|
this.fn = e, this.idx = n, this.csArg = r;
|
|
17
21
|
}
|
|
18
22
|
toString = () => `[fn:${this.fn}, idx:${String(this.idx)}, csArg:${JSON.stringify(this.csArg)}]`;
|
|
19
23
|
};
|
|
20
|
-
|
|
24
|
+
//#endregion
|
|
25
|
+
export { t as n, e as r, n as t };
|
|
21
26
|
|
|
22
27
|
//# sourceMappingURL=CallStack.js.map
|
package/dist/CallStack.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallStack.js","names":[
|
|
1
|
+
{"version":3,"file":"CallStack.js","names":[],"sources":["../src/sn/CallStack.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 type {T_HEvt2Fnc} from './CmnInterface';\nimport type {TArg} from './Grammar';\n\n\n// マクロ変数(mp:)\nexport type T_H_VAL_MP = {\n\t'const.sn.macro'\t\t\t: string;\t// (json)実行中マクロのスクリプター用情報\n\t'const.sn.me_call_scriptFn'\t: string;\t// マクロの呼び元スクリプト\n}\nexport function creMP(): T_H_VAL_MP {return {\n\t\t'const.sn.macro'\t\t\t: '{}',\n\t\t'const.sn.me_call_scriptFn'\t: '',\n}}\n\nexport type ICallStackArg = TArg & {\n\t':resvToken'?\t: string;\t\t// call元のtoken\n\t':hEvt1Time'?\t: T_HEvt2Fnc;\t// call元のローカル予約イベント\n\t':hMp'\t\t\t: T_H_VAL_MP;\t// call元のmp:\n\t':タグ名'?\t\t: string;\n\t':lenIfStk'\t\t: number;\n}\nexport function creCSArg(): ICallStackArg {return {\n\t':hEvt1Time': {},\n\t':hMp'\t\t: creMP(),\n\t':lenIfStk'\t: 1,\n}}\n\n\nexport class CallStack {\n\tconstructor(readonly fn = '', readonly idx = 0, readonly csArg: ICallStackArg = creCSArg()) {}\n\n\treadonly\ttoString = ()=> `[fn:${this.fn}, idx:${String(this.idx)}, csArg:${JSON.stringify(this.csArg)}]`;\n\n}\n"],"mappings":";AAgBA,SAAgB,IAAoB;CAAC,OAAO;EAC1C,kBAAqB;EACrB,6BAA8B;CAChC;AAAC;AASD,SAAgB,IAA0B;CAAC,OAAO;EACjD,cAAc,CAAC;EACf,QAAU,EAAM;EAChB,aAAc;CACf;AAAC;AAGD,IAAa,IAAb,MAAuB;CACD;CAAkB;CAAkB;CAAzD,YAAY,IAAc,IAAI,IAAe,GAAG,IAAgC,EAAS,GAAG;EAAnC,AAApC,KAAA,KAAA,GAAkB,KAAA,MAAA,GAAkB,KAAA,QAAA;CAAoC;CAE7F,iBAAyB,OAAO,KAAK,GAAG,QAAQ,OAAO,KAAK,GAAG,EAAE,UAAU,KAAK,UAAU,KAAK,KAAK,EAAE;AAEvG"}
|
package/dist/CmnInterface.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
1
|
+
import { t as e, u as t } from "./CmnLib.js";
|
|
2
|
+
//#region src/sn/CmnInterface.ts
|
|
3
|
+
function n() {
|
|
3
4
|
return {
|
|
4
5
|
"sn.userFnTail": "",
|
|
5
6
|
"const.sn.autowc.enabled": !1,
|
|
@@ -14,14 +15,14 @@ function creSAVEDATA() {
|
|
|
14
15
|
"const.sn.scriptIdx": 0
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
+
function r() {
|
|
18
19
|
return {
|
|
19
20
|
"const.sn.cfg.ns": "",
|
|
20
21
|
"const.sn.aPageLog": "[]",
|
|
21
22
|
"const.sn.nativeWindow.x": 0,
|
|
22
23
|
"const.sn.nativeWindow.y": 0,
|
|
23
|
-
"const.sn.nativeWindow.w":
|
|
24
|
-
"const.sn.nativeWindow.h":
|
|
24
|
+
"const.sn.nativeWindow.w": e.stageW,
|
|
25
|
+
"const.sn.nativeWindow.h": e.stageH,
|
|
25
26
|
"const.sn.save.place": 1,
|
|
26
27
|
"const.sn.sound.BGM.volume": 1,
|
|
27
28
|
"const.sn.sound.SE.volume": 1,
|
|
@@ -32,8 +33,8 @@ function creSYS_DATA() {
|
|
|
32
33
|
"sn.auto.msecPageWait_Kidoku": 3500,
|
|
33
34
|
"sn.skip.mode": "s",
|
|
34
35
|
"sn.sound.BGM.vol_mul_talking": 1,
|
|
35
|
-
"sn.sound.global_volume": (e,
|
|
36
|
-
"sn.sound.movie_volume": (e,
|
|
36
|
+
"sn.sound.global_volume": (e, t) => 1,
|
|
37
|
+
"sn.sound.movie_volume": (e, t) => 1,
|
|
37
38
|
"sn.tagCh.canskip": !0,
|
|
38
39
|
"sn.tagCh.doWait": !0,
|
|
39
40
|
"sn.tagCh.doWait_Kidoku": !0,
|
|
@@ -42,9 +43,9 @@ function creSYS_DATA() {
|
|
|
42
43
|
"TextLayer.Back.Alpha": .5
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function i() {
|
|
46
47
|
return {
|
|
47
|
-
"const.Date.getDateStr": () =>
|
|
48
|
+
"const.Date.getDateStr": () => t(),
|
|
48
49
|
"const.Date.getTime": () => (/* @__PURE__ */ new Date()).getTime(),
|
|
49
50
|
"const.sn.bookmark.json": "[]",
|
|
50
51
|
"const.sn.config.window.width": 0,
|
|
@@ -71,7 +72,7 @@ function creTMP_DATA() {
|
|
|
71
72
|
"const.sn.Math.PI": Math.PI,
|
|
72
73
|
"const.sn.navigator.language": "jp",
|
|
73
74
|
"const.sn.needClick2Play": !1,
|
|
74
|
-
"const.sn.platform":
|
|
75
|
+
"const.sn.platform": e.platform,
|
|
75
76
|
"const.sn.screenResolutionX": screen.availWidth,
|
|
76
77
|
"const.sn.screenResolutionY": screen.availHeight,
|
|
77
78
|
"const.sn.sound.codecs": "",
|
|
@@ -86,6 +87,7 @@ function creTMP_DATA() {
|
|
|
86
87
|
"sn.tagL.enabled": !0
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
+
//#endregion
|
|
91
|
+
export { r as n, i as r, n as t };
|
|
90
92
|
|
|
91
93
|
//# sourceMappingURL=CmnInterface.js.map
|
package/dist/CmnInterface.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CmnInterface.js","names":[],"sources":["../src/sn/CmnInterface.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 type {T_HSysBaseArg, T_SEARCHPATH} from './ConfigBase';\nimport type {TArg, TTag} from './Grammar';\nimport type {Areas, T_H_Areas} from './Areas';\nimport type {T_H_VAL_MP} from './CallStack';\nimport type {Layer, T_RecordPlayBack_lay} from './Layer';\nimport {CmnLib, getDateStr} from './CmnLib';\n\nimport type {DisplayObject, RenderTexture} from 'pixi.js';\n\n\n// 特定のプロパティだけrequiredにする型を作ってみる #TypeScript - Qiita https://qiita.com/islandryu/items/490414a537c203b151f7\nexport type T_PRequired<T,K extends keyof T> = T & {\n\t[P in K]-?: T[P]\n}\n\n// =============== PropParser\nexport type T_PropParser = {\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tparse(s: string): any;\n\tgetValAmpersand(val: string): string;\n}\n\n\n// =============== Plugin\nexport type T_PLUGIN_DECAB_RET = {\n\text_num\t: number;\n\tab\t\t: ArrayBuffer;\n};\nexport type T_PLUGIN_INFO = {\n\twindow: {\n\t\twidth\t: number;\n\t\theight\t: number;\n\t},\n}\nexport type T_PluginInitArg = {\n\tgetInfo(): T_PLUGIN_INFO;\n\taddTag(tag_name: string, tag_fnc: TTag): void;\n\taddLayCls(cls: string, fnc: T_LayerFactory): void;\n\tsearchPath: T_SEARCHPATH;\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tgetVal(arg_name: string, def?: number | string): any;\n\tresume(fnc?: ()=> void): void;\n\trender(dsp: DisplayObject, renTx?: RenderTexture, clear?: boolean): void;\n\tsetDec(fnc: (ext: string, tx: string)=> Promise<string>): void;\n\tsetDecAB(fnc: (ab: ArrayBuffer)=> Promise<T_PLUGIN_DECAB_RET>): void;\n\tsetEnc(fnc: (tx: string)=> Promise<string>): void;\n\tgetStK(fnc: ()=> string): void;\n\tgetHash(fnc: (str: string)=> string): void;\n}\nexport type T_Plugin = {\n\tinit(pia: T_PluginInitArg): Promise<void>;\n}\nexport type T_HPlugin = {[name: string]: T_Plugin;}\n\nexport type T_LayerFactory = ()=> Layer\n\n\n// =============== SysBase\nexport type T_SysBaseParams = [\n\thPlg\t: T_HPlugin,\n\targ?\t: T_HSysBaseArg,\n];\nexport type T_SysBaseLoadedParams = [\n\thPlg\t: T_HPlugin,\n\targ\t\t: T_HSysBaseArg,\n];\n\n\nexport type SYS_DEC_RET = HTMLImageElement | HTMLVideoElement | ArrayBuffer;\nexport type T_SysBase = {\n\tinitVal(hTmp: T_H_TMP_DATA, comp: (data: T_Data4Vari)=> void): Promise<void>;\n\tflush(): void;\n\n\taddHook(fnc: T_FncHook): void;\n\tcallHook: T_FncHook;\n\tsend2Dbg: T_FncHook;\n\n\tcopyBMFolder(from: number, to: number): void;\n\teraseBMFolder(place: number): void;\n\n\tdestroy(): void;\n}\n\nexport type T_Fire = (KEY: string, e: Event)=> void;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type T_FncHook = (type: string, o: any)=> void;\n\n\n// =============== Main\nexport type T_Main = {\n\terrScript(mes: string, isThrow? :boolean): void;\n\tcvs\t\t\t: HTMLCanvasElement;\n\tresume(fnc?: ()=> void): void;\n\tresumeByJumpOrCall(hArg: TArg): void;\n\tstop(): void;\n\tsetLoop(v: boolean, mes?: string): void;\n\tdestroy(): void;\n}\n\n\n// =============== Variable\nexport type T_VAL_BSN = boolean | string | number;\nexport type T_VAL_BSNU = T_VAL_BSN | undefined;\n\n\n// 汎用的に変数\nexport type T_VAL_DATA = T_VAL_BSNU | null;\nexport type T_VAL_DATA_FNC = T_VAL_DATA | (()=> boolean) | (()=> string) | (()=> number)\nexport type T_H_VAL_DATA = {[val_name: string]: T_VAL_DATA_FNC}\n\n// セーブ変数(save:)\nexport type T_H_SAVE_DATA = {\n\t'sn.userFnTail'\t\t: string;\n\n\t'const.sn.autowc.enabled'\t: boolean;\n\t'const.sn.autowc.text'\t\t: string;\n\t'const.sn.autowc.time'\t\t: number;\n\t'const.sn.mesLayer'\t\t: string;\n\t// 'const.sn.sound.【buf】.fn'\t\t: string;\n\t// 'const.sn.sound.【buf】.volume'\t: number;\n\t'const.sn.styPaging'\t: string;\n\t'sn.doRecLog'\t\t\t: boolean;\n\t'const.sn.sLog'\t\t\t: string;\n\t'const.sn.loopPlaying'\t: string;\n\t'const.sn.scriptFn'\t\t: string;\n\t'const.sn.scriptIdx'\t: number;\n\t// 'const.sn.layer.(文字レイヤ名).enabled'\t: boolean;\n\n\t// [val_name: string]: T_VAL_DATA;\n}\nexport function creSAVEDATA(): T_H_SAVE_DATA {return {\n\t'sn.userFnTail'\t\t: '',\n\n\t'const.sn.autowc.enabled': false,// (文字ごとのウェイト)enabled属性で指定した値。\n\t'const.sn.autowc.text'\t: '',\t// (文字ごとのウェイト)同名属性で指定した値。\n\t'const.sn.autowc.time'\t: 0,\t// textとtimeは常に同数にすること\n\t'const.sn.mesLayer'\t: '',\t// デフォルト文字レイヤ\n\t// 'const.sn.sound.【buf】.fn'\t: '',\t// サウンドバッファの再生ファイル名\n\t// 'const.sn.sound.【buf】.volume'\t: 1,// サウンドバッファの目標音量\n\t'const.sn.styPaging'\t: 'color: yellow; text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;',\n\t\t// ページ遷移中 CSS スタイル\n\t'sn.doRecLog'\t\t: false,\t// テキストを履歴に記録するか\n\t'const.sn.sLog'\t: '[]',\t// 履歴テキスト(JSON文字列)\n\t'const.sn.loopPlaying'\t: '{}',\t// ループ中のサウンドバッファ\n\t'const.sn.scriptFn'\t: '',\t// 最後に[record_place]したスクリプト名\n\t'const.sn.scriptIdx'\t: 0,\t// 最後に[record_place]したスクリプトインデックス(行番号ではなく内部トークン単位)\n\t// 'const.sn.layer.(文字レイヤ名).enabled'\t: true,\t// 文字レイヤのenabled値\n}}\n\n\n// システム変数(sys:)\nexport type T_H_SYS_DATA = {\n\t'const.sn.cfg.ns'\t\t\t: string;\t// [import]時のチェック用\n\n\t'const.sn.aPageLog'\t\t\t: string;\t// ページ遷移用情報(JSON文字列)\n\t'const.sn.nativeWindow.x'\t: number;\t// 実数;横座標\n\t'const.sn.nativeWindow.y'\t: number;\t// 実数;縦座標\n\t'const.sn.nativeWindow.w'\t: number;\t// 実数;横幅\n\t'const.sn.nativeWindow.h'\t: number;\t// 実数;縦幅\n\t'const.sn.save.place'\t\t: number;\t// 次のセーブplaceを示す\n\t'const.sn.sound.BGM.volume'\t: number;\t// BGMの基準音量(buf=\"BGM\"の効果音)\n\t'const.sn.sound.SE.volume'\t: number;\t// 効果音の基準音量(buf=\"SE\"の効果音)\n\t'const.sn.sound.SYS.volume'\t: number;\t// システムの基準音量(buf=\"SYS\"の効果音)\n\t// 'const.sn.sound.【buf】.volume'\t: number;\t// システムの基準音量(buf=\"【buf】\"の効果音)\n\t'sn.auto.msecLineWait'\t\t: number;\t// 未読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecLineWait_Kidoku': number;\t// 既読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait'\t\t: number;\t// 未読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait_Kidoku': number;\t// 既読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.skip.mode'\t\t\t\t: string;\t// スキップモード。\n\t'sn.sound.BGM.vol_mul_talking': number;\t// ボイス(VOICEバッファの音声)再生中のBGM音量への乗数\n\t'sn.sound.global_volume'\t: T_fncSetVal;\t// 全体的な音量を設定する\n\t'sn.sound.movie_volume'\t\t: T_fncSetVal;\t// ムービー音量を設定する\n\t'sn.tagCh.canskip'\t\t\t: boolean;\t// テキストをクリックなどでスキップ可能か\n\t'sn.tagCh.doWait'\t\t\t: boolean;\t// 未読テキストにウェイトを掛けるか\n\t'sn.tagCh.doWait_Kidoku'\t: boolean;\t// 既読テキストにウェイトを掛けるか\n\t'sn.tagCh.msecWait'\t\t\t: number;\t// 未読テキスト待ち時間(ミリ秒)\n\t'sn.tagCh.msecWait_Kidoku'\t: number;\t// 既読テキスト待ち時間(ミリ秒)\n\t'TextLayer.Back.Alpha'\t\t: number;\t// バック不透明度。テキストウインドウの背景の濃\n\n\t// [val_name: string]\t\t: T_VAL_DATA;\n}\nexport function creSYS_DATA(): T_H_SYS_DATA {return {\n\t'const.sn.cfg.ns'\t\t\t: '',\t// [import]時のチェック用\n\n\t'const.sn.aPageLog'\t\t\t: '[]',\t// ページ遷移用情報(JSON文字列)\n\t'const.sn.nativeWindow.x'\t: 0,\t// 実数;横座標\n\t'const.sn.nativeWindow.y'\t: 0,\t// 実数;縦座標\n\t'const.sn.nativeWindow.w'\t: CmnLib.stageW,\t// 実数;横幅\n\t'const.sn.nativeWindow.h'\t: CmnLib.stageH,\t// 実数;縦幅\n\t'const.sn.save.place'\t\t: 1,\t// 次のセーブplaceを示す\n\t'const.sn.sound.BGM.volume'\t: 1,\t// BGMの基準音量(buf=\"BGM\"の効果音)\n\t'const.sn.sound.SE.volume'\t: 1,\t// 効果音の基準音量(buf=\"SE\"の効果音)\n\t'const.sn.sound.SYS.volume'\t: 1,\t// システムの基準音量(buf=\"SYS\"の効果音)\n\t// 'const.sn.sound.【buf】.volume': 1,\t// システムの基準音量(buf=\"【buf】\"の効果音)\n\t'sn.auto.msecLineWait'\t\t: 500,\t// 未読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecLineWait_Kidoku': 500,\t// 既読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait'\t\t: 3500,\t// 未読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait_Kidoku': 3500,// 既読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.skip.mode'\t\t\t\t: 's',\t// スキップモード。\n\t'sn.sound.BGM.vol_mul_talking': 1.0,// ボイス(VOICEバッファの音声)再生中のBGM音量への乗数\n\t'sn.sound.global_volume'\t: (_, _2)=> 1,\t// 全体的な音量を設定する\n\t'sn.sound.movie_volume'\t\t: (_, _2)=> 1,\t// ムービー音量を設定する\n\t'sn.tagCh.canskip'\t\t\t: true,\t// テキストをクリックなどでスキップ可能か\n\t'sn.tagCh.doWait'\t\t\t: true,\t// 未読テキストにウェイトを掛けるか\n\t'sn.tagCh.doWait_Kidoku'\t: true,\t// 既読テキストにウェイトを掛けるか\n\t'sn.tagCh.msecWait'\t\t\t: 10,\t// 未読テキスト待ち時間(ミリ秒)\n\t'sn.tagCh.msecWait_Kidoku'\t: 10,\t// 既読テキスト待ち時間(ミリ秒)\n\t'TextLayer.Back.Alpha'\t\t: 0.5,\t// バック不透明度。テキストウインドウの背景の濃度。0.0で透明、1.0で不透明\n}}\n\n\n// 雑用変数(tmp:)\nexport type T_H_TMP_DATA = {\n\t'const.Date.getDateStr'\t\t: ()=> string;\n\t'const.Date.getTime'\t\t: ()=> number;\n\t'const.sn.bookmark.json'\t: string;\n\n\t// 'const.sn.config.(略)'\t\t: string;\n\t'const.sn.config.window.width'\t: number;\n\t'const.sn.config.window.height'\t: number;\n\t'const.sn.config.book.title'\t: string;\n\t'const.sn.config.book.version'\t: string;\n\n\t'const.sn.displayState'\t: boolean;\n\t\t\t// const.flash.display.Stage.displayState\n\n\t// 'const.sn.frm.(フレーム名)'\t\t: boolean;\n\t// 'const.sn.frm.(フレーム名).alpha'\t: number;\n\t// 'const.sn.frm.(フレーム名).x'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).y'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).scale_x'\t: number;\n\t// 'const.sn.frm.(フレーム名).scale_y'\t: number;\n\t// 'const.sn.frm.(フレーム名).rotate'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).width'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).height'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).visible'\t: boolean;\n\n\t'const.sn.isApp'\t: boolean;\n\t'const.sn.isDbg'\t: boolean;\n\t'const.sn.isPackaged'\t: boolean;\n\t'const.sn.isPaging'\t\t: boolean;\n\t'const.sn.isDarkMode'\t: boolean;\n\t'const.sn.isDebugger'\t: boolean;\n\t'const.sn.isFirstBoot'\t: boolean;\n\t'const.sn.isKidoku'\t\t: boolean;\n\t'const.sn.key.alternate': boolean;\n\t'const.sn.key.back'\t\t: boolean;\n\t'const.sn.key.command'\t: boolean;\n\t'const.sn.key.control'\t: boolean;\n\t'const.sn.key.end'\t\t: boolean;\n\t'const.sn.key.escape'\t: boolean;\n\t'const.sn.last_page_plain_text'\t: string;\n\t'const.sn.last_page_text'\t\t: string;\n\t// 'const.sn.lay.(レイヤ名)'\t\t\t\t\t\t: boolean;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).alpha'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).width'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).height'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).visible'\t: boolean;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).x'\t\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).y'\t\t: number;\n\t'const.sn.Math.PI'\t\t: number;\n\t'const.sn.navigator.language'\t: string;\n\t'const.sn.needClick2Play'\t\t: boolean;\n\t'const.sn.platform'\t\t\t\t: string;\n\t'const.sn.screenResolutionX'\t: number;\n\t'const.sn.screenResolutionY'\t: number;\n\t'const.sn.sound.codecs'\t\t\t: string;\n\t// 'const.sn.sound.【buf】.playing': boolean;\n\t'const.sn.aIfStk.length'\t\t: number;\n\t'const.sn.vctCallStk.length'\t: number;\n\t'sn.auto.enabled'\t\t: boolean;\n\t'sn.button.fontFamily'\t: string;\n\t// 'sn.event.domdata.(任意)'\t: string;\n\t'sn.eventArg'\t\t: string;\n\t'sn.eventLabel'\t\t: string;\n\t'sn.skip.all'\t\t: boolean;\n\t'sn.skip.enabled'\t: boolean;\n\t'sn.tagL.enabled'\t: boolean;\n}\nexport function creTMP_DATA(): T_H_TMP_DATA {return {\n\t'const.Date.getDateStr'\t\t: ()=> getDateStr(),\t// 変数参照時の日時を返す\n\t'const.Date.getTime'\t\t: ()=> (new Date).getTime(),\n\t'const.sn.bookmark.json'\t: '[]',\t// SKYNovel内部によるsave:の管理用\n\n\t// 'const.sn.config.(略)'\t: ,\t// prj.jsonの内容を返す\n\t'const.sn.config.window.width'\t: 0,\n\t'const.sn.config.window.height'\t: 0,\n\t'const.sn.config.book.title'\t: '',\n\t'const.sn.config.book.version'\t: '',\n\n\t'const.sn.displayState'\t\t: false,\t// ウインドウ・フルスクリーン状態。trueならフルスクリーン\n\n\t// 'const.sn.frm.(フレーム名)'\t: true,\t// [add_frame]でロードされた id属性が存在するか\n\t// 'const.sn.frm.(フレーム名).alpha'\t: 1,\t// フレームの不透明度\n\t// 'const.sn.frm.(フレーム名).x'\t\t: 0,\t// フレームの座標。画面左上を(0, 0)とする座標。leftやtopでないことに注意\n\t// 'const.sn.frm.(フレーム名).y'\t\t: 0,\t// 実数;縦座標\n\t// 'const.sn.frm.(フレーム名).scale_x': 1,\t// cssでのtransform: scaleの値\n\t// 'const.sn.frm.(フレーム名).scale_y': 1,\t// cssでのtransform: scaleの値\n\t// 'const.sn.frm.(フレーム名).rotate'\t: 0,\t// cssでのrotate、回転角度(単位:deg 度)、正の値は時計回り\n\t// 'const.sn.frm.(フレーム名).width'\t: prjのアプリ横幅画面サイズ,\t// フレームの横幅\n\t// 'const.sn.frm.(フレーム名).height'\t: prjのアプリ縦幅画面サイズ,\t// フレームの縦幅\n\t// 'const.sn.frm.(フレーム名).visible': true,\t// フレームが表示されているか。visible属性の値を返す\n\n\t'const.sn.isApp'\t\t: false,\t// アプリ版か\n\t'const.sn.isDbg'\t\t: false,\t// デバッグモードか\n\t'const.sn.isPackaged'\t: false,\t// パッケージされたアプリか(Electron API - app.isPackaged)\n\t'const.sn.isPaging'\t\t: false,\t// ページ遷移状態か\n\t'const.sn.isDarkMode'\t: false,\t// ダークモードか\n\t'const.sn.isDebugger'\t: true,\t\t// ブラウザ実行、それもVSCode・npmによる「起動:ブラウザ版」上での実行か\n\t'const.sn.isFirstBoot'\t: true,\t\t// ゲームがインストールされてから、初めての起動か(起動されるまでデータが空だったか)\n\t'const.sn.isKidoku'\t\t: true,\t\t// この変数を参照した位置は既読か。参照「後」必ず既読になる点に注意\n\t'const.sn.key.alternate': false,\t// ALTキー(MacならOptionキー)が押されているか\n\t'const.sn.key.back'\t\t: false,\t// back 〃\n\t'const.sn.key.command'\t: false,\t// command 〃\n\t'const.sn.key.control'\t: false,\t// control 〃\n\t'const.sn.key.end'\t\t: false,\t// end 〃\n\t'const.sn.key.escape'\t: false,\t// escape 〃\n\t'const.sn.last_page_plain_text'\t: '',\t// そのページの履歴テキスト(《》文法とルビを含まない)\n\t'const.sn.last_page_text'\t\t: '',\t// そのページの履歴テキスト(《》文法もそのまま)\n\t// 'const.sn.lay.(レイヤ名)'\t\t: true,\t// レイヤが[add_lay]され存在するか\n\t// 'const.sn.lay.(レイヤ名).(foreかback).alpha'\t\t: 0.0〜1.0,\t// レイヤの不透明度\n\t// 'const.sn.lay.(レイヤ名).(foreかback).width'\t\t: 1,\t// レイヤの横幅。ただし文字レイヤの場合は1、画像レイヤの場合、画像読込後でないと0\n\t// 'const.sn.lay.(レイヤ名).(foreかback).height'\t\t: 1,\t// レイヤの縦幅。ただし文字レイヤの場合は1、画像レイヤの場合、画像読込後でないと0\n\t// 'const.sn.lay.(レイヤ名).(foreかback).visible'\t\t: true,\t// レイヤが表示されているか。visible属性の値を返す\n\t// 'const.sn.lay.(レイヤ名).(foreかback).x'\t\t: 0,\t// 実数;横座標</td><td rowspan=\"2\">レイヤの座標。画面左上を(0, 0)とする座標。leftやtopでないことに注意\n\t// 'const.sn.lay.(レイヤ名).(foreかback).y'\t\t: 0,\t// 実数;縦座標\n\t'const.sn.Math.PI'\t\t: Math.PI,\t// 円周率\n\t'const.sn.navigator.language': 'jp',\t// ユーザーが最優先に設定している言語設定\n\t'const.sn.needClick2Play'\t: false,\n\t\t// ブラウザ実行で、クリックされるまで音声再生が差し止められている状態か。なにかクリックされれば falseになる\n\t'const.sn.platform'\t\t\t: CmnLib.platform,\t// 環境による\n\n\t'const.sn.screenResolutionX': screen.availWidth,\t// 画面の最大水平解像度\n\t'const.sn.screenResolutionY': screen.availHeight,\t// 画面の最大垂直解像度\n\t\t// ここでは正確な値は分からない。保存していた前回終了時の位置にウインドウを動かしてから、そのディスプレイののサイズを取得するまでは。\n\n\t'const.sn.sound.codecs'\t\t: '',\t// ゲーム実行環境がどのコーデックをサポートしているか\n\t// 'const.sn.sound.【buf】.playing'\t\t: 再生状態による,\t// サウンドバッファが再生中か<br/>\n\t'const.sn.aIfStk.length'\t: 1,\t// IFスタックの深さ([if]するたびに増)\n\t'const.sn.vctCallStk.length': 0,\t// コールスタックの深さ([call]するたびに増)\n\t'sn.auto.enabled'\t\t: false,\t// 自動読みすすみモードかどうか\n\t'sn.button.fontFamily'\t: '\\'Hiragino Sans\\', \\'Hiragino Kaku Gothic ProN\\', \\'游ゴシック Medium\\', meiryo, sans-serif',\t// 文字ボタンフォントを指定\n\t// 'sn.event.domdata.(任意)'\t\t: ''[event]でフレーム内のHTML要素に登録したイベントで、そのイベント発生時、HTML要素のdata-(任意)属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.eventArg'\t\t: '',\t// [button]等のイベント発生時、そのボタンタグのarg属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.eventLabel'\t\t: '',\t// [button]等のイベント発生時、そのボタンタグのlabel属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.skip.all'\t\t: false,\t// false(初期値)なら既読のみをスキップ\n\t'sn.skip.enabled'\t: false,\t// 次の選択肢(/未読)まで進む が有効か\n\t'sn.tagL.enabled'\t: true,\t\t// 頁末まで一気に読み進むか(l無視)\n}}\n\n\nexport type Scope = 'tmp'|'save'|'sys'|'mp';\n\nexport type T_ProcVal = ()=> T_VAL_BSN;\n\nexport type T_fncSetVal = (arg_name: string, val: T_VAL_BSN, autocast?: boolean)=> void;\n\nexport type T_Variable = {\n\tinit(): Promise<void>;\n\tflush(): void;\n\tsetDoRecProc(doRecProc: (doRec: boolean)=> void): void;\n\n\tgetVal(arg_name: string, def?: number | string, touch?: boolean): T_VAL_DATA;\n\tsetVal_Nochk(scope: Scope, nm: string, val: T_VAL_BSNU, autocast?: boolean): void;\n\n\tdefTmp(name: string, fnc: T_ProcVal): void;\n\tcloneMp(): T_H_VAL_MP;\n\tsetMp(mp: T_H_VAL_MP): void;\n\tsetMark(place: number, mark: T_Mark): void;\n\tgetMark(place: number): T_Mark | undefined;\n\tcloneSave(): T_H_SAVE_DATA;\n\tmark2save(mark: T_Mark): void;\n\n\ttouchAreaKidoku(fn: string): Areas;\n\tgetAreaKidoku(fn: string): Areas | undefined;\n\tsaveKidoku(): void;\n\tupdateData(data: T_Data4Vari): void;\n\n\tdefValTrg(name: string, fnc: T_fncSetVal): void;\n\n\tdoRecLog(): boolean;\n\n\tget tagCh_doWait(): boolean;\n\tget tagCh_doWait_Kidoku(): boolean;\n\tget tagCh_msecWait(): number;\n\tget tagCh_msecWait_Kidoku(): number;\n}\n\nexport type T_H_VAL_MARK\t= {[place: number]: T_Mark};\nexport type T_H_VAL_KIDOKU\t= {[fn: string]: T_H_Areas};\n\n\nexport type T_Data4Vari = {\n\tsys\t\t: T_H_SYS_DATA;\n\tmark\t: T_H_VAL_MARK;\n\tkidoku\t: T_H_VAL_KIDOKU;\n}\n\nexport type T_Mark = {\n\thSave\t: T_H_SAVE_DATA;\n\thPages\t: T_HPage;\n\taIfStk\t: number[];\n\tjson?\t: TArg;\n}\n\n\n// =============== EventMng\nexport type T_Evt2Fnc\t= (e: Event)=> void;\nexport type T_HEvt2Fnc\t= {[name: string]: T_Evt2Fnc;};\n\n\n// =============== FrameMng, LayerMng\nexport type T_GetFrm = {\n\tgetFrmDisabled\t: (id: string)=> boolean;\n};\n\n\n// =============== Pages\nexport type T_HPage = {[name: string]: T_Page};\nexport type T_Page = {\n\tcls\t\t: string;\n\tfore\t: T_RecordPlayBack_lay;\n\tback\t: T_RecordPlayBack_lay;\n}\n\n\n// =============== RubySpliter\nexport type T_PutCh = (ch: string, ruby: string)=> void\n\n\n// =============== Volume change event notification (GrpLayer)\nexport type T_NoticeChgVolume = (vol: number)=> void\n"],"mappings":";AAyIA,SAAgB,cAA6B;AAAC,QAAO;EACpD,iBAAmB;EAEnB,2BAA2B;EAC3B,wBAAyB;EACzB,wBAAyB;EACzB,qBAAsB;EAGtB,sBAAuB;EAEvB,eAAiB;EACjB,iBAAkB;EAClB,wBAAyB;EACzB,qBAAsB;EACtB,sBAAuB;EAEvB;;AAkCD,SAAgB,cAA4B;AAAC,QAAO;EACnD,mBAAsB;EAEtB,qBAAwB;EACxB,2BAA4B;EAC5B,2BAA4B;EAC5B,2BAA4B,OAAO;EACnC,2BAA4B,OAAO;EACnC,uBAAyB;EACzB,6BAA8B;EAC9B,4BAA6B;EAC7B,6BAA8B;EAE9B,wBAA0B;EAC1B,+BAA+B;EAC/B,wBAA0B;EAC1B,+BAA+B;EAC/B,gBAAoB;EACpB,gCAAgC;EAChC,2BAA4B,GAAG,MAAM;EACrC,0BAA4B,GAAG,MAAM;EACrC,oBAAuB;EACvB,mBAAsB;EACtB,0BAA2B;EAC3B,qBAAwB;EACxB,4BAA6B;EAC7B,wBAA0B;EAC1B;;AAuED,SAAgB,cAA4B;AAAC,QAAO;EACnD,+BAAgC,YAAY;EAC5C,6CAA8B,IAAI,MAAI,EAAE,SAAS;EACjD,0BAA2B;EAG3B,gCAAiC;EACjC,iCAAkC;EAClC,8BAA+B;EAC/B,gCAAiC;EAEjC,yBAA2B;EAa3B,kBAAoB;EACpB,kBAAoB;EACpB,uBAAwB;EACxB,qBAAuB;EACvB,uBAAwB;EACxB,uBAAwB;EACxB,wBAAyB;EACzB,qBAAuB;EACvB,0BAA0B;EAC1B,qBAAuB;EACvB,wBAAyB;EACzB,wBAAyB;EACzB,oBAAsB;EACtB,uBAAwB;EACxB,iCAAkC;EAClC,2BAA6B;EAQ7B,oBAAsB,KAAK;EAC3B,+BAA+B;EAC/B,2BAA4B;EAE5B,qBAAwB,OAAO;EAE/B,8BAA8B,OAAO;EACrC,8BAA8B,OAAO;EAGrC,yBAA2B;EAE3B,0BAA2B;EAC3B,8BAA8B;EAC9B,mBAAqB;EACrB,wBAAyB;EAEzB,eAAiB;EACjB,iBAAmB;EACnB,eAAiB;EACjB,mBAAoB;EACpB,mBAAoB;EACpB"}
|
|
1
|
+
{"version":3,"file":"CmnInterface.js","names":[],"sources":["../src/sn/CmnInterface.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 type {T_HSysBaseArg, T_SEARCHPATH} from './ConfigBase';\nimport type {TArg, TTag} from './Grammar';\nimport type {Areas, T_H_Areas} from './Areas';\nimport type {T_H_VAL_MP} from './CallStack';\nimport type {Layer, T_RecordPlayBack_lay} from './Layer';\nimport {CmnLib, getDateStr} from './CmnLib';\n\nimport type {DisplayObject, RenderTexture} from 'pixi.js';\n\n\n// 特定のプロパティだけrequiredにする型を作ってみる #TypeScript - Qiita https://qiita.com/islandryu/items/490414a537c203b151f7\nexport type T_PRequired<T,K extends keyof T> = T & {\n\t[P in K]-?: T[P]\n}\n\n// =============== PropParser\nexport type T_PropParser = {\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tparse(s: string): any;\n\tgetValAmpersand(val: string): string;\n}\n\n\n// =============== Plugin\nexport type T_PLUGIN_DECAB_RET = {\n\text_num\t: number;\n\tab\t\t: ArrayBuffer;\n};\nexport type T_PLUGIN_INFO = {\n\twindow: {\n\t\twidth\t: number;\n\t\theight\t: number;\n\t},\n}\nexport type T_PluginInitArg = {\n\tgetInfo(): T_PLUGIN_INFO;\n\taddTag(tag_name: string, tag_fnc: TTag): void;\n\taddLayCls(cls: string, fnc: T_LayerFactory): void;\n\tsearchPath: T_SEARCHPATH;\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tgetVal(arg_name: string, def?: number | string): any;\n\tresume(fnc?: ()=> void): void;\n\trender(dsp: DisplayObject, renTx?: RenderTexture, clear?: boolean): void;\n\tsetDec(fnc: (ext: string, tx: string)=> Promise<string>): void;\n\tsetDecAB(fnc: (ab: ArrayBuffer)=> Promise<T_PLUGIN_DECAB_RET>): void;\n\tsetEnc(fnc: (tx: string)=> Promise<string>): void;\n\tgetStK(fnc: ()=> string): void;\n\tgetHash(fnc: (str: string)=> string): void;\n}\nexport type T_Plugin = {\n\tinit(pia: T_PluginInitArg): Promise<void>;\n}\nexport type T_HPlugin = {[name: string]: T_Plugin;}\n\nexport type T_LayerFactory = ()=> Layer\n\n\n// =============== SysBase\nexport type T_SysBaseParams = [\n\thPlg\t: T_HPlugin,\n\targ?\t: T_HSysBaseArg,\n];\nexport type T_SysBaseLoadedParams = [\n\thPlg\t: T_HPlugin,\n\targ\t\t: T_HSysBaseArg,\n];\n\n\nexport type SYS_DEC_RET = HTMLImageElement | HTMLVideoElement | ArrayBuffer;\nexport type T_SysBase = {\n\tinitVal(hTmp: T_H_TMP_DATA, comp: (data: T_Data4Vari)=> void): Promise<void>;\n\tflush(): void;\n\n\taddHook(fnc: T_FncHook): void;\n\tcallHook: T_FncHook;\n\tsend2Dbg: T_FncHook;\n\n\tcopyBMFolder(from: number, to: number): void;\n\teraseBMFolder(place: number): void;\n\n\tdestroy(): void;\n}\n\nexport type T_Fire = (KEY: string, e: Event)=> void;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type T_FncHook = (type: string, o: any)=> void;\n\n\n// =============== Main\nexport type T_Main = {\n\terrScript(mes: string, isThrow? :boolean): void;\n\tcvs\t\t\t: HTMLCanvasElement;\n\tresume(fnc?: ()=> void): void;\n\tresumeByJumpOrCall(hArg: TArg): void;\n\tstop(): void;\n\tsetLoop(v: boolean, mes?: string): void;\n\tdestroy(): void;\n}\n\n\n// =============== Variable\nexport type T_VAL_BSN = boolean | string | number;\nexport type T_VAL_BSNU = T_VAL_BSN | undefined;\n\n\n// 汎用的に変数\nexport type T_VAL_DATA = T_VAL_BSNU | null;\nexport type T_VAL_DATA_FNC = T_VAL_DATA | (()=> boolean) | (()=> string) | (()=> number)\nexport type T_H_VAL_DATA = {[val_name: string]: T_VAL_DATA_FNC}\n\n// セーブ変数(save:)\nexport type T_H_SAVE_DATA = {\n\t'sn.userFnTail'\t\t: string;\n\n\t'const.sn.autowc.enabled'\t: boolean;\n\t'const.sn.autowc.text'\t\t: string;\n\t'const.sn.autowc.time'\t\t: number;\n\t'const.sn.mesLayer'\t\t: string;\n\t// 'const.sn.sound.【buf】.fn'\t\t: string;\n\t// 'const.sn.sound.【buf】.volume'\t: number;\n\t'const.sn.styPaging'\t: string;\n\t'sn.doRecLog'\t\t\t: boolean;\n\t'const.sn.sLog'\t\t\t: string;\n\t'const.sn.loopPlaying'\t: string;\n\t'const.sn.scriptFn'\t\t: string;\n\t'const.sn.scriptIdx'\t: number;\n\t// 'const.sn.layer.(文字レイヤ名).enabled'\t: boolean;\n\n\t// [val_name: string]: T_VAL_DATA;\n}\nexport function creSAVEDATA(): T_H_SAVE_DATA {return {\n\t'sn.userFnTail'\t\t: '',\n\n\t'const.sn.autowc.enabled': false,// (文字ごとのウェイト)enabled属性で指定した値。\n\t'const.sn.autowc.text'\t: '',\t// (文字ごとのウェイト)同名属性で指定した値。\n\t'const.sn.autowc.time'\t: 0,\t// textとtimeは常に同数にすること\n\t'const.sn.mesLayer'\t: '',\t// デフォルト文字レイヤ\n\t// 'const.sn.sound.【buf】.fn'\t: '',\t// サウンドバッファの再生ファイル名\n\t// 'const.sn.sound.【buf】.volume'\t: 1,// サウンドバッファの目標音量\n\t'const.sn.styPaging'\t: 'color: yellow; text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;',\n\t\t// ページ遷移中 CSS スタイル\n\t'sn.doRecLog'\t\t: false,\t// テキストを履歴に記録するか\n\t'const.sn.sLog'\t: '[]',\t// 履歴テキスト(JSON文字列)\n\t'const.sn.loopPlaying'\t: '{}',\t// ループ中のサウンドバッファ\n\t'const.sn.scriptFn'\t: '',\t// 最後に[record_place]したスクリプト名\n\t'const.sn.scriptIdx'\t: 0,\t// 最後に[record_place]したスクリプトインデックス(行番号ではなく内部トークン単位)\n\t// 'const.sn.layer.(文字レイヤ名).enabled'\t: true,\t// 文字レイヤのenabled値\n}}\n\n\n// システム変数(sys:)\nexport type T_H_SYS_DATA = {\n\t'const.sn.cfg.ns'\t\t\t: string;\t// [import]時のチェック用\n\n\t'const.sn.aPageLog'\t\t\t: string;\t// ページ遷移用情報(JSON文字列)\n\t'const.sn.nativeWindow.x'\t: number;\t// 実数;横座標\n\t'const.sn.nativeWindow.y'\t: number;\t// 実数;縦座標\n\t'const.sn.nativeWindow.w'\t: number;\t// 実数;横幅\n\t'const.sn.nativeWindow.h'\t: number;\t// 実数;縦幅\n\t'const.sn.save.place'\t\t: number;\t// 次のセーブplaceを示す\n\t'const.sn.sound.BGM.volume'\t: number;\t// BGMの基準音量(buf=\"BGM\"の効果音)\n\t'const.sn.sound.SE.volume'\t: number;\t// 効果音の基準音量(buf=\"SE\"の効果音)\n\t'const.sn.sound.SYS.volume'\t: number;\t// システムの基準音量(buf=\"SYS\"の効果音)\n\t// 'const.sn.sound.【buf】.volume'\t: number;\t// システムの基準音量(buf=\"【buf】\"の効果音)\n\t'sn.auto.msecLineWait'\t\t: number;\t// 未読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecLineWait_Kidoku': number;\t// 既読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait'\t\t: number;\t// 未読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait_Kidoku': number;\t// 既読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.skip.mode'\t\t\t\t: string;\t// スキップモード。\n\t'sn.sound.BGM.vol_mul_talking': number;\t// ボイス(VOICEバッファの音声)再生中のBGM音量への乗数\n\t'sn.sound.global_volume'\t: T_fncSetVal;\t// 全体的な音量を設定する\n\t'sn.sound.movie_volume'\t\t: T_fncSetVal;\t// ムービー音量を設定する\n\t'sn.tagCh.canskip'\t\t\t: boolean;\t// テキストをクリックなどでスキップ可能か\n\t'sn.tagCh.doWait'\t\t\t: boolean;\t// 未読テキストにウェイトを掛けるか\n\t'sn.tagCh.doWait_Kidoku'\t: boolean;\t// 既読テキストにウェイトを掛けるか\n\t'sn.tagCh.msecWait'\t\t\t: number;\t// 未読テキスト待ち時間(ミリ秒)\n\t'sn.tagCh.msecWait_Kidoku'\t: number;\t// 既読テキスト待ち時間(ミリ秒)\n\t'TextLayer.Back.Alpha'\t\t: number;\t// バック不透明度。テキストウインドウの背景の濃\n\n\t// [val_name: string]\t\t: T_VAL_DATA;\n}\nexport function creSYS_DATA(): T_H_SYS_DATA {return {\n\t'const.sn.cfg.ns'\t\t\t: '',\t// [import]時のチェック用\n\n\t'const.sn.aPageLog'\t\t\t: '[]',\t// ページ遷移用情報(JSON文字列)\n\t'const.sn.nativeWindow.x'\t: 0,\t// 実数;横座標\n\t'const.sn.nativeWindow.y'\t: 0,\t// 実数;縦座標\n\t'const.sn.nativeWindow.w'\t: CmnLib.stageW,\t// 実数;横幅\n\t'const.sn.nativeWindow.h'\t: CmnLib.stageH,\t// 実数;縦幅\n\t'const.sn.save.place'\t\t: 1,\t// 次のセーブplaceを示す\n\t'const.sn.sound.BGM.volume'\t: 1,\t// BGMの基準音量(buf=\"BGM\"の効果音)\n\t'const.sn.sound.SE.volume'\t: 1,\t// 効果音の基準音量(buf=\"SE\"の効果音)\n\t'const.sn.sound.SYS.volume'\t: 1,\t// システムの基準音量(buf=\"SYS\"の効果音)\n\t// 'const.sn.sound.【buf】.volume': 1,\t// システムの基準音量(buf=\"【buf】\"の効果音)\n\t'sn.auto.msecLineWait'\t\t: 500,\t// 未読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecLineWait_Kidoku': 500,\t// 既読テキストの改行待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait'\t\t: 3500,\t// 未読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.auto.msecPageWait_Kidoku': 3500,// 既読テキストの改ページ待ち時間(ミリ秒)\n\t'sn.skip.mode'\t\t\t\t: 's',\t// スキップモード。\n\t'sn.sound.BGM.vol_mul_talking': 1.0,// ボイス(VOICEバッファの音声)再生中のBGM音量への乗数\n\t'sn.sound.global_volume'\t: (_, _2)=> 1,\t// 全体的な音量を設定する\n\t'sn.sound.movie_volume'\t\t: (_, _2)=> 1,\t// ムービー音量を設定する\n\t'sn.tagCh.canskip'\t\t\t: true,\t// テキストをクリックなどでスキップ可能か\n\t'sn.tagCh.doWait'\t\t\t: true,\t// 未読テキストにウェイトを掛けるか\n\t'sn.tagCh.doWait_Kidoku'\t: true,\t// 既読テキストにウェイトを掛けるか\n\t'sn.tagCh.msecWait'\t\t\t: 10,\t// 未読テキスト待ち時間(ミリ秒)\n\t'sn.tagCh.msecWait_Kidoku'\t: 10,\t// 既読テキスト待ち時間(ミリ秒)\n\t'TextLayer.Back.Alpha'\t\t: 0.5,\t// バック不透明度。テキストウインドウの背景の濃度。0.0で透明、1.0で不透明\n}}\n\n\n// 雑用変数(tmp:)\nexport type T_H_TMP_DATA = {\n\t'const.Date.getDateStr'\t\t: ()=> string;\n\t'const.Date.getTime'\t\t: ()=> number;\n\t'const.sn.bookmark.json'\t: string;\n\n\t// 'const.sn.config.(略)'\t\t: string;\n\t'const.sn.config.window.width'\t: number;\n\t'const.sn.config.window.height'\t: number;\n\t'const.sn.config.book.title'\t: string;\n\t'const.sn.config.book.version'\t: string;\n\n\t'const.sn.displayState'\t: boolean;\n\t\t\t// const.flash.display.Stage.displayState\n\n\t// 'const.sn.frm.(フレーム名)'\t\t: boolean;\n\t// 'const.sn.frm.(フレーム名).alpha'\t: number;\n\t// 'const.sn.frm.(フレーム名).x'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).y'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).scale_x'\t: number;\n\t// 'const.sn.frm.(フレーム名).scale_y'\t: number;\n\t// 'const.sn.frm.(フレーム名).rotate'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).width'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).height'\t\t: number;\n\t// 'const.sn.frm.(フレーム名).visible'\t: boolean;\n\n\t'const.sn.isApp'\t: boolean;\n\t'const.sn.isDbg'\t: boolean;\n\t'const.sn.isPackaged'\t: boolean;\n\t'const.sn.isPaging'\t\t: boolean;\n\t'const.sn.isDarkMode'\t: boolean;\n\t'const.sn.isDebugger'\t: boolean;\n\t'const.sn.isFirstBoot'\t: boolean;\n\t'const.sn.isKidoku'\t\t: boolean;\n\t'const.sn.key.alternate': boolean;\n\t'const.sn.key.back'\t\t: boolean;\n\t'const.sn.key.command'\t: boolean;\n\t'const.sn.key.control'\t: boolean;\n\t'const.sn.key.end'\t\t: boolean;\n\t'const.sn.key.escape'\t: boolean;\n\t'const.sn.last_page_plain_text'\t: string;\n\t'const.sn.last_page_text'\t\t: string;\n\t// 'const.sn.lay.(レイヤ名)'\t\t\t\t\t\t: boolean;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).alpha'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).width'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).height'\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).visible'\t: boolean;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).x'\t\t: number;\n\t// 'const.sn.lay.(レイヤ名).(foreかback).y'\t\t: number;\n\t'const.sn.Math.PI'\t\t: number;\n\t'const.sn.navigator.language'\t: string;\n\t'const.sn.needClick2Play'\t\t: boolean;\n\t'const.sn.platform'\t\t\t\t: string;\n\t'const.sn.screenResolutionX'\t: number;\n\t'const.sn.screenResolutionY'\t: number;\n\t'const.sn.sound.codecs'\t\t\t: string;\n\t// 'const.sn.sound.【buf】.playing': boolean;\n\t'const.sn.aIfStk.length'\t\t: number;\n\t'const.sn.vctCallStk.length'\t: number;\n\t'sn.auto.enabled'\t\t: boolean;\n\t'sn.button.fontFamily'\t: string;\n\t// 'sn.event.domdata.(任意)'\t: string;\n\t'sn.eventArg'\t\t: string;\n\t'sn.eventLabel'\t\t: string;\n\t'sn.skip.all'\t\t: boolean;\n\t'sn.skip.enabled'\t: boolean;\n\t'sn.tagL.enabled'\t: boolean;\n}\nexport function creTMP_DATA(): T_H_TMP_DATA {return {\n\t'const.Date.getDateStr'\t\t: ()=> getDateStr(),\t// 変数参照時の日時を返す\n\t'const.Date.getTime'\t\t: ()=> (new Date).getTime(),\n\t'const.sn.bookmark.json'\t: '[]',\t// SKYNovel内部によるsave:の管理用\n\n\t// 'const.sn.config.(略)'\t: ,\t// prj.jsonの内容を返す\n\t'const.sn.config.window.width'\t: 0,\n\t'const.sn.config.window.height'\t: 0,\n\t'const.sn.config.book.title'\t: '',\n\t'const.sn.config.book.version'\t: '',\n\n\t'const.sn.displayState'\t\t: false,\t// ウインドウ・フルスクリーン状態。trueならフルスクリーン\n\n\t// 'const.sn.frm.(フレーム名)'\t: true,\t// [add_frame]でロードされた id属性が存在するか\n\t// 'const.sn.frm.(フレーム名).alpha'\t: 1,\t// フレームの不透明度\n\t// 'const.sn.frm.(フレーム名).x'\t\t: 0,\t// フレームの座標。画面左上を(0, 0)とする座標。leftやtopでないことに注意\n\t// 'const.sn.frm.(フレーム名).y'\t\t: 0,\t// 実数;縦座標\n\t// 'const.sn.frm.(フレーム名).scale_x': 1,\t// cssでのtransform: scaleの値\n\t// 'const.sn.frm.(フレーム名).scale_y': 1,\t// cssでのtransform: scaleの値\n\t// 'const.sn.frm.(フレーム名).rotate'\t: 0,\t// cssでのrotate、回転角度(単位:deg 度)、正の値は時計回り\n\t// 'const.sn.frm.(フレーム名).width'\t: prjのアプリ横幅画面サイズ,\t// フレームの横幅\n\t// 'const.sn.frm.(フレーム名).height'\t: prjのアプリ縦幅画面サイズ,\t// フレームの縦幅\n\t// 'const.sn.frm.(フレーム名).visible': true,\t// フレームが表示されているか。visible属性の値を返す\n\n\t'const.sn.isApp'\t\t: false,\t// アプリ版か\n\t'const.sn.isDbg'\t\t: false,\t// デバッグモードか\n\t'const.sn.isPackaged'\t: false,\t// パッケージされたアプリか(Electron API - app.isPackaged)\n\t'const.sn.isPaging'\t\t: false,\t// ページ遷移状態か\n\t'const.sn.isDarkMode'\t: false,\t// ダークモードか\n\t'const.sn.isDebugger'\t: true,\t\t// ブラウザ実行、それもVSCode・npmによる「起動:ブラウザ版」上での実行か\n\t'const.sn.isFirstBoot'\t: true,\t\t// ゲームがインストールされてから、初めての起動か(起動されるまでデータが空だったか)\n\t'const.sn.isKidoku'\t\t: true,\t\t// この変数を参照した位置は既読か。参照「後」必ず既読になる点に注意\n\t'const.sn.key.alternate': false,\t// ALTキー(MacならOptionキー)が押されているか\n\t'const.sn.key.back'\t\t: false,\t// back 〃\n\t'const.sn.key.command'\t: false,\t// command 〃\n\t'const.sn.key.control'\t: false,\t// control 〃\n\t'const.sn.key.end'\t\t: false,\t// end 〃\n\t'const.sn.key.escape'\t: false,\t// escape 〃\n\t'const.sn.last_page_plain_text'\t: '',\t// そのページの履歴テキスト(《》文法とルビを含まない)\n\t'const.sn.last_page_text'\t\t: '',\t// そのページの履歴テキスト(《》文法もそのまま)\n\t// 'const.sn.lay.(レイヤ名)'\t\t: true,\t// レイヤが[add_lay]され存在するか\n\t// 'const.sn.lay.(レイヤ名).(foreかback).alpha'\t\t: 0.0〜1.0,\t// レイヤの不透明度\n\t// 'const.sn.lay.(レイヤ名).(foreかback).width'\t\t: 1,\t// レイヤの横幅。ただし文字レイヤの場合は1、画像レイヤの場合、画像読込後でないと0\n\t// 'const.sn.lay.(レイヤ名).(foreかback).height'\t\t: 1,\t// レイヤの縦幅。ただし文字レイヤの場合は1、画像レイヤの場合、画像読込後でないと0\n\t// 'const.sn.lay.(レイヤ名).(foreかback).visible'\t\t: true,\t// レイヤが表示されているか。visible属性の値を返す\n\t// 'const.sn.lay.(レイヤ名).(foreかback).x'\t\t: 0,\t// 実数;横座標</td><td rowspan=\"2\">レイヤの座標。画面左上を(0, 0)とする座標。leftやtopでないことに注意\n\t// 'const.sn.lay.(レイヤ名).(foreかback).y'\t\t: 0,\t// 実数;縦座標\n\t'const.sn.Math.PI'\t\t: Math.PI,\t// 円周率\n\t'const.sn.navigator.language': 'jp',\t// ユーザーが最優先に設定している言語設定\n\t'const.sn.needClick2Play'\t: false,\n\t\t// ブラウザ実行で、クリックされるまで音声再生が差し止められている状態か。なにかクリックされれば falseになる\n\t'const.sn.platform'\t\t\t: CmnLib.platform,\t// 環境による\n\n\t'const.sn.screenResolutionX': screen.availWidth,\t// 画面の最大水平解像度\n\t'const.sn.screenResolutionY': screen.availHeight,\t// 画面の最大垂直解像度\n\t\t// ここでは正確な値は分からない。保存していた前回終了時の位置にウインドウを動かしてから、そのディスプレイののサイズを取得するまでは。\n\n\t'const.sn.sound.codecs'\t\t: '',\t// ゲーム実行環境がどのコーデックをサポートしているか\n\t// 'const.sn.sound.【buf】.playing'\t\t: 再生状態による,\t// サウンドバッファが再生中か<br/>\n\t'const.sn.aIfStk.length'\t: 1,\t// IFスタックの深さ([if]するたびに増)\n\t'const.sn.vctCallStk.length': 0,\t// コールスタックの深さ([call]するたびに増)\n\t'sn.auto.enabled'\t\t: false,\t// 自動読みすすみモードかどうか\n\t'sn.button.fontFamily'\t: '\\'Hiragino Sans\\', \\'Hiragino Kaku Gothic ProN\\', \\'游ゴシック Medium\\', meiryo, sans-serif',\t// 文字ボタンフォントを指定\n\t// 'sn.event.domdata.(任意)'\t\t: ''[event]でフレーム内のHTML要素に登録したイベントで、そのイベント発生時、HTML要素のdata-(任意)属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.eventArg'\t\t: '',\t// [button]等のイベント発生時、そのボタンタグのarg属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.eventLabel'\t\t: '',\t// [button]等のイベント発生時、そのボタンタグのlabel属性で指定された値。使い道は開発者が自由に決めていい\n\t'sn.skip.all'\t\t: false,\t// false(初期値)なら既読のみをスキップ\n\t'sn.skip.enabled'\t: false,\t// 次の選択肢(/未読)まで進む が有効か\n\t'sn.tagL.enabled'\t: true,\t\t// 頁末まで一気に読み進むか(l無視)\n}}\n\n\nexport type Scope = 'tmp'|'save'|'sys'|'mp';\n\nexport type T_ProcVal = ()=> T_VAL_BSN;\n\nexport type T_fncSetVal = (arg_name: string, val: T_VAL_BSN, autocast?: boolean)=> void;\n\nexport type T_Variable = {\n\tinit(): Promise<void>;\n\tflush(): void;\n\tsetDoRecProc(doRecProc: (doRec: boolean)=> void): void;\n\n\tgetVal(arg_name: string, def?: number | string, touch?: boolean): T_VAL_DATA;\n\tsetVal_Nochk(scope: Scope, nm: string, val: T_VAL_BSNU, autocast?: boolean): void;\n\n\tdefTmp(name: string, fnc: T_ProcVal): void;\n\tcloneMp(): T_H_VAL_MP;\n\tsetMp(mp: T_H_VAL_MP): void;\n\tsetMark(place: number, mark: T_Mark): void;\n\tgetMark(place: number): T_Mark | undefined;\n\tcloneSave(): T_H_SAVE_DATA;\n\tmark2save(mark: T_Mark): void;\n\n\ttouchAreaKidoku(fn: string): Areas;\n\tgetAreaKidoku(fn: string): Areas | undefined;\n\tsaveKidoku(): void;\n\tupdateData(data: T_Data4Vari): void;\n\n\tdefValTrg(name: string, fnc: T_fncSetVal): void;\n\n\tdoRecLog(): boolean;\n\n\tget tagCh_doWait(): boolean;\n\tget tagCh_doWait_Kidoku(): boolean;\n\tget tagCh_msecWait(): number;\n\tget tagCh_msecWait_Kidoku(): number;\n}\n\nexport type T_H_VAL_MARK\t= {[place: number]: T_Mark};\nexport type T_H_VAL_KIDOKU\t= {[fn: string]: T_H_Areas};\n\n\nexport type T_Data4Vari = {\n\tsys\t\t: T_H_SYS_DATA;\n\tmark\t: T_H_VAL_MARK;\n\tkidoku\t: T_H_VAL_KIDOKU;\n}\n\nexport type T_Mark = {\n\thSave\t: T_H_SAVE_DATA;\n\thPages\t: T_HPage;\n\taIfStk\t: number[];\n\tjson?\t: TArg;\n}\n\n\n// =============== EventMng\nexport type T_Evt2Fnc\t= (e: Event)=> void;\nexport type T_HEvt2Fnc\t= {[name: string]: T_Evt2Fnc;};\n\n\n// =============== FrameMng, LayerMng\nexport type T_GetFrm = {\n\tgetFrmDisabled\t: (id: string)=> boolean;\n};\n\n\n// =============== Pages\nexport type T_HPage = {[name: string]: T_Page};\nexport type T_Page = {\n\tcls\t\t: string;\n\tfore\t: T_RecordPlayBack_lay;\n\tback\t: T_RecordPlayBack_lay;\n}\n\n\n// =============== RubySpliter\nexport type T_PutCh = (ch: string, ruby: string)=> void\n\n\n// =============== Volume change event notification (GrpLayer)\nexport type T_NoticeChgVolume = (vol: number)=> void\n"],"mappings":";;AAyIA,SAAgB,IAA6B;CAAC,OAAO;EACpD,iBAAmB;EAEnB,2BAA2B;EAC3B,wBAAyB;EACzB,wBAAyB;EACzB,qBAAsB;EAGtB,sBAAuB;EAEvB,eAAiB;EACjB,iBAAkB;EAClB,wBAAyB;EACzB,qBAAsB;EACtB,sBAAuB;CAExB;AAAC;AAkCD,SAAgB,IAA4B;CAAC,OAAO;EACnD,mBAAsB;EAEtB,qB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Lib.ts
|
|
3
|
+
function t(e) {
|
|
3
4
|
return parseInt(String(e), 10);
|
|
4
5
|
}
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
return
|
|
6
|
+
function n(e) {
|
|
7
|
+
let t = parseInt(String(e), 10);
|
|
8
|
+
return t < 0 ? -t : t;
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
return String(
|
|
10
|
+
function r(e = "/", t = " ", n = ":", r = "") {
|
|
11
|
+
let i = /* @__PURE__ */ new Date();
|
|
12
|
+
return String(i.getFullYear()) + e + String(100 + i.getMonth() + 1).slice(1, 3) + e + String(100 + i.getDate()).slice(1, 3) + t + String(100 + i.getHours()).slice(1, 3) + n + String(100 + i.getMinutes()).slice(1, 3) + (r === "" ? "" : r + String(i.getMilliseconds()));
|
|
12
13
|
}
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
let e = document.getElementsByTagName("head")[0],
|
|
16
|
-
for (let
|
|
17
|
-
let
|
|
18
|
-
|
|
14
|
+
var i = "/* SKYNovel */";
|
|
15
|
+
function a() {
|
|
16
|
+
let e = document.getElementsByTagName("head")[0], t = e.children.length;
|
|
17
|
+
for (let n = t - 1; n >= 0; --n) {
|
|
18
|
+
let t = e.children[n];
|
|
19
|
+
t instanceof HTMLStyleElement && t.innerText.startsWith(i) && e.removeChild(t);
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
let
|
|
23
|
-
|
|
22
|
+
function o(e) {
|
|
23
|
+
let t = document.createElement("style");
|
|
24
|
+
t.innerHTML = i + e, document.getElementsByTagName("head")[0].appendChild(t);
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
let
|
|
28
|
-
if (!(
|
|
29
|
-
if (isNaN(
|
|
30
|
-
return e[
|
|
26
|
+
var s = "pointerdown", c = "pointerdown", l = "keydown", u = "compChIn";
|
|
27
|
+
function d(e, t, n) {
|
|
28
|
+
let r = e[t];
|
|
29
|
+
if (!(t in e)) {
|
|
30
|
+
if (isNaN(n)) throw `[${e[":タグ名"] ?? ""}]属性 ${t} は必須です`;
|
|
31
|
+
return e[t] = n, n;
|
|
31
32
|
}
|
|
32
|
-
let
|
|
33
|
-
if (isNaN(
|
|
34
|
-
return e[
|
|
33
|
+
let i = String(r).startsWith("0x") ? parseInt(r) : parseFloat(r);
|
|
34
|
+
if (isNaN(i)) throw `[${e[":タグ名"] ?? ""}]属性 ${t} の値【${String(r)}】が数値ではありません`;
|
|
35
|
+
return e[t] = i, i;
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
-
if (!(
|
|
38
|
-
let
|
|
39
|
-
if (
|
|
40
|
-
let
|
|
41
|
-
return e[
|
|
37
|
+
function f(e, t, n) {
|
|
38
|
+
if (!(t in e)) return e[t] = n, n;
|
|
39
|
+
let r = e[t];
|
|
40
|
+
if (r === null) return !1;
|
|
41
|
+
let i = String(r);
|
|
42
|
+
return e[t] = i !== "false" && !!i;
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function p(e) {
|
|
44
45
|
if (e.startsWith("#")) return parseInt(e.slice(1), 16);
|
|
45
|
-
let
|
|
46
|
-
if (!isNaN(
|
|
46
|
+
let t = Number(e);
|
|
47
|
+
if (!isNaN(t)) return t;
|
|
47
48
|
if (e === "black") return 0;
|
|
48
|
-
|
|
49
|
-
let
|
|
50
|
-
if (
|
|
51
|
-
return parseInt(
|
|
49
|
+
y.cc4ColorName.fillStyle = e;
|
|
50
|
+
let n = y.cc4ColorName.fillStyle;
|
|
51
|
+
if (n === "#000000") throw `色名前 ${e} が異常です`;
|
|
52
|
+
return parseInt(n.slice(1), 16);
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
-
let
|
|
55
|
-
return
|
|
54
|
+
function m(e, t, n) {
|
|
55
|
+
let r = e[t];
|
|
56
|
+
return r ? e[t] = p(String(r)) : (e[t] = n, n);
|
|
56
57
|
}
|
|
57
|
-
var
|
|
58
|
-
function
|
|
59
|
-
let
|
|
60
|
-
return `[${e[":タグ名"] ?? ""}] ${
|
|
61
|
-
${String(e[
|
|
62
|
-
${"^".padStart(Number(
|
|
58
|
+
var h = /JSON at position (\d+)$/;
|
|
59
|
+
function g(e, t = "", n = "") {
|
|
60
|
+
let r = (h.exec(n) ?? ["", ""])[1];
|
|
61
|
+
return `[${e[":タグ名"] ?? ""}] ${t} 属性の解析エラー : ${n}
|
|
62
|
+
${String(e[t])}${r ? `
|
|
63
|
+
${"^".padStart(Number(r))}` : ""}`;
|
|
63
64
|
}
|
|
64
|
-
var
|
|
65
|
-
function
|
|
66
|
-
return (
|
|
65
|
+
var _ = /^[^/.]+$|[^/]+(?=\.)/;
|
|
66
|
+
function v(e) {
|
|
67
|
+
return (_.exec(e) ?? [""])[0];
|
|
67
68
|
}
|
|
68
|
-
var
|
|
69
|
+
var y = class t {
|
|
69
70
|
static async init() {
|
|
70
|
-
let
|
|
71
|
-
this.platform = JSON.stringify(
|
|
71
|
+
let t = await import("./platform.js").then((t) => /* @__PURE__ */ e(t.default));
|
|
72
|
+
this.platform = JSON.stringify(t), this.plat_desc = t.description ?? "", this.isSafari = t.name === "Safari", this.isFirefox = t.name === "Firefox", this.isMac = (t.os?.family ?? "").includes("OS X"), this.isMobile = !/(Windows|OS X)/.test(t.os?.family ?? "");
|
|
72
73
|
}
|
|
73
74
|
static stageW = 0;
|
|
74
75
|
static stageH = 0;
|
|
@@ -83,12 +84,13 @@ var CmnLib = class g {
|
|
|
83
84
|
static isDbg = !1;
|
|
84
85
|
static isPackaged = !1;
|
|
85
86
|
static needClick2Play() {
|
|
86
|
-
return "AudioContext" in globalThis ? (
|
|
87
|
+
return "AudioContext" in globalThis ? (t.#e = new globalThis.AudioContext(), t.needClick2Play = () => t.#e.state === "suspended") : t.needClick2Play = () => !1, t.needClick2Play();
|
|
87
88
|
}
|
|
88
89
|
static #e;
|
|
89
90
|
static isDarkMode = !1;
|
|
90
91
|
static cc4ColorName;
|
|
91
92
|
};
|
|
92
|
-
|
|
93
|
+
//#endregion
|
|
94
|
+
export { u as a, m as c, v as d, a as f, n as g, p as h, l as i, d as l, g as m, s as n, o, t as p, c as r, f as s, y as t, r as u };
|
|
93
95
|
|
|
94
96
|
//# sourceMappingURL=CmnLib.js.map
|