Landscape JS
Install using your preferred package manager.
$npm install @binarystarstudio/landscapejs
$pnpm add @binarystarstudio/landscapejs
$yarn add @binarystarstudio/landscapejs
$bun add @binarystarstudio/landscapejs
Generate random, stunning landscape visualizations with just one line of code.
import { Landscape } from 'landscape-js';
// Initialize with a single line
const scene = new Landscape({ container: '#app' });
scene.render();Create landscapes with specific attributes.
import { Landscape } from 'landscape-js';
// Initialize with specific settings
const scene = new Landscape({
container: '#app',
dayTime: false,
numberOfStars: 750
numberOfMountains: 3
});
scene.render();Recreate previous generated landscapes by its seed.
import { Landscape } from 'landscape-js';
// Recreate a previous generated scence using a seed
const scene = new Landscape({
container: '#app',
seed: 'eyJyYW5kb21TZWVkIjo2OTQ4MTgwOTkwMTM2MjQsImRheVRpbWUiOmZhbHNlfQ=='
});
scene.render();Everything you need to create immersive background experiences.
Pure Canvas API with no external dependencies. Under 5kb gzipped and ready to drop into any project.
Adjust colors, noise levels, sun position, and mountain density via a simple JSON config object.
No heavy frameworks required. Just include the script tag and you're ready to paint the sky.