orb README

The project's README from github.com/LerSent001/orb. As one markdown file: README.md.

Liquid Orb Editor

English | 中文

English

A real-time liquid glass orb editor built with React, WebGPU/WGSL, and Toolcraft UI.

Live demo: https://lersent001.github.io/orb/

Features

Audio response

Use Audio response in the right-side control panel to start the microphone or select a local audio file, then adjust the sensitivity. Audio response is available for Siri Wave, Voice Membrane, Aurora Veil, Neural Plasma, Prismatic Field, and Violet Core. Other presets remain unchanged; switching to an unsupported preset stops the active audio input. Audio is analyzed locally in the browser and is never uploaded. Microphone input is not played back.

Low, mid, and high frequency bands plus overall energy drive the contour, internal distortion, highlights, and motion speed. Input is smoothed to prevent jitter. Pausing audio eases the orb back to its base appearance; stopping the input or setting sensitivity to 0 restores the original preset parameters. Audio modulation is applied after state transitions and does not overwrite presets, colors, or URL parameters. This feature modulates the existing procedural animation; it does not embed or reproduce the reference site's fluid solver.

Web and Swift exports use the same audio-to-parameter mapping. The host application supplies audio capture, frequency analysis, smoothing, and sensitivity. Pass smoothed values from 0 to 1 after applying sensitivity, and pass zero values when audio stops. Exported pages do not request microphone access automatically or bundle the currently selected audio file. Audio source and sensitivity are session-only editor settings and are not included in share links.

window.liquidOrb.setAudioBands({ low: 0.5, mid: 0.3, high: 0.1, all: 0.4 });
window.liquidOrb.setAudioBands(); // Stop audio response
LiquidOrbView(
    state: .thinking,
    audio: LiquidOrbAudio(low: 0.5, mid: 0.3, high: 0.1, all: 0.4)
)

Run node scripts/verify-audio.mjs to verify preset support, silence behavior, invalid input handling, and Web mapping parity. The script writes Swift parity fixtures to output/audio-qa/; run xcrun swift output/audio-qa/native-check.swift to verify the Swift mapping.

Maintenance status

This project is under active development. Presets, motion models, editor stability, and parity between WebGPU and SwiftUI/Metal output are continuously refined. OpenAI Codex assists with implementation, regression testing, and releases.

Local development

Requires Node.js 22, pnpm 11, and a browser with WebGPU support.

pnpm install
pnpm dev

Production build and preview:

pnpm build
pnpm preview

Project structure

License

Project code is licensed under the MIT License. Toolcraft UI code in src/toolcraft retains its original MIT copyright notice; see TOOLCRAFT_LICENSE.md.


中文

一个使用 React、WebGPU/WGSL 和 Toolcraft UI 构建的实时液态玻璃球编辑器。

在线使用:https://lersent001.github.io/orb/

功能

声音响应

在右侧「声音响应」中开启麦克风或选择本地音频,然后调节响应强度。支持 Siri 波澜、声纹薄膜、极光帷幕、神经电浆、彩色声场和紫焰流核;其余预设保持原样,切换到不支持的预设时会关闭音频输入。音频只在浏览器本地分析,不会上传,麦克风输入也不会回放。

声音按低频、中频、高频和总能量驱动轮廓、内部扭曲、高光及运动速度。输入经过平滑处理以避免画面抖动;暂停音频会让球体逐渐回落到基础效果,关闭输入或将响应强度设为 0 会恢复原始预设参数。声音映射发生在状态过渡之后,不会改写预设、颜色或 URL 参数。该功能用于调制现有的程序动画,不包含或复刻参考站的流体求解器。

Web 和 Swift 导出包含相同的声音参数映射。音频采集、频谱分析、平滑和响应强度由接入应用提供。请传入已经平滑并乘以响应强度的 0–1 数值,声音停止时传入零值。导出页面不会自动申请麦克风权限,也不会附带编辑器中当前选择的音频文件。声音来源和响应强度只在本次编辑会话中使用,不会写入分享链接。

window.liquidOrb.setAudioBands({ low: 0.5, mid: 0.3, high: 0.1, all: 0.4 });
window.liquidOrb.setAudioBands(); // 停止声音响应
LiquidOrbView(
    state: .thinking,
    audio: LiquidOrbAudio(low: 0.5, mid: 0.3, high: 0.1, all: 0.4)
)

运行 node scripts/verify-audio.mjs 可检查预设支持范围、静音行为、不合法输入和 Web 参数一致性。脚本会在 output/audio-qa/ 生成 Swift 对照文件;运行 xcrun swift output/audio-qa/native-check.swift 可检查 Swift 映射。

维护状态

本项目处于持续迭代维护中。作者持续优化预设、运动模型、编辑器稳定性,以及 WebGPU 与 SwiftUI/Metal 的输出一致性,并使用 OpenAI Codex 辅助代码实现、回归验证和发布。

本地运行

需要 Node.js 22、pnpm 11,以及支持 WebGPU 的浏览器。

pnpm install
pnpm dev

生产构建与预览:

pnpm build
pnpm preview

代码结构

许可证

项目代码使用 MIT License。src/toolcraft 中的 Toolcraft UI 代码保留其原始 MIT 版权声明,详见 TOOLCRAFT_LICENSE.md。

orb (LerSent001/orb)

Searching Database…

756 ·GitHub
What is this?Liquid Orb Editor is a real-time editor for creating animated liquid-glass orb effects, built with React and WebGPU/WGSL. You tweak color, speed, shape, glass refraction and glow, then export the result as a standalone web page or as SwiftUI/Metal code for iOS apps.
Is this a visual editor or a code library?It is a browser-based visual editor: you adjust parameters with sliders and previews, and it generates ready-to-use Web code or SwiftUI/Metal code for you, rather than being a library you import.
How do I run the editor?There is a hosted online version, or you can clone the repo and run it locally with pnpm (dev/build/preview scripts are powered by Vite).
What do I need installed to run it locally?You need Node.js 22 and pnpm 11, plus a browser that actually supports WebGPU to preview and edit the orb.
Will it run in any browser?No — the live preview depends on WebGPU support, so browsers without WebGPU can't render or edit the orb; the project is also still actively evolving, with ongoing changes to presets and output consistency.
What presets does it ship with?It comes with 12 editable, animated orb presets covering different colors, motion styles and glass looks that you can tweak or use as starting points.
Can I share a design I made with someone else?Yes — all your parameter choices are encoded into the page's URL hash, so sharing the link reproduces the exact orb you configured.
What role does OpenAI Codex play here?The author uses OpenAI Codex to help implement code, run regression verification on the Web/SwiftUI exports, and prepare releases.
Does the editor support Chinese and English?Yes, it auto-detects your browser language to show a Chinese or English interface, and you can switch between the two at any time.
Creator
LerSent001
Size
1.9 MB
Stars
756
Updated
CommitSep 16
Age
3mo
Commits · 90 Days