@fluxglass/core
v0.0.1
Published
Framework-agnostic engine and primitives for Fluxglass liquid glass effects.
Maintainers
Readme
@fluxglass/core
Pure Fluxglass state, option normalization, optical math, displacement-map generation,
quality selection, renderer contracts, and scheduling contracts. This package does not access
window, document, or framework APIs and is safe to import during server rendering.
import { computeDisplacementMap, normalizeOptions, resolveQuality } from '@fluxglass/core';
const options = normalizeOptions({ width: 200, height: 120, strength: 0.12 });
const width = typeof options.width === 'number' ? options.width : 200;
const height = typeof options.height === 'number' ? options.height : 120;
const mapSize = resolveQuality(options.quality, width, height);Every numeric option is validated at the public boundary. Invalid or non-finite values fall back
to the previous normalized value; legal ranges are documented on FluxglassOptions.
width and height also accept CSS length strings and "auto"; renderers resolve those to
pixels after layout.
