@vosjs/studio-core 0.31.0 → 0.31.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 +16 -15
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -7727,24 +7727,25 @@ var ON_FRAME = `(ctx, content, dt) => {
|
|
|
7727
7727
|
var cpH = 2 * ${Math.abs(CARD_Z)} * Math.tan(${CARD_FOV} * Math.PI / 180 / 2)
|
|
7728
7728
|
var cpv = null
|
|
7729
7729
|
if (cpk && cpk.keyframes && cpk.keyframes.length) cpv = TL.sample(cpk, t, TL.lerpArray)
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7730
|
+
// The pose track, then a boundary's enter on top: a slide is an offset
|
|
7731
|
+
// in plane widths and heights, a fade an opacity, a scale both. Outside
|
|
7732
|
+
// both, every term is its rest value.
|
|
7733
|
+
//
|
|
7734
|
+
// EVERY field is written EVERY frame, so the pose is a pure function of
|
|
7735
|
+
// t. A pose restored only when some field looked off-rest kept whatever
|
|
7736
|
+
// the last frame left in the fields it did not look at: a fade moves
|
|
7737
|
+
// opacity alone, so a scrub that jumped out of one mid-window left the
|
|
7738
|
+
// card translucent until something else moved it.
|
|
7739
|
+
var cpS = (cpv ? cpv[0] : 1) * trSc
|
|
7740
|
+
var cpO = (cpv ? cpv[2] : 1) * trOp
|
|
7741
|
+
if (card.mesh.scale) { card.mesh.scale.x = cpS; card.mesh.scale.y = cpS }
|
|
7742
|
+
if (card.mesh.position) {
|
|
7736
7743
|
card.mesh.position.x = trOx * cpH * (W / H)
|
|
7737
7744
|
card.mesh.position.y = ((cpv ? cpv[1] : 0) + trOy) * cpH
|
|
7738
|
-
if (card.mesh.material) card.mesh.material.opacity = cpO
|
|
7739
|
-
// Gone past its clip: the mesh leaves the scene, not just its paint.
|
|
7740
|
-
card.mesh.visible = cpO > 0.001
|
|
7741
|
-
} else if (card.mesh.scale && card.mesh.position && ((card.mesh.scale.x !== undefined && card.mesh.scale.x !== 1) || (card.mesh.position.y !== undefined && card.mesh.position.y !== 0) || (card.mesh.position.x !== undefined && card.mesh.position.x !== 0) || card.mesh.visible === false)) {
|
|
7742
|
-
card.mesh.scale.x = 1; card.mesh.scale.y = 1
|
|
7743
|
-
card.mesh.position.x = 0
|
|
7744
|
-
card.mesh.position.y = 0
|
|
7745
|
-
if (card.mesh.material) card.mesh.material.opacity = 1
|
|
7746
|
-
card.mesh.visible = true
|
|
7747
7745
|
}
|
|
7746
|
+
if (card.mesh.material) card.mesh.material.opacity = cpO
|
|
7747
|
+
// Gone past its clip: the mesh leaves the scene, not just its paint.
|
|
7748
|
+
card.mesh.visible = cpO > 0.001
|
|
7748
7749
|
var tilted = rx * rx + ry * ry > 1e-6
|
|
7749
7750
|
if (card.texture && card.texture.generateMipmaps !== tilted) {
|
|
7750
7751
|
var THREE2 = ctx.THREE
|