Files
hyperframes/docs/catalog/blocks/vfx-liquid-glass.mdx
T

57 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Liquid Glass"
description: "VFX composition block"
---
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/vfx-liquid-glass.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/vfx-liquid-glass.png" autoPlay muted loop playsInline />
## Install
```bash Terminal
npx hyperframes add vfx-liquid-glass
```
That writes one file: `compositions/vfx-liquid-glass.html`.
<Warning>
Live preview needs the `chrome://flags/#canvas-draw-element` flag switched on.
Rendering from the CLI switches it on for you. [How it
works](/guides/html-in-canvas)
</Warning>
## Add it to your video
It runs for 20 seconds at 1920×1080. Paste this into your composition:
```html index.html
<div
data-composition-id="vfx-liquid-glass"
data-composition-src="compositions/vfx-liquid-glass.html"
data-start="0"
data-duration="20"
data-track-index="1"
data-width="1920"
data-height="1080"
></div>
```
Move it in time with `data-start`. Put it on a different timeline row with
`data-track-index`. See [data attributes](/concepts/data-attributes) for the rest.
## Change the colors
Set these CSS variables on the block:
- `--bg-color` — Background. Defaults to `#030407`.
- `--accent-color` — Accent. Defaults to `#00d4ff`.
{/* hf:generated-footer */}
Tagged `html-in-canvas` `webgl`.
## Related topics
- [Browse the complete Catalog](/catalog)
- [Add assets and Catalog items in Studio](/studio/assets-and-blocks)
- [Build a richer composition](/go-further)