@glissade/export-web 0.4.1 → 0.4.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -226,8 +226,13 @@ async function mixAudio(clips, duration, sampleRate = 48e3) {
226
226
  if (clip.gain) {
227
227
  const gainNode = ctx.createGain();
228
228
  const keys = clip.gain.keys;
229
+ const gainTrack = {
230
+ target: "clip/gain",
231
+ type: "number",
232
+ keys
233
+ };
229
234
  gainNode.gain.setValueAtTime(Number(keys[0].value), Math.max(0, clip.at));
230
- for (const k of keys) gainNode.gain.linearRampToValueAtTime(Number(sampleTrack(clip.gain, k.t)), clip.at + k.t);
235
+ for (const k of keys) gainNode.gain.linearRampToValueAtTime(Number(sampleTrack(gainTrack, k.t)), clip.at + k.t);
231
236
  tail.connect(gainNode);
232
237
  tail = gainNode;
233
238
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissade/export-web",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "glissade in-browser export: WebCodecs VideoEncoder + Mediabunny muxing, OfflineAudioContext audio mix. Frame-accurate, faster than realtime, no server.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -16,9 +16,9 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "mediabunny": "^1.0.0",
19
- "@glissade/backend-canvas2d": "0.4.1",
20
- "@glissade/core": "0.4.1",
21
- "@glissade/scene": "0.4.1"
19
+ "@glissade/backend-canvas2d": "0.4.3",
20
+ "@glissade/core": "0.4.3",
21
+ "@glissade/scene": "0.4.3"
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",