starshipwright
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

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.

/starshipwright/

    Package Sidebar

    Install

    npm i starshipwright

    Weekly Downloads

    0

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    191 kB

    Total Files

    36

    Last publish

    Collaborators

    • joseprio