GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - chasebuilds/liquid-logo-studio: Turn any logo into animated liquid chrome, gold or holographic metal in the browser. WebGL2 shader, PNG and WebM export, one-line embed.

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
samples
samples
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.htmlvalidate.json
.htmlvalidate.json
 
 
.stylelintrc.json
.stylelintrc.json
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
app.js
app.js
 
 
eslint.config.mjs
eslint.config.mjs
 
 
index.html
index.html
 
 
liquid-logo.js
liquid-logo.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
styles.css
styles.css
 
 

Repository files navigation

Liquid Logo Studio

ci

Turn your logo into flowing liquid chrome, gold or holographic metal. Drop in an SVG or PNG, pick a look, then save it as an image or video, or paste two lines onto your website so the logo moves there too.

Live demo: https://chasebuilds.github.io/liquid-logo-studio/

Recorded from the live demo: a sample logo as animated liquid chrome while the light angle sweeps

What you get

  • Four looks: chrome, gold, holographic, or a tint of your brand color.
  • Sliders: flow speed, refraction, edge softness, light angle, bevel depth.
  • Reacts to the mouse: move over the logo and ripples spread through the metal.
  • Export: a transparent PNG, or a 5 second WebM video.
  • Runs in the browser: your logo is never uploaded anywhere.
  • Polite by default: people who set "reduce motion" see a still frame, the animation pauses when the tab is hidden or scrolled off screen, and browsers without WebGL2 get your plain logo.

The studio with a sample logo in liquid chrome

Put it on your website

Copy the snippet the studio shows under "Put it on your website". It looks like this:

<script src="https://chasebuilds.github.io/liquid-logo-studio/liquid-logo.js" defer></script>
<div data-liquid-logo data-src="your-logo.svg" data-preset="chrome"
     data-speed="0.6" data-refraction="0.5" data-softness="0.5"
     data-light="35" data-bevel="0.5" style="width:320px"></div>

Replace your-logo.svg with your own logo file. For a faster page, download liquid-logo.js and host it next to your logo (it is one file, about 8 KB gzipped, no other dependencies).

Settings are plain attributes: data-preset (chrome, gold, holographic, tint), data-tint (a color like #3b82f6, used with tint), data-speed (0 to 2), data-refraction, data-softness, data-bevel (0.1 to 1) and data-light (0 to 360 degrees). The element's width sets the size. For scripts, LiquidLogo.init() mounts any elements added later.

Run it locally

npm install
npm run serve      # then open the address it prints
npm run lint
npm test           # unit tests plus a headless Chromium check of the real shader

How it works

  1. The logo is drawn to a canvas and its shape becomes a mask.
  2. A distance transform (in liquid-logo.js) measures how far every pixel is from the edge. That gives a smooth bevel profile.
  3. A WebGL2 fragment shader treats that profile as the height of a liquid surface, adds slow flowing noise and mouse ripples, works out the surface angle at each pixel, and looks up what a made-up studio (bright horizon, two soft boxes) would reflect.
  4. That reflection is colored by the chosen material.

The shader and the mask code are written from scratch for this project. The idea of a liquid-metal logo effect comes from the Paper Design liquid-logo shader, which was studied for inspiration only; no code, shader or asset was copied.

Sample logos

samples/ has three simple shapes made for this repo (orbit, peaks, wave). They are not anyone's brand.

Limits

  • Needs WebGL2 (all current Chrome, Edge, Firefox and Safari). Without it the plain logo shows.
  • Only the logo's shape is used: colors inside the SVG or PNG are ignored. Brand tint takes its color from the picker.
  • Very thin strokes get little bevel; raise the bevel slider or thicken the shape.
  • WebM recording needs a browser with MediaRecorder. Safari support varies; PNG export works everywhere.
  • Keep the logo file on the same domain as the page that embeds it; a logo from another domain is blocked by the browser unless that site allows cross-origin access.

License

MIT, Chase Builds.

More from Chase Builds

  • notebook-shelf: A shelf of notebooks that open in 3D. Great for portfolios, menus and catalogs. (live demo)
  • r3f-showcase: 3D product configurator, scroll hero and gallery wall for a business site. (live demo)
  • dither-pond: A stylized 3D scene with a day-to-night slider and a mix of animals, boat, bike, wind and water. (live demo)

All projects, sorted by industry · chasebuilds.github.io

About

Turn any logo into animated liquid chrome, gold or holographic metal in the browser. WebGL2 shader, PNG and WebM export, one-line embed.

chasebuilds.github.io/liquid-logo-studio/

Topics

animationembeddablejavascriptliquid-metallogoshaderwebgl2

Resources

Readme
MIT license

Contributing

Contributing

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.