@vosjs/studio-core 0.45.0 → 0.45.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/dist/index.js CHANGED
@@ -6231,8 +6231,20 @@ var STUDIO_FRAME = `(ctx, content, dt) => {
6231
6231
  var rbPY = ol.box.py * olMS * s
6232
6232
  var rbW = rtL.width + rbPX * 2
6233
6233
  var rbH = rtN * rtLH + rbPY * 2
6234
+ // A per-unit entrance leaves the clip at full strength while its
6235
+ // units arrive one by one, so the box follows the EARLIEST unit (the
6236
+ // units' own delay, seconds and ease) or it stands empty until the
6237
+ // first word shows. A typewriter's field is there from its first frame.
6238
+ var rbA = 1
6239
+ if (rtFx && rtFx.k !== 'typewriter') {
6240
+ var rbN = 0
6241
+ for (var rbi = 0; rbi < rtN; rbi++) rbN += rtL.lines[rbi].units.length
6242
+ var rbO = rtFx.d === 2 && rbN % 2 === 0 ? 0.5 : 0
6243
+ var rbU = Math.max(0, Math.min(1, (olT - rbO * rtFx.st) / rtFx.dur))
6244
+ rbA = rtFx.k === 'pop' ? Math.min(1, rbU * 2) : 1 - Math.pow(1 - rbU, 3)
6245
+ }
6234
6246
  ovC.save()
6235
- ovC.globalAlpha = olA * ol.box.o
6247
+ ovC.globalAlpha = olA * ol.box.o * rbA
6236
6248
  ovC.fillStyle = ol.box.c
6237
6249
  rr(-rbW / 2, -rbH / 2, rbW, rbH, Math.min(ol.box.r * olMS * s, rbH / 2), ovC)
6238
6250
  ovC.fill()
@@ -9047,8 +9059,18 @@ var ON_FRAME = `(ctx, content, dt) => {
9047
9059
  var tqAx = (tqA[0] - W / 2) * trGsc + W / 2 + trGox * W, tqAy = (tqA[1] - H / 2) * trGsc + H / 2 - trGoy * H
9048
9060
  var tqBx = (tqB[0] - W / 2) * trSc + W / 2 + trOx * W, tqBy = (tqB[1] - H / 2) * trSc + H / 2 - trOy * H
9049
9061
  var tqX2 = tqAx + (tqBx - tqAx) * tqP, tqY2 = tqAy + (tqBy - tqAy) * tqP
9062
+ // A slide pulls the two cards a frame apart, so the lerp would cross
9063
+ // the bare ground between them: the dot rides the card that holds
9064
+ // more of the frame instead, moved with it, and only a card's own
9065
+ // point is ever drawn on that card.
9066
+ var tqOn = true
9067
+ if (trOut.kind === 'slide' || (trIn && trIn.kind === 'slide')) {
9068
+ var tqOut = Math.abs(trGox) + Math.abs(trGoy) <= Math.abs(trOx) + Math.abs(trOy)
9069
+ tqOn = tqOut ? !!trQa : !!trQb
9070
+ tqX2 = tqOut ? tqAx : tqBx; tqY2 = tqOut ? tqAy : tqBy
9071
+ }
9050
9072
  var tqR = trQs || (((d.cursorStyle && d.cursorStyle.size) || 24) * s * 0.5)
9051
- drawCur(ovC, tqX2, tqY2, tqR, 1, 2 * (trQw || s))
9073
+ if (tqOn) drawCur(ovC, tqX2, tqY2, tqR, 1, 2 * (trQw || s))
9052
9074
  }
9053
9075
  ov.sig = ovSig
9054
9076
  ov.active = camActiveNow || !!trOut || pqLive