Fragments/Utilities

  • 04boilerplateFree
  • 02color
  • 06patterns
  • 02sdf
  • 06function
  • 03systemNewFree
  • 04interactivity
  • 01noise
  • 13postprocessingNew
  • 03distortion

Join waitlist ↵

Export JSON

Serialize arbitrary data and download it as JSON for preset storage, sharing, and reproducible generative outputs.

Loading...
←
Works171
Writing34

Fragments

Learn creative coding with shaders. For design engineers, creative coders and shader artists: techniques, tools, deep dives. Powered by ThreeJS and TSL.

Loading...

2025 Phobon

phobon.ioShadercraft

Pages

HomeTechniquesUtilitiesBreakdownsWorksWriting

Contact

X @thenoumenonhey@fragments.supplyOKAY DEV @phobon
All rights reserved.

What it does

exportJson serializes data and triggers a browser download so you can save uniform presets, parameter snapshots, or any metadata alongside rendered outputs.

Usage

import { exportJson } from '@/utils/export_json'
 
const getUniforms = () => ({
  bands: _bands.value,
  freq: _freq.value,
  paletteA: {
    x: _paletteA.value.x,
    y: _paletteA.value.y,
    z: _paletteA.value.z,
  },
})
 
exportJson(getUniforms(), 'bands-preset')

API reference

Be the first to know what's next