1.1.2 • Published 3 years ago

starshipwright v1.1.2

Weekly downloads
15
License
MIT
Repository
github
Last release
3 years ago

Starshipwright

JS library to procedurally generate starships. Based on a procedural generation monthly challenge entry from Reddit by green_meklar, used with permission.

Installation

# npm
npm install starshipwright --save

# yarn
yarn add starshipwright

Usage

import { generateShip, generateFactionRandomizer } from 'starshipwright';

...

const faction = generateFactionRandomizer("factionRandomSeed");
const ship = generateShip(faction, "shipRandomSeed"); // HTML Canvas

API

generateFactionRandomizer(seed: string) ⇒ Randomizer

Returns a randomizer initialized with the specified seed.

generateShip(faction: Randomizer, seed: string, size?: number) ⇒ Randomizer

Returns a canvas that contains the generated ship.

Demo

Check it out here.

1.1.1

3 years ago

1.1.0

3 years ago

1.1.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago