@vosjs/studio-core 0.40.2 → 0.40.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.
package/dist/index.js CHANGED
@@ -7766,6 +7766,45 @@ var ON_FRAME = `(ctx, content, dt) => {
7766
7766
  if (bg.texture) bg.texture.needsUpdate = true
7767
7767
  }
7768
7768
 
7769
+ // The two painters every pass shares, and the overlay layer after the
7770
+ // loop too (the cam bubble, the dot across a boundary). They stand OUTSIDE
7771
+ // the loop on purpose: the program runs as a module, so it is strict, and
7772
+ // in strict code a function declared in a block exists only in that block.
7773
+ function rr(x, y, w, h, rd, cx) {
7774
+ var cc = cx || c
7775
+ if (cc.roundRect) { cc.beginPath(); cc.roundRect(x, y, w, h, rd) }
7776
+ else { cc.beginPath(); cc.rect(x, y, w, h) }
7777
+ }
7778
+
7779
+ // The pointer's shape: an OS-style arrow (tip on the recorded point, a
7780
+ // black body with a white edge, the shape of the pointer on the viewer's
7781
+ // own screen) or the white dot every earlier take was cut with. One
7782
+ // painter for both draw sites (in the card, and the ghost across a
7783
+ // boundary); r is the dot's radius, so an arrow stands 2r tall.
7784
+ var curArrow = !!(d.cursorStyle && d.cursorStyle.style === 'arrow')
7785
+ function drawCur(cc, x, y, r, a, lw) {
7786
+ cc.save()
7787
+ if (curArrow) {
7788
+ var h = 2 * r
7789
+ var P = [[0, 0], [0, 0.72], [0.19, 0.55], [0.31, 0.83], [0.43, 0.78], [0.31, 0.5], [0.55, 0.5]]
7790
+ cc.beginPath()
7791
+ cc.moveTo(x, y)
7792
+ for (var pi = 1; pi < P.length; pi++) cc.lineTo(x + P[pi][0] * h, y + P[pi][1] * h)
7793
+ cc.closePath()
7794
+ cc.lineJoin = 'round'
7795
+ cc.fillStyle = 'rgba(0,0,0,' + (0.92 * a) + ')'
7796
+ cc.strokeStyle = 'rgba(255,255,255,' + (0.95 * a) + ')'
7797
+ cc.lineWidth = Math.max(1, lw * 0.75)
7798
+ cc.fill(); cc.stroke()
7799
+ } else {
7800
+ cc.fillStyle = 'rgba(255,255,255,' + (0.95 * a) + ')'
7801
+ cc.strokeStyle = 'rgba(0,0,0,' + (0.4 * a) + ')'
7802
+ cc.lineWidth = lw
7803
+ cc.beginPath(); cc.arc(x, y, r, 0, Math.PI * 2); cc.fill(); cc.stroke()
7804
+ }
7805
+ cc.restore()
7806
+ }
7807
+
7769
7808
  // The card paints in PASSES: the ghost first (the outgoing clip's last
7770
7809
  // frame on its own canvas, while a boundary is crossing), then the live
7771
7810
  // card. A pass swaps the canvas, the element, the media, the source
@@ -7880,12 +7919,6 @@ var ON_FRAME = `(ctx, content, dt) => {
7880
7919
  shRgb = parseInt(shHex.slice(1, 3), 16) + ',' + parseInt(shHex.slice(3, 5), 16) + ',' + parseInt(shHex.slice(5, 7), 16)
7881
7920
  }
7882
7921
 
7883
- function rr(x, y, w, h, rd, cx) {
7884
- var cc = cx || c
7885
- if (cc.roundRect) { cc.beginPath(); cc.roundRect(x, y, w, h, rd) }
7886
- else { cc.beginPath(); cc.rect(x, y, w, h) }
7887
- }
7888
-
7889
7922
  c.save()
7890
7923
  // d.zoomSuppressed = editor aiming mode: the host merges it into ctx.data
7891
7924
  // while the focus overlay is up so the full frame renders. Never persisted.
@@ -8062,35 +8095,6 @@ var ON_FRAME = `(ctx, content, dt) => {
8062
8095
  // cursor coordinate space + drawn radius (shared by click effects + the dot)
8063
8096
  var space = (actM ? actM.cursorSpace : d.cursorSpace) || { w: vw, h: vh }
8064
8097
  var curSize = ((d.cursorStyle && d.cursorStyle.size) || 24) * s2 * 0.5
8065
- // The pointer's shape: an OS-style arrow (tip on the recorded point, a
8066
- // black body with a white edge, the shape of the pointer on the viewer's
8067
- // own screen) or the white dot every earlier take was cut with. One
8068
- // painter for both draw sites (in the card, and the ghost across a
8069
- // boundary); r is the dot's radius, so an arrow stands 2r tall.
8070
- var curArrow = !!(d.cursorStyle && d.cursorStyle.style === 'arrow')
8071
- function drawCur(cc, x, y, r, a, lw) {
8072
- cc.save()
8073
- if (curArrow) {
8074
- var h = 2 * r
8075
- var P = [[0, 0], [0, 0.72], [0.19, 0.55], [0.31, 0.83], [0.43, 0.78], [0.31, 0.5], [0.55, 0.5]]
8076
- cc.beginPath()
8077
- cc.moveTo(x, y)
8078
- for (var pi = 1; pi < P.length; pi++) cc.lineTo(x + P[pi][0] * h, y + P[pi][1] * h)
8079
- cc.closePath()
8080
- cc.lineJoin = 'round'
8081
- cc.fillStyle = 'rgba(0,0,0,' + (0.92 * a) + ')'
8082
- cc.strokeStyle = 'rgba(255,255,255,' + (0.95 * a) + ')'
8083
- cc.lineWidth = Math.max(1, lw * 0.75)
8084
- cc.fill(); cc.stroke()
8085
- } else {
8086
- cc.fillStyle = 'rgba(255,255,255,' + (0.95 * a) + ')'
8087
- cc.strokeStyle = 'rgba(0,0,0,' + (0.4 * a) + ')'
8088
- cc.lineWidth = lw
8089
- cc.beginPath(); cc.arc(x, y, r, 0, Math.PI * 2); cc.fill(); cc.stroke()
8090
- }
8091
- cc.restore()
8092
- }
8093
-
8094
8098
  // click effects \u2014 pure f(t): d.clicks are
8095
8099
  // OUTPUT-anchored records baked at lowering (sorted by ot; re-baked on every
8096
8100
  // edit, so they can't go stale), drawn UNDER the cursor and inside the zoom