@famibee/skynovel 1.64.17 → 1.64.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CmnTween.js +15 -15
- package/dist/CmnTween.js.map +1 -1
- package/dist/LayerMng.js +248 -250
- package/dist/LayerMng.js.map +1 -1
- package/dist/SndBuf.js +32 -27
- package/dist/SndBuf.js.map +1 -1
- package/dist/sn/CmnInterface.d.ts.map +1 -1
- package/dist/sn/CmnTween.d.ts +1 -1
- package/dist/sn/CmnTween.d.ts.map +1 -1
- package/dist/sn/FrameMng.d.ts.map +1 -1
- package/dist/sn/SndBuf.d.ts.map +1 -1
- package/dist/web2.js +4 -4
- package/dist/web2.js.map +1 -1
- package/dist_app/CmnTween.js +15 -15
- package/dist_app/CmnTween.js.map +1 -1
- package/dist_app/LayerMng.js +248 -250
- package/dist_app/LayerMng.js.map +1 -1
- package/dist_app/SndBuf.js +32 -27
- package/dist_app/SndBuf.js.map +1 -1
- package/dist_app/app2.js +4 -4
- package/dist_app/app2.js.map +1 -1
- package/dist_app/sn/CmnInterface.d.ts.map +1 -1
- package/dist_app/sn/CmnTween.d.ts +1 -1
- package/dist_app/sn/CmnTween.d.ts.map +1 -1
- package/dist_app/sn/FrameMng.d.ts.map +1 -1
- package/dist_app/sn/SndBuf.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/SndBuf.js
CHANGED
|
@@ -294,8 +294,8 @@ var q = se.filter(function(n) {
|
|
|
294
294
|
}, e.prototype.play = function(t) {
|
|
295
295
|
var s = t.start, o = t.end, i = t.speed, r = t.loop, u = t.volume, a = t.muted, l = t.filters;
|
|
296
296
|
this._paused = !1;
|
|
297
|
-
var h = this._media.nodes.cloneBufferSource(),
|
|
298
|
-
this._source =
|
|
297
|
+
var h = this._media.nodes.cloneBufferSource(), m = h.source, y = h.gain;
|
|
298
|
+
this._source = m, this._gain = y, this._speed = i, this._volume = u, this._loop = !!r, this._muted = a, this._filters = l, this.refresh();
|
|
299
299
|
var g = this._source.buffer.duration;
|
|
300
300
|
this._duration = g, this._end = o, this._lastUpdate = this._now(), this._elapsed = s, this._source.onended = this._onComplete.bind(this), this._loop ? (this._source.loopEnd = o, this._source.loopStart = s, this._source.start(0, s)) : o ? this._source.start(0, s, o - s) : this._source.start(0, s), this.emit("start"), this._update(!0), this.enableTicker(!0);
|
|
301
301
|
}, e.prototype.enableTicker = function(t) {
|
|
@@ -496,8 +496,8 @@ var q = se.filter(function(n) {
|
|
|
496
496
|
s.start = r.start + (s.start || 0), s.end = r.end, s.speed = r.speed || 1, s.loop = r.loop || s.loop, delete s.sprite;
|
|
497
497
|
}
|
|
498
498
|
if (s.offset && (s.start = s.offset), !this.isLoaded) return new Promise(function(a, l) {
|
|
499
|
-
o.autoPlay = !0, o._autoPlayOptions = s, o._preload(function(h,
|
|
500
|
-
h ? l(h) : (s.loaded && s.loaded(h,
|
|
499
|
+
o.autoPlay = !0, o._autoPlayOptions = s, o._preload(function(h, m, y) {
|
|
500
|
+
h ? l(h) : (s.loaded && s.loaded(h, m, y), a(y));
|
|
501
501
|
});
|
|
502
502
|
});
|
|
503
503
|
(this.singleInstance || s.singleInstance) && this._removeInstances();
|
|
@@ -728,22 +728,22 @@ var q = se.filter(function(n) {
|
|
|
728
728
|
this.disconnect(), this.destination = null, this.source = null;
|
|
729
729
|
}, n;
|
|
730
730
|
}(), B = { __proto__: null, EqualizerFilter: function(n) {
|
|
731
|
-
function e(t, s, o, i, r, u, a, l, h,
|
|
732
|
-
t === void 0 && (t = 0), s === void 0 && (s = 0), o === void 0 && (o = 0), i === void 0 && (i = 0), r === void 0 && (r = 0), u === void 0 && (u = 0), a === void 0 && (a = 0), l === void 0 && (l = 0), h === void 0 && (h = 0),
|
|
733
|
-
var
|
|
731
|
+
function e(t, s, o, i, r, u, a, l, h, m) {
|
|
732
|
+
t === void 0 && (t = 0), s === void 0 && (s = 0), o === void 0 && (o = 0), i === void 0 && (i = 0), r === void 0 && (r = 0), u === void 0 && (u = 0), a === void 0 && (a = 0), l === void 0 && (l = 0), h === void 0 && (h = 0), m === void 0 && (m = 0);
|
|
733
|
+
var y = this;
|
|
734
734
|
if (!_().useLegacy) {
|
|
735
|
-
var g = [{ f: e.F32, type: "lowshelf", gain: t }, { f: e.F64, type: "peaking", gain: s }, { f: e.F125, type: "peaking", gain: o }, { f: e.F250, type: "peaking", gain: i }, { f: e.F500, type: "peaking", gain: r }, { f: e.F1K, type: "peaking", gain: u }, { f: e.F2K, type: "peaking", gain: a }, { f: e.F4K, type: "peaking", gain: l }, { f: e.F8K, type: "peaking", gain: h }, { f: e.F16K, type: "highshelf", gain:
|
|
735
|
+
var g = [{ f: e.F32, type: "lowshelf", gain: t }, { f: e.F64, type: "peaking", gain: s }, { f: e.F125, type: "peaking", gain: o }, { f: e.F250, type: "peaking", gain: i }, { f: e.F500, type: "peaking", gain: r }, { f: e.F1K, type: "peaking", gain: u }, { f: e.F2K, type: "peaking", gain: a }, { f: e.F4K, type: "peaking", gain: l }, { f: e.F8K, type: "peaking", gain: h }, { f: e.F16K, type: "highshelf", gain: m }].map(function($) {
|
|
736
736
|
var p = _().context.audioContext.createBiquadFilter();
|
|
737
737
|
return p.type = $.type, v.setParamValue(p.Q, 1), p.frequency.value = $.f, v.setParamValue(p.gain, $.gain), p;
|
|
738
738
|
});
|
|
739
|
-
(
|
|
740
|
-
for (var d = 0; d <
|
|
741
|
-
var w =
|
|
742
|
-
d > 0 &&
|
|
739
|
+
(y = n.call(this, g[0], g[g.length - 1]) || this).bands = g, y.bandsMap = {};
|
|
740
|
+
for (var d = 0; d < y.bands.length; d++) {
|
|
741
|
+
var w = y.bands[d];
|
|
742
|
+
d > 0 && y.bands[d - 1].connect(w), y.bandsMap[w.frequency.value] = w;
|
|
743
743
|
}
|
|
744
|
-
return
|
|
744
|
+
return y;
|
|
745
745
|
}
|
|
746
|
-
|
|
746
|
+
y = n.call(this, null) || this;
|
|
747
747
|
}
|
|
748
748
|
return b(e, n), e.prototype.setGain = function(t, s) {
|
|
749
749
|
if (s === void 0 && (s = 0), !this.bandsMap[t]) throw new Error("No band found for frequency ".concat(t));
|
|
@@ -913,7 +913,7 @@ class j {
|
|
|
913
913
|
return this.#e;
|
|
914
914
|
}
|
|
915
915
|
addSnd(e) {
|
|
916
|
-
switch (this.loop = e.loop, this.stt.onLoad(this), this.pan !== 0 && (e.filters = [new B.StereoFilter(this.pan)]), this.setVol = (t) => {
|
|
916
|
+
switch (this.snd = e, this.loop = e.loop, this.stt.onLoad(this), this.pan !== 0 && (e.filters = [new B.StereoFilter(this.pan)]), this.setVol = (t) => {
|
|
917
917
|
e.volume = t;
|
|
918
918
|
}, this.tw = () => new he(e), this.onPlayEnd = () => {
|
|
919
919
|
this.stt.onPlayEnd(this.buf), this.#s();
|
|
@@ -969,8 +969,8 @@ class f {
|
|
|
969
969
|
c.setVal_Nochk("save", l + "fn", s);
|
|
970
970
|
const h = f.getVol(e, 1);
|
|
971
971
|
c.setVal_Nochk("save", l + "volume", h);
|
|
972
|
-
const
|
|
973
|
-
|
|
972
|
+
const m = h * Number(c.getVal("sys:" + l + "volume", 1, !0)), y = A(e, "loop", !1);
|
|
973
|
+
y ? (f.#t[t] = s, c.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(f.#t))) : f.delLoopPlay(t), c.setVal_Nochk("save", l + "start_ms", o), c.setVal_Nochk("save", l + "end_ms", i), c.setVal_Nochk("save", l + "ret_ms", r), c.setVal_Nochk("tmp", l + "playing", !0), c.flush();
|
|
974
974
|
const g = z.find(s);
|
|
975
975
|
this.#e = new j(
|
|
976
976
|
s,
|
|
@@ -978,14 +978,14 @@ class f {
|
|
|
978
978
|
o,
|
|
979
979
|
i,
|
|
980
980
|
r,
|
|
981
|
-
|
|
981
|
+
m,
|
|
982
982
|
u,
|
|
983
983
|
g
|
|
984
984
|
);
|
|
985
985
|
const d = {
|
|
986
|
-
loop:
|
|
986
|
+
loop: y,
|
|
987
987
|
speed: a,
|
|
988
|
-
volume:
|
|
988
|
+
volume: m,
|
|
989
989
|
loaded: (p, x) => {
|
|
990
990
|
if (!this.#e.stt.isDestroy) {
|
|
991
991
|
if (p) {
|
|
@@ -1012,7 +1012,7 @@ class f {
|
|
|
1012
1012
|
p.end < 0 && (p.end += M, I.removeSprites(w), I.addSprites(w, p)), p.end <= p.start && S.errScript(`[playse] end_ms:${i}(${p.end * 1e3}) >= start_ms:${o} は異常値です`), p.end * 1e3 <= r && S.errScript(`[playse] end_ms:${i}(${p.end * 1e3}) <= ret_ms:${r} は異常値です`), M <= p.start && S.errScript(`[playse] 音声ファイル再生時間:${M * 1e3} <= start_ms:${o} は異常値です`), i !== f.MAX_END_MS && M <= p.end && S.errScript(`[playse] 音声ファイル再生時間:${M * 1e3} <= end_ms:${i} は異常値です`), I.play(w, (re) => d.complete?.(re));
|
|
1013
1013
|
};
|
|
1014
1014
|
} else d.autoPlay = !0;
|
|
1015
|
-
if (
|
|
1015
|
+
if (y ? r !== 0 && (d.loop = !1, d.complete = (p) => {
|
|
1016
1016
|
const x = p.duration, C = r / 1e3, E = i / 1e3;
|
|
1017
1017
|
x <= C && S.errScript(`[playse] 音声ファイル再生時間:${x * 1e3} <= ret_ms:${r} は異常値です`), p.play({
|
|
1018
1018
|
// 一周目はループなし、なのでキャッシュされてる
|
|
@@ -1032,7 +1032,7 @@ class f {
|
|
|
1032
1032
|
}) : d.complete = () => {
|
|
1033
1033
|
W(this.#e, t), this.#e.onPlayEnd();
|
|
1034
1034
|
}, this.#s(), g) {
|
|
1035
|
-
if (g.volume =
|
|
1035
|
+
if (g.volume = m, w) this.#n(s, d);
|
|
1036
1036
|
else if (g.isPlayable) {
|
|
1037
1037
|
const p = g.options.source;
|
|
1038
1038
|
!(p instanceof ArrayBuffer) || p.byteLength === 0 ? g.play(d) : this.#e.addSnd(N.from({
|
|
@@ -1180,12 +1180,17 @@ class G {
|
|
|
1180
1180
|
e.setVol(u), e.stt = a ? new P(e) : new G(e);
|
|
1181
1181
|
return;
|
|
1182
1182
|
}
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1183
|
+
if (!e.snd) return;
|
|
1184
|
+
const m = e.tw();
|
|
1185
|
+
m && (pe.setTwProp(m, t).to({ volume: u }, l).onUpdate((y) => {
|
|
1186
|
+
if (e.snd?.isPlaying) {
|
|
1187
|
+
e.snd.volume = y.volume;
|
|
1188
|
+
return;
|
|
1189
|
+
}
|
|
1190
|
+
m.stop(), m.onComplete();
|
|
1186
1191
|
}).onComplete(() => {
|
|
1187
|
-
fe(
|
|
1188
|
-
}).start(), e.stt = new je(
|
|
1192
|
+
fe(m), e.stt.compFade(s), e.stt = a ? new P(e) : new G(e);
|
|
1193
|
+
}).start(), e.stt = new je(m, e));
|
|
1189
1194
|
}
|
|
1190
1195
|
wf = () => !1;
|
|
1191
1196
|
// ok
|