Motion Blocks

Canvas

Lava Lamp

Raymarched metaball blobs rendered with a smooth-min SDF and Fresnel edge lighting. Creates a fluid, organic lava lamp animation.

  • lit Preview of https://lit.devLitSimple. Fast. Web Components.
  • ogl Preview of https://github.com/oframe/oglOGLMinimal WebGL framework.

Preview

Raymarched metaball blobs with smooth-min SDF blending and Fresnel edge lighting — fluid, organic lava lamp motion.
Attributes

Installation

pnpm dlx motion-blocks add lava-lamp

Usage

---import "@/components/motion-blocks/lava-lamp-element.ts";--- <motion-lava-lamp  color="#17181A"  fresnel-color="#6c87bc"  speed="1.0"  fresnel-power="3.0"  radius="1"  smoothness="0.1"  class="w-full h-[500px]"/>

API Reference

Attribute Type Default
color Base body color of the lava blobs. string #17181A
fresnel-color Color applied at blob edges via the Fresnel effect. string #6c87bc
speed Animation speed multiplier. number 1.0
fresnel-power Controls the sharpness of the Fresnel edge glow. number 3.0
radius Base radius of the blobs. number 1
smoothness Smoothness of the blob blending (metaball merge factor). number 0.1
scale Scale multiplier for the lava field. number 1
rotation Lava field rotation in degrees. number 0
offset-x Horizontal offset in normalized viewport units. number 0
offset-y Vertical offset in normalized viewport units. number 0