@famibee/skynovel 1.27.0 → 1.27.1

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 CHANGED
@@ -1,3 +1,13 @@
1
+ ## [1.27.1](https://github.com/famibee/SKYNovel/compare/v1.27.0...v1.27.1) (2022-01-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * [playse][stopse][fadeoutse]にてObjの扱いでエラーになる件 ([ed92d0b](https://github.com/famibee/SKYNovel/commit/ed92d0b82942f3fbaf0c9da338b76d21a29339d8))
7
+
8
+ - fix: [playse][stopse][fadeoutse]にてオブジェクトの扱いによりエラーになる場合に対応
9
+
10
+
1
11
  # [1.27.0](https://github.com/famibee/SKYNovel/compare/v1.26.0...v1.27.0) (2022-01-11)
2
12
 
3
13
 
@@ -5,7 +15,7 @@
5
15
 
6
16
  * [update_check]DLでアーキテクチャ(x32、x64など)別の対応が可能に ([b8e569f](https://github.com/famibee/SKYNovel/commit/b8e569febb418f69c58879cab036d370fa66a3f1))
7
17
 
8
- - feat: [update_check]のアプリダウンロードでアーキテクチャ(x32、x64など)別の対応が可能に
18
+ - feat: [update_check]のアプリダウンロードでアーキテクチャ(ia32、x64など)別の対応が可能に
9
19
  - 拡張機能により生成された _index.json ファイルを使用
10
20
  - 旧版の .yml ファイルもしばらく対応する
11
21
  - feat: アプリ実行時に OSや CPU アーキテクチャに対応するファイルが見つからない場合、同じOSのファイルをすべてダウンロードさせる
package/app.js CHANGED
@@ -72747,7 +72747,7 @@ class SoundMng {
72747
72747
  [hArg.clickse, hArg.enterse, hArg.leavese].forEach(fn => {
72748
72748
  if (!fn || sound_1.sound.exists(fn))
72749
72749
  return;
72750
- __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, fn, { preload: true, autoPlay: false });
72750
+ __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, '', fn, { preload: true, autoPlay: false });
72751
72751
  });
72752
72752
  }
72753
72753
  playLoopFromSaveObj() {
@@ -72858,7 +72858,7 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
72858
72858
  __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_stopse).call(this, { buf });
72859
72859
  const fn = hArg.fn;
72860
72860
  if (!fn)
72861
- throw '[playse] fnは必須です(buf=' + buf + ')';
72861
+ throw `[playse] fnは必須です buf:${buf}`;
72862
72862
  if ((0, CmnLib_1.argChk_Boolean)(hArg, 'canskip', true)
72863
72863
  && __classPrivateFieldGet(this, _SoundMng_evtMng, "f").isSkippingByKeyDown())
72864
72864
  return false;
@@ -72889,11 +72889,11 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
72889
72889
  const snd = sound_1.sound.find(fn);
72890
72890
  const oSb = __classPrivateFieldGet(this, _SoundMng_hSndBuf, "f")[buf] = {
72891
72891
  now_buf: buf,
72892
- snd: snd,
72893
- loop: loop,
72894
- start_ms: start_ms,
72895
- end_ms: end_ms,
72896
- ret_ms: ret_ms,
72892
+ snd,
72893
+ loop,
72894
+ start_ms,
72895
+ end_ms,
72896
+ ret_ms,
72897
72897
  resume: false,
72898
72898
  playing: () => true,
72899
72899
  onend: () => {
@@ -72908,7 +72908,7 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
72908
72908
  },
72909
72909
  };
72910
72910
  const o = {
72911
- loop: loop,
72911
+ loop,
72912
72912
  volume: vol,
72913
72913
  speed: (0, CmnLib_1.argChk_Num)(hArg, 'speed', 1),
72914
72914
  sprites: {},
@@ -72993,14 +72993,14 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
72993
72993
  }
72994
72994
  if (o2s.start >= d)
72995
72995
  throw `[playse] ret_ms:${ret_ms} >= 音声ファイル再生時間:${d} は異常値です`;
72996
- __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, fn, o2);
72996
+ __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, buf, fn, o2);
72997
72997
  };
72998
72998
  }
72999
72999
  __classPrivateFieldGet(this, _SoundMng_initVol, "f").call(this);
73000
73000
  if (snd) {
73001
73001
  snd.volume = vol;
73002
73002
  if (sp_nm)
73003
- __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, fn, o);
73003
+ __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, buf, fn, o);
73004
73004
  else if (snd.isPlayable) {
73005
73005
  const ab = snd.options.source;
73006
73006
  if (!(ab instanceof ArrayBuffer)
@@ -73020,13 +73020,15 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
73020
73020
  const old = o.loaded;
73021
73021
  o.loaded = (e, snd) => { old?.(e, snd); this.main.resume(); };
73022
73022
  }
73023
- __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, fn, o);
73023
+ __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, buf, fn, o);
73024
73024
  return join;
73025
- }, _SoundMng_playseSub = function _SoundMng_playseSub(fn, o) {
73025
+ }, _SoundMng_playseSub = function _SoundMng_playseSub(buf, fn, o) {
73026
73026
  const url = this.cfg.searchPath(fn, Config_1.Config.EXT_SOUND);
73027
73027
  if (url.slice(-4) !== '.bin') {
73028
73028
  o.url = url;
73029
73029
  const snd = sound_1.Sound.from(o);
73030
+ if (buf)
73031
+ __classPrivateFieldGet(this, _SoundMng_hSndBuf, "f")[buf].snd = snd;
73030
73032
  if (!o.loop)
73031
73033
  sound_1.sound.add(fn, snd);
73032
73034
  return;
@@ -73040,6 +73042,8 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
73040
73042
  .load((_ldr, hRes) => {
73041
73043
  o.source = hRes[fn]?.data;
73042
73044
  const snd = sound_1.Sound.from(o);
73045
+ if (buf)
73046
+ __classPrivateFieldGet(this, _SoundMng_hSndBuf, "f")[buf].snd = snd;
73043
73047
  if (!o.loop)
73044
73048
  sound_1.sound.add(fn, snd);
73045
73049
  });
@@ -73051,9 +73055,12 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
73051
73055
  return false;
73052
73056
  }, _SoundMng_stopbgm = function _SoundMng_stopbgm(hArg) { hArg.buf = 'BGM'; return __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_stopse).call(this, hArg); }, _SoundMng_stopse = function _SoundMng_stopse(hArg) {
73053
73057
  const buf = hArg.buf ?? 'SE';
73054
- __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_stopfadese).call(this, hArg);
73055
73058
  __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_delLoopPlay).call(this, buf);
73056
- __classPrivateFieldGet(this, _SoundMng_hSndBuf, "f")[buf]?.snd?.stop();
73059
+ const oSb = __classPrivateFieldGet(this, _SoundMng_hSndBuf, "f")[buf];
73060
+ if (oSb) {
73061
+ oSb.snd?.stop();
73062
+ oSb.onend();
73063
+ }
73057
73064
  return false;
73058
73065
  }, _SoundMng_wb = function _SoundMng_wb(hArg) { hArg.buf = 'BGM'; return __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_wf).call(this, hArg); }, _SoundMng_wf = function _SoundMng_wf(hArg) {
73059
73066
  const buf = hArg.buf ?? 'SE';
@@ -1 +1 @@
1
- {"version":3,"file":"SoundMng.d.ts","sourceRoot":"","sources":["../../src/sn/SoundMng.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,OAAO,EAA6B,MAAM,UAAU,CAAC;AAE7D,OAAO,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAC/E,OAAO,E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SAAS,CAAC,MAAM,EAAE,OAAO;IACzB,kBAAkB,CAAC,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB;IA+S3E,UAAU;IAwGV,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAS9B,mBAAmB,IAAI,IAAI;CAwC3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@famibee/skynovel",
3
- "version": "1.27.0",
3
+ "version": "1.27.1",
4
4
  "description": "webgl novelgame framework",
5
5
  "main": "core/web.js",
6
6
  "types": "core/lib/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "@types/store": "^2.0.2",
37
37
  "@types/tar-fs": "^2.0.1",
38
38
  "@types/xml2js": "^0.4.9",
39
- "electron": "^16.0.6",
39
+ "electron": "^16.0.7",
40
40
  "mocha": "^9.1.3",
41
41
  "power-assert": "^1.6.1",
42
42
  "rimraf": "^3.0.2",
@@ -44,9 +44,9 @@
44
44
  "ts-loader": "^9.2.6",
45
45
  "ts-node": "^10.4.0",
46
46
  "typescript": "^4.5.4",
47
- "webpack": "^5.65.0",
47
+ "webpack": "^5.66.0",
48
48
  "webpack-cli": "^4.9.1",
49
- "webpack-dev-server": "^4.7.2"
49
+ "webpack-dev-server": "^4.7.3"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "npm run wp && npm run test",
package/web.js CHANGED
@@ -74095,7 +74095,7 @@ class SoundMng {
74095
74095
  [hArg.clickse, hArg.enterse, hArg.leavese].forEach(fn => {
74096
74096
  if (!fn || sound_1.sound.exists(fn))
74097
74097
  return;
74098
- __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, fn, { preload: true, autoPlay: false });
74098
+ __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, '', fn, { preload: true, autoPlay: false });
74099
74099
  });
74100
74100
  }
74101
74101
  playLoopFromSaveObj() {
@@ -74206,7 +74206,7 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
74206
74206
  __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_stopse).call(this, { buf });
74207
74207
  const fn = hArg.fn;
74208
74208
  if (!fn)
74209
- throw '[playse] fnは必須です(buf=' + buf + ')';
74209
+ throw `[playse] fnは必須です buf:${buf}`;
74210
74210
  if ((0, CmnLib_1.argChk_Boolean)(hArg, 'canskip', true)
74211
74211
  && __classPrivateFieldGet(this, _SoundMng_evtMng, "f").isSkippingByKeyDown())
74212
74212
  return false;
@@ -74237,11 +74237,11 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
74237
74237
  const snd = sound_1.sound.find(fn);
74238
74238
  const oSb = __classPrivateFieldGet(this, _SoundMng_hSndBuf, "f")[buf] = {
74239
74239
  now_buf: buf,
74240
- snd: snd,
74241
- loop: loop,
74242
- start_ms: start_ms,
74243
- end_ms: end_ms,
74244
- ret_ms: ret_ms,
74240
+ snd,
74241
+ loop,
74242
+ start_ms,
74243
+ end_ms,
74244
+ ret_ms,
74245
74245
  resume: false,
74246
74246
  playing: () => true,
74247
74247
  onend: () => {
@@ -74256,7 +74256,7 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
74256
74256
  },
74257
74257
  };
74258
74258
  const o = {
74259
- loop: loop,
74259
+ loop,
74260
74260
  volume: vol,
74261
74261
  speed: (0, CmnLib_1.argChk_Num)(hArg, 'speed', 1),
74262
74262
  sprites: {},
@@ -74341,14 +74341,14 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
74341
74341
  }
74342
74342
  if (o2s.start >= d)
74343
74343
  throw `[playse] ret_ms:${ret_ms} >= 音声ファイル再生時間:${d} は異常値です`;
74344
- __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, fn, o2);
74344
+ __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, buf, fn, o2);
74345
74345
  };
74346
74346
  }
74347
74347
  __classPrivateFieldGet(this, _SoundMng_initVol, "f").call(this);
74348
74348
  if (snd) {
74349
74349
  snd.volume = vol;
74350
74350
  if (sp_nm)
74351
- __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, fn, o);
74351
+ __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, buf, fn, o);
74352
74352
  else if (snd.isPlayable) {
74353
74353
  const ab = snd.options.source;
74354
74354
  if (!(ab instanceof ArrayBuffer)
@@ -74368,13 +74368,15 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
74368
74368
  const old = o.loaded;
74369
74369
  o.loaded = (e, snd) => { old?.(e, snd); this.main.resume(); };
74370
74370
  }
74371
- __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, fn, o);
74371
+ __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_playseSub).call(this, buf, fn, o);
74372
74372
  return join;
74373
- }, _SoundMng_playseSub = function _SoundMng_playseSub(fn, o) {
74373
+ }, _SoundMng_playseSub = function _SoundMng_playseSub(buf, fn, o) {
74374
74374
  const url = this.cfg.searchPath(fn, Config_1.Config.EXT_SOUND);
74375
74375
  if (url.slice(-4) !== '.bin') {
74376
74376
  o.url = url;
74377
74377
  const snd = sound_1.Sound.from(o);
74378
+ if (buf)
74379
+ __classPrivateFieldGet(this, _SoundMng_hSndBuf, "f")[buf].snd = snd;
74378
74380
  if (!o.loop)
74379
74381
  sound_1.sound.add(fn, snd);
74380
74382
  return;
@@ -74388,6 +74390,8 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
74388
74390
  .load((_ldr, hRes) => {
74389
74391
  o.source = hRes[fn]?.data;
74390
74392
  const snd = sound_1.Sound.from(o);
74393
+ if (buf)
74394
+ __classPrivateFieldGet(this, _SoundMng_hSndBuf, "f")[buf].snd = snd;
74391
74395
  if (!o.loop)
74392
74396
  sound_1.sound.add(fn, snd);
74393
74397
  });
@@ -74399,9 +74403,12 @@ _a = SoundMng, _SoundMng_hSndBuf = new WeakMap(), _SoundMng_hLP = new WeakMap(),
74399
74403
  return false;
74400
74404
  }, _SoundMng_stopbgm = function _SoundMng_stopbgm(hArg) { hArg.buf = 'BGM'; return __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_stopse).call(this, hArg); }, _SoundMng_stopse = function _SoundMng_stopse(hArg) {
74401
74405
  const buf = hArg.buf ?? 'SE';
74402
- __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_stopfadese).call(this, hArg);
74403
74406
  __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_delLoopPlay).call(this, buf);
74404
- __classPrivateFieldGet(this, _SoundMng_hSndBuf, "f")[buf]?.snd?.stop();
74407
+ const oSb = __classPrivateFieldGet(this, _SoundMng_hSndBuf, "f")[buf];
74408
+ if (oSb) {
74409
+ oSb.snd?.stop();
74410
+ oSb.onend();
74411
+ }
74405
74412
  return false;
74406
74413
  }, _SoundMng_wb = function _SoundMng_wb(hArg) { hArg.buf = 'BGM'; return __classPrivateFieldGet(this, _SoundMng_instances, "m", _SoundMng_wf).call(this, hArg); }, _SoundMng_wf = function _SoundMng_wf(hArg) {
74407
74414
  const buf = hArg.buf ?? 'SE';