@markdy/renderer-dom 0.5.3 → 0.5.4
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 +2 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -659,11 +659,12 @@ function createPlayer(opts) {
|
|
|
659
659
|
});
|
|
660
660
|
viewport.appendChild(progressEl);
|
|
661
661
|
}
|
|
662
|
+
const tlAngle = (Math.atan2(-ast.meta.width / 2, ast.meta.height / 2) * 180 / Math.PI + 360) % 360;
|
|
662
663
|
function updateProgressBar(pct) {
|
|
663
664
|
if (!progressEl) return;
|
|
664
665
|
const deg = pct * 360;
|
|
665
666
|
const rainbow = "hsl(0,90%,60%), hsl(45,90%,55%), hsl(90,80%,50%), hsl(180,80%,50%), hsl(270,80%,55%), hsl(330,90%,60%)";
|
|
666
|
-
progressEl.style.background = `conic-gradient(from
|
|
667
|
+
progressEl.style.background = `conic-gradient(from ${tlAngle}deg, ${rainbow} ${deg}deg, transparent ${deg}deg)`;
|
|
667
668
|
progressEl.style.mask = `linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`;
|
|
668
669
|
progressEl.style.webkitMask = progressEl.style.mask;
|
|
669
670
|
progressEl.style.maskComposite = "exclude";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markdy/renderer-dom",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Web Animations API renderer for MarkdyScript scenes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@markdy/core": "0.5.
|
|
46
|
+
"@markdy/core": "0.5.4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"tsup": "^8.5.1",
|