Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions registry/components/caption-texture-lava/registry-item.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=1920, height=1080" />
<title>Texture Lava</title>
<title>Texture</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Anton&display=swap" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
<style>
/* Inlined texture-mask-text component styles */
.hf-texture-text {
color: #fff;
-webkit-mask-size: var(--mask-size, cover);
Expand All @@ -20,10 +19,6 @@
mask-mode: luminance;
filter: contrast(var(--mask-contrast, 1));
}
.hf-texture-lava {
-webkit-mask-image: url("compositions/components/lava.png");
mask-image: url("compositions/components/lava.png");
}

*,
*::before,
Expand Down Expand Up @@ -67,7 +62,6 @@
pointer-events: none;
}

/* Lava-specific overrides for texture mask */
.lv-texture-override {
-webkit-mask-size: 200% 200%;
mask-size: 200% 200%;
Expand Down Expand Up @@ -101,13 +95,14 @@
</head>
<body>
<div
id="texture-lava"
data-composition-id="caption-texture-lava"
id="caption-texture"
data-composition-id="caption-texture"
data-start="0"
data-duration="8"
data-fps="30"
data-width="1920"
data-height="1080"
data-composition-variables='{"texture":{"type":"string","default":"lava"}}'
>
<video
id="lv-video"
Expand All @@ -126,6 +121,13 @@
(function () {
window.__timelines = window.__timelines || {};

var vars =
window.__hyperframes && window.__hyperframes.getVariables
? window.__hyperframes.getVariables()
: {};
var TEXTURE = vars.texture || "lava";
var TEXTURE_URL = "compositions/components/" + TEXTURE + ".png";

var _fitCanvas = document.createElement("canvas");
var _fitCtx = _fitCanvas.getContext("2d");
function fitFontSize(text, baseFontSize, fontWeight, fontFamily, maxWidth) {
Expand Down Expand Up @@ -170,7 +172,7 @@
{ text: "cinema.", start: 7.3, end: 7.7 },
];

var KEYWORDS = new Set([8, 12, 15, 24, 27]); // HyperFrames, HTML, professional, code, cinema.
var KEYWORDS = new Set([8, 12, 15, 24, 27]);

var container = document.getElementById("lv-container");
var tl = gsap.timeline({ paused: true });
Expand All @@ -185,10 +187,12 @@
gsap.set(shadow, { yPercent: -50 });

var wordEl = document.createElement("div");
wordEl.className = "hf-texture-text hf-texture-lava lv-texture-override lv-word";
wordEl.className = "hf-texture-text lv-texture-override lv-word";
wordEl.id = "lv-word-" + wi;
wordEl.textContent = txt;
wordEl.style.fontSize = fontSize + "px";
wordEl.style.webkitMaskImage = "url('" + TEXTURE_URL + "')";
wordEl.style.maskImage = "url('" + TEXTURE_URL + "')";
if (KEYWORDS.has(wi)) wordEl.style.color = "#FFAA44";

shadow.appendChild(wordEl);
Expand All @@ -215,7 +219,7 @@
});

tl.seek(0);
window.__timelines["caption-texture-lava"] = tl;
window.__timelines["caption-texture"] = tl;
})();
</script>
</body>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=1920, height=1080" />
<title>Texture Lava</title>
<title>Texture</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Anton&display=swap" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
<style>
/* Inlined texture-mask-text component styles */
.hf-texture-text {
color: #fff;
-webkit-mask-size: var(--mask-size, cover);
Expand All @@ -20,10 +19,6 @@
mask-mode: luminance;
filter: contrast(var(--mask-contrast, 1));
}
.hf-texture-lava {
-webkit-mask-image: url("compositions/components/lava.png");
mask-image: url("compositions/components/lava.png");
}

*,
*::before,
Expand Down Expand Up @@ -67,7 +62,6 @@
pointer-events: none;
}

/* Lava-specific overrides for texture mask */
.lv-texture-override {
-webkit-mask-size: 200% 200%;
mask-size: 200% 200%;
Expand Down Expand Up @@ -101,13 +95,14 @@
</head>
<body>
<div
id="texture-lava"
data-composition-id="caption-texture-lava"
id="caption-texture"
data-composition-id="caption-texture"
data-start="0"
data-duration="8"
data-fps="30"
data-width="1920"
data-height="1080"
data-composition-variables='{"texture":{"type":"string","default":"lava"}}'
>
<video
id="lv-video"
Expand All @@ -126,6 +121,13 @@
(function () {
window.__timelines = window.__timelines || {};

var vars =
window.__hyperframes && window.__hyperframes.getVariables
? window.__hyperframes.getVariables()
: {};
var TEXTURE = vars.texture || "lava";
var TEXTURE_URL = "compositions/components/" + TEXTURE + ".png";

var _fitCanvas = document.createElement("canvas");
var _fitCtx = _fitCanvas.getContext("2d");
function fitFontSize(text, baseFontSize, fontWeight, fontFamily, maxWidth) {
Expand Down Expand Up @@ -170,7 +172,7 @@
{ text: "cinema.", start: 7.3, end: 7.7 },
];

var KEYWORDS = new Set([8, 12, 15, 24, 27]); // HyperFrames, HTML, professional, code, cinema.
var KEYWORDS = new Set([8, 12, 15, 24, 27]);

var container = document.getElementById("lv-container");
var tl = gsap.timeline({ paused: true });
Expand All @@ -185,10 +187,12 @@
gsap.set(shadow, { yPercent: -50 });

var wordEl = document.createElement("div");
wordEl.className = "hf-texture-text hf-texture-lava lv-texture-override lv-word";
wordEl.className = "hf-texture-text lv-texture-override lv-word";
wordEl.id = "lv-word-" + wi;
wordEl.textContent = txt;
wordEl.style.fontSize = fontSize + "px";
wordEl.style.webkitMaskImage = "url('" + TEXTURE_URL + "')";
wordEl.style.maskImage = "url('" + TEXTURE_URL + "')";
if (KEYWORDS.has(wi)) wordEl.style.color = "#FFAA44";

shadow.appendChild(wordEl);
Expand All @@ -215,7 +219,7 @@
});

tl.seek(0);
window.__timelines["caption-texture-lava"] = tl;
window.__timelines["caption-texture"] = tl;
})();
</script>
</body>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions registry/components/caption-texture/registry-item.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "https://hyperframes.heygen.com/schema/registry-item.json",
"name": "caption-texture",
"type": "hyperframes:component",
"title": "Texture",
"description": "Flowing texture mask over large uppercase text — ships with 6 textures (lava, marble, metal, wood, concrete, rock), configurable via the texture variable",
"tags": ["captions", "caption-style", "texture", "mask"],
"files": [
{
"path": "caption-texture.html",
"target": "compositions/components/caption-texture.html",
"type": "hyperframes:snippet"
},
{
"path": "lava.png",
"target": "compositions/components/lava.png",
"type": "hyperframes:asset"
},
{
"path": "marble-012.png",
"target": "compositions/components/marble-012.png",
"type": "hyperframes:asset"
},
{
"path": "metal-046-b.png",
"target": "compositions/components/metal-046-b.png",
"type": "hyperframes:asset"
},
{
"path": "wood-066.png",
"target": "compositions/components/wood-066.png",
"type": "hyperframes:asset"
},
{
"path": "concrete-042-a.png",
"target": "compositions/components/concrete-042-a.png",
"type": "hyperframes:asset"
},
{
"path": "rock-058.png",
"target": "compositions/components/rock-058.png",
"type": "hyperframes:asset"
}
],
"preview": "https://static.heygen.ai/hyperframes-oss/registry/components/caption-texture-lava/preview.mp4?v=1779051416"
}
Binary file added registry/components/caption-texture/rock-058.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion registry/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"type": "hyperframes:component"
},
{
"name": "caption-texture-lava",
"name": "caption-texture",
"type": "hyperframes:component"
},
{
Expand Down
Loading