@famibee/skynovel 1.22.3 → 1.24.0
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/CHANGELOG.md +49 -0
- package/app.js +106 -85
- package/core/lib/sn/Button.d.ts.map +1 -1
- package/core/lib/sn/CmnLib.d.ts +3 -0
- package/core/lib/sn/CmnLib.d.ts.map +1 -1
- package/core/lib/sn/Config.d.ts.map +1 -1
- package/core/lib/sn/Layer.d.ts.map +1 -1
- package/core/lib/sn/LayerMng.d.ts.map +1 -1
- package/core/lib/sn/Main.d.ts.map +1 -1
- package/core/lib/sn/PropParser.d.ts.map +1 -1
- package/core/lib/sn/TxtLayer.d.ts +1 -35
- package/core/lib/sn/TxtLayer.d.ts.map +1 -1
- package/core/lib/sn/TxtStage.d.ts +6 -6
- package/core/lib/sn/TxtStage.d.ts.map +1 -1
- package/package.json +3 -3
- package/web.js +106 -85
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropParser.d.ts","sourceRoot":"","sources":["../../src/sn/PropParser.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAKtD,qBAAa,UAAW,YAAW,WAAW;;IAGjC,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,SAAS,EAAE,EAAE,SAAO;IAiItD,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG;
|
|
1
|
+
{"version":3,"file":"PropParser.d.ts","sourceRoot":"","sources":["../../src/sn/PropParser.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAKtD,qBAAa,UAAW,YAAW,WAAW;;IAGjC,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,SAAS,EAAE,EAAE,SAAO;IAiItD,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG;IAoKrB,eAAe,QAAS,MAAM,YAEvB;IAOP,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,GAAG,SAAS;CAqCzE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Layer } from './Layer';
|
|
2
2
|
import { IEvtMng } from './CmnLib';
|
|
3
3
|
import { IVariable, IHTag, HArg, IMain } from './CmnInterface';
|
|
4
|
-
import { IInfTxLay } from './TxtStage';
|
|
5
4
|
import { Config } from './Config';
|
|
6
5
|
import { IMakeDesignCast } from './LayerMng';
|
|
7
6
|
import { Renderer } from 'pixi.js';
|
|
@@ -32,40 +31,7 @@ export declare class TxtLayer extends Layer {
|
|
|
32
31
|
readonly addButton: (hArg: HArg) => Promise<void>;
|
|
33
32
|
canFocus(): boolean;
|
|
34
33
|
clearLay(hArg: HArg): void;
|
|
35
|
-
readonly record: () =>
|
|
36
|
-
name: string;
|
|
37
|
-
idx: number;
|
|
38
|
-
alpha: number;
|
|
39
|
-
blendMode: import("pixi.js").BLEND_MODES;
|
|
40
|
-
rotation: number;
|
|
41
|
-
scale_x: number;
|
|
42
|
-
scale_y: number;
|
|
43
|
-
pivot_x: number;
|
|
44
|
-
pivot_y: number;
|
|
45
|
-
x: number;
|
|
46
|
-
y: number;
|
|
47
|
-
visible: boolean;
|
|
48
|
-
} & {
|
|
49
|
-
enabled: boolean;
|
|
50
|
-
r_align: string;
|
|
51
|
-
b_do: string | null;
|
|
52
|
-
b_pic: string;
|
|
53
|
-
b_color: number;
|
|
54
|
-
b_alpha: number;
|
|
55
|
-
b_alpha_isfixed: boolean;
|
|
56
|
-
ffs: string;
|
|
57
|
-
txs: {
|
|
58
|
-
infTL: IInfTxLay;
|
|
59
|
-
cssText: string;
|
|
60
|
-
left: number;
|
|
61
|
-
idc_hArg: HArg;
|
|
62
|
-
ch_filter: any[] | null;
|
|
63
|
-
fi_easing: string;
|
|
64
|
-
fo_easing: string;
|
|
65
|
-
};
|
|
66
|
-
strNoFFS: string;
|
|
67
|
-
btns: string[];
|
|
68
|
-
};
|
|
34
|
+
readonly record: () => any;
|
|
69
35
|
playback(hLay: any, aPrm: Promise<void>[]): void;
|
|
70
36
|
snapshot(rnd: Renderer, re: () => void): void;
|
|
71
37
|
snapshot_end(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TxtLayer.d.ts","sourceRoot":"","sources":["../../src/sn/TxtLayer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAe,OAAO,
|
|
1
|
+
{"version":3,"file":"TxtLayer.d.ts","sourceRoot":"","sources":["../../src/sn/TxtLayer.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAe,OAAO,EAAgE,MAAM,UAAU,CAAC;AAC9G,OAAO,EAAC,SAAS,EAAE,KAAK,EAAE,IAAI,EAAU,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErE,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAIhC,OAAO,EAAW,eAAe,EAAC,MAAM,YAAY,CAAC;AAErD,OAAO,EAA6C,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE7E,qBAAa,QAAS,SAAQ,KAAK;;IAKlC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAI,IAAI,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAI,OAAO,GAAG,IAAI;IAyHhI,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO;;IA6DpC,OAAO;IAWhB,IAAa,IAAI,CAAC,EAAE,EAAE,MAAM,EAAyC;IACrE,IAAa,IAAI,IADK,MAAM,CACY;IAG/B,SAAS;IACT,iBAAiB;IAEjB,GAAG,CAAC,IAAI,EAAE,IAAI;IAqCvB,IAAa,KAAK,WAA8B;IAChD,IAAa,MAAM,WAA+B;IA4ElD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAuDnC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO;IAM9B,MAAM,CAAC,GAAG,OAAQ,MAAM,YAAO;IAE/B,KAAK,UAAS;IAEd,OAAO,CAAC,eAAe;IAqDvB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IA6TzB,QAAQ,CAAC,KAAK,gBAGb;IAED,SAAS,IAAI,IAAI;IAWjB,IAAI,QAAQ,WAA8C;IAE1D,IAAI,OAAO,YAA0C;IACrD,IAAI,OAAO,CAAC,CAAC,SAAA,EAAsC;IAEnD,QAAQ,CAAC,SAAS,SAAU,IAAI,mBAO7B;IACH,QAAQ,IAAI,OAAO;IAMV,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAOnC,SAAkB,MAAM,YAkBrB;IACM,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI;IA0BhD,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAK,IAAI;IAIrC,YAAY;IAEZ,cAAc,CAAC,GAAG,EAAE,eAAe;IAInC,sBAAsB,CAAC,GAAG,EAAE,eAAe;IAK3C,cAAc;IACd,sBAAsB;IAItB,IAAI,IAAI,MAAM;CAoBvB"}
|
|
@@ -3,7 +3,7 @@ import { HArg } from './CmnInterface';
|
|
|
3
3
|
import { Config } from './Config';
|
|
4
4
|
import { IMakeDesignCast } from './LayerMng';
|
|
5
5
|
import { Container, Sprite, Renderer } from 'pixi.js';
|
|
6
|
-
|
|
6
|
+
interface IInfTxLay {
|
|
7
7
|
fontsize: number;
|
|
8
8
|
$width: number;
|
|
9
9
|
$height: number;
|
|
@@ -14,19 +14,18 @@ export interface IInfTxLay {
|
|
|
14
14
|
}
|
|
15
15
|
export declare class TxtStage extends Container {
|
|
16
16
|
#private;
|
|
17
|
-
private infTL;
|
|
18
17
|
private readonly spLay;
|
|
19
18
|
private readonly canFocus;
|
|
20
19
|
static init(cfg: Config): void;
|
|
21
20
|
static setEvtMng(evtMng: IEvtMng): void;
|
|
22
21
|
static destroy(): void;
|
|
23
|
-
|
|
24
|
-
constructor(infTL: IInfTxLay, spLay: Sprite, canFocus: () => boolean);
|
|
22
|
+
constructor(spLay: Sprite, canFocus: () => boolean);
|
|
25
23
|
lay(hArg: HArg): void;
|
|
26
24
|
cvsResize(): void;
|
|
27
25
|
get tategaki(): boolean;
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
get infTL(): IInfTxLay;
|
|
27
|
+
get getWidth(): number;
|
|
28
|
+
get getHeight(): number;
|
|
30
29
|
setSize(width: number, height: number): void;
|
|
31
30
|
goTxt(aSpan: string[]): void;
|
|
32
31
|
skipChIn(): boolean;
|
|
@@ -67,4 +66,5 @@ export declare class TxtStage extends Container {
|
|
|
67
66
|
dump(): string;
|
|
68
67
|
destroy(): void;
|
|
69
68
|
}
|
|
69
|
+
export {};
|
|
70
70
|
//# sourceMappingURL=TxtStage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TxtStage.d.ts","sourceRoot":"","sources":["../../src/sn/TxtStage.ts"],"names":[],"mappings":"AAOA,OAAO,EAAS,OAAO,EAA6B,MAAM,UAAU,CAAC;AACrE,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAIhC,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAC,SAAS,EAAW,MAAM,EAAuB,QAAQ,EAAQ,MAAM,SAAS,CAAC;AAGzF,
|
|
1
|
+
{"version":3,"file":"TxtStage.d.ts","sourceRoot":"","sources":["../../src/sn/TxtStage.ts"],"names":[],"mappings":"AAOA,OAAO,EAAS,OAAO,EAA6B,MAAM,UAAU,CAAC;AACrE,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAIhC,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAC,SAAS,EAAW,MAAM,EAAuB,QAAQ,EAAQ,MAAM,SAAS,CAAC;AAGzF,UAAU,SAAS;IAClB,QAAQ,EAAG,MAAM,CAAC;IAClB,MAAM,EAAI,MAAM,CAAC;IACjB,OAAO,EAAI,MAAM,CAAC;IAClB,QAAQ,EAAG,MAAM,CAAC;IAClB,SAAS,EAAG,MAAM,CAAC;IACnB,OAAO,EAAI,MAAM,CAAC;IAClB,UAAU,EAAG,MAAM,CAAC;CACpB;AAiBD,qBAAa,QAAS,SAAQ,SAAS;;IAmD1B,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAU,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAhDrE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAS9B,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO;IAEhC,MAAM,CAAC,OAAO;gBAqCe,KAAK,EAAE,MAAM,EAAmB,QAAQ,EAAE,MAAK,OAAO;IAenF,GAAG,CAAC,IAAI,EAAE,IAAI;IAyEd,SAAS;IAWT,IAAI,QAAQ,YAA4B;IAIxC,IAAI,KAAK,IAAI,SAAS,CAAqB;IAC3C,IAAI,QAAQ,WAA8B;IAC1C,IAAI,SAAS,WAA+B;IAE5C,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IA8WrC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE;IAkRrB,QAAQ,IAAI,OAAO;IAWnB,MAAM,CAAC,WAAW;IAIlB,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM;IAChC,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,GAAG;IA2CnC,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM;;;;;;;;;;;;;IACjC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,GAAG;IA+BpC,SAAS,CAAC,GAAG,EAAE,MAAM;IAQrB,MAAM,CAAC,QAAQ;IAkGf,KAAK,IAAI,QAAQ;IAqBjB,MAAM;;;;;;;;;IAWN,QAAQ,CAAC,IAAI,EAAE,GAAG;IAelB,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAK,IAAI;IAgBrC,YAAY;IAIZ,cAAc,CAAC,GAAG,EAAE,eAAe;IAOnC,cAAc;IAEd,IAAI,IAAI,MAAM;IAaL,OAAO;CAOhB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@famibee/skynovel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.0",
|
|
4
4
|
"description": "webgl novelgame framework",
|
|
5
5
|
"main": "core/web.js",
|
|
6
6
|
"types": "core/lib/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/electron-json-storage": "^4.5.0",
|
|
30
30
|
"@types/fs-extra": "^9.0.13",
|
|
31
31
|
"@types/mocha": "^9.0.0",
|
|
32
|
-
"@types/node": "^
|
|
32
|
+
"@types/node": "^17.0.0",
|
|
33
33
|
"@types/parsimmon": "^1.10.6",
|
|
34
34
|
"@types/platform": "^1.3.4",
|
|
35
35
|
"@types/power-assert": "^1.5.8",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"semantic-release": "^18.0.1",
|
|
44
44
|
"ts-loader": "^9.2.6",
|
|
45
45
|
"ts-node": "^10.4.0",
|
|
46
|
-
"typescript": "^4.5.
|
|
46
|
+
"typescript": "^4.5.4",
|
|
47
47
|
"webpack": "^5.65.0",
|
|
48
48
|
"webpack-cli": "^4.9.1",
|
|
49
49
|
"webpack-dev-server": "^4.6.0"
|
package/web.js
CHANGED
|
@@ -68253,7 +68253,7 @@ class Button extends pixi_js_1.Container {
|
|
|
68253
68253
|
align: 'center',
|
|
68254
68254
|
dropShadow: true,
|
|
68255
68255
|
dropShadowAlpha: 0.7,
|
|
68256
|
-
dropShadowColor: '
|
|
68256
|
+
dropShadowColor: 'white',
|
|
68257
68257
|
dropShadowBlur: 7,
|
|
68258
68258
|
dropShadowDistance: 0,
|
|
68259
68259
|
fill: 'black',
|
|
@@ -68469,7 +68469,7 @@ exports.CallStack = CallStack;
|
|
|
68469
68469
|
"use strict";
|
|
68470
68470
|
|
|
68471
68471
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
68472
|
-
exports.CmnLib = exports.getExt = exports.getFn = exports.argChk_Boolean = exports.argChk_Num = exports.addStyle = exports.initStyle = exports.cnvTweenArg = exports.hMemberCnt = exports.getDateStr = exports.uint = exports.int = void 0;
|
|
68472
|
+
exports.CmnLib = exports.getExt = exports.getFn = exports.argChk_Color = exports.parseColor = exports.argChk_Boolean = exports.argChk_Num = exports.addStyle = exports.initStyle = exports.cnvTweenArg = exports.hMemberCnt = exports.getDateStr = exports.uint = exports.int = void 0;
|
|
68473
68473
|
function int(o) { return parseInt(String(o), 10); }
|
|
68474
68474
|
exports.int = int;
|
|
68475
68475
|
function uint(o) {
|
|
@@ -68571,6 +68571,28 @@ function argChk_Boolean(hash, name, def) {
|
|
|
68571
68571
|
return hash[name] = (v2 === 'false') ? false : Boolean(v2);
|
|
68572
68572
|
}
|
|
68573
68573
|
exports.argChk_Boolean = argChk_Boolean;
|
|
68574
|
+
function parseColor(v) {
|
|
68575
|
+
if (v.charAt(0) === '#')
|
|
68576
|
+
return parseInt(v.slice(1), 16);
|
|
68577
|
+
const n = Number(v);
|
|
68578
|
+
if (!isNaN(n))
|
|
68579
|
+
return n;
|
|
68580
|
+
if (v === 'black')
|
|
68581
|
+
return 0;
|
|
68582
|
+
CmnLib.cc4ColorName.fillStyle = v;
|
|
68583
|
+
const cc = CmnLib.cc4ColorName.fillStyle;
|
|
68584
|
+
if (cc === '#000000')
|
|
68585
|
+
throw `色名前 ${v} が異常です`;
|
|
68586
|
+
return parseInt(cc.slice(1), 16);
|
|
68587
|
+
}
|
|
68588
|
+
exports.parseColor = parseColor;
|
|
68589
|
+
function argChk_Color(hash, name, def) {
|
|
68590
|
+
const v = hash[name];
|
|
68591
|
+
if (!v)
|
|
68592
|
+
return hash[name] = def;
|
|
68593
|
+
return hash[name] = parseColor(String(v));
|
|
68594
|
+
}
|
|
68595
|
+
exports.argChk_Color = argChk_Color;
|
|
68574
68596
|
const REG_FN = /^[^\/\.]+$|[^\/]+(?=\.)/;
|
|
68575
68597
|
function getFn(p) { return (p.match(REG_FN) ?? [''])[0]; }
|
|
68576
68598
|
exports.getFn = getFn;
|
|
@@ -68801,12 +68823,7 @@ class Config {
|
|
|
68801
68823
|
this.oCfg.book = { ...this.oCfg.book, ...oCfg.book };
|
|
68802
68824
|
this.oCfg.log.max_len = oCfg.log?.max_len?.max_len ?? this.oCfg.log.max_len;
|
|
68803
68825
|
this.oCfg.init = { ...this.oCfg.init, ...oCfg.init };
|
|
68804
|
-
|
|
68805
|
-
for (const n in this.oCfg.init) {
|
|
68806
|
-
const v = String(this.oCfg.init[n]);
|
|
68807
|
-
if (v.charAt(0) === '#')
|
|
68808
|
-
this.oCfg.init[n] = parseInt(v.slice(1), 16);
|
|
68809
|
-
}
|
|
68826
|
+
this.oCfg.init.bg_color = (0, CmnLib_1.parseColor)(String(this.oCfg.init.bg_color));
|
|
68810
68827
|
this.oCfg.debug = { ...this.oCfg.debug, ...oCfg.debug };
|
|
68811
68828
|
CmnLib_1.CmnLib.debugLog = this.oCfg.debug.debugLog;
|
|
68812
68829
|
this.oCfg.debuger_token = oCfg.debuger_token;
|
|
@@ -69578,7 +69595,7 @@ class TxtLayDesignCast extends DesignCast {
|
|
|
69578
69595
|
};
|
|
69579
69596
|
}
|
|
69580
69597
|
getRect() {
|
|
69581
|
-
const it = this.ts.
|
|
69598
|
+
const it = this.ts.infTL;
|
|
69582
69599
|
return new pixi_js_1.Rectangle(this.spLay.x, this.spLay.y, it.$width, it.$height);
|
|
69583
69600
|
}
|
|
69584
69601
|
cnvPosArg(left, top) { return { left, top }; }
|
|
@@ -69606,12 +69623,12 @@ class TxtLayPadDesignCast extends DesignCast {
|
|
|
69606
69623
|
this.rotatable = false;
|
|
69607
69624
|
}
|
|
69608
69625
|
getRect() {
|
|
69609
|
-
const it = this.ts.
|
|
69626
|
+
const it = this.ts.infTL;
|
|
69610
69627
|
return new pixi_js_1.Rectangle(it.pad_left, it.pad_top, it.$width - it.pad_left - it.pad_right, it.$height - it.pad_top - it.pad_bottom);
|
|
69611
69628
|
}
|
|
69612
69629
|
cnvPosArg(pl, pt) { return { pl, pt }; }
|
|
69613
69630
|
cnvSizeArg(w, h) {
|
|
69614
|
-
const it = this.ts.
|
|
69631
|
+
const it = this.ts.infTL;
|
|
69615
69632
|
return {
|
|
69616
69633
|
pr: it.$width - it.pad_left - w,
|
|
69617
69634
|
pb: it.$height - it.pad_top - h,
|
|
@@ -69622,7 +69639,7 @@ class TxtLayPadDesignCast extends DesignCast {
|
|
|
69622
69639
|
this.ts.lay({ ...this.cnvSizeArg(w, h), ':redraw': true });
|
|
69623
69640
|
}
|
|
69624
69641
|
setOther(hPrm) {
|
|
69625
|
-
const it = this.ts.
|
|
69642
|
+
const it = this.ts.infTL;
|
|
69626
69643
|
if ('pl' in hPrm || 'pt' in hPrm) {
|
|
69627
69644
|
this.setPos(this.rect.x = parseFloat(DesignCast.prpPrs.getValAmpersand(hPrm.pl?.val ?? `${it.pad_left}`)), this.rect.y = parseFloat(DesignCast.prpPrs.getValAmpersand(hPrm.pt?.val ?? `${it.pad_top}`)));
|
|
69628
69645
|
this.cvsResize();
|
|
@@ -69650,7 +69667,7 @@ exports.TxtLayPadDesignCast = TxtLayPadDesignCast;
|
|
|
69650
69667
|
_TxtLayPadDesignCast_instances = new WeakSet(), _TxtLayPadDesignCast_procHint = function _TxtLayPadDesignCast_procHint(left, top, dx, dy) {
|
|
69651
69668
|
const x = this.rect.x, y = this.rect.y;
|
|
69652
69669
|
const w = this.rect.width, h = this.rect.height;
|
|
69653
|
-
const it = this.ts.
|
|
69670
|
+
const it = this.ts.infTL;
|
|
69654
69671
|
const pl = (0, CmnLib_1.int)(x + dx / CmnLib_1.CmnLib.cvsScale);
|
|
69655
69672
|
const pt = (0, CmnLib_1.int)(y + dy / CmnLib_1.CmnLib.cvsScale);
|
|
69656
69673
|
const pr = (0, CmnLib_1.int)(it.$width - pl - w);
|
|
@@ -72397,14 +72414,14 @@ _a = LayerMng, _LayerMng_stage = new WeakMap(), _LayerMng_fore = new WeakMap(),
|
|
|
72397
72414
|
if (this.sys.canCapturePage(fn))
|
|
72398
72415
|
return false;
|
|
72399
72416
|
const ext = (0, CmnLib_1.getExt)(fn);
|
|
72400
|
-
const b_color = hArg
|
|
72417
|
+
const b_color = (0, CmnLib_1.argChk_Color)(hArg, 'b_color', this.cfg.oCfg.init.bg_color);
|
|
72401
72418
|
const rnd = (0, pixi_js_1.autoDetectRenderer)({
|
|
72402
72419
|
width: (0, CmnLib_1.argChk_Num)(hArg, 'width', CmnLib_1.CmnLib.stageW),
|
|
72403
72420
|
height: (0, CmnLib_1.argChk_Num)(hArg, 'height', CmnLib_1.CmnLib.stageH),
|
|
72404
72421
|
backgroundAlpha: (b_color > 0x1000000) && (ext === 'png') ? 0 : 1,
|
|
72405
72422
|
antialias: (0, CmnLib_1.argChk_Boolean)(hArg, 'smoothing', false),
|
|
72406
72423
|
preserveDrawingBuffer: true,
|
|
72407
|
-
backgroundColor:
|
|
72424
|
+
backgroundColor: b_color & 0xFFFFFF,
|
|
72408
72425
|
autoDensity: true,
|
|
72409
72426
|
});
|
|
72410
72427
|
const a = [];
|
|
@@ -73075,10 +73092,15 @@ class Main {
|
|
|
73075
73092
|
}
|
|
73076
73093
|
exports.Main = Main;
|
|
73077
73094
|
_Main_cfg = new WeakMap(), _Main_appPixi = new WeakMap(), _Main_hTag = new WeakMap(), _Main_val = new WeakMap(), _Main_prpPrs = new WeakMap(), _Main_sndMng = new WeakMap(), _Main_scrItr = new WeakMap(), _Main_dbgMng = new WeakMap(), _Main_layMng = new WeakMap(), _Main_evtMng = new WeakMap(), _Main_fncNext = new WeakMap(), _Main_alzTagArg = new WeakMap(), _Main_inited = new WeakMap(), _Main_fncTicker = new WeakMap(), _Main_fncresume = new WeakMap(), _Main_isLoop = new WeakMap(), _Main_destroyed = new WeakMap(), _Main_clone_cvs = new WeakMap(), _Main_instances = new WeakSet(), _Main_init = async function _Main_init() {
|
|
73095
|
+
const cc = document.createElement('canvas')?.getContext('2d');
|
|
73096
|
+
if (!cc)
|
|
73097
|
+
throw 'argChk_Color err';
|
|
73098
|
+
CmnLib_1.CmnLib.cc4ColorName = cc;
|
|
73078
73099
|
const hApp = {
|
|
73079
73100
|
width: __classPrivateFieldGet(this, _Main_cfg, "f").oCfg.window.width,
|
|
73080
73101
|
height: __classPrivateFieldGet(this, _Main_cfg, "f").oCfg.window.height,
|
|
73081
|
-
backgroundColor: __classPrivateFieldGet(this, _Main_cfg, "f").oCfg.init.bg_color
|
|
73102
|
+
backgroundColor: __classPrivateFieldGet(this, _Main_cfg, "f").oCfg.init.bg_color =
|
|
73103
|
+
(0, CmnLib_1.parseColor)(String(__classPrivateFieldGet(this, _Main_cfg, "f").oCfg.init.bg_color)),
|
|
73082
73104
|
resolution: globalThis.devicePixelRatio ?? 1,
|
|
73083
73105
|
autoResize: true,
|
|
73084
73106
|
};
|
|
@@ -73360,6 +73382,7 @@ class PropParser {
|
|
|
73360
73382
|
'ceil': a => Math.ceil(__classPrivateFieldGet(this, _PropParser_instances, "m", _PropParser_fncSub_ChkNum).call(this, a.shift())),
|
|
73361
73383
|
'floor': a => Math.floor(__classPrivateFieldGet(this, _PropParser_instances, "m", _PropParser_fncSub_ChkNum).call(this, a.shift())),
|
|
73362
73384
|
'round': a => Math.round(__classPrivateFieldGet(this, _PropParser_instances, "m", _PropParser_fncSub_ChkNum).call(this, a.shift())),
|
|
73385
|
+
'isNaN': a => isNaN(Number(__classPrivateFieldGet(this, _PropParser_instances, "m", _PropParser_calc).call(this, a.shift()))),
|
|
73363
73386
|
'<<': a => Number(__classPrivateFieldGet(this, _PropParser_instances, "m", _PropParser_calc).call(this, a.shift())) <<
|
|
73364
73387
|
Number(__classPrivateFieldGet(this, _PropParser_instances, "m", _PropParser_calc).call(this, a.shift())),
|
|
73365
73388
|
'>>': a => Number(__classPrivateFieldGet(this, _PropParser_instances, "m", _PropParser_calc).call(this, a.shift())) >>
|
|
@@ -75949,7 +75972,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
75949
75972
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
75950
75973
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
75951
75974
|
};
|
|
75952
|
-
var _TxtLayer_instances, _a, _TxtLayer_cfg, _TxtLayer_val, _TxtLayer_recText, _TxtLayer_isPageFore, _TxtLayer_ch_in_style, _TxtLayer_ch_out_style, _TxtLayer_main, _TxtLayer_evtMng, _TxtLayer_doAutoWc, _TxtLayer_hAutoWc, _TxtLayer_autowc,
|
|
75975
|
+
var _TxtLayer_instances, _a, _TxtLayer_cfg, _TxtLayer_val, _TxtLayer_recText, _TxtLayer_isPageFore, _TxtLayer_ch_in_style, _TxtLayer_ch_out_style, _TxtLayer_main, _TxtLayer_evtMng, _TxtLayer_doAutoWc, _TxtLayer_hAutoWc, _TxtLayer_autowc, _TxtLayer_b_color, _TxtLayer_b_alpha, _TxtLayer_b_alpha_isfixed, _TxtLayer_b_do, _TxtLayer_b_pic, _TxtLayer_txs, _TxtLayer_rbSpl, _TxtLayer_cntBtn, _TxtLayer_set_ch_in, _TxtLayer_$ch_in_style, _TxtLayer_ch_in_join, _TxtLayer_set_ch_out, _TxtLayer_$ch_out_style, _TxtLayer_drawBack, _TxtLayer_setFfs, _TxtLayer_ffs, _TxtLayer_fncFFSStyle, _TxtLayer_fncFFSSpan, _TxtLayer_strNoFFS, _TxtLayer_regNoFFS, _TxtLayer_ruby_pd, _TxtLayer_r_align, _TxtLayer_mkStyle_r_align4ff, _TxtLayer_needGoTxt, _TxtLayer_putCh, _TxtLayer_tagCh_sub, _TxtLayer_cumDelay, _TxtLayer_firstCh, _TxtLayer_aSpan, _TxtLayer_aSpan_bk, _TxtLayer_aSpan_link, _TxtLayer_hSpanBk, _TxtLayer_beginSpan, _TxtLayer_autoCloseSpan, _TxtLayer_page_text;
|
|
75953
75976
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
75954
75977
|
exports.TxtLayer = void 0;
|
|
75955
75978
|
const Layer_1 = __webpack_require__(/*! ./Layer */ "./core/src/sn/Layer.ts");
|
|
@@ -75965,21 +75988,12 @@ class TxtLayer extends Layer_1.Layer {
|
|
|
75965
75988
|
constructor() {
|
|
75966
75989
|
super();
|
|
75967
75990
|
_TxtLayer_instances.add(this);
|
|
75968
|
-
_TxtLayer_infTL.set(this, {
|
|
75969
|
-
fontsize: 24,
|
|
75970
|
-
$width: 0,
|
|
75971
|
-
$height: 0,
|
|
75972
|
-
pad_left: 0,
|
|
75973
|
-
pad_right: 0,
|
|
75974
|
-
pad_top: 0,
|
|
75975
|
-
pad_bottom: 0,
|
|
75976
|
-
});
|
|
75977
75991
|
_TxtLayer_b_color.set(this, 0x000000);
|
|
75978
75992
|
_TxtLayer_b_alpha.set(this, 0);
|
|
75979
75993
|
_TxtLayer_b_alpha_isfixed.set(this, false);
|
|
75980
75994
|
_TxtLayer_b_do.set(this, null);
|
|
75981
75995
|
_TxtLayer_b_pic.set(this, '');
|
|
75982
|
-
_TxtLayer_txs.set(this, new TxtStage_1.TxtStage(
|
|
75996
|
+
_TxtLayer_txs.set(this, new TxtStage_1.TxtStage(this.spLay, () => this.canFocus()));
|
|
75983
75997
|
_TxtLayer_rbSpl.set(this, new RubySpliter_1.RubySpliter);
|
|
75984
75998
|
_TxtLayer_cntBtn.set(this, new pixi_js_1.Container);
|
|
75985
75999
|
_TxtLayer_$ch_in_style.set(this, '');
|
|
@@ -76395,8 +76409,8 @@ class TxtLayer extends Layer_1.Layer {
|
|
|
76395
76409
|
return __classPrivateFieldGet(this, _TxtLayer_instances, "m", _TxtLayer_drawBack).call(this, hArg, isStop => { if (isStop)
|
|
76396
76410
|
__classPrivateFieldGet(TxtLayer, _a, "f", _TxtLayer_main).resume(); });
|
|
76397
76411
|
}
|
|
76398
|
-
get width() { return __classPrivateFieldGet(this, _TxtLayer_txs, "f").getWidth
|
|
76399
|
-
get height() { return __classPrivateFieldGet(this, _TxtLayer_txs, "f").getHeight
|
|
76412
|
+
get width() { return __classPrivateFieldGet(this, _TxtLayer_txs, "f").getWidth; }
|
|
76413
|
+
get height() { return __classPrivateFieldGet(this, _TxtLayer_txs, "f").getHeight; }
|
|
76400
76414
|
chgBackAlpha(g_alpha) {
|
|
76401
76415
|
const alpha = __classPrivateFieldGet(this, _TxtLayer_b_alpha_isfixed, "f")
|
|
76402
76416
|
? __classPrivateFieldGet(this, _TxtLayer_b_alpha, "f")
|
|
@@ -76406,13 +76420,12 @@ class TxtLayer extends Layer_1.Layer {
|
|
|
76406
76420
|
this.spLay.removeChild(__classPrivateFieldGet(this, _TxtLayer_b_do, "f"));
|
|
76407
76421
|
__classPrivateFieldGet(this, _TxtLayer_b_do, "f").destroy();
|
|
76408
76422
|
}
|
|
76409
|
-
|
|
76410
|
-
|
|
76411
|
-
|
|
76412
|
-
|
|
76413
|
-
|
|
76414
|
-
|
|
76415
|
-
this.spLay.addChildAt(grp, 0);
|
|
76423
|
+
this.spLay.addChildAt((__classPrivateFieldSet(this, _TxtLayer_b_do, new pixi_js_1.Graphics, "f"))
|
|
76424
|
+
.beginFill(__classPrivateFieldGet(this, _TxtLayer_b_color, "f"))
|
|
76425
|
+
.lineStyle(undefined)
|
|
76426
|
+
.drawRect(0, 0, __classPrivateFieldGet(this, _TxtLayer_txs, "f").getWidth, __classPrivateFieldGet(this, _TxtLayer_txs, "f").getHeight)
|
|
76427
|
+
.endFill(), 0);
|
|
76428
|
+
__classPrivateFieldGet(this, _TxtLayer_b_do, "f").name = 'back(color)';
|
|
76416
76429
|
}
|
|
76417
76430
|
if (__classPrivateFieldGet(this, _TxtLayer_b_do, "f")) {
|
|
76418
76431
|
__classPrivateFieldGet(this, _TxtLayer_b_do, "f").visible = (alpha > 0);
|
|
@@ -76477,6 +76490,8 @@ class TxtLayer extends Layer_1.Layer {
|
|
|
76477
76490
|
this.enabled = hLay.enabled;
|
|
76478
76491
|
__classPrivateFieldSet(this, _TxtLayer_r_align, hLay.r_align, "f");
|
|
76479
76492
|
this.cvsResize();
|
|
76493
|
+
__classPrivateFieldGet(this, _TxtLayer_instances, "m", _TxtLayer_setFfs).call(this, hLay);
|
|
76494
|
+
__classPrivateFieldGet(this, _TxtLayer_txs, "f").playback(hLay.txs);
|
|
76480
76495
|
__classPrivateFieldSet(this, _TxtLayer_b_alpha, hLay.b_alpha, "f");
|
|
76481
76496
|
__classPrivateFieldSet(this, _TxtLayer_b_alpha_isfixed, hLay.b_alpha_isfixed, "f");
|
|
76482
76497
|
aPrm.push(new Promise(re => {
|
|
@@ -76488,8 +76503,6 @@ class TxtLayer extends Layer_1.Layer {
|
|
|
76488
76503
|
re(); }))
|
|
76489
76504
|
re();
|
|
76490
76505
|
}));
|
|
76491
|
-
__classPrivateFieldGet(this, _TxtLayer_instances, "m", _TxtLayer_setFfs).call(this, hLay);
|
|
76492
|
-
__classPrivateFieldGet(this, _TxtLayer_txs, "f").playback(hLay.txs);
|
|
76493
76506
|
const aBtn = hLay.btns;
|
|
76494
76507
|
aPrm = aPrm.concat(aBtn.map(v => this.addButton(JSON.parse(v.replaceAll(`'`, '"')))));
|
|
76495
76508
|
}
|
|
@@ -76514,11 +76527,11 @@ class TxtLayer extends Layer_1.Layer {
|
|
|
76514
76527
|
}
|
|
76515
76528
|
dump() {
|
|
76516
76529
|
__classPrivateFieldGet(this, _TxtLayer_putCh, "f").call(this, '', 'gotxt|');
|
|
76517
|
-
return super.dump() + `, "enabled":"${this.enabled}", ${__classPrivateFieldGet(this, _TxtLayer_txs, "f").dump()}, "b_pic":"${__classPrivateFieldGet(this, _TxtLayer_b_pic, "f")}", "b_color":"${__classPrivateFieldGet(this, _TxtLayer_b_color, "f")}", "b_alpha":${__classPrivateFieldGet(this, _TxtLayer_b_alpha, "f")}, "b_alpha_isfixed":"${__classPrivateFieldGet(this, _TxtLayer_b_alpha_isfixed, "f")}", "
|
|
76530
|
+
return super.dump() + `, "enabled":"${this.enabled}", ${__classPrivateFieldGet(this, _TxtLayer_txs, "f").dump()}, "b_pic":"${__classPrivateFieldGet(this, _TxtLayer_b_pic, "f")}", "b_color":"${__classPrivateFieldGet(this, _TxtLayer_b_color, "f")}", "b_alpha":${__classPrivateFieldGet(this, _TxtLayer_b_alpha, "f")}, "b_alpha_isfixed":"${__classPrivateFieldGet(this, _TxtLayer_b_alpha_isfixed, "f")}", "width":${__classPrivateFieldGet(this, _TxtLayer_txs, "f").getWidth}, "height":${__classPrivateFieldGet(this, _TxtLayer_txs, "f").getHeight}, "pixi_obj":[${this.spLay.children.map(e => `{"class":"${(e instanceof pixi_js_1.Sprite) ? 'Sprite' : ((e instanceof pixi_js_1.Graphics) ? 'Graphics' : ((e instanceof pixi_js_1.Container) ? 'Container' : '?'))}", "name":"${e.name}", "alpha":${e.alpha}, "x":${e.x}, "y":${e.y}, "visible":"${e.visible}"}`).join(',')}], "button":[${__classPrivateFieldGet(this, _TxtLayer_cntBtn, "f").children.map(d => d.children[0].name ?? '{}').join(',')}]`;
|
|
76518
76531
|
}
|
|
76519
76532
|
}
|
|
76520
76533
|
exports.TxtLayer = TxtLayer;
|
|
76521
|
-
_a = TxtLayer,
|
|
76534
|
+
_a = TxtLayer, _TxtLayer_b_color = new WeakMap(), _TxtLayer_b_alpha = new WeakMap(), _TxtLayer_b_alpha_isfixed = new WeakMap(), _TxtLayer_b_do = new WeakMap(), _TxtLayer_b_pic = new WeakMap(), _TxtLayer_txs = new WeakMap(), _TxtLayer_rbSpl = new WeakMap(), _TxtLayer_cntBtn = new WeakMap(), _TxtLayer_$ch_in_style = new WeakMap(), _TxtLayer_ch_in_join = new WeakMap(), _TxtLayer_$ch_out_style = new WeakMap(), _TxtLayer_ffs = new WeakMap(), _TxtLayer_fncFFSStyle = new WeakMap(), _TxtLayer_fncFFSSpan = new WeakMap(), _TxtLayer_strNoFFS = new WeakMap(), _TxtLayer_regNoFFS = new WeakMap(), _TxtLayer_ruby_pd = new WeakMap(), _TxtLayer_r_align = new WeakMap(), _TxtLayer_needGoTxt = new WeakMap(), _TxtLayer_putCh = new WeakMap(), _TxtLayer_cumDelay = new WeakMap(), _TxtLayer_firstCh = new WeakMap(), _TxtLayer_aSpan = new WeakMap(), _TxtLayer_aSpan_bk = new WeakMap(), _TxtLayer_aSpan_link = new WeakMap(), _TxtLayer_hSpanBk = new WeakMap(), _TxtLayer_page_text = new WeakMap(), _TxtLayer_instances = new WeakSet(), _TxtLayer_ch_in_style = function _TxtLayer_ch_in_style(hArg) {
|
|
76522
76535
|
const o = TxtStage_1.TxtStage.ch_in_style(hArg);
|
|
76523
76536
|
const x = (o.x.charAt(0) === '=') ? `${o.nx * 100}%` : `${o.nx}px`;
|
|
76524
76537
|
const y = (o.y.charAt(0) === '=') ? `${o.ny * 100}%` : `${o.ny}px`;
|
|
@@ -76631,19 +76644,18 @@ _a = TxtLayer, _TxtLayer_infTL = new WeakMap(), _TxtLayer_b_color = new WeakMap(
|
|
|
76631
76644
|
}
|
|
76632
76645
|
}
|
|
76633
76646
|
else if ('b_color' in hArg) {
|
|
76634
|
-
__classPrivateFieldSet(this, _TxtLayer_b_color,
|
|
76647
|
+
__classPrivateFieldSet(this, _TxtLayer_b_color, (0, CmnLib_1.argChk_Color)(hArg, 'b_color', 0x000000), "f");
|
|
76635
76648
|
if (__classPrivateFieldGet(this, _TxtLayer_b_do, "f")) {
|
|
76636
76649
|
this.spLay.removeChild(__classPrivateFieldGet(this, _TxtLayer_b_do, "f"));
|
|
76637
76650
|
__classPrivateFieldGet(this, _TxtLayer_b_do, "f").destroy();
|
|
76638
76651
|
}
|
|
76639
76652
|
__classPrivateFieldSet(this, _TxtLayer_b_pic, '', "f");
|
|
76640
|
-
|
|
76641
|
-
|
|
76642
|
-
|
|
76643
|
-
|
|
76644
|
-
|
|
76645
|
-
|
|
76646
|
-
this.spLay.addChildAt(grp, 0);
|
|
76653
|
+
this.spLay.addChildAt((__classPrivateFieldSet(this, _TxtLayer_b_do, new pixi_js_1.Graphics, "f"))
|
|
76654
|
+
.beginFill(__classPrivateFieldGet(this, _TxtLayer_b_color, "f"))
|
|
76655
|
+
.lineStyle(undefined)
|
|
76656
|
+
.drawRect(0, 0, __classPrivateFieldGet(this, _TxtLayer_txs, "f").getWidth, __classPrivateFieldGet(this, _TxtLayer_txs, "f").getHeight)
|
|
76657
|
+
.endFill(), 0);
|
|
76658
|
+
__classPrivateFieldGet(this, _TxtLayer_b_do, "f").name = 'back(color)';
|
|
76647
76659
|
}
|
|
76648
76660
|
if (__classPrivateFieldGet(this, _TxtLayer_b_do, "f")) {
|
|
76649
76661
|
__classPrivateFieldGet(this, _TxtLayer_b_do, "f").visible = (alpha > 0);
|
|
@@ -76784,7 +76796,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
76784
76796
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
76785
76797
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
76786
76798
|
};
|
|
76787
|
-
var _TxtStage_instances, _a, _TxtStage_cfg, _TxtStage_cvs, _TxtStage_evtMng, _TxtStage_htmTxt, _TxtStage_cntTxt, _TxtStage_grpDbgMasume, _TxtStage_idc, _TxtStage_idcCh, _TxtStage_lay_sub, _TxtStage_left, _TxtStage_isTategaki, _TxtStage_padTx4x, _TxtStage_padTx4y, _TxtStage_hWarning, _TxtStage_htm2tx, _TxtStage_ch_filter, _TxtStage_aSpTw, _TxtStage_aRect, _TxtStage_lenHtmTxt, _TxtStage_reg行頭禁則, _TxtStage_reg行末禁則, _TxtStage_reg分割禁止, _TxtStage_beforeHTMLElm, _TxtStage_rctm, _TxtStage_REGDS, _TxtStage_fncEndChIn, _TxtStage_spWork, _TxtStage_isChInIng, _TxtStage_hChInStyle, _TxtStage_REG_NG_CHSTYLE_NAME_CHR, _TxtStage_hChOutStyle, _TxtStage_cntBreak, _TxtStage_lh_half, _TxtStage_getChRects, _TxtStage_fi_easing, _TxtStage_fo_easing, _TxtStage_clearText, _TxtStage_sss;
|
|
76799
|
+
var _TxtStage_instances, _a, _TxtStage_cfg, _TxtStage_cvs, _TxtStage_evtMng, _TxtStage_htmTxt, _TxtStage_cntTxt, _TxtStage_grpDbgMasume, _TxtStage_idc, _TxtStage_idcCh, _TxtStage_infTL, _TxtStage_lay_sub, _TxtStage_left, _TxtStage_isTategaki, _TxtStage_padTx4x, _TxtStage_padTx4y, _TxtStage_hWarning, _TxtStage_htm2tx, _TxtStage_ch_filter, _TxtStage_aSpTw, _TxtStage_aRect, _TxtStage_lenHtmTxt, _TxtStage_reg行頭禁則, _TxtStage_reg行末禁則, _TxtStage_reg分割禁止, _TxtStage_beforeHTMLElm, _TxtStage_rctm, _TxtStage_REGDS, _TxtStage_fncEndChIn, _TxtStage_spWork, _TxtStage_isChInIng, _TxtStage_hChInStyle, _TxtStage_REG_NG_CHSTYLE_NAME_CHR, _TxtStage_hChOutStyle, _TxtStage_cntBreak, _TxtStage_lh_half, _TxtStage_getChRects, _TxtStage_fi_easing, _TxtStage_fo_easing, _TxtStage_clearText, _TxtStage_sss;
|
|
76788
76800
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
76789
76801
|
exports.TxtStage = void 0;
|
|
76790
76802
|
const CmnLib_1 = __webpack_require__(/*! ./CmnLib */ "./core/src/sn/CmnLib.ts");
|
|
@@ -76797,9 +76809,8 @@ const tween_js_1 = __webpack_require__(/*! @tweenjs/tween.js */ "./node_modules/
|
|
|
76797
76809
|
;
|
|
76798
76810
|
;
|
|
76799
76811
|
class TxtStage extends pixi_js_1.Container {
|
|
76800
|
-
constructor(
|
|
76812
|
+
constructor(spLay, canFocus) {
|
|
76801
76813
|
super();
|
|
76802
|
-
this.infTL = infTL;
|
|
76803
76814
|
this.spLay = spLay;
|
|
76804
76815
|
this.canFocus = canFocus;
|
|
76805
76816
|
_TxtStage_instances.add(this);
|
|
@@ -76808,6 +76819,15 @@ class TxtStage extends pixi_js_1.Container {
|
|
|
76808
76819
|
_TxtStage_grpDbgMasume.set(this, new pixi_js_1.Graphics);
|
|
76809
76820
|
_TxtStage_idc.set(this, new DesignCast_1.TxtLayDesignCast(this.spLay, this));
|
|
76810
76821
|
_TxtStage_idcCh.set(this, new DesignCast_1.TxtLayPadDesignCast(this));
|
|
76822
|
+
_TxtStage_infTL.set(this, {
|
|
76823
|
+
fontsize: 24,
|
|
76824
|
+
$width: 0,
|
|
76825
|
+
$height: 0,
|
|
76826
|
+
pad_left: 0,
|
|
76827
|
+
pad_right: 0,
|
|
76828
|
+
pad_top: 0,
|
|
76829
|
+
pad_bottom: 0,
|
|
76830
|
+
});
|
|
76811
76831
|
_TxtStage_left.set(this, 0);
|
|
76812
76832
|
_TxtStage_isTategaki.set(this, false);
|
|
76813
76833
|
_TxtStage_padTx4x.set(this, 0);
|
|
@@ -76857,7 +76877,6 @@ class TxtStage extends pixi_js_1.Container {
|
|
|
76857
76877
|
__classPrivateFieldSet(TxtStage, _a, Object.create(null), "f", _TxtStage_hChOutStyle);
|
|
76858
76878
|
__classPrivateFieldSet(TxtStage, _a, new pixi_js_1.Container, "f", _TxtStage_cntBreak);
|
|
76859
76879
|
}
|
|
76860
|
-
getInfTL() { return this.infTL; }
|
|
76861
76880
|
lay(hArg) {
|
|
76862
76881
|
const s = __classPrivateFieldGet(this, _TxtStage_htmTxt, "f").style;
|
|
76863
76882
|
if (hArg.style) {
|
|
@@ -76893,7 +76912,7 @@ class TxtStage extends pixi_js_1.Container {
|
|
|
76893
76912
|
__classPrivateFieldGet(this, _TxtStage_idc, "f").sethArg(hArg);
|
|
76894
76913
|
__classPrivateFieldSet(this, _TxtStage_left, this.spLay.position.x
|
|
76895
76914
|
- (CmnLib_1.CmnLib.isSafari && !CmnLib_1.CmnLib.isMobile && __classPrivateFieldGet(this, _TxtStage_isTategaki, "f")
|
|
76896
|
-
? this.
|
|
76915
|
+
? __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_left + __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_right
|
|
76897
76916
|
: 0), "f");
|
|
76898
76917
|
s.transformOrigin = `${this.spLay.pivot.x}px ${this.spLay.pivot.y}px`;
|
|
76899
76918
|
this.cvsResize();
|
|
@@ -76917,13 +76936,14 @@ class TxtStage extends pixi_js_1.Container {
|
|
|
76917
76936
|
__classPrivateFieldGet(this, _TxtStage_idcCh, "f").cvsResize();
|
|
76918
76937
|
}
|
|
76919
76938
|
get tategaki() { return __classPrivateFieldGet(this, _TxtStage_isTategaki, "f"); }
|
|
76920
|
-
|
|
76921
|
-
|
|
76939
|
+
get infTL() { return __classPrivateFieldGet(this, _TxtStage_infTL, "f"); }
|
|
76940
|
+
get getWidth() { return __classPrivateFieldGet(this, _TxtStage_infTL, "f").$width; }
|
|
76941
|
+
get getHeight() { return __classPrivateFieldGet(this, _TxtStage_infTL, "f").$height; }
|
|
76922
76942
|
setSize(width, height) {
|
|
76923
|
-
this
|
|
76924
|
-
this
|
|
76925
|
-
__classPrivateFieldGet(this, _TxtStage_htmTxt, "f").style.width = this
|
|
76926
|
-
__classPrivateFieldGet(this, _TxtStage_htmTxt, "f").style.height = this
|
|
76943
|
+
__classPrivateFieldGet(this, _TxtStage_infTL, "f").$width = width;
|
|
76944
|
+
__classPrivateFieldGet(this, _TxtStage_infTL, "f").$height = height;
|
|
76945
|
+
__classPrivateFieldGet(this, _TxtStage_htmTxt, "f").style.width = __classPrivateFieldGet(this, _TxtStage_infTL, "f").$width + 'px';
|
|
76946
|
+
__classPrivateFieldGet(this, _TxtStage_htmTxt, "f").style.height = __classPrivateFieldGet(this, _TxtStage_infTL, "f").$height + 'px';
|
|
76927
76947
|
}
|
|
76928
76948
|
goTxt(aSpan) {
|
|
76929
76949
|
var _b;
|
|
@@ -76932,15 +76952,15 @@ class TxtStage extends pixi_js_1.Container {
|
|
|
76932
76952
|
if (begin === 0) {
|
|
76933
76953
|
if (__classPrivateFieldGet(TxtStage, _a, "f", _TxtStage_cfg).oCfg.debug.masume) {
|
|
76934
76954
|
if (CmnLib_1.CmnLib.debugLog)
|
|
76935
|
-
console.log(`🍌 masume ${this.name} v:${this.visible} l:${this.x} t:${this.y} a:${this.alpha} pl:${this.
|
|
76955
|
+
console.log(`🍌 masume ${this.name} v:${this.visible} l:${this.x} t:${this.y} a:${this.alpha} pl:${__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_left} pr:${__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_right} pt:${__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_top} pb:${__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_bottom} w:${__classPrivateFieldGet(this, _TxtStage_infTL, "f").$width} h:${__classPrivateFieldGet(this, _TxtStage_infTL, "f").$height}`);
|
|
76936
76956
|
__classPrivateFieldGet(this, _TxtStage_grpDbgMasume, "f").clear()
|
|
76937
76957
|
.beginFill(0x33FF00, 0.2)
|
|
76938
76958
|
.lineStyle(1, 0x33FF00, 1)
|
|
76939
|
-
.drawRect(-this.
|
|
76959
|
+
.drawRect(-__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_left, -__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_top, __classPrivateFieldGet(this, _TxtStage_infTL, "f").$width, __classPrivateFieldGet(this, _TxtStage_infTL, "f").$height)
|
|
76940
76960
|
.endFill()
|
|
76941
76961
|
.beginFill(0x0033FF, 0.2)
|
|
76942
76962
|
.lineStyle(2, 0x0033FF, 1)
|
|
76943
|
-
.drawRect(0, 0, this
|
|
76963
|
+
.drawRect(0, 0, __classPrivateFieldGet(this, _TxtStage_infTL, "f").$width - __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_left - __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_right, __classPrivateFieldGet(this, _TxtStage_infTL, "f").$height - __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_top - __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_bottom)
|
|
76944
76964
|
.endFill();
|
|
76945
76965
|
}
|
|
76946
76966
|
__classPrivateFieldGet(this, _TxtStage_htmTxt, "f").innerHTML = [...aSpan].join('');
|
|
@@ -77037,8 +77057,8 @@ class TxtStage extends pixi_js_1.Container {
|
|
|
77037
77057
|
: () => { };
|
|
77038
77058
|
const ease = CmnTween_1.CmnTween.ease(__classPrivateFieldGet(this, _TxtStage_fi_easing, "f"));
|
|
77039
77059
|
const bcr = __classPrivateFieldGet(this, _TxtStage_htmTxt, "f").getBoundingClientRect();
|
|
77040
|
-
const sx = bcr.left + globalThis.scrollX + this.
|
|
77041
|
-
const sy = bcr.top + globalThis.scrollY + this.
|
|
77060
|
+
const sx = bcr.left + globalThis.scrollX + __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_left;
|
|
77061
|
+
const sy = bcr.top + globalThis.scrollY + __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_top;
|
|
77042
77062
|
for (let i = begin; i < len; ++i) {
|
|
77043
77063
|
const v = __classPrivateFieldGet(this, _TxtStage_aRect, "f")[i];
|
|
77044
77064
|
const rct = v.rect;
|
|
@@ -77219,7 +77239,8 @@ class TxtStage extends pixi_js_1.Container {
|
|
|
77219
77239
|
}
|
|
77220
77240
|
reNew() {
|
|
77221
77241
|
__classPrivateFieldGet(this, _TxtStage_instances, "m", _TxtStage_clearText).call(this);
|
|
77222
|
-
const to = new TxtStage(this.
|
|
77242
|
+
const to = new TxtStage(this.spLay, () => this.canFocus());
|
|
77243
|
+
__classPrivateFieldSet(to, _TxtStage_infTL, __classPrivateFieldGet(this, _TxtStage_infTL, "f"), "f");
|
|
77223
77244
|
__classPrivateFieldGet(to, _TxtStage_htmTxt, "f").style.cssText = __classPrivateFieldGet(this, _TxtStage_htmTxt, "f").style.cssText;
|
|
77224
77245
|
__classPrivateFieldSet(to, _TxtStage_left, __classPrivateFieldGet(this, _TxtStage_left, "f"), "f");
|
|
77225
77246
|
to.name = this.name;
|
|
@@ -77233,7 +77254,7 @@ class TxtStage extends pixi_js_1.Container {
|
|
|
77233
77254
|
}
|
|
77234
77255
|
record() {
|
|
77235
77256
|
return {
|
|
77236
|
-
infTL: this
|
|
77257
|
+
infTL: __classPrivateFieldGet(this, _TxtStage_infTL, "f"),
|
|
77237
77258
|
cssText: __classPrivateFieldGet(this, _TxtStage_htmTxt, "f").style.cssText,
|
|
77238
77259
|
left: __classPrivateFieldGet(this, _TxtStage_left, "f"),
|
|
77239
77260
|
idc_hArg: __classPrivateFieldGet(this, _TxtStage_idc, "f").gethArg(),
|
|
@@ -77244,8 +77265,8 @@ class TxtStage extends pixi_js_1.Container {
|
|
|
77244
77265
|
}
|
|
77245
77266
|
;
|
|
77246
77267
|
playback(hLay) {
|
|
77247
|
-
this
|
|
77248
|
-
this.position.set(this.
|
|
77268
|
+
__classPrivateFieldSet(this, _TxtStage_infTL, hLay.infTL, "f");
|
|
77269
|
+
this.position.set(__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_left, __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_top);
|
|
77249
77270
|
__classPrivateFieldGet(this, _TxtStage_htmTxt, "f").style.cssText = hLay.cssText;
|
|
77250
77271
|
__classPrivateFieldSet(this, _TxtStage_left, hLay.left, "f");
|
|
77251
77272
|
__classPrivateFieldGet(this, _TxtStage_instances, "m", _TxtStage_lay_sub).call(this);
|
|
@@ -77258,13 +77279,13 @@ class TxtStage extends pixi_js_1.Container {
|
|
|
77258
77279
|
__classPrivateFieldGet(this, _TxtStage_instances, "m", _TxtStage_htm2tx).call(this, tx => {
|
|
77259
77280
|
__classPrivateFieldSet(this, _TxtStage_sss, new pixi_js_1.Sprite(tx), "f");
|
|
77260
77281
|
if (__classPrivateFieldGet(this, _TxtStage_isTategaki, "f")) {
|
|
77261
|
-
__classPrivateFieldGet(this, _TxtStage_sss, "f").x += CmnLib_1.CmnLib.stageW - (__classPrivateFieldGet(this, _TxtStage_left, "f") + this
|
|
77282
|
+
__classPrivateFieldGet(this, _TxtStage_sss, "f").x += CmnLib_1.CmnLib.stageW - (__classPrivateFieldGet(this, _TxtStage_left, "f") + __classPrivateFieldGet(this, _TxtStage_infTL, "f").$width)
|
|
77262
77283
|
- ((CmnLib_1.CmnLib.isSafari && !CmnLib_1.CmnLib.isMobile)
|
|
77263
77284
|
? 0
|
|
77264
|
-
: this.
|
|
77285
|
+
: __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_left + __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_right);
|
|
77265
77286
|
}
|
|
77266
77287
|
__classPrivateFieldGet(this, _TxtStage_sss, "f").y -= __classPrivateFieldGet(this, _TxtStage_padTx4y, "f");
|
|
77267
|
-
__classPrivateFieldGet(this, _TxtStage_sss, "f").texture.frame = new pixi_js_1.Rectangle(0, 0, this
|
|
77288
|
+
__classPrivateFieldGet(this, _TxtStage_sss, "f").texture.frame = new pixi_js_1.Rectangle(0, 0, __classPrivateFieldGet(this, _TxtStage_infTL, "f").$width - __classPrivateFieldGet(this, _TxtStage_left, "f"), __classPrivateFieldGet(this, _TxtStage_infTL, "f").$height);
|
|
77268
77289
|
__classPrivateFieldGet(this, _TxtStage_cntTxt, "f").addChild(__classPrivateFieldGet(this, _TxtStage_sss, "f"));
|
|
77269
77290
|
rnd.render(__classPrivateFieldGet(this, _TxtStage_sss, "f"), undefined, false);
|
|
77270
77291
|
re();
|
|
@@ -77302,17 +77323,17 @@ class TxtStage extends pixi_js_1.Container {
|
|
|
77302
77323
|
}
|
|
77303
77324
|
}
|
|
77304
77325
|
exports.TxtStage = TxtStage;
|
|
77305
|
-
_a = TxtStage, _TxtStage_htmTxt = new WeakMap(), _TxtStage_cntTxt = new WeakMap(), _TxtStage_grpDbgMasume = new WeakMap(), _TxtStage_idc = new WeakMap(), _TxtStage_idcCh = new WeakMap(), _TxtStage_left = new WeakMap(), _TxtStage_isTategaki = new WeakMap(), _TxtStage_padTx4x = new WeakMap(), _TxtStage_padTx4y = new WeakMap(), _TxtStage_ch_filter = new WeakMap(), _TxtStage_aSpTw = new WeakMap(), _TxtStage_aRect = new WeakMap(), _TxtStage_lenHtmTxt = new WeakMap(), _TxtStage_beforeHTMLElm = new WeakMap(), _TxtStage_rctm = new WeakMap(), _TxtStage_REGDS = new WeakMap(), _TxtStage_fncEndChIn = new WeakMap(), _TxtStage_isChInIng = new WeakMap(), _TxtStage_lh_half = new WeakMap(), _TxtStage_fi_easing = new WeakMap(), _TxtStage_fo_easing = new WeakMap(), _TxtStage_sss = new WeakMap(), _TxtStage_instances = new WeakSet(), _TxtStage_lay_sub = function _TxtStage_lay_sub() {
|
|
77326
|
+
_a = TxtStage, _TxtStage_htmTxt = new WeakMap(), _TxtStage_cntTxt = new WeakMap(), _TxtStage_grpDbgMasume = new WeakMap(), _TxtStage_idc = new WeakMap(), _TxtStage_idcCh = new WeakMap(), _TxtStage_infTL = new WeakMap(), _TxtStage_left = new WeakMap(), _TxtStage_isTategaki = new WeakMap(), _TxtStage_padTx4x = new WeakMap(), _TxtStage_padTx4y = new WeakMap(), _TxtStage_ch_filter = new WeakMap(), _TxtStage_aSpTw = new WeakMap(), _TxtStage_aRect = new WeakMap(), _TxtStage_lenHtmTxt = new WeakMap(), _TxtStage_beforeHTMLElm = new WeakMap(), _TxtStage_rctm = new WeakMap(), _TxtStage_REGDS = new WeakMap(), _TxtStage_fncEndChIn = new WeakMap(), _TxtStage_isChInIng = new WeakMap(), _TxtStage_lh_half = new WeakMap(), _TxtStage_fi_easing = new WeakMap(), _TxtStage_fo_easing = new WeakMap(), _TxtStage_sss = new WeakMap(), _TxtStage_instances = new WeakSet(), _TxtStage_lay_sub = function _TxtStage_lay_sub() {
|
|
77306
77327
|
const s = __classPrivateFieldGet(this, _TxtStage_htmTxt, "f").style;
|
|
77307
77328
|
const fs = parseFloat(s.fontSize || '0');
|
|
77308
|
-
this.
|
|
77309
|
-
this.
|
|
77310
|
-
this.
|
|
77311
|
-
this.
|
|
77312
|
-
this.
|
|
77313
|
-
this
|
|
77314
|
-
this
|
|
77315
|
-
this.position.set(this.
|
|
77329
|
+
__classPrivateFieldGet(this, _TxtStage_infTL, "f").fontsize = fs;
|
|
77330
|
+
__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_left = parseFloat(s.paddingLeft || '0');
|
|
77331
|
+
__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_right = parseFloat(s.paddingRight || '0');
|
|
77332
|
+
__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_top = parseFloat(s.paddingTop || '0');
|
|
77333
|
+
__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_bottom = parseFloat(s.paddingBottom || '0');
|
|
77334
|
+
__classPrivateFieldGet(this, _TxtStage_infTL, "f").$width = parseFloat(s.width || '0');
|
|
77335
|
+
__classPrivateFieldGet(this, _TxtStage_infTL, "f").$height = parseFloat(s.height || '0');
|
|
77336
|
+
this.position.set(__classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_left, __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_top);
|
|
77316
77337
|
__classPrivateFieldSet(this, _TxtStage_isTategaki, (s.writingMode === 'vertical-rl'), "f");
|
|
77317
77338
|
__classPrivateFieldSet(this, _TxtStage_padTx4x, 0, "f");
|
|
77318
77339
|
__classPrivateFieldSet(this, _TxtStage_padTx4y, 0, "f");
|
|
@@ -77524,8 +77545,8 @@ _a = TxtStage, _TxtStage_htmTxt = new WeakMap(), _TxtStage_cntTxt = new WeakMap(
|
|
|
77524
77545
|
cln.style.paddingTop = __classPrivateFieldGet(this, _TxtStage_padTx4y, "f") + 'px';
|
|
77525
77546
|
cln.style.left = '0px';
|
|
77526
77547
|
cln.style.top = '0px';
|
|
77527
|
-
cln.style.width = (this
|
|
77528
|
-
cln.style.height = (this
|
|
77548
|
+
cln.style.width = (__classPrivateFieldGet(this, _TxtStage_infTL, "f").$width - __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_left - __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_right) + 'px';
|
|
77549
|
+
cln.style.height = (__classPrivateFieldGet(this, _TxtStage_infTL, "f").$height - __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_top - __classPrivateFieldGet(this, _TxtStage_infTL, "f").pad_bottom) + 'px';
|
|
77529
77550
|
__classPrivateFieldGet(this, _TxtStage_htmTxt, "f").hidden = hidden;
|
|
77530
77551
|
return cln;
|
|
77531
77552
|
})
|
|
@@ -77533,15 +77554,15 @@ _a = TxtStage, _TxtStage_htmTxt = new WeakMap(), _TxtStage_cntTxt = new WeakMap(
|
|
|
77533
77554
|
.then(node => {
|
|
77534
77555
|
node.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml');
|
|
77535
77556
|
const img = new Image;
|
|
77536
|
-
img.src = `data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="${this
|
|
77557
|
+
img.src = `data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="${__classPrivateFieldGet(this, _TxtStage_infTL, "f").$width}px" height="${__classPrivateFieldGet(this, _TxtStage_infTL, "f").$height}px"><foreignObject x="0" y="0" width="100%" height="100%">${new XMLSerializer().serializeToString(node)
|
|
77537
77558
|
.replaceAll('#', '%23').replaceAll('\n', '%0A')}</foreignObject></svg>`;
|
|
77538
77559
|
return new Promise(resolve => img.onload = () => resolve(img));
|
|
77539
77560
|
})
|
|
77540
77561
|
.then(img => new Promise(resolve => setTimeout(() => resolve(img), 100)))
|
|
77541
77562
|
.then((img) => {
|
|
77542
77563
|
const canvas = document.createElement('canvas');
|
|
77543
|
-
canvas.width = this
|
|
77544
|
-
canvas.height = this
|
|
77564
|
+
canvas.width = __classPrivateFieldGet(this, _TxtStage_infTL, "f").$width;
|
|
77565
|
+
canvas.height = __classPrivateFieldGet(this, _TxtStage_infTL, "f").$height;
|
|
77545
77566
|
canvas.getContext('2d').drawImage(img, 0, 0);
|
|
77546
77567
|
canvas.toBlob(blob => {
|
|
77547
77568
|
if (!blob)
|