Merge pull request #1045 from heygen-com/feat/vfx-liquid-glass-v2
feat(registry): Apple Liquid Glass components — iOS 26 + macOS Tahoe
@@ -4,5 +4,11 @@
|
|||||||
"correctness": "error"
|
"correctness": "error"
|
||||||
},
|
},
|
||||||
"plugins": ["react", "typescript"],
|
"plugins": ["react", "typescript"],
|
||||||
"ignorePatterns": ["dist/", "coverage/", "node_modules/", "playground/"]
|
"ignorePatterns": [
|
||||||
|
"dist/",
|
||||||
|
"coverage/",
|
||||||
|
"node_modules/",
|
||||||
|
"playground/",
|
||||||
|
"registry/blocks/**/lib/*.iife.js"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
---
|
||||||
|
title: "iOS 26 Liquid Glass Home Screen"
|
||||||
|
description: "3D iPhone with a normal iOS 26 home screen, liquid glass app icons, shader wallpaper, dock, and fluid glass notifications that drop from the status area onto a GLTF device model."
|
||||||
|
---
|
||||||
|
|
||||||
|
# iOS 26 Liquid Glass Home Screen
|
||||||
|
|
||||||
|
3D iPhone with a normal iOS 26 home screen, liquid glass app icons, shader wallpaper, dock, and fluid glass notifications that drop from the status area onto a GLTF device model.
|
||||||
|
|
||||||
|
`liquid-glass-html-in-canvas` `webgpu` `3d` `iphone` `ios26` `notifications` `gltf` `html-in-canvas`
|
||||||
|
|
||||||
|
<Warning>
|
||||||
|
**Requires Chrome flag.** Enable `chrome://flags/#canvas-draw-element` for live preview. Rendering via CLI enables the flag automatically. [Learn more](/guides/html-in-canvas).
|
||||||
|
</Warning>
|
||||||
|
|
||||||
|
<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/ios26-liquid-glass.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/ios26-liquid-glass.png" autoPlay muted loop playsInline />
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
<CodeGroup>
|
||||||
|
|
||||||
|
```bash Terminal
|
||||||
|
npx hyperframes add ios26-liquid-glass
|
||||||
|
```
|
||||||
|
|
||||||
|
</CodeGroup>
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
| Property | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| Type | Block |
|
||||||
|
| Dimensions | 1920×1080 |
|
||||||
|
| Duration | 15s |
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
| File | Target | Type |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `ios26-liquid-glass.html` | `compositions/ios26-liquid-glass.html` | hyperframes:composition |
|
||||||
|
| `models/iphone.glb` | `models/iphone.glb` | hyperframes:asset |
|
||||||
|
| `lib/liquid-glass.iife.js` | `lib/liquid-glass.iife.js` | hyperframes:asset |
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
After installing, add the block to your host composition:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div data-composition-id="ios26-liquid-glass" data-composition-src="compositions/ios26-liquid-glass.html" data-start="0" data-duration="15" data-track-index="1" data-width="1920" data-height="1080"></div>
|
||||||
|
```
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
title: "Liquid Glass Context Menu"
|
||||||
|
description: "Frosted glass context menu panel drifting over an aurora shader background"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Liquid Glass Context Menu
|
||||||
|
|
||||||
|
Frosted glass context menu panel drifting over an aurora shader background
|
||||||
|
|
||||||
|
`html-in-canvas` `liquid-glass-html-in-canvas` `webgpu`
|
||||||
|
|
||||||
|
<Warning>
|
||||||
|
**Requires Chrome flag.** Enable `chrome://flags/#canvas-draw-element` for live preview. Rendering via CLI enables the flag automatically. [Learn more](/guides/html-in-canvas).
|
||||||
|
</Warning>
|
||||||
|
|
||||||
|
<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/liquid-glass-context-menu.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-context-menu.png" autoPlay muted loop playsInline />
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
<CodeGroup>
|
||||||
|
|
||||||
|
```bash Terminal
|
||||||
|
npx hyperframes add liquid-glass-context-menu
|
||||||
|
```
|
||||||
|
|
||||||
|
</CodeGroup>
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
| Property | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| Type | Block |
|
||||||
|
| Dimensions | 1920×1080 |
|
||||||
|
| Duration | 8s |
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
| File | Target | Type |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `liquid-glass-context-menu.html` | `compositions/liquid-glass-context-menu.html` | hyperframes:composition |
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
After installing, add the block to your host composition:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div data-composition-id="liquid-glass-context-menu" data-composition-src="compositions/liquid-glass-context-menu.html" data-start="0" data-duration="8" data-track-index="1" data-width="1920" data-height="1080"></div>
|
||||||
|
```
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
title: "Liquid Glass Media Controls"
|
||||||
|
description: "Frosted glass media control panels spreading over an aurora shader background"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Liquid Glass Media Controls
|
||||||
|
|
||||||
|
Frosted glass media control panels spreading over an aurora shader background
|
||||||
|
|
||||||
|
`html-in-canvas` `liquid-glass-html-in-canvas` `webgpu`
|
||||||
|
|
||||||
|
<Warning>
|
||||||
|
**Requires Chrome flag.** Enable `chrome://flags/#canvas-draw-element` for live preview. Rendering via CLI enables the flag automatically. [Learn more](/guides/html-in-canvas).
|
||||||
|
</Warning>
|
||||||
|
|
||||||
|
<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/liquid-glass-media-controls.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-media-controls.png" autoPlay muted loop playsInline />
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
<CodeGroup>
|
||||||
|
|
||||||
|
```bash Terminal
|
||||||
|
npx hyperframes add liquid-glass-media-controls
|
||||||
|
```
|
||||||
|
|
||||||
|
</CodeGroup>
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
| Property | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| Type | Block |
|
||||||
|
| Dimensions | 1920×1080 |
|
||||||
|
| Duration | 8s |
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
| File | Target | Type |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `liquid-glass-media-controls.html` | `compositions/liquid-glass-media-controls.html` | hyperframes:composition |
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
After installing, add the block to your host composition:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div data-composition-id="liquid-glass-media-controls" data-composition-src="compositions/liquid-glass-media-controls.html" data-start="0" data-duration="8" data-track-index="1" data-width="1920" data-height="1080"></div>
|
||||||
|
```
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
title: "Liquid Glass Notification"
|
||||||
|
description: "Frosted glass notification cards floating over an aurora shader background"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Liquid Glass Notification
|
||||||
|
|
||||||
|
Frosted glass notification cards floating over an aurora shader background
|
||||||
|
|
||||||
|
`html-in-canvas` `liquid-glass-html-in-canvas` `webgpu`
|
||||||
|
|
||||||
|
<Warning>
|
||||||
|
**Requires Chrome flag.** Enable `chrome://flags/#canvas-draw-element` for live preview. Rendering via CLI enables the flag automatically. [Learn more](/guides/html-in-canvas).
|
||||||
|
</Warning>
|
||||||
|
|
||||||
|
<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/liquid-glass-notification.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-notification.png" autoPlay muted loop playsInline />
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
<CodeGroup>
|
||||||
|
|
||||||
|
```bash Terminal
|
||||||
|
npx hyperframes add liquid-glass-notification
|
||||||
|
```
|
||||||
|
|
||||||
|
</CodeGroup>
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
| Property | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| Type | Block |
|
||||||
|
| Dimensions | 1920×1080 |
|
||||||
|
| Duration | 8s |
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
| File | Target | Type |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `liquid-glass-notification.html` | `compositions/liquid-glass-notification.html` | hyperframes:composition |
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
After installing, add the block to your host composition:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div data-composition-id="liquid-glass-notification" data-composition-src="compositions/liquid-glass-notification.html" data-start="0" data-duration="8" data-track-index="1" data-width="1920" data-height="1080"></div>
|
||||||
|
```
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
---
|
||||||
|
title: "Liquid Glass Widgets"
|
||||||
|
description: "Frosted glass stat cards, showcase panel and pill chips over an aurora shader background"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Liquid Glass Widgets
|
||||||
|
|
||||||
|
Frosted glass stat cards, showcase panel and pill chips over an aurora shader background
|
||||||
|
|
||||||
|
`html-in-canvas` `liquid-glass-html-in-canvas` `webgpu`
|
||||||
|
|
||||||
|
<Warning>
|
||||||
|
**Requires Chrome flag.** Enable `chrome://flags/#canvas-draw-element` for live preview. Rendering via CLI enables the flag automatically. [Learn more](/guides/html-in-canvas).
|
||||||
|
</Warning>
|
||||||
|
|
||||||
|
<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/liquid-glass-widgets.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-widgets.png" autoPlay muted loop playsInline />
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
<CodeGroup>
|
||||||
|
|
||||||
|
```bash Terminal
|
||||||
|
npx hyperframes add liquid-glass-widgets
|
||||||
|
```
|
||||||
|
|
||||||
|
</CodeGroup>
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
| Property | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| Type | Block |
|
||||||
|
| Dimensions | 1920×1080 |
|
||||||
|
| Duration | 8s |
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
| File | Target | Type |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `liquid-glass-widgets.html` | `compositions/liquid-glass-widgets.html` | hyperframes:composition |
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
After installing, add the block to your host composition:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div data-composition-id="liquid-glass-widgets" data-composition-src="compositions/liquid-glass-widgets.html" data-start="0" data-duration="8" data-track-index="1" data-width="1920" data-height="1080"></div>
|
||||||
|
```
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
---
|
||||||
|
title: "macOS Tahoe Liquid Glass Desktop"
|
||||||
|
description: "3D MacBook with a macOS Tahoe-style desktop, glass menu bar, Finder window, dock, and cinematic device camera move."
|
||||||
|
---
|
||||||
|
|
||||||
|
# macOS Tahoe Liquid Glass Desktop
|
||||||
|
|
||||||
|
3D MacBook with a macOS Tahoe-style desktop, glass menu bar, Finder window, dock, and cinematic device camera move.
|
||||||
|
|
||||||
|
`html-in-canvas` `3d` `macos` `tahoe` `gltf`
|
||||||
|
|
||||||
|
<Warning>
|
||||||
|
**Requires Chrome flag.** Enable `chrome://flags/#canvas-draw-element` for live preview. Rendering via CLI enables the flag automatically. [Learn more](/guides/html-in-canvas).
|
||||||
|
</Warning>
|
||||||
|
|
||||||
|
<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/macos-tahoe-liquid-glass.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/macos-tahoe-liquid-glass.png" autoPlay muted loop playsInline />
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
<CodeGroup>
|
||||||
|
|
||||||
|
```bash Terminal
|
||||||
|
npx hyperframes add macos-tahoe-liquid-glass
|
||||||
|
```
|
||||||
|
|
||||||
|
</CodeGroup>
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
| Property | Value |
|
||||||
|
| --- | --- |
|
||||||
|
| Type | Block |
|
||||||
|
| Dimensions | 1920×1080 |
|
||||||
|
| Duration | 15s |
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
| File | Target | Type |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `macos-tahoe-liquid-glass.html` | `compositions/macos-tahoe-liquid-glass.html` | hyperframes:composition |
|
||||||
|
| `models/macbook.glb` | `models/macbook.glb` | hyperframes:asset |
|
||||||
|
| `models/iphone.glb` | `models/iphone.glb` | hyperframes:asset |
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
After installing, add the block to your host composition:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div data-composition-id="macos-tahoe-liquid-glass" data-composition-src="compositions/macos-tahoe-liquid-glass.html" data-start="0" data-duration="15" data-track-index="1" data-width="1920" data-height="1080"></div>
|
||||||
|
```
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Liquid Glass"
|
|
||||||
description: "VFX composition block"
|
|
||||||
---
|
|
||||||
|
|
||||||
# Liquid Glass
|
|
||||||
|
|
||||||
VFX composition block
|
|
||||||
|
|
||||||
`html-in-canvas` `webgl`
|
|
||||||
|
|
||||||
<Warning>
|
|
||||||
**Requires Chrome flag.** Enable `chrome://flags/#canvas-draw-element` for live preview. Rendering via CLI enables the flag automatically. [Learn more](/guides/html-in-canvas).
|
|
||||||
</Warning>
|
|
||||||
|
|
||||||
<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
|
|
||||||
|
|
||||||
<CodeGroup>
|
|
||||||
|
|
||||||
```bash Terminal
|
|
||||||
npx hyperframes add vfx-liquid-glass
|
|
||||||
```
|
|
||||||
|
|
||||||
</CodeGroup>
|
|
||||||
|
|
||||||
## Details
|
|
||||||
|
|
||||||
| Property | Value |
|
|
||||||
| --- | --- |
|
|
||||||
| Type | Block |
|
|
||||||
| Dimensions | 1920×1080 |
|
|
||||||
| Duration | 20s |
|
|
||||||
|
|
||||||
## Files
|
|
||||||
|
|
||||||
| File | Target | Type |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| `vfx-liquid-glass.html` | `compositions/vfx-liquid-glass.html` | hyperframes:composition |
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
After installing, add the block to your host composition:
|
|
||||||
|
|
||||||
```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>
|
|
||||||
```
|
|
||||||
@@ -129,9 +129,14 @@
|
|||||||
{
|
{
|
||||||
"group": "HTML-in-Canvas",
|
"group": "HTML-in-Canvas",
|
||||||
"pages": [
|
"pages": [
|
||||||
|
"catalog/blocks/ios26-liquid-glass",
|
||||||
|
"catalog/blocks/liquid-glass-context-menu",
|
||||||
|
"catalog/blocks/liquid-glass-media-controls",
|
||||||
|
"catalog/blocks/liquid-glass-notification",
|
||||||
|
"catalog/blocks/liquid-glass-widgets",
|
||||||
|
"catalog/blocks/macos-tahoe-liquid-glass",
|
||||||
"catalog/blocks/vfx-iphone-device",
|
"catalog/blocks/vfx-iphone-device",
|
||||||
"catalog/blocks/vfx-liquid-background",
|
"catalog/blocks/vfx-liquid-background",
|
||||||
"catalog/blocks/vfx-liquid-glass",
|
|
||||||
"catalog/blocks/vfx-magnetic",
|
"catalog/blocks/vfx-magnetic",
|
||||||
"catalog/blocks/vfx-portal",
|
"catalog/blocks/vfx-portal",
|
||||||
"catalog/blocks/vfx-shatter",
|
"catalog/blocks/vfx-shatter",
|
||||||
|
|||||||
@@ -109,7 +109,9 @@ Or install individually:
|
|||||||
|
|
||||||
| Block | Description | Install |
|
| Block | Description | Install |
|
||||||
|-------|-------------|---------|
|
|-------|-------------|---------|
|
||||||
| [Liquid Glass](/catalog/blocks/vfx-liquid-glass) | Voronoi glass fracture with parallax reveal | `npx hyperframes add vfx-liquid-glass` |
|
| [iOS 26 Liquid Glass Home Screen](/catalog/blocks/ios26-liquid-glass) | iPhone home screen with live Liquid Glass notifications and widgets | `npx hyperframes add ios26-liquid-glass` |
|
||||||
|
| [macOS Tahoe Liquid Glass Desktop](/catalog/blocks/macos-tahoe-liquid-glass) | MacBook desktop with liquid glass windows, dock, and notifications | `npx hyperframes add macos-tahoe-liquid-glass` |
|
||||||
|
| [Liquid Glass Notification](/catalog/blocks/liquid-glass-notification) | Native-feeling glass notification stack with progress and reply states | `npx hyperframes add liquid-glass-notification` |
|
||||||
| [iPhone & MacBook](/catalog/blocks/vfx-iphone-device) | Real 3D GLTF devices with live HTML screens | `npx hyperframes add vfx-iphone-device` |
|
| [iPhone & MacBook](/catalog/blocks/vfx-iphone-device) | Real 3D GLTF devices with live HTML screens | `npx hyperframes add vfx-iphone-device` |
|
||||||
| [Text Cursor](/catalog/blocks/vfx-text-cursor) | Dramatic text reveal with chromatic shadows | `npx hyperframes add vfx-text-cursor` |
|
| [Text Cursor](/catalog/blocks/vfx-text-cursor) | Dramatic text reveal with chromatic shadows | `npx hyperframes add vfx-text-cursor` |
|
||||||
| [Portal](/catalog/blocks/vfx-portal) | Dimension breach with volumetric light | `npx hyperframes add vfx-portal` |
|
| [Portal](/catalog/blocks/vfx-portal) | Dimension breach with volumetric light | `npx hyperframes add vfx-portal` |
|
||||||
|
|||||||
@@ -427,6 +427,24 @@
|
|||||||
"href": "/catalog/blocks/instagram-follow",
|
"href": "/catalog/blocks/instagram-follow",
|
||||||
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/instagram-follow.png"
|
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/instagram-follow.png"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "ios26-liquid-glass",
|
||||||
|
"type": "block",
|
||||||
|
"title": "iOS 26 Liquid Glass Home Screen",
|
||||||
|
"description": "3D iPhone with a normal iOS 26 home screen, liquid glass app icons, shader wallpaper, dock, and fluid glass notifications that drop from the status area onto a GLTF device model.",
|
||||||
|
"tags": [
|
||||||
|
"liquid-glass-html-in-canvas",
|
||||||
|
"webgpu",
|
||||||
|
"3d",
|
||||||
|
"iphone",
|
||||||
|
"ios26",
|
||||||
|
"notifications",
|
||||||
|
"gltf",
|
||||||
|
"html-in-canvas"
|
||||||
|
],
|
||||||
|
"href": "/catalog/blocks/ios26-liquid-glass",
|
||||||
|
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/ios26-liquid-glass.png"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "light-leak",
|
"name": "light-leak",
|
||||||
"type": "block",
|
"type": "block",
|
||||||
@@ -439,6 +457,58 @@
|
|||||||
"href": "/catalog/blocks/light-leak",
|
"href": "/catalog/blocks/light-leak",
|
||||||
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/light-leak.png"
|
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/light-leak.png"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "liquid-glass-context-menu",
|
||||||
|
"type": "block",
|
||||||
|
"title": "Liquid Glass Context Menu",
|
||||||
|
"description": "Frosted glass context menu panel drifting over an aurora shader background",
|
||||||
|
"tags": [
|
||||||
|
"html-in-canvas",
|
||||||
|
"liquid-glass-html-in-canvas",
|
||||||
|
"webgpu"
|
||||||
|
],
|
||||||
|
"href": "/catalog/blocks/liquid-glass-context-menu",
|
||||||
|
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-context-menu.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "liquid-glass-media-controls",
|
||||||
|
"type": "block",
|
||||||
|
"title": "Liquid Glass Media Controls",
|
||||||
|
"description": "Frosted glass media control panels spreading over an aurora shader background",
|
||||||
|
"tags": [
|
||||||
|
"html-in-canvas",
|
||||||
|
"liquid-glass-html-in-canvas",
|
||||||
|
"webgpu"
|
||||||
|
],
|
||||||
|
"href": "/catalog/blocks/liquid-glass-media-controls",
|
||||||
|
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-media-controls.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "liquid-glass-notification",
|
||||||
|
"type": "block",
|
||||||
|
"title": "Liquid Glass Notification",
|
||||||
|
"description": "Frosted glass notification cards floating over an aurora shader background",
|
||||||
|
"tags": [
|
||||||
|
"html-in-canvas",
|
||||||
|
"liquid-glass-html-in-canvas",
|
||||||
|
"webgpu"
|
||||||
|
],
|
||||||
|
"href": "/catalog/blocks/liquid-glass-notification",
|
||||||
|
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-notification.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "liquid-glass-widgets",
|
||||||
|
"type": "block",
|
||||||
|
"title": "Liquid Glass Widgets",
|
||||||
|
"description": "Frosted glass stat cards, showcase panel and pill chips over an aurora shader background",
|
||||||
|
"tags": [
|
||||||
|
"html-in-canvas",
|
||||||
|
"liquid-glass-html-in-canvas",
|
||||||
|
"webgpu"
|
||||||
|
],
|
||||||
|
"href": "/catalog/blocks/liquid-glass-widgets",
|
||||||
|
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-widgets.png"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "logo-outro",
|
"name": "logo-outro",
|
||||||
"type": "block",
|
"type": "block",
|
||||||
@@ -465,6 +535,21 @@
|
|||||||
"href": "/catalog/blocks/macos-notification",
|
"href": "/catalog/blocks/macos-notification",
|
||||||
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/macos-notification.png"
|
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/macos-notification.png"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-tahoe-liquid-glass",
|
||||||
|
"type": "block",
|
||||||
|
"title": "macOS Tahoe Liquid Glass Desktop",
|
||||||
|
"description": "3D MacBook with a macOS Tahoe-style desktop, glass menu bar, Finder window, dock, and cinematic device camera move.",
|
||||||
|
"tags": [
|
||||||
|
"html-in-canvas",
|
||||||
|
"3d",
|
||||||
|
"macos",
|
||||||
|
"tahoe",
|
||||||
|
"gltf"
|
||||||
|
],
|
||||||
|
"href": "/catalog/blocks/macos-tahoe-liquid-glass",
|
||||||
|
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/macos-tahoe-liquid-glass.png"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "north-korea-locked-down",
|
"name": "north-korea-locked-down",
|
||||||
"type": "block",
|
"type": "block",
|
||||||
@@ -933,18 +1018,6 @@
|
|||||||
"href": "/catalog/blocks/vfx-liquid-background",
|
"href": "/catalog/blocks/vfx-liquid-background",
|
||||||
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/vfx-liquid-background.png"
|
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/vfx-liquid-background.png"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "vfx-liquid-glass",
|
|
||||||
"type": "block",
|
|
||||||
"title": "Liquid Glass",
|
|
||||||
"description": "VFX composition block",
|
|
||||||
"tags": [
|
|
||||||
"html-in-canvas",
|
|
||||||
"webgl"
|
|
||||||
],
|
|
||||||
"href": "/catalog/blocks/vfx-liquid-glass",
|
|
||||||
"preview": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/vfx-liquid-glass.png"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "vfx-magnetic",
|
"name": "vfx-magnetic",
|
||||||
"type": "block",
|
"type": "block",
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ describe("buildChromeArgs browser GPU mode", () => {
|
|||||||
it("uses SwiftShader software GL by default for reproducible local renders", () => {
|
it("uses SwiftShader software GL by default for reproducible local renders", () => {
|
||||||
const args = buildChromeArgs(base);
|
const args = buildChromeArgs(base);
|
||||||
expect(args).toContain("--enable-features=CanvasDrawElement");
|
expect(args).toContain("--enable-features=CanvasDrawElement");
|
||||||
|
expect(args).not.toContain("--enable-unsafe-webgpu");
|
||||||
expect(args).toContain("--use-gl=angle");
|
expect(args).toContain("--use-gl=angle");
|
||||||
expect(args).toContain("--use-angle=swiftshader");
|
expect(args).toContain("--use-angle=swiftshader");
|
||||||
expect(args).toContain("--enable-unsafe-swiftshader");
|
expect(args).toContain("--enable-unsafe-swiftshader");
|
||||||
@@ -28,6 +29,7 @@ describe("buildChromeArgs browser GPU mode", () => {
|
|||||||
|
|
||||||
it("uses Metal-backed ANGLE for hardware browser GPU mode on macOS", () => {
|
it("uses Metal-backed ANGLE for hardware browser GPU mode on macOS", () => {
|
||||||
const args = buildChromeArgs({ ...base, platform: "darwin" }, { browserGpuMode: "hardware" });
|
const args = buildChromeArgs({ ...base, platform: "darwin" }, { browserGpuMode: "hardware" });
|
||||||
|
expect(args).toContain("--enable-unsafe-webgpu");
|
||||||
expect(args).toContain("--use-gl=angle");
|
expect(args).toContain("--use-gl=angle");
|
||||||
expect(args).toContain("--use-angle=metal");
|
expect(args).toContain("--use-angle=metal");
|
||||||
expect(args).toContain("--enable-gpu-rasterization");
|
expect(args).toContain("--enable-gpu-rasterization");
|
||||||
|
|||||||
@@ -484,6 +484,7 @@ export interface BuildChromeArgsOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const CANVAS_DRAW_ELEMENT_FEATURE_FLAG = "--enable-features=CanvasDrawElement";
|
const CANVAS_DRAW_ELEMENT_FEATURE_FLAG = "--enable-features=CanvasDrawElement";
|
||||||
|
const WEBGPU_FLAG = "--enable-unsafe-webgpu";
|
||||||
|
|
||||||
export function buildChromeArgs(
|
export function buildChromeArgs(
|
||||||
options: BuildChromeArgsOptions,
|
options: BuildChromeArgsOptions,
|
||||||
@@ -536,6 +537,10 @@ export function buildChromeArgs(
|
|||||||
"--disable-features=AudioServiceOutOfProcess,IsolateOrigins,site-per-process,Translate,BackForwardCache,IntensiveWakeUpThrottling",
|
"--disable-features=AudioServiceOutOfProcess,IsolateOrigins,site-per-process,Translate,BackForwardCache,IntensiveWakeUpThrottling",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (browserGpuMode !== "software") {
|
||||||
|
chromeArgs.push(WEBGPU_FLAG);
|
||||||
|
}
|
||||||
|
|
||||||
// BeginFrame flags — only when using chrome-headless-shell on Linux
|
// BeginFrame flags — only when using chrome-headless-shell on Linux
|
||||||
if (options.captureMode !== "screenshot") {
|
if (options.captureMode !== "screenshot") {
|
||||||
chromeArgs.push(
|
chromeArgs.push(
|
||||||
|
|||||||
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 378 KiB |
|
After Width: | Height: | Size: 74 KiB |
@@ -0,0 +1,174 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://hyperframes.heygen.com/schema/registry-item.json",
|
||||||
|
"name": "ios26-liquid-glass",
|
||||||
|
"type": "hyperframes:block",
|
||||||
|
"title": "iOS 26 Liquid Glass Home Screen",
|
||||||
|
"description": "3D iPhone with a normal iOS 26 home screen, liquid glass app icons, shader wallpaper, dock, and fluid glass notifications that drop from the status area onto a GLTF device model.",
|
||||||
|
"stability": "experimental",
|
||||||
|
"dimensions": {
|
||||||
|
"width": 1920,
|
||||||
|
"height": 1080
|
||||||
|
},
|
||||||
|
"duration": 15,
|
||||||
|
"tags": [
|
||||||
|
"liquid-glass-html-in-canvas",
|
||||||
|
"webgpu",
|
||||||
|
"3d",
|
||||||
|
"iphone",
|
||||||
|
"ios26",
|
||||||
|
"notifications",
|
||||||
|
"gltf",
|
||||||
|
"html-in-canvas"
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "ios26-liquid-glass.html",
|
||||||
|
"target": "compositions/ios26-liquid-glass.html",
|
||||||
|
"type": "hyperframes:composition"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "models/iphone.glb",
|
||||||
|
"target": "models/iphone.glb",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "lib/liquid-glass.iife.js",
|
||||||
|
"target": "lib/liquid-glass.iife.js",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/weather.jpg",
|
||||||
|
"target": "assets/icons/weather.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/stocks.jpg",
|
||||||
|
"target": "assets/icons/stocks.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/find-my.jpg",
|
||||||
|
"target": "assets/icons/find-my.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/home.jpg",
|
||||||
|
"target": "assets/icons/home.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/books.jpg",
|
||||||
|
"target": "assets/icons/books.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/itunes-store.jpg",
|
||||||
|
"target": "assets/icons/itunes-store.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/fitness.jpg",
|
||||||
|
"target": "assets/icons/fitness.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/watch.jpg",
|
||||||
|
"target": "assets/icons/watch.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/contacts.jpg",
|
||||||
|
"target": "assets/icons/contacts.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/files.jpg",
|
||||||
|
"target": "assets/icons/files.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/translate.jpg",
|
||||||
|
"target": "assets/icons/translate.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/calendar.jpg",
|
||||||
|
"target": "assets/icons/calendar.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/chatgpt.jpg",
|
||||||
|
"target": "assets/icons/chatgpt.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/slack.jpg",
|
||||||
|
"target": "assets/icons/slack.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/instagram.jpg",
|
||||||
|
"target": "assets/icons/instagram.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/x.jpg",
|
||||||
|
"target": "assets/icons/x.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/proton-mail.jpg",
|
||||||
|
"target": "assets/icons/proton-mail.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/gmail.jpg",
|
||||||
|
"target": "assets/icons/gmail.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/revolut.jpg",
|
||||||
|
"target": "assets/icons/revolut.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/photos.jpg",
|
||||||
|
"target": "assets/icons/photos.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/phone.jpg",
|
||||||
|
"target": "assets/icons/phone.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/brave.jpg",
|
||||||
|
"target": "assets/icons/brave.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/messages.jpg",
|
||||||
|
"target": "assets/icons/messages.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/whatsapp.jpg",
|
||||||
|
"target": "assets/icons/whatsapp.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/notify-messages.jpg",
|
||||||
|
"target": "assets/icons/notify-messages.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/music.jpg",
|
||||||
|
"target": "assets/icons/music.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preview": {
|
||||||
|
"video": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/ios26-liquid-glass.mp4",
|
||||||
|
"poster": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/ios26-liquid-glass.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,617 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=1920, height=1080" />
|
||||||
|
<title>Liquid Glass Context Menu</title>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
||||||
|
<script src="lib/liquid-glass.iife.js"></script>
|
||||||
|
<style>
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background: #0a0218;
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: "Inter", system-ui, sans-serif;
|
||||||
|
}
|
||||||
|
#root {
|
||||||
|
position: relative;
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
#three-canvas {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
#glass-canvas {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Glass Panel ── */
|
||||||
|
.menu-panel {
|
||||||
|
position: absolute;
|
||||||
|
width: 390px;
|
||||||
|
height: 506px;
|
||||||
|
background: rgba(255, 255, 255, 0.15);
|
||||||
|
--lg-blur: 0.56;
|
||||||
|
--lg-refraction: 0.52;
|
||||||
|
--lg-corner-radius: 30;
|
||||||
|
--lg-z-radius: 48;
|
||||||
|
--lg-specular: 0.26;
|
||||||
|
--lg-fresnel: 1;
|
||||||
|
--lg-edge-highlight: 0.2;
|
||||||
|
--lg-chrom-aberration: 0.035;
|
||||||
|
--lg-tint: 0.88;
|
||||||
|
--lg-brightness: 0.54;
|
||||||
|
--lg-shadow-opacity: 0;
|
||||||
|
--lg-shadow-spread: 0;
|
||||||
|
--lg-shadow-offset-y: 0;
|
||||||
|
--lg-saturation: -0.24;
|
||||||
|
}
|
||||||
|
#glass-menu {
|
||||||
|
top: 270px;
|
||||||
|
left: 1980px;
|
||||||
|
}
|
||||||
|
.file-panel {
|
||||||
|
position: absolute;
|
||||||
|
top: 372px;
|
||||||
|
left: 500px;
|
||||||
|
width: 360px;
|
||||||
|
height: 104px;
|
||||||
|
background: rgba(255, 255, 255, 0.11);
|
||||||
|
--lg-blur: 0.52;
|
||||||
|
--lg-refraction: 0.48;
|
||||||
|
--lg-corner-radius: 28;
|
||||||
|
--lg-z-radius: 36;
|
||||||
|
--lg-specular: 0.28;
|
||||||
|
--lg-fresnel: 0.94;
|
||||||
|
--lg-edge-highlight: 0.18;
|
||||||
|
--lg-chrom-aberration: 0.03;
|
||||||
|
--lg-tint: 0.74;
|
||||||
|
--lg-brightness: 0.34;
|
||||||
|
--lg-shadow-opacity: 0;
|
||||||
|
--lg-shadow-spread: 0;
|
||||||
|
--lg-shadow-offset-y: 0;
|
||||||
|
--lg-saturation: -0.18;
|
||||||
|
}
|
||||||
|
.submenu-panel {
|
||||||
|
position: absolute;
|
||||||
|
top: 456px;
|
||||||
|
left: 1980px;
|
||||||
|
width: 230px;
|
||||||
|
height: 58px;
|
||||||
|
background: rgba(255, 255, 255, 0.11);
|
||||||
|
--lg-blur: 0.52;
|
||||||
|
--lg-refraction: 0.5;
|
||||||
|
--lg-corner-radius: 20;
|
||||||
|
--lg-z-radius: 28;
|
||||||
|
--lg-specular: 0.3;
|
||||||
|
--lg-fresnel: 0.96;
|
||||||
|
--lg-edge-highlight: 0.18;
|
||||||
|
--lg-chrom-aberration: 0.03;
|
||||||
|
--lg-tint: 0.74;
|
||||||
|
--lg-brightness: 0.36;
|
||||||
|
--lg-shadow-opacity: 0;
|
||||||
|
--lg-shadow-spread: 0;
|
||||||
|
--lg-shadow-offset-y: 0;
|
||||||
|
--lg-saturation: -0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Text Overlay ── */
|
||||||
|
.text-overlay {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
.context-file {
|
||||||
|
position: absolute;
|
||||||
|
top: 340px;
|
||||||
|
left: 500px;
|
||||||
|
z-index: 2;
|
||||||
|
width: 360px;
|
||||||
|
height: 104px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 18px;
|
||||||
|
padding: 18px 22px;
|
||||||
|
border-radius: 26px;
|
||||||
|
background: linear-gradient(
|
||||||
|
180deg,
|
||||||
|
rgba(255, 255, 255, 0.095) 0%,
|
||||||
|
rgba(255, 255, 255, 0.036) 38%,
|
||||||
|
rgba(255, 255, 255, 0.006) 100%
|
||||||
|
);
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.file-icon {
|
||||||
|
width: 58px;
|
||||||
|
height: 68px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
border-radius: 16px;
|
||||||
|
background:
|
||||||
|
linear-gradient(135deg, rgba(6, 227, 250, 0.92), rgba(79, 219, 94, 0.85)),
|
||||||
|
rgba(255, 255, 255, 0.12);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
|
||||||
|
}
|
||||||
|
.file-meta {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
.file-title {
|
||||||
|
color: rgba(5, 17, 28, 0.9);
|
||||||
|
font-size: 21px;
|
||||||
|
font-weight: 780;
|
||||||
|
letter-spacing: 0;
|
||||||
|
text-shadow:
|
||||||
|
0 1px 0 rgba(255, 255, 255, 0.24),
|
||||||
|
0 10px 20px rgba(255, 255, 255, 0.14);
|
||||||
|
}
|
||||||
|
.file-subtitle {
|
||||||
|
color: rgba(5, 17, 28, 0.72);
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 650;
|
||||||
|
text-shadow:
|
||||||
|
0 1px 0 rgba(255, 255, 255, 0.2),
|
||||||
|
0 8px 18px rgba(255, 255, 255, 0.12);
|
||||||
|
}
|
||||||
|
.pointer {
|
||||||
|
position: absolute;
|
||||||
|
top: 395px;
|
||||||
|
left: 778px;
|
||||||
|
z-index: 4;
|
||||||
|
width: 34px;
|
||||||
|
height: 44px;
|
||||||
|
border-radius: 2px;
|
||||||
|
background: #fff;
|
||||||
|
clip-path: polygon(0 0, 0 100%, 31% 73%, 47% 100%, 62% 93%, 46% 67%, 82% 67%);
|
||||||
|
filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4));
|
||||||
|
}
|
||||||
|
.click-ring {
|
||||||
|
position: absolute;
|
||||||
|
top: 390px;
|
||||||
|
left: 770px;
|
||||||
|
z-index: 3;
|
||||||
|
width: 46px;
|
||||||
|
height: 46px;
|
||||||
|
border: 2px solid rgba(255, 255, 255, 0.75);
|
||||||
|
border-radius: 50%;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.menu-text {
|
||||||
|
width: 390px;
|
||||||
|
height: 506px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 18px 0;
|
||||||
|
background: transparent;
|
||||||
|
border-radius: 30px;
|
||||||
|
box-shadow: none;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
#text-menu {
|
||||||
|
top: 270px;
|
||||||
|
left: 1980px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-highlight {
|
||||||
|
position: absolute;
|
||||||
|
top: 17px;
|
||||||
|
left: 14px;
|
||||||
|
z-index: 0;
|
||||||
|
width: 362px;
|
||||||
|
height: 52px;
|
||||||
|
border-radius: 17px;
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.48), transparent 42%),
|
||||||
|
linear-gradient(90deg, rgba(255, 255, 255, 0.29), rgba(255, 255, 255, 0.12));
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.38),
|
||||||
|
inset 0 -1px 0 rgba(255, 255, 255, 0.1);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.menu-item {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
padding: 14px 28px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 650;
|
||||||
|
color: rgb(0, 7, 14);
|
||||||
|
cursor: default;
|
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.26);
|
||||||
|
}
|
||||||
|
.menu-item svg {
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
stroke: rgb(0, 7, 14);
|
||||||
|
fill: none;
|
||||||
|
stroke-width: 2;
|
||||||
|
stroke-linecap: round;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
}
|
||||||
|
.menu-sep {
|
||||||
|
height: 1px;
|
||||||
|
margin: 10px 28px;
|
||||||
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
|
||||||
|
}
|
||||||
|
.menu-footer {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 14px 26px;
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
.menu-footer-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 650;
|
||||||
|
color: rgba(0, 7, 14, 0.9);
|
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.24);
|
||||||
|
}
|
||||||
|
.menu-footer-item svg {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
stroke: rgba(0, 7, 14, 0.84);
|
||||||
|
fill: none;
|
||||||
|
stroke-width: 2;
|
||||||
|
stroke-linecap: round;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
}
|
||||||
|
.menu-kbd {
|
||||||
|
margin-left: auto;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 650;
|
||||||
|
color: rgba(0, 7, 14, 0.82);
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
.submenu-preview {
|
||||||
|
position: absolute;
|
||||||
|
top: 456px;
|
||||||
|
left: 1980px;
|
||||||
|
z-index: 2;
|
||||||
|
width: 230px;
|
||||||
|
height: 58px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 20px;
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
color: rgba(0, 7, 14, 0.92);
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 760;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div
|
||||||
|
id="root"
|
||||||
|
data-composition-id="liquid-glass-context-menu"
|
||||||
|
data-width="1920"
|
||||||
|
data-height="1080"
|
||||||
|
data-start="0"
|
||||||
|
data-duration="8"
|
||||||
|
data-root="true"
|
||||||
|
>
|
||||||
|
<canvas id="three-canvas" width="1920" height="1080"></canvas>
|
||||||
|
|
||||||
|
<canvas id="glass-canvas" layoutsubtree width="1920" height="1080">
|
||||||
|
<div id="glass-file" class="file-panel liquid-glass"></div>
|
||||||
|
<div id="glass-menu" class="menu-panel liquid-glass"></div>
|
||||||
|
<div id="glass-submenu" class="submenu-panel liquid-glass"></div>
|
||||||
|
</canvas>
|
||||||
|
|
||||||
|
<div id="context-file" class="context-file">
|
||||||
|
<div class="file-icon"></div>
|
||||||
|
<div class="file-meta">
|
||||||
|
<div class="file-title">liquid-glass.mov</div>
|
||||||
|
<div class="file-subtitle">Preview render - 08s</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="click-ring" class="click-ring"></div>
|
||||||
|
<div id="pointer" class="pointer"></div>
|
||||||
|
|
||||||
|
<div id="text-menu" class="text-overlay menu-text">
|
||||||
|
<div id="menu-highlight" class="menu-highlight"></div>
|
||||||
|
<div class="menu-item">
|
||||||
|
<svg viewBox="0 0 24 24">
|
||||||
|
<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" />
|
||||||
|
<polyline points="16 6 12 2 8 6" />
|
||||||
|
<line x1="12" y1="2" x2="12" y2="15" />
|
||||||
|
</svg>
|
||||||
|
<span>Share</span>
|
||||||
|
</div>
|
||||||
|
<div class="menu-item">
|
||||||
|
<svg viewBox="0 0 24 24">
|
||||||
|
<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" />
|
||||||
|
</svg>
|
||||||
|
<span>Add to Bookmarks</span>
|
||||||
|
</div>
|
||||||
|
<div class="menu-item">
|
||||||
|
<svg viewBox="0 0 24 24"><path d="M12 5v14M5 12h14" /></svg>
|
||||||
|
<span>Add Bookmark to...</span>
|
||||||
|
</div>
|
||||||
|
<div class="menu-sep"></div>
|
||||||
|
<div class="menu-item">
|
||||||
|
<svg viewBox="0 0 24 24">
|
||||||
|
<rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
|
||||||
|
<line x1="9" y1="3" x2="9" y2="21" />
|
||||||
|
</svg>
|
||||||
|
<span>New Tab</span>
|
||||||
|
<span class="menu-kbd">⌘T</span>
|
||||||
|
</div>
|
||||||
|
<div class="menu-item">
|
||||||
|
<svg viewBox="0 0 24 24">
|
||||||
|
<rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
|
||||||
|
<path d="M9 3v18" />
|
||||||
|
<path d="M14 9l3 3-3 3" />
|
||||||
|
</svg>
|
||||||
|
<span>New Private Tab</span>
|
||||||
|
<span class="menu-kbd">⇧⌘N</span>
|
||||||
|
</div>
|
||||||
|
<div class="menu-sep"></div>
|
||||||
|
<div class="menu-footer">
|
||||||
|
<div class="menu-footer-item">
|
||||||
|
<svg viewBox="0 0 24 24">
|
||||||
|
<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z" />
|
||||||
|
</svg>
|
||||||
|
<span>Bookmarks</span>
|
||||||
|
</div>
|
||||||
|
<div class="menu-footer-item">
|
||||||
|
<svg viewBox="0 0 24 24">
|
||||||
|
<rect x="3" y="3" width="7" height="7" />
|
||||||
|
<rect x="14" y="3" width="7" height="7" />
|
||||||
|
<rect x="3" y="14" width="7" height="7" />
|
||||||
|
<rect x="14" y="14" width="7" height="7" />
|
||||||
|
</svg>
|
||||||
|
<span>All Tabs</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="submenu-preview" class="submenu-preview">Open in New Tab</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
id="driver"
|
||||||
|
class="clip"
|
||||||
|
data-start="0"
|
||||||
|
data-duration="8"
|
||||||
|
data-track-index="0"
|
||||||
|
style="position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var W = 1920,
|
||||||
|
H = 1080,
|
||||||
|
DURATION = 8;
|
||||||
|
|
||||||
|
/* ── Three.js Aurora Shader ─────────────────────────────────────── */
|
||||||
|
var vs = "varying vec2 vUv; void main() { vUv = uv; gl_Position = vec4(position, 1.0); }";
|
||||||
|
var fs = [
|
||||||
|
"precision highp float;",
|
||||||
|
"varying vec2 vUv;",
|
||||||
|
"uniform float uTime;",
|
||||||
|
"vec3 mod289(vec3 x){return x-floor(x*(1.0/289.0))*289.0;}",
|
||||||
|
"vec4 mod289(vec4 x){return x-floor(x*(1.0/289.0))*289.0;}",
|
||||||
|
"vec4 permute(vec4 x){return mod289(((x*34.0)+1.0)*x);}",
|
||||||
|
"vec4 taylorInvSqrt(vec4 r){return 1.79284291400159-0.85373472095314*r;}",
|
||||||
|
"float snoise(vec3 v){",
|
||||||
|
" const vec2 C=vec2(1.0/6.0,1.0/3.0);const vec4 D=vec4(0.0,0.5,1.0,2.0);",
|
||||||
|
" vec3 i=floor(v+dot(v,C.yyy));vec3 x0=v-i+dot(i,C.xxx);",
|
||||||
|
" vec3 g=step(x0.yzx,x0.xyz);vec3 l=1.0-g;",
|
||||||
|
" vec3 i1=min(g.xyz,l.zxy);vec3 i2=max(g.xyz,l.zxy);",
|
||||||
|
" vec3 x1=x0-i1+C.xxx;vec3 x2=x0-i2+C.yyy;vec3 x3=x0-D.yyy;",
|
||||||
|
" i=mod289(i);",
|
||||||
|
" vec4 p=permute(permute(permute(i.z+vec4(0.0,i1.z,i2.z,1.0))+i.y+vec4(0.0,i1.y,i2.y,1.0))+i.x+vec4(0.0,i1.x,i2.x,1.0));",
|
||||||
|
" float n_=0.142857142857;vec3 ns=n_*D.wyz-D.xzx;",
|
||||||
|
" vec4 j=p-49.0*floor(p*ns.z*ns.z);vec4 x_=floor(j*ns.z);vec4 y_=floor(j-7.0*x_);",
|
||||||
|
" vec4 x=x_*ns.x+ns.yyyy;vec4 y=y_*ns.x+ns.yyyy;vec4 h=1.0-abs(x)-abs(y);",
|
||||||
|
" vec4 b0=vec4(x.xy,y.xy);vec4 b1=vec4(x.zw,y.zw);",
|
||||||
|
" vec4 s0=floor(b0)*2.0+1.0;vec4 s1=floor(b1)*2.0+1.0;",
|
||||||
|
" vec4 sh=-step(h,vec4(0.0));",
|
||||||
|
" vec4 a0=b0.xzyw+s0.xzyw*sh.xxyy;vec4 a1=b1.xzyw+s1.xzyw*sh.zzww;",
|
||||||
|
" vec3 p0=vec3(a0.xy,h.x);vec3 p1=vec3(a0.zw,h.y);vec3 p2=vec3(a1.xy,h.z);vec3 p3=vec3(a1.zw,h.w);",
|
||||||
|
" vec4 norm=taylorInvSqrt(vec4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));",
|
||||||
|
" p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;",
|
||||||
|
" vec4 m=max(0.6-vec4(dot(x0,x0),dot(x1,x1),dot(x2,x2),dot(x3,x3)),0.0);m=m*m;",
|
||||||
|
" return 42.0*dot(m*m,vec4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3)));",
|
||||||
|
"}",
|
||||||
|
"void main(){",
|
||||||
|
" vec2 uv=vUv;float ar=1920.0/1080.0;vec2 p=vec2(uv.x*ar,uv.y);float t=uTime*0.06;",
|
||||||
|
" float wx=snoise(vec3(p*1.4,t*0.5))*0.2;float wy=snoise(vec3(p*1.4+100.0,t*0.5))*0.2;",
|
||||||
|
" vec2 wp=p+vec2(wx,wy);",
|
||||||
|
" vec3 base=mix(vec3(0.10,0.02,0.22),vec3(0.04,0.10,0.25),smoothstep(0.0,1.0,uv.x*0.6+uv.y*0.4));",
|
||||||
|
" float angle=0.65;float ridgeUv=dot(wp,vec2(cos(angle),sin(angle)));",
|
||||||
|
" float ridge1=sin(ridgeUv*8.0+t*2.0+snoise(vec3(wp*0.8,t))*1.5);",
|
||||||
|
" float ridge2=sin(ridgeUv*5.5-t*1.4+snoise(vec3(wp*1.2+50.0,t*0.7))*2.0);",
|
||||||
|
" float ridge3=sin(ridgeUv*12.0+t*3.0+snoise(vec3(wp*0.6+80.0,t*0.4))*1.0);",
|
||||||
|
" float crease1=pow(abs(ridge1),0.35)*sign(ridge1)*0.5+0.5;",
|
||||||
|
" float crease2=pow(abs(ridge2),0.4)*sign(ridge2)*0.5+0.5;",
|
||||||
|
" float crease3=pow(abs(ridge3),0.5)*sign(ridge3)*0.5+0.5;",
|
||||||
|
" vec3 warm=mix(vec3(0.9,0.4,0.08),vec3(0.95,0.65,0.15),crease1);",
|
||||||
|
" float warmZone=smoothstep(0.15,0.75,uv.x+uv.y*0.4+snoise(vec3(uv*2.0,t))*0.3);",
|
||||||
|
" vec3 cool=mix(vec3(0.02,0.4,0.55),vec3(0.25,0.7,0.82),crease2);",
|
||||||
|
" float coolZone=smoothstep(0.25,0.85,1.2-uv.x+uv.y*0.5+snoise(vec3(uv*2.0+40.0,t*0.8))*0.25);",
|
||||||
|
" vec3 hot=mix(vec3(0.8,0.1,0.4),vec3(0.6,0.08,0.65),crease3);",
|
||||||
|
" float hotZone=smoothstep(0.5,0.9,snoise(vec3(uv*2.5+20.0,t*0.6))*0.5+0.5);",
|
||||||
|
" vec3 col=base;",
|
||||||
|
" col=mix(col,warm,warmZone*0.75*smoothstep(0.3,0.7,crease1));",
|
||||||
|
" col=mix(col,cool,coolZone*0.65*smoothstep(0.2,0.65,crease2));",
|
||||||
|
" col=mix(col,hot,hotZone*0.5*smoothstep(0.35,0.8,crease3));",
|
||||||
|
" float edgeGlow=pow(1.0-abs(ridge1),6.0)*0.4+pow(1.0-abs(ridge2),5.0)*0.25;",
|
||||||
|
" col+=edgeGlow*mix(warm,cool,uv.x)*0.8;",
|
||||||
|
" col*=1.0-pow(abs(ridge1),4.0)*0.15;",
|
||||||
|
" float vig=1.0-smoothstep(0.5,1.5,length((uv-0.5)*vec2(1.3,1.0)));",
|
||||||
|
" col*=0.65+vig*0.5;",
|
||||||
|
" float luma=dot(col,vec3(0.299,0.587,0.114));col=mix(vec3(luma),col,1.5);",
|
||||||
|
" col=clamp(col,0.0,1.0);col=pow(col,vec3(0.9));",
|
||||||
|
" gl_FragColor=vec4(col,1.0);",
|
||||||
|
"}",
|
||||||
|
].join("\n");
|
||||||
|
|
||||||
|
/* ── Three.js Setup ─────────────────────────────────────────────── */
|
||||||
|
var threeCanvas = document.getElementById("three-canvas");
|
||||||
|
var renderer = new THREE.WebGLRenderer({ canvas: threeCanvas, alpha: false });
|
||||||
|
renderer.setSize(W, H, false);
|
||||||
|
renderer.setPixelRatio(1);
|
||||||
|
|
||||||
|
var scene = new THREE.Scene();
|
||||||
|
var camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
||||||
|
var uniforms = { uTime: { value: 0 } };
|
||||||
|
var mat = new THREE.ShaderMaterial({
|
||||||
|
vertexShader: vs,
|
||||||
|
fragmentShader: fs,
|
||||||
|
uniforms: uniforms,
|
||||||
|
});
|
||||||
|
var quad = new THREE.Mesh(new THREE.PlaneGeometry(2, 2), mat);
|
||||||
|
scene.add(quad);
|
||||||
|
|
||||||
|
/* ── Glass Canvas ───────────────────────────────────────────────── */
|
||||||
|
var glassCanvas = document.getElementById("glass-canvas");
|
||||||
|
var ctx = glassCanvas.getContext("2d");
|
||||||
|
var lg = new LiquidGlass.LiquidGlassCanvas(glassCanvas);
|
||||||
|
var lgReady = false;
|
||||||
|
|
||||||
|
function renderGlass(time) {
|
||||||
|
if (!lgReady) return;
|
||||||
|
uniforms.uTime.value = time;
|
||||||
|
renderer.render(scene, camera);
|
||||||
|
ctx.clearRect(0, 0, W, H);
|
||||||
|
ctx.drawImage(threeCanvas, 0, 0, W, H);
|
||||||
|
lg.renderGlassElements();
|
||||||
|
}
|
||||||
|
|
||||||
|
function requestGlassRender(time) {
|
||||||
|
if (glassCanvas.requestPaint) {
|
||||||
|
glassCanvas.onpaint = function () {
|
||||||
|
renderGlass(time);
|
||||||
|
};
|
||||||
|
glassCanvas.requestPaint();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
renderGlass(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
lg.waitForInit().then(function (ok) {
|
||||||
|
if (!ok) return;
|
||||||
|
lgReady = true;
|
||||||
|
requestGlassRender(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* ── GSAP Timeline ──────────────────────────────────────────────── */
|
||||||
|
window.__timelines = window.__timelines || {};
|
||||||
|
var tl = gsap.timeline({ paused: true });
|
||||||
|
|
||||||
|
var gm = document.getElementById("glass-menu");
|
||||||
|
var gf = document.getElementById("glass-file");
|
||||||
|
var gsm = document.getElementById("glass-submenu");
|
||||||
|
var tm = document.getElementById("text-menu");
|
||||||
|
var pointer = document.getElementById("pointer");
|
||||||
|
var fileCard = document.getElementById("context-file");
|
||||||
|
|
||||||
|
gsap.set([gm, tm], {
|
||||||
|
left: 860,
|
||||||
|
top: 270,
|
||||||
|
opacity: 0,
|
||||||
|
scale: 0.82,
|
||||||
|
y: -8,
|
||||||
|
transformOrigin: "0% 18%",
|
||||||
|
});
|
||||||
|
gsap.set([gf, fileCard], { top: 372, opacity: 1, scale: 1, transformOrigin: "78% 54%" });
|
||||||
|
gsap.set([gsm, "#submenu-preview"], {
|
||||||
|
left: 1980,
|
||||||
|
opacity: 0,
|
||||||
|
scale: 0.86,
|
||||||
|
x: -12,
|
||||||
|
transformOrigin: "0% 50%",
|
||||||
|
});
|
||||||
|
gsap.set(".menu-item", { y: -4, opacity: 0 });
|
||||||
|
gsap.set("#menu-highlight", { top: 17, opacity: 0 });
|
||||||
|
|
||||||
|
tl.to([gf, fileCard], { top: 340, duration: 0.38, ease: "power3.out" }, 0.1);
|
||||||
|
tl.fromTo(
|
||||||
|
pointer,
|
||||||
|
{ left: 620, top: 520 },
|
||||||
|
{ left: 778, top: 395, duration: 0.55, ease: "power3.out" },
|
||||||
|
0.35,
|
||||||
|
);
|
||||||
|
tl.set("#click-ring", { left: 756, top: 372, scale: 0.72 }, 0.84);
|
||||||
|
tl.to("#click-ring", { opacity: 0.7, scale: 1.18, duration: 0.16, ease: "power2.out" }, 0.86);
|
||||||
|
tl.to("#click-ring", { opacity: 0, scale: 1.8, duration: 0.28, ease: "power2.out" }, 1.02);
|
||||||
|
tl.to(
|
||||||
|
[gf, fileCard],
|
||||||
|
{ scale: 0.985, duration: 0.08, ease: "power2.out", yoyo: true, repeat: 1 },
|
||||||
|
0.86,
|
||||||
|
);
|
||||||
|
|
||||||
|
tl.to([gm, tm], { opacity: 1, scale: 1, y: 0, duration: 0.36, ease: "back.out(1.08)" }, 0.98);
|
||||||
|
tl.to(
|
||||||
|
".menu-item",
|
||||||
|
{ y: 0, opacity: 1, duration: 0.24, ease: "power3.out", stagger: 0.026 },
|
||||||
|
1.07,
|
||||||
|
);
|
||||||
|
|
||||||
|
tl.to("#menu-highlight", { opacity: 1, duration: 0.12, ease: "none" }, 1.35);
|
||||||
|
tl.to("#menu-highlight", { top: 69, duration: 0.22, ease: "power2.out" }, 2.0);
|
||||||
|
tl.to(pointer, { left: 1128, top: 468, duration: 0.46, ease: "power3.inOut" }, 2.48);
|
||||||
|
tl.to("#menu-highlight", { top: 187, duration: 0.22, ease: "power2.out" }, 2.58);
|
||||||
|
tl.set([gsm, "#submenu-preview"], { left: 1236 }, 3.04);
|
||||||
|
tl.fromTo(
|
||||||
|
[gsm, "#submenu-preview"],
|
||||||
|
{ scale: 0.86, opacity: 0, x: -12 },
|
||||||
|
{ scale: 1, opacity: 1, x: 0, duration: 0.24, ease: "back.out(1.04)" },
|
||||||
|
3.08,
|
||||||
|
);
|
||||||
|
tl.to(pointer, { left: 1318, top: 484, duration: 0.5, ease: "power3.inOut" }, 3.32);
|
||||||
|
tl.set("#click-ring", { left: 1295, top: 461, scale: 0.72 }, 3.86);
|
||||||
|
tl.to(
|
||||||
|
"#click-ring",
|
||||||
|
{ opacity: 0.72, scale: 1.08, duration: 0.12, ease: "power2.out" },
|
||||||
|
3.88,
|
||||||
|
);
|
||||||
|
tl.to("#click-ring", { opacity: 0, scale: 1.58, duration: 0.24, ease: "power2.out" }, 4.0);
|
||||||
|
tl.to(
|
||||||
|
[gsm, "#submenu-preview"],
|
||||||
|
{ scale: 0.965, duration: 0.09, ease: "power2.out", yoyo: true, repeat: 1 },
|
||||||
|
3.92,
|
||||||
|
);
|
||||||
|
|
||||||
|
tl.to(pointer, { opacity: 0, duration: 0.35, ease: "power2.out" }, 5.85);
|
||||||
|
|
||||||
|
/* Duration driver */
|
||||||
|
tl.to({ v: 0 }, { v: 1, duration: DURATION, ease: "none" }, 0);
|
||||||
|
|
||||||
|
tl.eventCallback("onUpdate", function () {
|
||||||
|
requestGlassRender(tl.time());
|
||||||
|
});
|
||||||
|
|
||||||
|
window.__timelines["liquid-glass-context-menu"] = tl;
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://hyperframes.heygen.com/schema/registry-item.json",
|
||||||
|
"name": "liquid-glass-context-menu",
|
||||||
|
"type": "hyperframes:block",
|
||||||
|
"title": "Liquid Glass Context Menu",
|
||||||
|
"description": "Frosted glass context menu panel drifting over an aurora shader background",
|
||||||
|
"stability": "experimental",
|
||||||
|
"dimensions": {
|
||||||
|
"width": 1920,
|
||||||
|
"height": 1080
|
||||||
|
},
|
||||||
|
"duration": 8,
|
||||||
|
"tags": ["html-in-canvas", "liquid-glass-html-in-canvas", "webgpu"],
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "liquid-glass-context-menu.html",
|
||||||
|
"target": "compositions/liquid-glass-context-menu.html",
|
||||||
|
"type": "hyperframes:composition"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preview": {
|
||||||
|
"video": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-context-menu.mp4",
|
||||||
|
"poster": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-context-menu.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,657 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=1920, height=1080" />
|
||||||
|
<title>Liquid Glass Media Controls</title>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
||||||
|
<script src="lib/liquid-glass.iife.js"></script>
|
||||||
|
<style>
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background: #0a0218;
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: "Inter", system-ui, sans-serif;
|
||||||
|
}
|
||||||
|
#root {
|
||||||
|
position: relative;
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
#three-canvas {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
#glass-canvas {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Glass Panels ── */
|
||||||
|
.glass-panel {
|
||||||
|
position: absolute;
|
||||||
|
background: rgba(255, 255, 255, 0.055);
|
||||||
|
--lg-blur: 0.42;
|
||||||
|
--lg-refraction: 0.92;
|
||||||
|
--lg-corner-radius: 36;
|
||||||
|
--lg-z-radius: 58;
|
||||||
|
--lg-specular: 0.46;
|
||||||
|
--lg-fresnel: 1.15;
|
||||||
|
--lg-edge-highlight: 0.34;
|
||||||
|
--lg-chrom-aberration: 0.08;
|
||||||
|
--lg-shadow-opacity: 0;
|
||||||
|
--lg-shadow-spread: 0;
|
||||||
|
--lg-shadow-offset-y: 0;
|
||||||
|
--lg-saturation: 1.1;
|
||||||
|
}
|
||||||
|
.search-panel {
|
||||||
|
width: 640px;
|
||||||
|
height: 72px;
|
||||||
|
--lg-corner-radius: 24;
|
||||||
|
}
|
||||||
|
.toggle-panel {
|
||||||
|
width: 640px;
|
||||||
|
height: 64px;
|
||||||
|
--lg-corner-radius: 44;
|
||||||
|
}
|
||||||
|
.media-panel {
|
||||||
|
width: 640px;
|
||||||
|
height: 116px;
|
||||||
|
--lg-corner-radius: 44;
|
||||||
|
}
|
||||||
|
.slider-panel {
|
||||||
|
width: 640px;
|
||||||
|
height: 76px;
|
||||||
|
--lg-corner-radius: 28;
|
||||||
|
}
|
||||||
|
|
||||||
|
#glass-search {
|
||||||
|
top: 300px;
|
||||||
|
left: 640px;
|
||||||
|
}
|
||||||
|
#glass-toggle {
|
||||||
|
top: 390px;
|
||||||
|
left: 640px;
|
||||||
|
}
|
||||||
|
#glass-media {
|
||||||
|
top: 476px;
|
||||||
|
left: 640px;
|
||||||
|
}
|
||||||
|
#glass-slider {
|
||||||
|
top: 616px;
|
||||||
|
left: 640px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Text Overlays ── */
|
||||||
|
.text-overlay {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Search bar */
|
||||||
|
.search-text {
|
||||||
|
width: 640px;
|
||||||
|
height: 72px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
padding: 0 28px;
|
||||||
|
background: transparent;
|
||||||
|
border-radius: 24px;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.search-text svg {
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
stroke: rgba(255, 255, 255, 0.86);
|
||||||
|
fill: none;
|
||||||
|
stroke-width: 2;
|
||||||
|
stroke-linecap: round;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.search-label {
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: 650;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
|
||||||
|
}
|
||||||
|
.search-caret {
|
||||||
|
width: 2px;
|
||||||
|
height: 25px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(255, 255, 255, 0.82);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
#text-search {
|
||||||
|
top: 300px;
|
||||||
|
left: 640px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Toggle row */
|
||||||
|
.toggle-text {
|
||||||
|
width: 640px;
|
||||||
|
height: 64px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 0;
|
||||||
|
position: relative;
|
||||||
|
padding: 6px;
|
||||||
|
background: transparent;
|
||||||
|
border-radius: 44px;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.toggle-active-pill {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
left: 6px;
|
||||||
|
z-index: 0;
|
||||||
|
width: 209px;
|
||||||
|
height: 52px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.32), transparent 42%),
|
||||||
|
rgba(255, 255, 255, 0.14);
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.32),
|
||||||
|
inset 0 -1px 0 rgba(255, 255, 255, 0.09);
|
||||||
|
}
|
||||||
|
.toggle-item {
|
||||||
|
flex: 1;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: rgba(255, 255, 255, 0.96);
|
||||||
|
line-height: 52px;
|
||||||
|
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
|
||||||
|
}
|
||||||
|
.toggle-item.active {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
#text-toggle {
|
||||||
|
top: 390px;
|
||||||
|
left: 640px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Media pill */
|
||||||
|
.media-text {
|
||||||
|
width: 640px;
|
||||||
|
height: 116px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 22px;
|
||||||
|
padding: 0 24px;
|
||||||
|
background: transparent;
|
||||||
|
border-radius: 44px;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.album-art {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 78px;
|
||||||
|
height: 78px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at 70% 28%, rgba(255, 255, 255, 0.78), transparent 16%),
|
||||||
|
conic-gradient(from 210deg, #06e3fa, #4fdb5e, #f59e0b, #ec4899, #06e3fa);
|
||||||
|
flex-shrink: 0;
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.28),
|
||||||
|
0 12px 26px rgba(0, 0, 0, 0.24);
|
||||||
|
}
|
||||||
|
.album-sheen {
|
||||||
|
position: absolute;
|
||||||
|
top: -10px;
|
||||||
|
left: -70px;
|
||||||
|
width: 38px;
|
||||||
|
height: 110px;
|
||||||
|
background: rgba(255, 255, 255, 0.34);
|
||||||
|
filter: blur(8px);
|
||||||
|
transform: rotate(24deg);
|
||||||
|
}
|
||||||
|
.media-info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 7px;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.media-title {
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #fff;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
|
||||||
|
}
|
||||||
|
.media-artist {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: rgba(255, 255, 255, 0.84);
|
||||||
|
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
|
||||||
|
}
|
||||||
|
.media-meta-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 9px;
|
||||||
|
}
|
||||||
|
.live-dot {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #4ade80;
|
||||||
|
box-shadow: 0 0 14px rgba(74, 222, 128, 0.76);
|
||||||
|
}
|
||||||
|
.sound-wave {
|
||||||
|
display: flex;
|
||||||
|
align-items: end;
|
||||||
|
gap: 3px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
.sound-wave span {
|
||||||
|
width: 3px;
|
||||||
|
height: 7px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(255, 255, 255, 0.74);
|
||||||
|
}
|
||||||
|
.transport {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 24px;
|
||||||
|
margin-left: auto;
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
.transport svg {
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
fill: #fff;
|
||||||
|
stroke: none;
|
||||||
|
}
|
||||||
|
.transport .play-btn svg {
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
#text-media {
|
||||||
|
top: 476px;
|
||||||
|
left: 640px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Brightness slider */
|
||||||
|
.slider-text {
|
||||||
|
width: 640px;
|
||||||
|
height: 76px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 18px;
|
||||||
|
padding: 0 28px;
|
||||||
|
background: transparent;
|
||||||
|
border-radius: 28px;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.slider-text svg {
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
stroke: rgba(255, 255, 255, 0.88);
|
||||||
|
fill: none;
|
||||||
|
stroke-width: 2;
|
||||||
|
stroke-linecap: round;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.slider-track {
|
||||||
|
flex: 1;
|
||||||
|
height: 8px;
|
||||||
|
background: rgba(255, 255, 255, 0.24);
|
||||||
|
border-radius: 4px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.slider-fill {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 34%;
|
||||||
|
height: 100%;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 3px;
|
||||||
|
box-shadow: 0 0 14px rgba(255, 255, 255, 0.5);
|
||||||
|
}
|
||||||
|
.slider-pct {
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: rgba(255, 255, 255, 0.9);
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
width: 42px;
|
||||||
|
text-align: right;
|
||||||
|
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
|
||||||
|
}
|
||||||
|
#text-slider {
|
||||||
|
top: 616px;
|
||||||
|
left: 640px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div
|
||||||
|
id="root"
|
||||||
|
data-composition-id="liquid-glass-media-controls"
|
||||||
|
data-width="1920"
|
||||||
|
data-height="1080"
|
||||||
|
data-start="0"
|
||||||
|
data-duration="8"
|
||||||
|
data-root="true"
|
||||||
|
>
|
||||||
|
<canvas id="three-canvas" width="1920" height="1080"></canvas>
|
||||||
|
|
||||||
|
<canvas id="glass-canvas" layoutsubtree width="1920" height="1080">
|
||||||
|
<div id="glass-search" class="glass-panel search-panel liquid-glass"></div>
|
||||||
|
<div id="glass-toggle" class="glass-panel toggle-panel liquid-glass"></div>
|
||||||
|
<div id="glass-media" class="glass-panel media-panel liquid-glass"></div>
|
||||||
|
<div id="glass-slider" class="glass-panel slider-panel liquid-glass"></div>
|
||||||
|
</canvas>
|
||||||
|
|
||||||
|
<!-- Search bar -->
|
||||||
|
<div id="text-search" class="text-overlay search-text">
|
||||||
|
<svg viewBox="0 0 24 24">
|
||||||
|
<circle cx="11" cy="11" r="8" />
|
||||||
|
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
||||||
|
</svg>
|
||||||
|
<span id="search-label" class="search-label">Search</span>
|
||||||
|
<span id="search-caret" class="search-caret"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Toggle row -->
|
||||||
|
<div id="text-toggle" class="text-overlay toggle-text">
|
||||||
|
<div id="toggle-pill" class="toggle-active-pill"></div>
|
||||||
|
<div class="toggle-item active">All</div>
|
||||||
|
<div class="toggle-item">Favorites</div>
|
||||||
|
<div class="toggle-item">Recent</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Media pill -->
|
||||||
|
<div id="text-media" class="text-overlay media-text">
|
||||||
|
<div class="album-art"><span id="album-sheen" class="album-sheen"></span></div>
|
||||||
|
<div class="media-info">
|
||||||
|
<div class="media-title">Midnight Drive</div>
|
||||||
|
<div class="media-meta-row">
|
||||||
|
<span id="live-dot" class="live-dot"></span>
|
||||||
|
<div class="media-artist">Glass Resonance</div>
|
||||||
|
<div id="sound-wave" class="sound-wave">
|
||||||
|
<span></span><span></span><span></span><span></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="transport">
|
||||||
|
<span>
|
||||||
|
<svg viewBox="0 0 24 24">
|
||||||
|
<polygon points="19 20 9 12 19 4" />
|
||||||
|
<line x1="5" y1="4" x2="5" y2="20" stroke="#fff" stroke-width="2" />
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<span class="play-btn">
|
||||||
|
<svg viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21" /></svg>
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
<svg viewBox="0 0 24 24">
|
||||||
|
<polygon points="5 4 15 12 5 20" />
|
||||||
|
<line x1="19" y1="4" x2="19" y2="20" stroke="#fff" stroke-width="2" />
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Brightness slider -->
|
||||||
|
<div id="text-slider" class="text-overlay slider-text">
|
||||||
|
<svg viewBox="0 0 24 24">
|
||||||
|
<circle cx="12" cy="12" r="5" />
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3" />
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23" />
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12" />
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12" />
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
|
||||||
|
</svg>
|
||||||
|
<div class="slider-track"><div id="slider-fill" class="slider-fill"></div></div>
|
||||||
|
<span id="slider-pct" class="slider-pct">34%</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
id="driver"
|
||||||
|
class="clip"
|
||||||
|
data-start="0"
|
||||||
|
data-duration="8"
|
||||||
|
data-track-index="0"
|
||||||
|
style="position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var W = 1920,
|
||||||
|
H = 1080,
|
||||||
|
DURATION = 8;
|
||||||
|
|
||||||
|
/* ── Three.js Aurora Shader ─────────────────────────────────────── */
|
||||||
|
var vs = "varying vec2 vUv; void main() { vUv = uv; gl_Position = vec4(position, 1.0); }";
|
||||||
|
var fs = [
|
||||||
|
"precision highp float;",
|
||||||
|
"varying vec2 vUv;",
|
||||||
|
"uniform float uTime;",
|
||||||
|
"vec3 mod289(vec3 x){return x-floor(x*(1.0/289.0))*289.0;}",
|
||||||
|
"vec4 mod289(vec4 x){return x-floor(x*(1.0/289.0))*289.0;}",
|
||||||
|
"vec4 permute(vec4 x){return mod289(((x*34.0)+1.0)*x);}",
|
||||||
|
"vec4 taylorInvSqrt(vec4 r){return 1.79284291400159-0.85373472095314*r;}",
|
||||||
|
"float snoise(vec3 v){",
|
||||||
|
" const vec2 C=vec2(1.0/6.0,1.0/3.0);const vec4 D=vec4(0.0,0.5,1.0,2.0);",
|
||||||
|
" vec3 i=floor(v+dot(v,C.yyy));vec3 x0=v-i+dot(i,C.xxx);",
|
||||||
|
" vec3 g=step(x0.yzx,x0.xyz);vec3 l=1.0-g;",
|
||||||
|
" vec3 i1=min(g.xyz,l.zxy);vec3 i2=max(g.xyz,l.zxy);",
|
||||||
|
" vec3 x1=x0-i1+C.xxx;vec3 x2=x0-i2+C.yyy;vec3 x3=x0-D.yyy;",
|
||||||
|
" i=mod289(i);",
|
||||||
|
" vec4 p=permute(permute(permute(i.z+vec4(0.0,i1.z,i2.z,1.0))+i.y+vec4(0.0,i1.y,i2.y,1.0))+i.x+vec4(0.0,i1.x,i2.x,1.0));",
|
||||||
|
" float n_=0.142857142857;vec3 ns=n_*D.wyz-D.xzx;",
|
||||||
|
" vec4 j=p-49.0*floor(p*ns.z*ns.z);vec4 x_=floor(j*ns.z);vec4 y_=floor(j-7.0*x_);",
|
||||||
|
" vec4 x=x_*ns.x+ns.yyyy;vec4 y=y_*ns.x+ns.yyyy;vec4 h=1.0-abs(x)-abs(y);",
|
||||||
|
" vec4 b0=vec4(x.xy,y.xy);vec4 b1=vec4(x.zw,y.zw);",
|
||||||
|
" vec4 s0=floor(b0)*2.0+1.0;vec4 s1=floor(b1)*2.0+1.0;",
|
||||||
|
" vec4 sh=-step(h,vec4(0.0));",
|
||||||
|
" vec4 a0=b0.xzyw+s0.xzyw*sh.xxyy;vec4 a1=b1.xzyw+s1.xzyw*sh.zzww;",
|
||||||
|
" vec3 p0=vec3(a0.xy,h.x);vec3 p1=vec3(a0.zw,h.y);vec3 p2=vec3(a1.xy,h.z);vec3 p3=vec3(a1.zw,h.w);",
|
||||||
|
" vec4 norm=taylorInvSqrt(vec4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));",
|
||||||
|
" p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;",
|
||||||
|
" vec4 m=max(0.6-vec4(dot(x0,x0),dot(x1,x1),dot(x2,x2),dot(x3,x3)),0.0);m=m*m;",
|
||||||
|
" return 42.0*dot(m*m,vec4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3)));",
|
||||||
|
"}",
|
||||||
|
"void main(){",
|
||||||
|
" vec2 uv=vUv;float ar=1920.0/1080.0;vec2 p=vec2(uv.x*ar,uv.y);float t=uTime*0.06;",
|
||||||
|
" float wx=snoise(vec3(p*1.4,t*0.5))*0.2;float wy=snoise(vec3(p*1.4+100.0,t*0.5))*0.2;",
|
||||||
|
" vec2 wp=p+vec2(wx,wy);",
|
||||||
|
" vec3 base=mix(vec3(0.10,0.02,0.22),vec3(0.04,0.10,0.25),smoothstep(0.0,1.0,uv.x*0.6+uv.y*0.4));",
|
||||||
|
" float angle=0.65;float ridgeUv=dot(wp,vec2(cos(angle),sin(angle)));",
|
||||||
|
" float ridge1=sin(ridgeUv*8.0+t*2.0+snoise(vec3(wp*0.8,t))*1.5);",
|
||||||
|
" float ridge2=sin(ridgeUv*5.5-t*1.4+snoise(vec3(wp*1.2+50.0,t*0.7))*2.0);",
|
||||||
|
" float ridge3=sin(ridgeUv*12.0+t*3.0+snoise(vec3(wp*0.6+80.0,t*0.4))*1.0);",
|
||||||
|
" float crease1=pow(abs(ridge1),0.35)*sign(ridge1)*0.5+0.5;",
|
||||||
|
" float crease2=pow(abs(ridge2),0.4)*sign(ridge2)*0.5+0.5;",
|
||||||
|
" float crease3=pow(abs(ridge3),0.5)*sign(ridge3)*0.5+0.5;",
|
||||||
|
" vec3 warm=mix(vec3(0.9,0.4,0.08),vec3(0.95,0.65,0.15),crease1);",
|
||||||
|
" float warmZone=smoothstep(0.15,0.75,uv.x+uv.y*0.4+snoise(vec3(uv*2.0,t))*0.3);",
|
||||||
|
" vec3 cool=mix(vec3(0.02,0.4,0.55),vec3(0.25,0.7,0.82),crease2);",
|
||||||
|
" float coolZone=smoothstep(0.25,0.85,1.2-uv.x+uv.y*0.5+snoise(vec3(uv*2.0+40.0,t*0.8))*0.25);",
|
||||||
|
" vec3 hot=mix(vec3(0.8,0.1,0.4),vec3(0.6,0.08,0.65),crease3);",
|
||||||
|
" float hotZone=smoothstep(0.5,0.9,snoise(vec3(uv*2.5+20.0,t*0.6))*0.5+0.5);",
|
||||||
|
" vec3 col=base;",
|
||||||
|
" col=mix(col,warm,warmZone*0.75*smoothstep(0.3,0.7,crease1));",
|
||||||
|
" col=mix(col,cool,coolZone*0.65*smoothstep(0.2,0.65,crease2));",
|
||||||
|
" col=mix(col,hot,hotZone*0.5*smoothstep(0.35,0.8,crease3));",
|
||||||
|
" float edgeGlow=pow(1.0-abs(ridge1),6.0)*0.4+pow(1.0-abs(ridge2),5.0)*0.25;",
|
||||||
|
" col+=edgeGlow*mix(warm,cool,uv.x)*0.8;",
|
||||||
|
" col*=1.0-pow(abs(ridge1),4.0)*0.15;",
|
||||||
|
" float vig=1.0-smoothstep(0.5,1.5,length((uv-0.5)*vec2(1.3,1.0)));",
|
||||||
|
" col*=0.65+vig*0.5;",
|
||||||
|
" float luma=dot(col,vec3(0.299,0.587,0.114));col=mix(vec3(luma),col,1.5);",
|
||||||
|
" col=clamp(col,0.0,1.0);col=pow(col,vec3(0.9));",
|
||||||
|
" gl_FragColor=vec4(col,1.0);",
|
||||||
|
"}",
|
||||||
|
].join("\n");
|
||||||
|
|
||||||
|
/* ── Three.js Setup ─────────────────────────────────────────────── */
|
||||||
|
var threeCanvas = document.getElementById("three-canvas");
|
||||||
|
var renderer = new THREE.WebGLRenderer({ canvas: threeCanvas, alpha: false });
|
||||||
|
renderer.setSize(W, H, false);
|
||||||
|
renderer.setPixelRatio(1);
|
||||||
|
|
||||||
|
var scene = new THREE.Scene();
|
||||||
|
var camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
||||||
|
var uniforms = { uTime: { value: 0 } };
|
||||||
|
var shaderMat = new THREE.ShaderMaterial({
|
||||||
|
vertexShader: vs,
|
||||||
|
fragmentShader: fs,
|
||||||
|
uniforms: uniforms,
|
||||||
|
});
|
||||||
|
var quad = new THREE.Mesh(new THREE.PlaneGeometry(2, 2), shaderMat);
|
||||||
|
scene.add(quad);
|
||||||
|
|
||||||
|
/* ── Glass Canvas ───────────────────────────────────────────────── */
|
||||||
|
var glassCanvas = document.getElementById("glass-canvas");
|
||||||
|
var ctx = glassCanvas.getContext("2d");
|
||||||
|
var lg = new LiquidGlass.LiquidGlassCanvas(glassCanvas);
|
||||||
|
var lgReady = false;
|
||||||
|
|
||||||
|
function renderGlass(time) {
|
||||||
|
if (!lgReady) return;
|
||||||
|
uniforms.uTime.value = time;
|
||||||
|
renderer.render(scene, camera);
|
||||||
|
ctx.clearRect(0, 0, W, H);
|
||||||
|
ctx.drawImage(threeCanvas, 0, 0, W, H);
|
||||||
|
lg.renderGlassElements();
|
||||||
|
}
|
||||||
|
|
||||||
|
function requestGlassRender(time) {
|
||||||
|
if (glassCanvas.requestPaint) {
|
||||||
|
glassCanvas.onpaint = function () {
|
||||||
|
renderGlass(time);
|
||||||
|
};
|
||||||
|
glassCanvas.requestPaint();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
renderGlass(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
lg.waitForInit().then(function (ok) {
|
||||||
|
if (!ok) return;
|
||||||
|
lgReady = true;
|
||||||
|
requestGlassRender(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* ── GSAP Timeline ──────────────────────────────────────────────── */
|
||||||
|
window.__timelines = window.__timelines || {};
|
||||||
|
var tl = gsap.timeline({ paused: true });
|
||||||
|
|
||||||
|
var gs = document.getElementById("glass-search");
|
||||||
|
var gt = document.getElementById("glass-toggle");
|
||||||
|
var gm = document.getElementById("glass-media");
|
||||||
|
var gsl = document.getElementById("glass-slider");
|
||||||
|
var ts = document.getElementById("text-search");
|
||||||
|
var tt = document.getElementById("text-toggle");
|
||||||
|
var tm = document.getElementById("text-media");
|
||||||
|
var tsl = document.getElementById("text-slider");
|
||||||
|
var searchLabel = document.getElementById("search-label");
|
||||||
|
var sliderPct = document.getElementById("slider-pct");
|
||||||
|
var sliderValue = { value: 34 };
|
||||||
|
|
||||||
|
gsap.set([gs, ts, gt, tt, gm, tm, gsl, tsl], { top: 1160, opacity: 1 });
|
||||||
|
gsap.set("#sound-wave span", { height: 7 });
|
||||||
|
|
||||||
|
tl.to([gs, ts], { top: 300, duration: 0.48, ease: "power3.out" }, 0.12);
|
||||||
|
tl.to([gt, tt], { top: 390, duration: 0.44, ease: "power3.out" }, 0.22);
|
||||||
|
tl.to([gm, tm], { top: 476, duration: 0.44, ease: "power3.out" }, 0.32);
|
||||||
|
tl.to([gsl, tsl], { top: 616, duration: 0.46, ease: "power3.out" }, 0.42);
|
||||||
|
|
||||||
|
tl.call(
|
||||||
|
function () {
|
||||||
|
searchLabel.textContent = "Search Music";
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
0.9,
|
||||||
|
);
|
||||||
|
tl.to(
|
||||||
|
"#search-caret",
|
||||||
|
{ opacity: 1, duration: 0.1, yoyo: true, repeat: 5, ease: "none" },
|
||||||
|
0.94,
|
||||||
|
);
|
||||||
|
tl.call(
|
||||||
|
function () {
|
||||||
|
searchLabel.textContent = "Midnight Drive";
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
1.55,
|
||||||
|
);
|
||||||
|
tl.to("#toggle-pill", { left: 215, duration: 0.24, ease: "power2.out" }, 1.82);
|
||||||
|
tl.to(
|
||||||
|
".play-btn",
|
||||||
|
{ scale: 0.86, duration: 0.12, ease: "power2.out", yoyo: true, repeat: 1 },
|
||||||
|
2.18,
|
||||||
|
);
|
||||||
|
tl.to("#album-sheen", { left: 112, duration: 0.75, ease: "power2.out" }, 2.2);
|
||||||
|
tl.to(
|
||||||
|
"#sound-wave span",
|
||||||
|
{ height: 15, duration: 0.22, ease: "power2.inOut", stagger: 0.05, yoyo: true, repeat: 12 },
|
||||||
|
2.2,
|
||||||
|
);
|
||||||
|
tl.to(
|
||||||
|
sliderValue,
|
||||||
|
{
|
||||||
|
value: 82,
|
||||||
|
duration: 4.4,
|
||||||
|
ease: "none",
|
||||||
|
onUpdate: function () {
|
||||||
|
sliderPct.textContent = Math.round(sliderValue.value) + "%";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
1.2,
|
||||||
|
);
|
||||||
|
tl.to("#slider-fill", { width: "82%", duration: 4.4, ease: "none" }, 1.2);
|
||||||
|
tl.to(
|
||||||
|
"#live-dot",
|
||||||
|
{ scale: 1.45, duration: 0.24, ease: "power2.out", yoyo: true, repeat: 4 },
|
||||||
|
2.6,
|
||||||
|
);
|
||||||
|
tl.to("#toggle-pill", { left: 425, duration: 0.24, ease: "power2.out" }, 4.15);
|
||||||
|
|
||||||
|
var stack = [gs, ts, gt, tt, gm, tm, gsl, tsl];
|
||||||
|
tl.to(stack, { top: "-=8", duration: 0.22, ease: "power2.out", yoyo: true, repeat: 1 }, 5.55);
|
||||||
|
tl.to(stack, { top: "+=760", duration: 0.42, ease: "power2.in" }, 6.72);
|
||||||
|
|
||||||
|
/* Duration driver */
|
||||||
|
tl.to({ v: 0 }, { v: 1, duration: DURATION, ease: "none" }, 0);
|
||||||
|
|
||||||
|
tl.eventCallback("onUpdate", function () {
|
||||||
|
requestGlassRender(tl.time());
|
||||||
|
});
|
||||||
|
|
||||||
|
window.__timelines["liquid-glass-media-controls"] = tl;
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://hyperframes.heygen.com/schema/registry-item.json",
|
||||||
|
"name": "liquid-glass-media-controls",
|
||||||
|
"type": "hyperframes:block",
|
||||||
|
"title": "Liquid Glass Media Controls",
|
||||||
|
"description": "Frosted glass media control panels spreading over an aurora shader background",
|
||||||
|
"stability": "experimental",
|
||||||
|
"dimensions": {
|
||||||
|
"width": 1920,
|
||||||
|
"height": 1080
|
||||||
|
},
|
||||||
|
"duration": 8,
|
||||||
|
"tags": ["html-in-canvas", "liquid-glass-html-in-canvas", "webgpu"],
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "liquid-glass-media-controls.html",
|
||||||
|
"target": "compositions/liquid-glass-media-controls.html",
|
||||||
|
"type": "hyperframes:composition"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preview": {
|
||||||
|
"video": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-media-controls.mp4",
|
||||||
|
"poster": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-media-controls.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<svg width="263" height="79" viewBox="0 0 263 79" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M0 16.6738H4.96V23.3838H11.53V16.6738H16.49V35.4538H11.53V27.6738H4.96V35.4538H0V16.6738Z" fill="white"/>
|
||||||
|
<path d="M17.8899 28.0137C17.8899 23.4237 21.2399 20.0237 25.7999 20.0237C30.0099 20.0237 32.9399 23.0837 32.9399 27.5637C32.9399 28.2037 32.8599 28.8237 32.8299 29.3337H22.6099C23.0399 31.1337 24.6199 32.1237 27.1399 32.1237C28.7199 32.1237 30.2199 31.7237 31.2999 31.0237V34.6737C30.1699 35.3937 28.2999 35.8537 26.3599 35.8537C21.2599 35.8537 17.8799 32.6037 17.8799 28.0237L17.8899 28.0137ZM28.5699 26.1937C28.4899 24.5337 27.3899 23.5637 25.7499 23.5637C24.1099 23.5637 22.9599 24.5337 22.6099 26.1937H28.5699Z" fill="white"/>
|
||||||
|
<path d="M37.85 33.8638L32 20.4238H37.29L40.46 28.1538L43.6 20.4238H48.48L40.33 39.5738H35.26L37.86 33.8638H37.85Z" fill="white"/>
|
||||||
|
<path d="M48.1797 26.1138C48.1797 20.4238 52.7097 16.2438 58.9397 16.2438C61.2997 16.2438 63.5297 16.8038 64.8197 17.7238V21.9338C63.5597 20.9138 61.6797 20.2938 59.7497 20.2938C55.7797 20.2938 53.2597 22.6238 53.2597 26.1438C53.2597 29.6638 55.5697 31.8838 58.8897 31.8838C59.6397 31.8838 60.4997 31.7538 61.1997 31.5038V27.8838H57.4697V24.2338H65.5197V33.7038C63.6697 35.0938 61.1997 35.8738 58.5997 35.8738C52.5397 35.8738 48.1897 31.7438 48.1897 26.1138H48.1797Z" fill="white"/>
|
||||||
|
<path d="M66.6604 28.0137C66.6604 23.4237 70.0104 20.0237 74.5704 20.0237C78.7804 20.0237 81.7104 23.0837 81.7104 27.5637C81.7104 28.2037 81.6304 28.8237 81.6004 29.3337H71.3804C71.8104 31.1337 73.3904 32.1237 75.9104 32.1237C77.4904 32.1237 78.9904 31.7237 80.0704 31.0237V34.6737C78.9404 35.3937 77.0704 35.8537 75.1304 35.8537C70.0304 35.8537 66.6504 32.6037 66.6504 28.0237L66.6604 28.0137ZM77.3404 26.1937C77.2604 24.5337 76.1604 23.5637 74.5204 23.5637C72.8804 23.5637 71.7304 24.5337 71.3804 26.1937H77.3404Z" fill="white"/>
|
||||||
|
<path d="M82.9697 20.4238H87.8497V22.4138C88.7597 20.9638 90.3497 20.1038 92.3297 20.1038C95.4997 20.1038 97.3997 22.3338 97.3997 25.8138V35.4438H92.5197V26.8638C92.5197 25.0438 91.8197 24.1838 90.4797 24.1838C88.9497 24.1838 87.8497 25.3638 87.8497 27.2638V35.4438H82.9697V20.4238Z" fill="white"/>
|
||||||
|
<path d="M195.219 26.1937L213.529 38.9937C216.009 40.7237 220.239 38.7637 221.009 35.5337L228.419 4.33374C229.189 1.10374 225.879 -0.856262 222.589 0.873738L198.199 13.6737C192.649 16.5837 191.059 23.2837 195.219 26.1937Z" fill="url(#paint0_linear_2204_3044)"/>
|
||||||
|
<path d="M256.97 25.9638L232.58 38.7638C229.28 40.4938 225.98 38.5338 226.75 35.3038L234.16 4.10376C234.93 0.873757 239.16 -1.08624 241.64 0.643757L259.95 13.4438C264.12 16.3538 262.52 23.0538 256.97 25.9638Z" fill="url(#paint1_linear_2204_3044)"/>
|
||||||
|
<path d="M252.115 72.502C250.192 72.502 248.268 72.0838 246.93 71.3728V65.6853C247.808 66.3126 248.937 66.689 250.066 66.689C251.739 66.689 252.784 65.8526 252.784 64.5562C252.784 63.8452 252.492 63.0925 251.655 62.0888L249.899 59.956C248.728 58.4923 248.226 56.9031 248.226 55.2721C248.226 51.0065 251.864 48.0791 256.883 48.0791C258.723 48.0791 260.438 48.4555 261.65 49.0828V54.7703C260.898 54.2266 259.768 53.8503 258.723 53.8503C257.092 53.8503 256.046 54.6867 256.046 55.8994C256.046 56.6522 256.423 57.405 257.259 58.4086L258.974 60.4996C260.187 62.047 260.73 63.5943 260.73 65.2671C260.73 69.5746 257.05 72.502 252.115 72.502Z" fill="white"/>
|
||||||
|
<path d="M236.338 72.6269C228.392 72.6269 223.123 67.5667 223.123 60.4155C223.123 53.2643 228.351 47.9531 235.46 47.9531C242.026 47.9531 246.584 52.7206 246.584 59.7045C246.584 60.7082 246.459 61.6701 246.417 62.4647H230.483C231.152 65.2666 233.62 66.8139 237.551 66.8139C240.018 66.8139 242.36 66.1866 244.033 65.0993V70.7868C242.277 71.916 239.349 72.6269 236.338 72.6269ZM230.483 57.5717H239.767C239.642 54.9789 237.927 53.4734 235.376 53.4734C232.867 53.4734 231.027 54.9789 230.483 57.5717Z" fill="white"/>
|
||||||
|
<path d="M184.998 72.0001V48.5809H192.609V51.6756C193.989 49.4173 196.373 48.0791 199.426 48.0791C202.521 48.0791 204.779 49.5428 206.075 52.052C207.497 49.5846 210.132 48.0791 213.352 48.0791C218.245 48.0791 221.214 51.592 221.214 57.0286V72.0001H213.603V58.5341C213.603 55.774 212.557 54.4357 210.634 54.4357C208.459 54.4357 206.912 56.234 206.912 59.0778V72.0001H199.3V58.5341C199.3 55.774 198.255 54.4357 196.373 54.4357C194.157 54.4357 192.609 56.234 192.609 59.0778V72.0001H184.998Z" fill="white"/>
|
||||||
|
<path d="M167.26 72.4602C161.154 72.4602 156.596 67.2745 156.596 60.3324C156.596 53.3066 161.196 48.0791 167.302 48.0791C170.438 48.0791 173.031 49.4173 174.536 51.8429V48.5809H182.148V72.0001H174.536V68.4873C173.031 71.0801 170.438 72.4602 167.26 72.4602ZM169.393 66.1872C172.78 66.1872 174.536 63.3434 174.536 60.876V59.6632C174.536 57.2377 172.78 54.4357 169.393 54.4357C166.298 54.4357 164.207 56.7777 164.207 60.2905C164.207 63.7616 166.298 66.1872 169.393 66.1872Z" fill="white"/>
|
||||||
|
<path d="M141.258 72V48.5808H148.827V52.9719C149.831 50.0445 151.796 48.2881 154.306 48.2881C154.975 48.2881 155.602 48.4135 156.02 48.6645V55.8993C155.435 55.5648 154.724 55.4393 153.887 55.4393C150.751 55.4393 148.869 57.6558 148.869 61.2941V72H141.258Z" fill="white"/>
|
||||||
|
<path d="M122.643 71.9996V42.7256H139.371V49.124H130.379V54.477H138.911V60.5827H130.379V71.9996H122.643Z" fill="white"/>
|
||||||
|
<path d="M105.645 72V48.5808H113.214V52.9719C114.218 50.0445 116.183 48.2881 118.692 48.2881C119.361 48.2881 119.989 48.4135 120.407 48.6645V55.8993C119.822 55.5648 119.111 55.4393 118.274 55.4393C115.138 55.4393 113.256 57.6558 113.256 61.2941V72H105.645Z" fill="white"/>
|
||||||
|
<path d="M93.4397 72.6269C85.4939 72.6269 80.2246 67.5667 80.2246 60.4155C80.2246 53.2643 85.4521 47.9531 92.5615 47.9531C99.1273 47.9531 103.686 52.7206 103.686 59.7045C103.686 60.7082 103.56 61.6701 103.518 62.4647H87.5849C88.2541 65.2666 90.7214 66.8139 94.6525 66.8139C97.1199 66.8139 99.4618 66.1866 101.135 65.0993V70.7868C99.3782 71.916 96.4508 72.6269 93.4397 72.6269ZM87.5849 57.5717H96.869C96.7435 54.9789 95.0289 53.4734 92.4779 53.4734C89.9687 53.4734 88.1286 54.9789 87.5849 57.5717Z" fill="white"/>
|
||||||
|
<path d="M53.3711 78.4404V48.5809H60.9823V52.052C62.446 49.501 65.0807 48.0791 68.3008 48.0791C74.3647 48.0791 78.9649 53.3066 78.9649 60.2487C78.9649 67.2745 74.3229 72.4602 68.259 72.4602C65.0807 72.4602 62.446 71.1637 60.9823 68.78V78.4404H53.3711ZM66.1262 66.1872C69.2627 66.1872 71.3119 63.7616 71.3119 60.2905C71.3119 56.8195 69.2627 54.4357 66.1262 54.4357C62.7388 54.4357 60.9823 57.2795 60.9823 59.7051V60.9178C60.9823 63.3434 62.7388 66.1872 66.1262 66.1872Z" fill="white"/>
|
||||||
|
<path d="M31.9606 78.4405L36.0171 69.5329L26.9004 48.5811H35.1389L40.0737 60.6252L44.9666 48.5811H52.5779L39.8646 78.4405H31.9606Z" fill="white"/>
|
||||||
|
<path d="M0 71.9996V42.7256H7.7367V53.1806H17.9826V42.7256H25.7193V71.9996H17.9826V59.8718H7.7367V71.9996H0Z" fill="white"/>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_2204_3044" x1="225.869" y1="-3.06048e-05" x2="222.845" y2="37.4821" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#06E3FA"/>
|
||||||
|
<stop offset="1" stop-color="#4FDB5E"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint1_linear_2204_3044" x1="230.87" y1="39" x2="244.661" y2="6.30303" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#06E3FA"/>
|
||||||
|
<stop offset="1" stop-color="#4FDB5E"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 7.1 KiB |
@@ -0,0 +1,483 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=1920, height=1080" />
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
||||||
|
<script src="lib/liquid-glass.iife.js"></script>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #000;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: "Inter", sans-serif;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#three-canvas {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 0;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
#glass-canvas {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 1;
|
||||||
|
display: block;
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
}
|
||||||
|
.text-overlay {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 2;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-panel {
|
||||||
|
position: absolute;
|
||||||
|
width: 520px;
|
||||||
|
height: 118px;
|
||||||
|
background: rgba(255, 255, 255, 0.06);
|
||||||
|
--lg-blur: 0.22;
|
||||||
|
--lg-refraction: 0.6;
|
||||||
|
--lg-corner-radius: 36;
|
||||||
|
--lg-z-radius: 38;
|
||||||
|
--lg-specular: 0.2;
|
||||||
|
--lg-fresnel: 0.9;
|
||||||
|
--lg-edge-highlight: 0.1;
|
||||||
|
--lg-chrom-aberration: 0.05;
|
||||||
|
--lg-shadow-opacity: 0.35;
|
||||||
|
--lg-shadow-spread: 14;
|
||||||
|
--lg-shadow-offset-y: 4;
|
||||||
|
--lg-saturation: 0.25;
|
||||||
|
}
|
||||||
|
.glass-panel.p1 {
|
||||||
|
top: 60px;
|
||||||
|
left: 1340px;
|
||||||
|
}
|
||||||
|
.glass-panel.p2 {
|
||||||
|
top: 196px;
|
||||||
|
left: 1340px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notif-card {
|
||||||
|
position: absolute;
|
||||||
|
width: 520px;
|
||||||
|
height: 118px;
|
||||||
|
padding: 18px 24px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.notif-card.c1 {
|
||||||
|
top: 60px;
|
||||||
|
left: 1340px;
|
||||||
|
}
|
||||||
|
.notif-card.c2 {
|
||||||
|
top: 196px;
|
||||||
|
left: 1340px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: 800;
|
||||||
|
flex-shrink: 0;
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.35),
|
||||||
|
0 10px 24px rgba(0, 0, 0, 0.24);
|
||||||
|
}
|
||||||
|
.avatar-ja {
|
||||||
|
width: 128px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background: rgba(2, 4, 10, 0.72);
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.18),
|
||||||
|
0 10px 24px rgba(0, 0, 0, 0.24);
|
||||||
|
}
|
||||||
|
.hyperframes-logo {
|
||||||
|
width: 102px;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.avatar-kl {
|
||||||
|
background: linear-gradient(135deg, #ff7ab6, #8b5cf6);
|
||||||
|
}
|
||||||
|
.notif-body {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.notif-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 8px;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
}
|
||||||
|
.notif-name {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.notif-time {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: rgba(255, 255, 255, 0.55);
|
||||||
|
}
|
||||||
|
.notif-text {
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: rgba(255, 255, 255, 0.88);
|
||||||
|
line-height: 1.32;
|
||||||
|
}
|
||||||
|
.notif-progress {
|
||||||
|
position: absolute;
|
||||||
|
right: 26px;
|
||||||
|
bottom: 15px;
|
||||||
|
left: 168px;
|
||||||
|
height: 3px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(255, 255, 255, 0.18);
|
||||||
|
}
|
||||||
|
.notif-progress-fill {
|
||||||
|
width: 0%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: inherit;
|
||||||
|
background: linear-gradient(90deg, #06e3fa, #4fdb5e);
|
||||||
|
box-shadow: 0 0 16px rgba(79, 219, 94, 0.55);
|
||||||
|
}
|
||||||
|
.status-dot {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #06e3fa;
|
||||||
|
box-shadow: 0 0 16px rgba(6, 227, 250, 0.65);
|
||||||
|
}
|
||||||
|
.notif-actions {
|
||||||
|
position: absolute;
|
||||||
|
right: 22px;
|
||||||
|
bottom: 13px;
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.action-chip {
|
||||||
|
padding: 5px 11px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(255, 255, 255, 0.16);
|
||||||
|
color: rgba(255, 255, 255, 0.94);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 750;
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
|
||||||
|
}
|
||||||
|
.typing-dots {
|
||||||
|
display: inline-flex;
|
||||||
|
gap: 3px;
|
||||||
|
margin-left: 5px;
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
.typing-dots span {
|
||||||
|
width: 4px;
|
||||||
|
height: 4px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: rgba(255, 255, 255, 0.72);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div
|
||||||
|
id="root"
|
||||||
|
data-composition-id="liquid-glass-notification"
|
||||||
|
data-start="0"
|
||||||
|
data-duration="8"
|
||||||
|
data-width="1920"
|
||||||
|
data-height="1080"
|
||||||
|
>
|
||||||
|
<canvas id="three-canvas"></canvas>
|
||||||
|
|
||||||
|
<canvas id="glass-canvas" layoutsubtree width="1920" height="1080">
|
||||||
|
<div class="glass-panel liquid-glass p1" id="gp1"></div>
|
||||||
|
<div class="glass-panel liquid-glass p2" id="gp2"></div>
|
||||||
|
</canvas>
|
||||||
|
|
||||||
|
<div class="text-overlay">
|
||||||
|
<div class="notif-card c1" id="txt1">
|
||||||
|
<div class="avatar avatar-ja">
|
||||||
|
<img
|
||||||
|
class="hyperframes-logo"
|
||||||
|
src="assets/hyperframes-logo-dark.svg"
|
||||||
|
alt="HyperFrames"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="notif-body">
|
||||||
|
<div class="notif-header">
|
||||||
|
<span class="notif-name">Render complete</span>
|
||||||
|
<span class="status-dot" id="status-dot"></span>
|
||||||
|
<span class="notif-time" id="render-status">rendering</span>
|
||||||
|
</div>
|
||||||
|
<div class="notif-text" id="render-copy">
|
||||||
|
Liquid glass preview is encoding with GPU capture.
|
||||||
|
</div>
|
||||||
|
<div class="notif-progress">
|
||||||
|
<div class="notif-progress-fill" id="render-progress"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="notif-card c2" id="txt2">
|
||||||
|
<div class="avatar avatar-kl">M</div>
|
||||||
|
<div class="notif-body">
|
||||||
|
<div class="notif-header">
|
||||||
|
<span class="notif-name">Messages</span>
|
||||||
|
<span class="notif-time">now</span>
|
||||||
|
</div>
|
||||||
|
<div class="notif-text">
|
||||||
|
Miguel: can it feel alive but still native?
|
||||||
|
<span class="typing-dots" id="typing-dots"
|
||||||
|
><span></span><span></span><span></span
|
||||||
|
></span>
|
||||||
|
</div>
|
||||||
|
<div class="notif-actions" id="reply-actions">
|
||||||
|
<span class="action-chip">Reply</span>
|
||||||
|
<span class="action-chip">Mark Read</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
(function () {
|
||||||
|
var threeCanvas = document.getElementById("three-canvas");
|
||||||
|
var threeRenderer = new THREE.WebGLRenderer({
|
||||||
|
canvas: threeCanvas,
|
||||||
|
antialias: false,
|
||||||
|
preserveDrawingBuffer: true,
|
||||||
|
});
|
||||||
|
threeRenderer.setSize(1920, 1080);
|
||||||
|
threeRenderer.setPixelRatio(1);
|
||||||
|
var threeScene = new THREE.Scene();
|
||||||
|
var threeCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
||||||
|
|
||||||
|
var fs = [
|
||||||
|
"precision highp float;",
|
||||||
|
"varying vec2 vUv;",
|
||||||
|
"uniform float uTime;",
|
||||||
|
"vec3 mod289(vec3 x){return x-floor(x*(1.0/289.0))*289.0;}",
|
||||||
|
"vec4 mod289(vec4 x){return x-floor(x*(1.0/289.0))*289.0;}",
|
||||||
|
"vec4 permute(vec4 x){return mod289(((x*34.0)+1.0)*x);}",
|
||||||
|
"vec4 taylorInvSqrt(vec4 r){return 1.79284291400159-0.85373472095314*r;}",
|
||||||
|
"float snoise(vec3 v){",
|
||||||
|
" const vec2 C=vec2(1.0/6.0,1.0/3.0);const vec4 D=vec4(0.0,0.5,1.0,2.0);",
|
||||||
|
" vec3 i=floor(v+dot(v,C.yyy));vec3 x0=v-i+dot(i,C.xxx);",
|
||||||
|
" vec3 g=step(x0.yzx,x0.xyz);vec3 l=1.0-g;",
|
||||||
|
" vec3 i1=min(g.xyz,l.zxy);vec3 i2=max(g.xyz,l.zxy);",
|
||||||
|
" vec3 x1=x0-i1+C.xxx;vec3 x2=x0-i2+C.yyy;vec3 x3=x0-D.yyy;",
|
||||||
|
" i=mod289(i);",
|
||||||
|
" vec4 p=permute(permute(permute(i.z+vec4(0.0,i1.z,i2.z,1.0))+i.y+vec4(0.0,i1.y,i2.y,1.0))+i.x+vec4(0.0,i1.x,i2.x,1.0));",
|
||||||
|
" float n_=0.142857142857;vec3 ns=n_*D.wyz-D.xzx;",
|
||||||
|
" vec4 j=p-49.0*floor(p*ns.z*ns.z);vec4 x_=floor(j*ns.z);vec4 y_=floor(j-7.0*x_);",
|
||||||
|
" vec4 x=x_*ns.x+ns.yyyy;vec4 y=y_*ns.x+ns.yyyy;vec4 h=1.0-abs(x)-abs(y);",
|
||||||
|
" vec4 b0=vec4(x.xy,y.xy);vec4 b1=vec4(x.zw,y.zw);",
|
||||||
|
" vec4 s0=floor(b0)*2.0+1.0;vec4 s1=floor(b1)*2.0+1.0;",
|
||||||
|
" vec4 sh=-step(h,vec4(0.0));",
|
||||||
|
" vec4 a0=b0.xzyw+s0.xzyw*sh.xxyy;vec4 a1=b1.xzyw+s1.xzyw*sh.zzww;",
|
||||||
|
" vec3 p0=vec3(a0.xy,h.x);vec3 p1=vec3(a0.zw,h.y);vec3 p2=vec3(a1.xy,h.z);vec3 p3=vec3(a1.zw,h.w);",
|
||||||
|
" vec4 norm=taylorInvSqrt(vec4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));",
|
||||||
|
" p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;",
|
||||||
|
" vec4 m=max(0.6-vec4(dot(x0,x0),dot(x1,x1),dot(x2,x2),dot(x3,x3)),0.0);m=m*m;",
|
||||||
|
" return 42.0*dot(m*m,vec4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3)));",
|
||||||
|
"}",
|
||||||
|
"void main(){",
|
||||||
|
" vec2 uv=vUv;float ar=1920.0/1080.0;vec2 p=vec2(uv.x*ar,uv.y);float t=uTime*0.06;",
|
||||||
|
" float wx=snoise(vec3(p*1.4,t*0.5))*0.2;float wy=snoise(vec3(p*1.4+100.0,t*0.5))*0.2;",
|
||||||
|
" vec2 wp=p+vec2(wx,wy);",
|
||||||
|
" vec3 base=mix(vec3(0.10,0.02,0.22),vec3(0.04,0.10,0.25),smoothstep(0.0,1.0,uv.x*0.6+uv.y*0.4));",
|
||||||
|
" float angle=0.65;float ridgeUv=dot(wp,vec2(cos(angle),sin(angle)));",
|
||||||
|
" float ridge1=sin(ridgeUv*8.0+t*2.0+snoise(vec3(wp*0.8,t))*1.5);",
|
||||||
|
" float ridge2=sin(ridgeUv*5.5-t*1.4+snoise(vec3(wp*1.2+50.0,t*0.7))*2.0);",
|
||||||
|
" float ridge3=sin(ridgeUv*12.0+t*3.0+snoise(vec3(wp*0.6+80.0,t*0.4))*1.0);",
|
||||||
|
" float crease1=pow(abs(ridge1),0.35)*sign(ridge1)*0.5+0.5;",
|
||||||
|
" float crease2=pow(abs(ridge2),0.4)*sign(ridge2)*0.5+0.5;",
|
||||||
|
" float crease3=pow(abs(ridge3),0.5)*sign(ridge3)*0.5+0.5;",
|
||||||
|
" vec3 warm=mix(vec3(0.9,0.4,0.08),vec3(0.95,0.65,0.15),crease1);",
|
||||||
|
" float warmZone=smoothstep(0.15,0.75,uv.x+uv.y*0.4+snoise(vec3(uv*2.0,t))*0.3);",
|
||||||
|
" vec3 cool=mix(vec3(0.02,0.4,0.55),vec3(0.25,0.7,0.82),crease2);",
|
||||||
|
" float coolZone=smoothstep(0.25,0.85,1.2-uv.x+uv.y*0.5+snoise(vec3(uv*2.0+40.0,t*0.8))*0.25);",
|
||||||
|
" vec3 hot=mix(vec3(0.8,0.1,0.4),vec3(0.6,0.08,0.65),crease3);",
|
||||||
|
" float hotZone=smoothstep(0.5,0.9,snoise(vec3(uv*2.5+20.0,t*0.6))*0.5+0.5);",
|
||||||
|
" vec3 col=base;",
|
||||||
|
" col=mix(col,warm,warmZone*0.75*smoothstep(0.3,0.7,crease1));",
|
||||||
|
" col=mix(col,cool,coolZone*0.65*smoothstep(0.2,0.65,crease2));",
|
||||||
|
" col=mix(col,hot,hotZone*0.5*smoothstep(0.35,0.8,crease3));",
|
||||||
|
" float edgeGlow=pow(1.0-abs(ridge1),6.0)*0.4+pow(1.0-abs(ridge2),5.0)*0.25;",
|
||||||
|
" col+=edgeGlow*mix(warm,cool,uv.x)*0.8;",
|
||||||
|
" col*=1.0-pow(abs(ridge1),4.0)*0.15;",
|
||||||
|
" float vig=1.0-smoothstep(0.5,1.5,length((uv-0.5)*vec2(1.3,1.0)));",
|
||||||
|
" col*=0.65+vig*0.5;",
|
||||||
|
" float luma=dot(col,vec3(0.299,0.587,0.114));col=mix(vec3(luma),col,1.5);",
|
||||||
|
" col=clamp(col,0.0,1.0);col=pow(col,vec3(0.9));",
|
||||||
|
" gl_FragColor=vec4(col,1.0);",
|
||||||
|
"}",
|
||||||
|
].join("\n");
|
||||||
|
|
||||||
|
var uniforms = { uTime: { value: 0.0 } };
|
||||||
|
threeScene.add(
|
||||||
|
new THREE.Mesh(
|
||||||
|
new THREE.PlaneGeometry(2, 2),
|
||||||
|
new THREE.ShaderMaterial({
|
||||||
|
vertexShader:
|
||||||
|
"varying vec2 vUv; void main() { vUv = uv; gl_Position = vec4(position, 1.0); }",
|
||||||
|
fragmentShader: fs,
|
||||||
|
uniforms: uniforms,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
threeRenderer.render(threeScene, threeCamera);
|
||||||
|
|
||||||
|
var glassCanvas = document.getElementById("glass-canvas");
|
||||||
|
var glassCtx = glassCanvas.getContext("2d");
|
||||||
|
var lg = new LiquidGlass.LiquidGlassCanvas(glassCanvas);
|
||||||
|
|
||||||
|
function renderFrame(time) {
|
||||||
|
uniforms.uTime.value = time;
|
||||||
|
threeRenderer.render(threeScene, threeCamera);
|
||||||
|
if (!lg.isReady) return;
|
||||||
|
glassCtx.clearRect(0, 0, 1920, 1080);
|
||||||
|
glassCtx.drawImage(threeCanvas, 0, 0, 1920, 1080);
|
||||||
|
lg.renderGlassElements();
|
||||||
|
}
|
||||||
|
|
||||||
|
var lgReady = false;
|
||||||
|
lg.waitForInit().then(function (ok) {
|
||||||
|
if (!ok) return;
|
||||||
|
lgReady = true;
|
||||||
|
glassCanvas.onpaint = function () {
|
||||||
|
renderFrame(0);
|
||||||
|
};
|
||||||
|
if (glassCanvas.requestPaint) glassCanvas.requestPaint();
|
||||||
|
});
|
||||||
|
|
||||||
|
window.__timelines = window.__timelines || {};
|
||||||
|
var tl = gsap.timeline({ paused: true });
|
||||||
|
|
||||||
|
tl.to(
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
duration: 8,
|
||||||
|
ease: "none",
|
||||||
|
onUpdate: function () {
|
||||||
|
var t = tl.time();
|
||||||
|
uniforms.uTime.value = t;
|
||||||
|
threeRenderer.render(threeScene, threeCamera);
|
||||||
|
if (lgReady) {
|
||||||
|
glassCanvas.onpaint = function () {
|
||||||
|
glassCtx.clearRect(0, 0, 1920, 1080);
|
||||||
|
glassCtx.drawImage(threeCanvas, 0, 0, 1920, 1080);
|
||||||
|
lg.renderGlassElements();
|
||||||
|
};
|
||||||
|
if (glassCanvas.requestPaint) glassCanvas.requestPaint();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
0,
|
||||||
|
);
|
||||||
|
|
||||||
|
var renderStatus = document.getElementById("render-status");
|
||||||
|
var renderCopy = document.getElementById("render-copy");
|
||||||
|
|
||||||
|
gsap.set(["#gp1", "#txt1", "#gp2", "#txt2"], { left: "1980px", opacity: 0 });
|
||||||
|
gsap.set("#reply-actions", { y: 8, opacity: 0 });
|
||||||
|
gsap.set("#typing-dots span", { opacity: 0.35 });
|
||||||
|
|
||||||
|
tl.to(
|
||||||
|
["#gp1", "#txt1"],
|
||||||
|
{ left: "1326px", opacity: 1, duration: 0.38, ease: "power3.out" },
|
||||||
|
0.18,
|
||||||
|
);
|
||||||
|
tl.to(["#gp1", "#txt1"], { left: "1340px", duration: 0.16, ease: "power2.out" }, 0.56);
|
||||||
|
|
||||||
|
tl.to(
|
||||||
|
["#gp2", "#txt2"],
|
||||||
|
{ left: "1326px", opacity: 1, duration: 0.36, ease: "power3.out" },
|
||||||
|
0.82,
|
||||||
|
);
|
||||||
|
tl.to(["#gp2", "#txt2"], { left: "1340px", duration: 0.16, ease: "power2.out" }, 1.18);
|
||||||
|
|
||||||
|
tl.to("#render-progress", { width: "100%", duration: 3.4, ease: "none" }, 0.82);
|
||||||
|
tl.to(
|
||||||
|
"#status-dot",
|
||||||
|
{ scale: 1.45, duration: 0.18, ease: "power2.out", yoyo: true, repeat: 1 },
|
||||||
|
1.1,
|
||||||
|
);
|
||||||
|
tl.to(
|
||||||
|
"#typing-dots span",
|
||||||
|
{
|
||||||
|
opacity: 1,
|
||||||
|
y: -2,
|
||||||
|
duration: 0.22,
|
||||||
|
ease: "power2.out",
|
||||||
|
stagger: 0.08,
|
||||||
|
yoyo: true,
|
||||||
|
repeat: 5,
|
||||||
|
},
|
||||||
|
1.2,
|
||||||
|
);
|
||||||
|
tl.to(["#gp2", "#txt2"], { top: "+=10", duration: 0.18, ease: "power2.out" }, 2.55);
|
||||||
|
tl.to(["#gp2", "#txt2"], { top: "-=10", duration: 0.22, ease: "power2.out" }, 2.73);
|
||||||
|
tl.to("#reply-actions", { y: 0, opacity: 1, duration: 0.24, ease: "power2.out" }, 2.72);
|
||||||
|
tl.to(
|
||||||
|
"#status-dot",
|
||||||
|
{
|
||||||
|
backgroundColor: "#4ade80",
|
||||||
|
boxShadow: "0 0 18px rgba(74, 222, 128, 0.8)",
|
||||||
|
duration: 0.15,
|
||||||
|
},
|
||||||
|
4.25,
|
||||||
|
);
|
||||||
|
tl.call(
|
||||||
|
function () {
|
||||||
|
renderStatus.textContent = "complete";
|
||||||
|
renderCopy.textContent = "liquid-glass-notification.mp4 is ready.";
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
4.25,
|
||||||
|
);
|
||||||
|
tl.to(
|
||||||
|
["#gp1", "#txt1"],
|
||||||
|
{ top: "-=8", duration: 0.2, ease: "power2.out", yoyo: true, repeat: 1 },
|
||||||
|
4.25,
|
||||||
|
);
|
||||||
|
|
||||||
|
tl.to(
|
||||||
|
["#gp1", "#txt1"],
|
||||||
|
{ left: "1980px", opacity: 0, duration: 0.42, ease: "power2.in" },
|
||||||
|
6.72,
|
||||||
|
);
|
||||||
|
tl.to(
|
||||||
|
["#gp2", "#txt2"],
|
||||||
|
{ left: "1980px", opacity: 0, duration: 0.42, ease: "power2.in" },
|
||||||
|
6.9,
|
||||||
|
);
|
||||||
|
|
||||||
|
window.__timelines["liquid-glass-notification"] = tl;
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://hyperframes.heygen.com/schema/registry-item.json",
|
||||||
|
"name": "liquid-glass-notification",
|
||||||
|
"type": "hyperframes:block",
|
||||||
|
"title": "Liquid Glass Notification",
|
||||||
|
"description": "Frosted glass notification cards floating over an aurora shader background",
|
||||||
|
"stability": "experimental",
|
||||||
|
"dimensions": {
|
||||||
|
"width": 1920,
|
||||||
|
"height": 1080
|
||||||
|
},
|
||||||
|
"duration": 8,
|
||||||
|
"tags": ["html-in-canvas", "liquid-glass-html-in-canvas", "webgpu"],
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "liquid-glass-notification.html",
|
||||||
|
"target": "compositions/liquid-glass-notification.html",
|
||||||
|
"type": "hyperframes:composition"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/hyperframes-logo-dark.svg",
|
||||||
|
"target": "compositions/assets/hyperframes-logo-dark.svg",
|
||||||
|
"type": "registry:asset"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preview": {
|
||||||
|
"video": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-notification.mp4",
|
||||||
|
"poster": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-notification.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<svg width="263" height="79" viewBox="0 0 263 79" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M0 16.6738H4.96V23.3838H11.53V16.6738H16.49V35.4538H11.53V27.6738H4.96V35.4538H0V16.6738Z" fill="white"/>
|
||||||
|
<path d="M17.8899 28.0137C17.8899 23.4237 21.2399 20.0237 25.7999 20.0237C30.0099 20.0237 32.9399 23.0837 32.9399 27.5637C32.9399 28.2037 32.8599 28.8237 32.8299 29.3337H22.6099C23.0399 31.1337 24.6199 32.1237 27.1399 32.1237C28.7199 32.1237 30.2199 31.7237 31.2999 31.0237V34.6737C30.1699 35.3937 28.2999 35.8537 26.3599 35.8537C21.2599 35.8537 17.8799 32.6037 17.8799 28.0237L17.8899 28.0137ZM28.5699 26.1937C28.4899 24.5337 27.3899 23.5637 25.7499 23.5637C24.1099 23.5637 22.9599 24.5337 22.6099 26.1937H28.5699Z" fill="white"/>
|
||||||
|
<path d="M37.85 33.8638L32 20.4238H37.29L40.46 28.1538L43.6 20.4238H48.48L40.33 39.5738H35.26L37.86 33.8638H37.85Z" fill="white"/>
|
||||||
|
<path d="M48.1797 26.1138C48.1797 20.4238 52.7097 16.2438 58.9397 16.2438C61.2997 16.2438 63.5297 16.8038 64.8197 17.7238V21.9338C63.5597 20.9138 61.6797 20.2938 59.7497 20.2938C55.7797 20.2938 53.2597 22.6238 53.2597 26.1438C53.2597 29.6638 55.5697 31.8838 58.8897 31.8838C59.6397 31.8838 60.4997 31.7538 61.1997 31.5038V27.8838H57.4697V24.2338H65.5197V33.7038C63.6697 35.0938 61.1997 35.8738 58.5997 35.8738C52.5397 35.8738 48.1897 31.7438 48.1897 26.1138H48.1797Z" fill="white"/>
|
||||||
|
<path d="M66.6604 28.0137C66.6604 23.4237 70.0104 20.0237 74.5704 20.0237C78.7804 20.0237 81.7104 23.0837 81.7104 27.5637C81.7104 28.2037 81.6304 28.8237 81.6004 29.3337H71.3804C71.8104 31.1337 73.3904 32.1237 75.9104 32.1237C77.4904 32.1237 78.9904 31.7237 80.0704 31.0237V34.6737C78.9404 35.3937 77.0704 35.8537 75.1304 35.8537C70.0304 35.8537 66.6504 32.6037 66.6504 28.0237L66.6604 28.0137ZM77.3404 26.1937C77.2604 24.5337 76.1604 23.5637 74.5204 23.5637C72.8804 23.5637 71.7304 24.5337 71.3804 26.1937H77.3404Z" fill="white"/>
|
||||||
|
<path d="M82.9697 20.4238H87.8497V22.4138C88.7597 20.9638 90.3497 20.1038 92.3297 20.1038C95.4997 20.1038 97.3997 22.3338 97.3997 25.8138V35.4438H92.5197V26.8638C92.5197 25.0438 91.8197 24.1838 90.4797 24.1838C88.9497 24.1838 87.8497 25.3638 87.8497 27.2638V35.4438H82.9697V20.4238Z" fill="white"/>
|
||||||
|
<path d="M195.219 26.1937L213.529 38.9937C216.009 40.7237 220.239 38.7637 221.009 35.5337L228.419 4.33374C229.189 1.10374 225.879 -0.856262 222.589 0.873738L198.199 13.6737C192.649 16.5837 191.059 23.2837 195.219 26.1937Z" fill="url(#paint0_linear_2204_3044)"/>
|
||||||
|
<path d="M256.97 25.9638L232.58 38.7638C229.28 40.4938 225.98 38.5338 226.75 35.3038L234.16 4.10376C234.93 0.873757 239.16 -1.08624 241.64 0.643757L259.95 13.4438C264.12 16.3538 262.52 23.0538 256.97 25.9638Z" fill="url(#paint1_linear_2204_3044)"/>
|
||||||
|
<path d="M252.115 72.502C250.192 72.502 248.268 72.0838 246.93 71.3728V65.6853C247.808 66.3126 248.937 66.689 250.066 66.689C251.739 66.689 252.784 65.8526 252.784 64.5562C252.784 63.8452 252.492 63.0925 251.655 62.0888L249.899 59.956C248.728 58.4923 248.226 56.9031 248.226 55.2721C248.226 51.0065 251.864 48.0791 256.883 48.0791C258.723 48.0791 260.438 48.4555 261.65 49.0828V54.7703C260.898 54.2266 259.768 53.8503 258.723 53.8503C257.092 53.8503 256.046 54.6867 256.046 55.8994C256.046 56.6522 256.423 57.405 257.259 58.4086L258.974 60.4996C260.187 62.047 260.73 63.5943 260.73 65.2671C260.73 69.5746 257.05 72.502 252.115 72.502Z" fill="white"/>
|
||||||
|
<path d="M236.338 72.6269C228.392 72.6269 223.123 67.5667 223.123 60.4155C223.123 53.2643 228.351 47.9531 235.46 47.9531C242.026 47.9531 246.584 52.7206 246.584 59.7045C246.584 60.7082 246.459 61.6701 246.417 62.4647H230.483C231.152 65.2666 233.62 66.8139 237.551 66.8139C240.018 66.8139 242.36 66.1866 244.033 65.0993V70.7868C242.277 71.916 239.349 72.6269 236.338 72.6269ZM230.483 57.5717H239.767C239.642 54.9789 237.927 53.4734 235.376 53.4734C232.867 53.4734 231.027 54.9789 230.483 57.5717Z" fill="white"/>
|
||||||
|
<path d="M184.998 72.0001V48.5809H192.609V51.6756C193.989 49.4173 196.373 48.0791 199.426 48.0791C202.521 48.0791 204.779 49.5428 206.075 52.052C207.497 49.5846 210.132 48.0791 213.352 48.0791C218.245 48.0791 221.214 51.592 221.214 57.0286V72.0001H213.603V58.5341C213.603 55.774 212.557 54.4357 210.634 54.4357C208.459 54.4357 206.912 56.234 206.912 59.0778V72.0001H199.3V58.5341C199.3 55.774 198.255 54.4357 196.373 54.4357C194.157 54.4357 192.609 56.234 192.609 59.0778V72.0001H184.998Z" fill="white"/>
|
||||||
|
<path d="M167.26 72.4602C161.154 72.4602 156.596 67.2745 156.596 60.3324C156.596 53.3066 161.196 48.0791 167.302 48.0791C170.438 48.0791 173.031 49.4173 174.536 51.8429V48.5809H182.148V72.0001H174.536V68.4873C173.031 71.0801 170.438 72.4602 167.26 72.4602ZM169.393 66.1872C172.78 66.1872 174.536 63.3434 174.536 60.876V59.6632C174.536 57.2377 172.78 54.4357 169.393 54.4357C166.298 54.4357 164.207 56.7777 164.207 60.2905C164.207 63.7616 166.298 66.1872 169.393 66.1872Z" fill="white"/>
|
||||||
|
<path d="M141.258 72V48.5808H148.827V52.9719C149.831 50.0445 151.796 48.2881 154.306 48.2881C154.975 48.2881 155.602 48.4135 156.02 48.6645V55.8993C155.435 55.5648 154.724 55.4393 153.887 55.4393C150.751 55.4393 148.869 57.6558 148.869 61.2941V72H141.258Z" fill="white"/>
|
||||||
|
<path d="M122.643 71.9996V42.7256H139.371V49.124H130.379V54.477H138.911V60.5827H130.379V71.9996H122.643Z" fill="white"/>
|
||||||
|
<path d="M105.645 72V48.5808H113.214V52.9719C114.218 50.0445 116.183 48.2881 118.692 48.2881C119.361 48.2881 119.989 48.4135 120.407 48.6645V55.8993C119.822 55.5648 119.111 55.4393 118.274 55.4393C115.138 55.4393 113.256 57.6558 113.256 61.2941V72H105.645Z" fill="white"/>
|
||||||
|
<path d="M93.4397 72.6269C85.4939 72.6269 80.2246 67.5667 80.2246 60.4155C80.2246 53.2643 85.4521 47.9531 92.5615 47.9531C99.1273 47.9531 103.686 52.7206 103.686 59.7045C103.686 60.7082 103.56 61.6701 103.518 62.4647H87.5849C88.2541 65.2666 90.7214 66.8139 94.6525 66.8139C97.1199 66.8139 99.4618 66.1866 101.135 65.0993V70.7868C99.3782 71.916 96.4508 72.6269 93.4397 72.6269ZM87.5849 57.5717H96.869C96.7435 54.9789 95.0289 53.4734 92.4779 53.4734C89.9687 53.4734 88.1286 54.9789 87.5849 57.5717Z" fill="white"/>
|
||||||
|
<path d="M53.3711 78.4404V48.5809H60.9823V52.052C62.446 49.501 65.0807 48.0791 68.3008 48.0791C74.3647 48.0791 78.9649 53.3066 78.9649 60.2487C78.9649 67.2745 74.3229 72.4602 68.259 72.4602C65.0807 72.4602 62.446 71.1637 60.9823 68.78V78.4404H53.3711ZM66.1262 66.1872C69.2627 66.1872 71.3119 63.7616 71.3119 60.2905C71.3119 56.8195 69.2627 54.4357 66.1262 54.4357C62.7388 54.4357 60.9823 57.2795 60.9823 59.7051V60.9178C60.9823 63.3434 62.7388 66.1872 66.1262 66.1872Z" fill="white"/>
|
||||||
|
<path d="M31.9606 78.4405L36.0171 69.5329L26.9004 48.5811H35.1389L40.0737 60.6252L44.9666 48.5811H52.5779L39.8646 78.4405H31.9606Z" fill="white"/>
|
||||||
|
<path d="M0 71.9996V42.7256H7.7367V53.1806H17.9826V42.7256H25.7193V71.9996H17.9826V59.8718H7.7367V71.9996H0Z" fill="white"/>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_2204_3044" x1="225.869" y1="-3.06048e-05" x2="222.845" y2="37.4821" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#06E3FA"/>
|
||||||
|
<stop offset="1" stop-color="#4FDB5E"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint1_linear_2204_3044" x1="230.87" y1="39" x2="244.661" y2="6.30303" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#06E3FA"/>
|
||||||
|
<stop offset="1" stop-color="#4FDB5E"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 7.1 KiB |
@@ -0,0 +1,729 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=1920, height=1080" />
|
||||||
|
<title>Liquid Glass Widgets</title>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
|
||||||
|
<script src="lib/liquid-glass.iife.js"></script>
|
||||||
|
<style>
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background: #0a0218;
|
||||||
|
overflow: hidden;
|
||||||
|
font-family: "Inter", system-ui, sans-serif;
|
||||||
|
}
|
||||||
|
#root {
|
||||||
|
position: relative;
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
#three-canvas {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
#glass-canvas {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 1920px;
|
||||||
|
height: 1080px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Glass Panels ── */
|
||||||
|
.glass-panel {
|
||||||
|
position: absolute;
|
||||||
|
background: rgba(255, 255, 255, 0.025);
|
||||||
|
--lg-blur: 0.42;
|
||||||
|
--lg-refraction: 0.82;
|
||||||
|
--lg-corner-radius: 28;
|
||||||
|
--lg-z-radius: 46;
|
||||||
|
--lg-specular: 0.34;
|
||||||
|
--lg-fresnel: 1.25;
|
||||||
|
--lg-edge-highlight: 0.26;
|
||||||
|
--lg-chrom-aberration: 0.08;
|
||||||
|
--lg-shadow-opacity: 0;
|
||||||
|
--lg-shadow-spread: 0;
|
||||||
|
--lg-shadow-offset-y: 0;
|
||||||
|
--lg-saturation: 0.38;
|
||||||
|
}
|
||||||
|
.stat-card {
|
||||||
|
width: 220px;
|
||||||
|
height: 220px;
|
||||||
|
}
|
||||||
|
.showcase-card {
|
||||||
|
width: 500px;
|
||||||
|
height: 320px;
|
||||||
|
}
|
||||||
|
.pill-chip {
|
||||||
|
width: 130px;
|
||||||
|
height: 36px;
|
||||||
|
--lg-corner-radius: 40;
|
||||||
|
}
|
||||||
|
|
||||||
|
#glass-stat1 {
|
||||||
|
top: 300px;
|
||||||
|
left: 200px;
|
||||||
|
}
|
||||||
|
#glass-stat2 {
|
||||||
|
top: 300px;
|
||||||
|
left: 460px;
|
||||||
|
}
|
||||||
|
#glass-stat3 {
|
||||||
|
top: 300px;
|
||||||
|
left: 720px;
|
||||||
|
}
|
||||||
|
#glass-showcase {
|
||||||
|
top: 380px;
|
||||||
|
left: 1100px;
|
||||||
|
}
|
||||||
|
#glass-pill1 {
|
||||||
|
top: 720px;
|
||||||
|
left: 300px;
|
||||||
|
}
|
||||||
|
#glass-pill2 {
|
||||||
|
top: 720px;
|
||||||
|
left: 460px;
|
||||||
|
}
|
||||||
|
#glass-pill3 {
|
||||||
|
top: 720px;
|
||||||
|
left: 620px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ── Text Overlays ── */
|
||||||
|
.text-overlay {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Stat cards */
|
||||||
|
.stat-text {
|
||||||
|
width: 220px;
|
||||||
|
height: 220px;
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 22px;
|
||||||
|
border-radius: 28px;
|
||||||
|
background:
|
||||||
|
linear-gradient(
|
||||||
|
150deg,
|
||||||
|
rgba(255, 255, 255, 0.28),
|
||||||
|
rgba(255, 255, 255, 0.06) 46%,
|
||||||
|
rgba(255, 255, 255, 0.16)
|
||||||
|
),
|
||||||
|
linear-gradient(180deg, rgba(9, 18, 31, 0.2), rgba(255, 255, 255, 0.04));
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.36);
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.5),
|
||||||
|
inset 0 -18px 38px rgba(255, 255, 255, 0.08);
|
||||||
|
overflow: hidden;
|
||||||
|
text-shadow: 0 2px 16px rgba(0, 0, 0, 0.38);
|
||||||
|
}
|
||||||
|
.stat-text::before,
|
||||||
|
.showcase-text::before,
|
||||||
|
.pill-text::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 1px;
|
||||||
|
border-radius: inherit;
|
||||||
|
pointer-events: none;
|
||||||
|
background: linear-gradient(
|
||||||
|
120deg,
|
||||||
|
rgba(255, 255, 255, 0.44),
|
||||||
|
transparent 28%,
|
||||||
|
transparent 66%,
|
||||||
|
rgba(255, 255, 255, 0.2)
|
||||||
|
);
|
||||||
|
opacity: 0.32;
|
||||||
|
mix-blend-mode: screen;
|
||||||
|
}
|
||||||
|
.stat-label {
|
||||||
|
position: relative;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 650;
|
||||||
|
color: #fff;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 1.5px;
|
||||||
|
}
|
||||||
|
.stat-value {
|
||||||
|
position: relative;
|
||||||
|
font-size: 52px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #fff;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
.stat-unit {
|
||||||
|
position: relative;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.mini-meter {
|
||||||
|
position: relative;
|
||||||
|
width: 140px;
|
||||||
|
height: 6px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(255, 255, 255, 0.28);
|
||||||
|
}
|
||||||
|
.mini-meter-fill {
|
||||||
|
width: 0%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: inherit;
|
||||||
|
background: linear-gradient(90deg, #06e3fa, #4fdb5e);
|
||||||
|
box-shadow: 0 0 12px rgba(79, 219, 94, 0.55);
|
||||||
|
}
|
||||||
|
.battery-shell {
|
||||||
|
position: relative;
|
||||||
|
width: 118px;
|
||||||
|
height: 40px;
|
||||||
|
padding: 4px;
|
||||||
|
border: 2px solid rgba(255, 255, 255, 0.66);
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
.battery-shell::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 12px;
|
||||||
|
right: -9px;
|
||||||
|
width: 5px;
|
||||||
|
height: 14px;
|
||||||
|
border-radius: 0 5px 5px 0;
|
||||||
|
background: rgba(255, 255, 255, 0.66);
|
||||||
|
}
|
||||||
|
.battery-fill {
|
||||||
|
width: 72%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: linear-gradient(90deg, #4ade80, #06e3fa);
|
||||||
|
box-shadow: 0 0 18px rgba(74, 222, 128, 0.45);
|
||||||
|
}
|
||||||
|
.steps-ring {
|
||||||
|
width: 106px;
|
||||||
|
height: 106px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: conic-gradient(#a78bfa 0deg, #06e3fa 180deg, rgba(255, 255, 255, 0.18) 180deg);
|
||||||
|
}
|
||||||
|
.steps-ring-inner {
|
||||||
|
width: 78px;
|
||||||
|
height: 78px;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: rgba(7, 10, 18, 0.36);
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.22),
|
||||||
|
inset 0 -8px 20px rgba(0, 0, 0, 0.14);
|
||||||
|
color: #fff;
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: 800;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
#text-stat1 {
|
||||||
|
top: 300px;
|
||||||
|
left: 200px;
|
||||||
|
}
|
||||||
|
#text-stat2 {
|
||||||
|
top: 300px;
|
||||||
|
left: 460px;
|
||||||
|
}
|
||||||
|
#text-stat3 {
|
||||||
|
top: 300px;
|
||||||
|
left: 720px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Showcase card */
|
||||||
|
.showcase-text {
|
||||||
|
width: 500px;
|
||||||
|
height: 320px;
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 20px;
|
||||||
|
padding: 32px;
|
||||||
|
border-radius: 28px;
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.38), transparent 24%),
|
||||||
|
linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(255, 255, 255, 0.24),
|
||||||
|
rgba(255, 255, 255, 0.07) 52%,
|
||||||
|
rgba(255, 255, 255, 0.18)
|
||||||
|
);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.38);
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 0 rgba(255, 255, 255, 0.5),
|
||||||
|
inset 0 -24px 48px rgba(255, 255, 255, 0.08);
|
||||||
|
overflow: hidden;
|
||||||
|
text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
|
||||||
|
}
|
||||||
|
.showcase-icon {
|
||||||
|
position: relative;
|
||||||
|
width: 168px;
|
||||||
|
height: 52px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.showcase-logo {
|
||||||
|
width: 150px;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.showcase-title {
|
||||||
|
position: relative;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
.showcase-desc {
|
||||||
|
position: relative;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1.5;
|
||||||
|
max-width: 380px;
|
||||||
|
}
|
||||||
|
.showcase-status {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.showcase-dot {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #4ade80;
|
||||||
|
box-shadow: 0 0 14px rgba(74, 222, 128, 0.7);
|
||||||
|
}
|
||||||
|
.showcase-progress {
|
||||||
|
position: relative;
|
||||||
|
width: 300px;
|
||||||
|
height: 7px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(255, 255, 255, 0.18);
|
||||||
|
}
|
||||||
|
.showcase-progress-fill {
|
||||||
|
width: 18%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: inherit;
|
||||||
|
background: linear-gradient(90deg, #06e3fa, #4fdb5e);
|
||||||
|
}
|
||||||
|
#text-showcase {
|
||||||
|
top: 380px;
|
||||||
|
left: 1100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pill chips */
|
||||||
|
.pill-text {
|
||||||
|
width: 130px;
|
||||||
|
height: 36px;
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 8px;
|
||||||
|
border-radius: 40px;
|
||||||
|
background: linear-gradient(130deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1));
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.34);
|
||||||
|
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.pill-dot {
|
||||||
|
position: relative;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 50%;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.dot-green {
|
||||||
|
background: #4ade80;
|
||||||
|
}
|
||||||
|
.dot-blue {
|
||||||
|
background: #60a5fa;
|
||||||
|
}
|
||||||
|
.dot-violet {
|
||||||
|
background: #a78bfa;
|
||||||
|
}
|
||||||
|
.pill-label {
|
||||||
|
position: relative;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
#text-pill1 {
|
||||||
|
top: 720px;
|
||||||
|
left: 300px;
|
||||||
|
}
|
||||||
|
#text-pill2 {
|
||||||
|
top: 720px;
|
||||||
|
left: 460px;
|
||||||
|
}
|
||||||
|
#text-pill3 {
|
||||||
|
top: 720px;
|
||||||
|
left: 620px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div
|
||||||
|
id="root"
|
||||||
|
data-composition-id="liquid-glass-widgets"
|
||||||
|
data-width="1920"
|
||||||
|
data-height="1080"
|
||||||
|
data-start="0"
|
||||||
|
data-duration="8"
|
||||||
|
data-root="true"
|
||||||
|
>
|
||||||
|
<canvas id="three-canvas" width="1920" height="1080"></canvas>
|
||||||
|
|
||||||
|
<canvas id="glass-canvas" layoutsubtree width="1920" height="1080">
|
||||||
|
<div id="glass-stat1" class="glass-panel stat-card liquid-glass"></div>
|
||||||
|
<div id="glass-stat2" class="glass-panel stat-card liquid-glass"></div>
|
||||||
|
<div id="glass-stat3" class="glass-panel stat-card liquid-glass"></div>
|
||||||
|
<div id="glass-showcase" class="glass-panel showcase-card liquid-glass"></div>
|
||||||
|
<div id="glass-pill1" class="glass-panel pill-chip liquid-glass"></div>
|
||||||
|
<div id="glass-pill2" class="glass-panel pill-chip liquid-glass"></div>
|
||||||
|
<div id="glass-pill3" class="glass-panel pill-chip liquid-glass"></div>
|
||||||
|
</canvas>
|
||||||
|
|
||||||
|
<!-- Stat cards -->
|
||||||
|
<div id="text-stat1" class="text-overlay stat-text">
|
||||||
|
<span class="stat-label">Temperature</span>
|
||||||
|
<span class="stat-value"
|
||||||
|
><span id="temp-value">21</span><span class="stat-unit">°</span></span
|
||||||
|
>
|
||||||
|
<div class="mini-meter"><div id="temp-meter" class="mini-meter-fill"></div></div>
|
||||||
|
</div>
|
||||||
|
<div id="text-stat2" class="text-overlay stat-text">
|
||||||
|
<span class="stat-label">Battery</span>
|
||||||
|
<div class="battery-shell"><div id="battery-fill" class="battery-fill"></div></div>
|
||||||
|
<span class="stat-value"
|
||||||
|
><span id="battery-value">87</span><span class="stat-unit">%</span></span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div id="text-stat3" class="text-overlay stat-text">
|
||||||
|
<span class="stat-label">Steps</span>
|
||||||
|
<div id="steps-ring" class="steps-ring">
|
||||||
|
<div id="steps-value" class="steps-ring-inner">8.2K</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Showcase card -->
|
||||||
|
<div id="text-showcase" class="text-overlay showcase-text">
|
||||||
|
<div class="showcase-icon">
|
||||||
|
<img class="showcase-logo" src="assets/hyperframes-logo-dark.svg" alt="HyperFrames" />
|
||||||
|
</div>
|
||||||
|
<div class="showcase-title">Preview pipeline</div>
|
||||||
|
<div class="showcase-desc">
|
||||||
|
Write HTML, render video. Ship compositions at the speed of code.
|
||||||
|
</div>
|
||||||
|
<div class="showcase-status">
|
||||||
|
<span class="showcase-dot" id="showcase-dot"></span
|
||||||
|
><span id="showcase-status">Encoding frames</span>
|
||||||
|
</div>
|
||||||
|
<div class="showcase-progress">
|
||||||
|
<div id="showcase-progress" class="showcase-progress-fill"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Pill chips -->
|
||||||
|
<div id="text-pill1" class="text-overlay pill-text">
|
||||||
|
<span class="pill-dot dot-green"></span>
|
||||||
|
<span class="pill-label">Connected</span>
|
||||||
|
</div>
|
||||||
|
<div id="text-pill2" class="text-overlay pill-text">
|
||||||
|
<span class="pill-dot dot-blue"></span>
|
||||||
|
<span class="pill-label">Bluetooth</span>
|
||||||
|
</div>
|
||||||
|
<div id="text-pill3" class="text-overlay pill-text">
|
||||||
|
<span class="pill-dot dot-violet"></span>
|
||||||
|
<span class="pill-label">Focus</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
id="driver"
|
||||||
|
class="clip"
|
||||||
|
data-start="0"
|
||||||
|
data-duration="8"
|
||||||
|
data-track-index="0"
|
||||||
|
style="position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none"
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var W = 1920,
|
||||||
|
H = 1080,
|
||||||
|
DURATION = 8;
|
||||||
|
|
||||||
|
/* ── Three.js Aurora Shader ─────────────────────────────────────── */
|
||||||
|
var vs = "varying vec2 vUv; void main() { vUv = uv; gl_Position = vec4(position, 1.0); }";
|
||||||
|
var fs = [
|
||||||
|
"precision highp float;",
|
||||||
|
"varying vec2 vUv;",
|
||||||
|
"uniform float uTime;",
|
||||||
|
"vec3 mod289(vec3 x){return x-floor(x*(1.0/289.0))*289.0;}",
|
||||||
|
"vec4 mod289(vec4 x){return x-floor(x*(1.0/289.0))*289.0;}",
|
||||||
|
"vec4 permute(vec4 x){return mod289(((x*34.0)+1.0)*x);}",
|
||||||
|
"vec4 taylorInvSqrt(vec4 r){return 1.79284291400159-0.85373472095314*r;}",
|
||||||
|
"float snoise(vec3 v){",
|
||||||
|
" const vec2 C=vec2(1.0/6.0,1.0/3.0);const vec4 D=vec4(0.0,0.5,1.0,2.0);",
|
||||||
|
" vec3 i=floor(v+dot(v,C.yyy));vec3 x0=v-i+dot(i,C.xxx);",
|
||||||
|
" vec3 g=step(x0.yzx,x0.xyz);vec3 l=1.0-g;",
|
||||||
|
" vec3 i1=min(g.xyz,l.zxy);vec3 i2=max(g.xyz,l.zxy);",
|
||||||
|
" vec3 x1=x0-i1+C.xxx;vec3 x2=x0-i2+C.yyy;vec3 x3=x0-D.yyy;",
|
||||||
|
" i=mod289(i);",
|
||||||
|
" vec4 p=permute(permute(permute(i.z+vec4(0.0,i1.z,i2.z,1.0))+i.y+vec4(0.0,i1.y,i2.y,1.0))+i.x+vec4(0.0,i1.x,i2.x,1.0));",
|
||||||
|
" float n_=0.142857142857;vec3 ns=n_*D.wyz-D.xzx;",
|
||||||
|
" vec4 j=p-49.0*floor(p*ns.z*ns.z);vec4 x_=floor(j*ns.z);vec4 y_=floor(j-7.0*x_);",
|
||||||
|
" vec4 x=x_*ns.x+ns.yyyy;vec4 y=y_*ns.x+ns.yyyy;vec4 h=1.0-abs(x)-abs(y);",
|
||||||
|
" vec4 b0=vec4(x.xy,y.xy);vec4 b1=vec4(x.zw,y.zw);",
|
||||||
|
" vec4 s0=floor(b0)*2.0+1.0;vec4 s1=floor(b1)*2.0+1.0;",
|
||||||
|
" vec4 sh=-step(h,vec4(0.0));",
|
||||||
|
" vec4 a0=b0.xzyw+s0.xzyw*sh.xxyy;vec4 a1=b1.xzyw+s1.xzyw*sh.zzww;",
|
||||||
|
" vec3 p0=vec3(a0.xy,h.x);vec3 p1=vec3(a0.zw,h.y);vec3 p2=vec3(a1.xy,h.z);vec3 p3=vec3(a1.zw,h.w);",
|
||||||
|
" vec4 norm=taylorInvSqrt(vec4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));",
|
||||||
|
" p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;",
|
||||||
|
" vec4 m=max(0.6-vec4(dot(x0,x0),dot(x1,x1),dot(x2,x2),dot(x3,x3)),0.0);m=m*m;",
|
||||||
|
" return 42.0*dot(m*m,vec4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3)));",
|
||||||
|
"}",
|
||||||
|
"void main(){",
|
||||||
|
" vec2 uv=vUv;float ar=1920.0/1080.0;vec2 p=vec2(uv.x*ar,uv.y);float t=uTime*0.06;",
|
||||||
|
" float wx=snoise(vec3(p*1.4,t*0.5))*0.2;float wy=snoise(vec3(p*1.4+100.0,t*0.5))*0.2;",
|
||||||
|
" vec2 wp=p+vec2(wx,wy);",
|
||||||
|
" vec3 base=mix(vec3(0.10,0.02,0.22),vec3(0.04,0.10,0.25),smoothstep(0.0,1.0,uv.x*0.6+uv.y*0.4));",
|
||||||
|
" float angle=0.65;float ridgeUv=dot(wp,vec2(cos(angle),sin(angle)));",
|
||||||
|
" float ridge1=sin(ridgeUv*8.0+t*2.0+snoise(vec3(wp*0.8,t))*1.5);",
|
||||||
|
" float ridge2=sin(ridgeUv*5.5-t*1.4+snoise(vec3(wp*1.2+50.0,t*0.7))*2.0);",
|
||||||
|
" float ridge3=sin(ridgeUv*12.0+t*3.0+snoise(vec3(wp*0.6+80.0,t*0.4))*1.0);",
|
||||||
|
" float crease1=pow(abs(ridge1),0.35)*sign(ridge1)*0.5+0.5;",
|
||||||
|
" float crease2=pow(abs(ridge2),0.4)*sign(ridge2)*0.5+0.5;",
|
||||||
|
" float crease3=pow(abs(ridge3),0.5)*sign(ridge3)*0.5+0.5;",
|
||||||
|
" vec3 warm=mix(vec3(0.9,0.4,0.08),vec3(0.95,0.65,0.15),crease1);",
|
||||||
|
" float warmZone=smoothstep(0.15,0.75,uv.x+uv.y*0.4+snoise(vec3(uv*2.0,t))*0.3);",
|
||||||
|
" vec3 cool=mix(vec3(0.02,0.4,0.55),vec3(0.25,0.7,0.82),crease2);",
|
||||||
|
" float coolZone=smoothstep(0.25,0.85,1.2-uv.x+uv.y*0.5+snoise(vec3(uv*2.0+40.0,t*0.8))*0.25);",
|
||||||
|
" vec3 hot=mix(vec3(0.8,0.1,0.4),vec3(0.6,0.08,0.65),crease3);",
|
||||||
|
" float hotZone=smoothstep(0.5,0.9,snoise(vec3(uv*2.5+20.0,t*0.6))*0.5+0.5);",
|
||||||
|
" vec3 col=base;",
|
||||||
|
" col=mix(col,warm,warmZone*0.75*smoothstep(0.3,0.7,crease1));",
|
||||||
|
" col=mix(col,cool,coolZone*0.65*smoothstep(0.2,0.65,crease2));",
|
||||||
|
" col=mix(col,hot,hotZone*0.5*smoothstep(0.35,0.8,crease3));",
|
||||||
|
" float edgeGlow=pow(1.0-abs(ridge1),6.0)*0.4+pow(1.0-abs(ridge2),5.0)*0.25;",
|
||||||
|
" col+=edgeGlow*mix(warm,cool,uv.x)*0.8;",
|
||||||
|
" col*=1.0-pow(abs(ridge1),4.0)*0.15;",
|
||||||
|
" float vig=1.0-smoothstep(0.5,1.5,length((uv-0.5)*vec2(1.3,1.0)));",
|
||||||
|
" col*=0.65+vig*0.5;",
|
||||||
|
" float luma=dot(col,vec3(0.299,0.587,0.114));col=mix(vec3(luma),col,1.5);",
|
||||||
|
" col=clamp(col,0.0,1.0);col=pow(col,vec3(0.9));",
|
||||||
|
" gl_FragColor=vec4(col,1.0);",
|
||||||
|
"}",
|
||||||
|
].join("\n");
|
||||||
|
|
||||||
|
/* ── Three.js Setup ─────────────────────────────────────────────── */
|
||||||
|
var threeCanvas = document.getElementById("three-canvas");
|
||||||
|
var renderer = new THREE.WebGLRenderer({ canvas: threeCanvas, alpha: false });
|
||||||
|
renderer.setSize(W, H, false);
|
||||||
|
renderer.setPixelRatio(1);
|
||||||
|
|
||||||
|
var scene = new THREE.Scene();
|
||||||
|
var camera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
||||||
|
var uniforms = { uTime: { value: 0 } };
|
||||||
|
var shaderMat = new THREE.ShaderMaterial({
|
||||||
|
vertexShader: vs,
|
||||||
|
fragmentShader: fs,
|
||||||
|
uniforms: uniforms,
|
||||||
|
});
|
||||||
|
var quad = new THREE.Mesh(new THREE.PlaneGeometry(2, 2), shaderMat);
|
||||||
|
scene.add(quad);
|
||||||
|
|
||||||
|
/* ── Glass Canvas ───────────────────────────────────────────────── */
|
||||||
|
var glassCanvas = document.getElementById("glass-canvas");
|
||||||
|
var ctx = glassCanvas.getContext("2d");
|
||||||
|
var lg = new LiquidGlass.LiquidGlassCanvas(glassCanvas);
|
||||||
|
var lgReady = false;
|
||||||
|
|
||||||
|
function renderGlass(time) {
|
||||||
|
if (!lgReady) return;
|
||||||
|
uniforms.uTime.value = time;
|
||||||
|
renderer.render(scene, camera);
|
||||||
|
ctx.clearRect(0, 0, W, H);
|
||||||
|
ctx.drawImage(threeCanvas, 0, 0, W, H);
|
||||||
|
lg.renderGlassElements();
|
||||||
|
}
|
||||||
|
|
||||||
|
function requestGlassRender(time) {
|
||||||
|
if (glassCanvas.requestPaint) {
|
||||||
|
glassCanvas.onpaint = function () {
|
||||||
|
renderGlass(time);
|
||||||
|
};
|
||||||
|
glassCanvas.requestPaint();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
renderGlass(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
lg.waitForInit().then(function (ok) {
|
||||||
|
if (!ok) return;
|
||||||
|
lgReady = true;
|
||||||
|
requestGlassRender(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* ── GSAP Timeline ──────────────────────────────────────────────── */
|
||||||
|
window.__timelines = window.__timelines || {};
|
||||||
|
var tl = gsap.timeline({ paused: true });
|
||||||
|
|
||||||
|
/* Glass + text element pairs */
|
||||||
|
var s1g = document.getElementById("glass-stat1");
|
||||||
|
var s2g = document.getElementById("glass-stat2");
|
||||||
|
var s3g = document.getElementById("glass-stat3");
|
||||||
|
var scg = document.getElementById("glass-showcase");
|
||||||
|
var p1g = document.getElementById("glass-pill1");
|
||||||
|
var p2g = document.getElementById("glass-pill2");
|
||||||
|
var p3g = document.getElementById("glass-pill3");
|
||||||
|
var s1t = document.getElementById("text-stat1");
|
||||||
|
var s2t = document.getElementById("text-stat2");
|
||||||
|
var s3t = document.getElementById("text-stat3");
|
||||||
|
var sct = document.getElementById("text-showcase");
|
||||||
|
var p1t = document.getElementById("text-pill1");
|
||||||
|
var p2t = document.getElementById("text-pill2");
|
||||||
|
var p3t = document.getElementById("text-pill3");
|
||||||
|
|
||||||
|
var tempValue = document.getElementById("temp-value");
|
||||||
|
var batteryValue = document.getElementById("battery-value");
|
||||||
|
var stepsValue = document.getElementById("steps-value");
|
||||||
|
var stepsRing = document.getElementById("steps-ring");
|
||||||
|
var showcaseStatus = document.getElementById("showcase-status");
|
||||||
|
var tempCounter = { value: 21 };
|
||||||
|
var batteryCounter = { value: 87 };
|
||||||
|
var stepsCounter = { value: 8.2 };
|
||||||
|
|
||||||
|
var allPanels = [s1g, s1t, s2g, s2t, s3g, s3t, scg, sct, p1g, p1t, p2g, p2t, p3g, p3t];
|
||||||
|
gsap.set(allPanels, { opacity: 1, top: 1160 });
|
||||||
|
|
||||||
|
tl.to([s1g, s1t], { top: 300, duration: 0.46, ease: "power3.out" }, 0.12);
|
||||||
|
tl.to([s2g, s2t], { top: 300, duration: 0.46, ease: "power3.out" }, 0.24);
|
||||||
|
tl.to([s3g, s3t], { top: 300, duration: 0.46, ease: "power3.out" }, 0.36);
|
||||||
|
tl.to([scg, sct], { top: 380, duration: 0.5, ease: "power3.out" }, 0.5);
|
||||||
|
tl.to([p1g, p1t], { top: 720, duration: 0.32, ease: "power3.out" }, 0.9);
|
||||||
|
tl.to([p2g, p2t], { top: 720, duration: 0.32, ease: "power3.out" }, 1.0);
|
||||||
|
tl.to([p3g, p3t], { top: 720, duration: 0.32, ease: "power3.out" }, 1.1);
|
||||||
|
|
||||||
|
tl.to("#temp-meter", { width: "76%", duration: 1.7, ease: "power2.out" }, 0.9);
|
||||||
|
tl.to(
|
||||||
|
tempCounter,
|
||||||
|
{
|
||||||
|
value: 25,
|
||||||
|
duration: 2.2,
|
||||||
|
ease: "power2.out",
|
||||||
|
onUpdate: function () {
|
||||||
|
tempValue.textContent = Math.round(tempCounter.value);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
0.9,
|
||||||
|
);
|
||||||
|
tl.to("#battery-fill", { width: "91%", duration: 2.4, ease: "power2.out" }, 1.05);
|
||||||
|
tl.to(
|
||||||
|
batteryCounter,
|
||||||
|
{
|
||||||
|
value: 91,
|
||||||
|
duration: 2.4,
|
||||||
|
ease: "power2.out",
|
||||||
|
onUpdate: function () {
|
||||||
|
batteryValue.textContent = Math.round(batteryCounter.value);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
1.05,
|
||||||
|
);
|
||||||
|
tl.to(
|
||||||
|
stepsCounter,
|
||||||
|
{
|
||||||
|
value: 9.1,
|
||||||
|
duration: 2.6,
|
||||||
|
ease: "power2.out",
|
||||||
|
onUpdate: function () {
|
||||||
|
var degrees = Math.round(stepsCounter.value * 31.4);
|
||||||
|
stepsValue.textContent = stepsCounter.value.toFixed(1) + "K";
|
||||||
|
stepsRing.style.background =
|
||||||
|
"conic-gradient(#a78bfa 0deg, #06e3fa " +
|
||||||
|
degrees +
|
||||||
|
"deg, rgba(255, 255, 255, 0.18) " +
|
||||||
|
degrees +
|
||||||
|
"deg)";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
1.2,
|
||||||
|
);
|
||||||
|
tl.to("#showcase-progress", { width: "92%", duration: 4.1, ease: "none" }, 1.2);
|
||||||
|
tl.to(
|
||||||
|
"#showcase-dot",
|
||||||
|
{ scale: 1.5, duration: 0.25, ease: "power2.out", yoyo: true, repeat: 7 },
|
||||||
|
1.4,
|
||||||
|
);
|
||||||
|
tl.call(
|
||||||
|
function () {
|
||||||
|
showcaseStatus.textContent = "Preview ready";
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
5.2,
|
||||||
|
);
|
||||||
|
tl.to(
|
||||||
|
[scg, sct],
|
||||||
|
{ top: "-=10", duration: 0.2, ease: "power2.out", yoyo: true, repeat: 1 },
|
||||||
|
5.2,
|
||||||
|
);
|
||||||
|
tl.to(
|
||||||
|
".pill-dot",
|
||||||
|
{ scale: 1.55, duration: 0.2, ease: "power2.out", stagger: 0.12, yoyo: true, repeat: 3 },
|
||||||
|
2.2,
|
||||||
|
);
|
||||||
|
|
||||||
|
tl.to(
|
||||||
|
[s1g, s1t, s2g, s2t, s3g, s3t],
|
||||||
|
{ top: "-=12", duration: 0.2, ease: "power2.out", yoyo: true, repeat: 1 },
|
||||||
|
5.7,
|
||||||
|
);
|
||||||
|
tl.to(allPanels, { top: "+=760", duration: 0.42, ease: "power2.in" }, 6.74);
|
||||||
|
|
||||||
|
/* Duration driver */
|
||||||
|
tl.to({ v: 0 }, { v: 1, duration: DURATION, ease: "none" }, 0);
|
||||||
|
|
||||||
|
tl.eventCallback("onUpdate", function () {
|
||||||
|
requestGlassRender(tl.time());
|
||||||
|
});
|
||||||
|
|
||||||
|
window.__timelines["liquid-glass-widgets"] = tl;
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://hyperframes.heygen.com/schema/registry-item.json",
|
||||||
|
"name": "liquid-glass-widgets",
|
||||||
|
"type": "hyperframes:block",
|
||||||
|
"title": "Liquid Glass Widgets",
|
||||||
|
"description": "Frosted glass stat cards, showcase panel and pill chips over an aurora shader background",
|
||||||
|
"stability": "experimental",
|
||||||
|
"dimensions": {
|
||||||
|
"width": 1920,
|
||||||
|
"height": 1080
|
||||||
|
},
|
||||||
|
"duration": 8,
|
||||||
|
"tags": ["html-in-canvas", "liquid-glass-html-in-canvas", "webgpu"],
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "liquid-glass-widgets.html",
|
||||||
|
"target": "compositions/liquid-glass-widgets.html",
|
||||||
|
"type": "hyperframes:composition"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/hyperframes-logo-dark.svg",
|
||||||
|
"target": "compositions/assets/hyperframes-logo-dark.svg",
|
||||||
|
"type": "registry:asset"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preview": {
|
||||||
|
"video": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-widgets.mp4",
|
||||||
|
"poster": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/liquid-glass-widgets.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 273 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 273 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 378 KiB |
|
After Width: | Height: | Size: 74 KiB |
@@ -0,0 +1,115 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://hyperframes.heygen.com/schema/registry-item.json",
|
||||||
|
"name": "macos-tahoe-liquid-glass",
|
||||||
|
"type": "hyperframes:block",
|
||||||
|
"title": "macOS Tahoe Liquid Glass Desktop",
|
||||||
|
"description": "3D MacBook with a macOS Tahoe-style desktop, glass menu bar, Finder window, dock, and cinematic device camera move.",
|
||||||
|
"stability": "experimental",
|
||||||
|
"dimensions": {
|
||||||
|
"width": 1920,
|
||||||
|
"height": 1080
|
||||||
|
},
|
||||||
|
"duration": 15,
|
||||||
|
"tags": ["html-in-canvas", "3d", "macos", "tahoe", "gltf"],
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "macos-tahoe-liquid-glass.html",
|
||||||
|
"target": "compositions/macos-tahoe-liquid-glass.html",
|
||||||
|
"type": "hyperframes:composition"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "models/macbook.glb",
|
||||||
|
"target": "models/macbook.glb",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/wallpapers/golden-gate-bridge-san-francisco-5k-0g.jpg",
|
||||||
|
"target": "assets/wallpapers/golden-gate-bridge-san-francisco-5k-0g.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/finder.png",
|
||||||
|
"target": "assets/icons/finder.png",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/safari.jpg",
|
||||||
|
"target": "assets/icons/safari.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/mail.jpg",
|
||||||
|
"target": "assets/icons/mail.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/calendar.jpg",
|
||||||
|
"target": "assets/icons/calendar.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/photos.jpg",
|
||||||
|
"target": "assets/icons/photos.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/messages.jpg",
|
||||||
|
"target": "assets/icons/messages.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/toast-messages.jpg",
|
||||||
|
"target": "assets/icons/toast-messages.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/music.jpg",
|
||||||
|
"target": "assets/icons/music.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/brave.jpg",
|
||||||
|
"target": "assets/icons/brave.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/slack.jpg",
|
||||||
|
"target": "assets/icons/slack.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/files.jpg",
|
||||||
|
"target": "assets/icons/files.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/dock-finder.png",
|
||||||
|
"target": "assets/icons/dock-finder.png",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/dock-safari.jpg",
|
||||||
|
"target": "assets/icons/dock-safari.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/dock-mail.jpg",
|
||||||
|
"target": "assets/icons/dock-mail.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/dock-photos.jpg",
|
||||||
|
"target": "assets/icons/dock-photos.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "assets/icons/dock-music.jpg",
|
||||||
|
"target": "assets/icons/dock-music.jpg",
|
||||||
|
"type": "hyperframes:asset"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preview": {
|
||||||
|
"video": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/macos-tahoe-liquid-glass.mp4",
|
||||||
|
"poster": "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/macos-tahoe-liquid-glass.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -340,7 +340,27 @@
|
|||||||
"type": "hyperframes:block"
|
"type": "hyperframes:block"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vfx-liquid-glass",
|
"name": "liquid-glass-notification",
|
||||||
|
"type": "hyperframes:block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "liquid-glass-context-menu",
|
||||||
|
"type": "hyperframes:block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "liquid-glass-media-controls",
|
||||||
|
"type": "hyperframes:block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "liquid-glass-widgets",
|
||||||
|
"type": "hyperframes:block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ios26-liquid-glass",
|
||||||
|
"type": "hyperframes:block"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "macos-tahoe-liquid-glass",
|
||||||
"type": "hyperframes:block"
|
"type": "hyperframes:block"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||