smoke ring

A radial multi-colour gradient shaped with layered noise — wispy gas clouds, nebulae, and aurora rings.

Preview

live

Install

npm
npm i @devmischief/shaders-svelte

Code

import { SmokeRing } from '@devmischief/shaders-svelte';

<SmokeRing
  width={1280}
  height={720}
  colors={['#1f1147', '#5b1d9b', '#a04ad9', '#ff7eb0']}
  colorBack="#000000"
  noiseScale={3}
  thickness={0.65}
  radius={0.25}
  innerShape={0.7}
  noiseIterations={8}
  scale={0.8}
  rotation={0}
  offsetX={0}
  offsetY={0}
  speed={0.5}
  fit="contain"
/>
			
			

Shader Props

9
namedescriptiontypevalues
colorsSmoke gradient colors (up to 10).string[]hex / rgb
colorBackBackground color shown behind the ring.stringhex / rgba
noiseScaleNoise frequency. Low values = big slow waves, high values = tight detail.number0.01 → 5
thicknessThickness of the ring shape.number0.01 → 1
radiusRadius of the ring shape.number0 → 1
innerShapeRing inner fill amount. Values above 1 fill in the center.number0 → 4
noiseIterationsLayered noise passes. More iterations = more detail, higher GPU cost.number1 → 8
speedAnimation speed of the smoky drift.number0 → 3
fitHow the ring world is fit into the canvas.stringnone · cover · contain

Common Props

6
namedescriptiontypevalues
originXReference point for positioning width in the canvas.number0 → 1
originYReference point for positioning height in the canvas.number0 → 1
worldWidthVirtual width of the graphic before it's scaled to fit the canvas.number
worldHeightVirtual height of the graphic before it's scaled to fit the canvas.number
minPixelRatioMinimum pixel ratio used when rendering the shader (default 2).number
maxPixelCountMaximum pixel count the shader may process.number

built with mischief by devmischief

@devmischief/shaders-svelte