mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-10 22:20:14 +00:00
57 lines
1.8 KiB
Plaintext
57 lines
1.8 KiB
Plaintext
---
|
||
title: "Liquid Background"
|
||
description: "Organic liquid simulation with vertex displacement on a subdivided plane. HTML content floats above rippling fluid surface with real-time wave dynamics."
|
||
---
|
||
|
||
<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-background.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/vfx-liquid-background.png" autoPlay muted loop playsInline />
|
||
|
||
## Install
|
||
|
||
```bash Terminal
|
||
npx hyperframes add vfx-liquid-background
|
||
```
|
||
|
||
That writes one file: `compositions/vfx-liquid-background.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 12 seconds at 1920×1080. Paste this into your composition:
|
||
|
||
```html index.html
|
||
<div
|
||
data-composition-id="vfx-liquid-background"
|
||
data-composition-src="compositions/vfx-liquid-background.html"
|
||
data-start="0"
|
||
data-duration="12"
|
||
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 `#0a0e17`.
|
||
- `--text-color` — Text color. Defaults to `#e2e8f0`.
|
||
|
||
{/* hf:generated-footer */}
|
||
|
||
Tagged `html-in-canvas` `liquid` `webgl` `displacement` `background`.
|
||
|
||
## Related topics
|
||
|
||
- [Browse the complete Catalog](/catalog)
|
||
- [Add assets and Catalog items in Studio](/studio/assets-and-blocks)
|
||
- [Build a richer composition](/go-further)
|