Skip to content

TheEmptynessProject/ForgeNoise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

60 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ForgeNoise ๐Ÿ”ฅ๐Ÿ—ฃ

License: MIT

A high-performance JavaScript library for procedural noise generation, featuring multiple algorithms and fractal patterns. Perfect for games, visualizations, and creative coding projects.

Examples

Domain Warping Ridged Multifractal Warped fBm with Turbulence

Features

  • ๐ŸŒช Multiple noise algorithms: Perlin, Simplex, Worley, and Voronoi
  • ๐ŸŒ€ Fractal noise generation (fBm, Ridged Multifractal)
  • ๐ŸŒ Domain warping and turbulence effects
  • ๐Ÿงฎ Seamless tiling patterns
  • โšก Web-optimized performance
  • ๐ŸŒˆ Customizable parameters for all noise types
  • ๐Ÿ”ข Seedable randomness

Installation

CDN

<script src="https://cdn.jsdelivr.net/gh/TheEmptynessProject/ForgeNoise@main/dist/forgeNoise.min.js"></script>

Local

<script src="path/to/forgeNoise.min.js"></script>

Quick Start

// Initialize generator
const noise = new ForgeNoise(seedNumber);

// Generate basic Perlin noise
const perlinValue = noise.generate2D(x, y);

// Create fractal noise
const fbmValue = noise.generateFractal2D(x, y, {
  octaves: 6,
  lacunarity: 2.0,
  persistence: 0.5
});

// Generate Worley cellular pattern
const worleyValue = noise.generateWorley2D01(x, y);

// Create domain-warped noise
const warped = noise.warp2D(x, y, {
  warpStrength: 2,
  warpScale: 1.5
});

API Highlights

Core Methods

  • new ForgeNoise([seed]) - Create new noise generator
  • generate2D(x, y) - Classic Perlin noise (range: [-1, 1])
  • generateSimplex2D(x, y) - Simplex noise implementation
  • generateWorley2D(x, y) - Cellular/Worley noise

Advanced Features

  • generateFractal2D() - Fractional Brownian Motion
  • warp2D() - Domain distortion effects
  • generateTiling2D() - Seamless tiling patterns
  • generateVoronoi2D() - Voronoi diagram generation

Utility Methods

  • generate*01() versions - Output mapped to [0, 1] range
  • setSeed(seed) - Update generator seed
  • configure() - Global noise parameters

Examples

Basic Perlin Noise

const value = noise.generate2D01(x/20, y/20);

Turbulent Terrain

const height = noise.generateFractal2D(x/50, y/50, {
  octaves: 8,
  persistence: 0.65,
  turbulence: true
});

Cellular Texturing

const pattern = noise.generateWorley2D01(x/15, y/15) * 
               noise.generateSimplex2D01(x/30, y/30);

Documentation

Contributing

Contributions are welcome! Please read our Contribution Guidelines before submitting PRs.

License

MIT ยฉ [TheEmptynessProject]