# create-world

> ---

Latest version **0.0.2** (published 2020-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install create-world
pnpm add create-world
yarn add create-world
bun add create-world
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2020-04-07 |
| First published | 2020-03-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 37.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | sajmoni |

## Links

- npm: https://www.npmjs.com/package/create-world
- npm.io page: https://npm.io/package/create-world

## Dependencies (4)

- [uuid](https://npm.io/package/uuid.md) 7.0.3
- [chance](https://npm.io/package/chance.md) 1.1.4
- [seedrandom](https://npm.io/package/seedrandom.md) 3.0.5
- [perlin-simplex](https://npm.io/package/perlin-simplex.md) 0.0.3

## Recent versions

- 0.0.2 (latest) — 2020-04-07
- 0.0.1 — 2020-03-05

## README

<h1 align="center">
  create-world
</h1>
<h4 align="center">
    Create procedurally generated 2D worlds
</h4>

<div align="center">
  <img src="https://badgen.net/npm/v/create-world?icon=npm" />
  <img src="https://badgen.net/bundlephobia/minzip/create-world" />
</div>

Add a short introduction here.

---

## :sparkles: Features

---

## :wrench: Example usage

const world = createWorld({})
const generatedTiles = generateArea(world)({ x: 1, y: 0 })

---

## :package: Install

**npm**

```
npm install create-world
```

**yarn**

```
yarn add create-world
```

---

## :newspaper: API

---

## :book: Recipes

Mud-world:

```
const TileType = {
  WATER: 'water',
  MUD: 'mud',
}

const FeatureType = {
  LOG: 'log',
}

const world = createWorld({
  // order matters since resulting tiles will be first type matched
  tiles: [
    { type: TileType.WATER, noiseMax: -0.3 },
    // default tile so that something is always matched
    { type: TileType.MUD },
  ],
  features: [
    {
      type: FeatureType.LOG,
      tileTypesAllowed: [TileType.MUD],
      likelihood: 5,
    },
  ],
})
```

---

## :computer: Develop

### Commands

| Command           | Description                                    |
| ----------------- | ---------------------------------------------- |
| `yarn build`      | Generate files in the `dist` folder            |
| `yarn release`    | Start the process to release a new version     |
| `yarn typecheck`  | Run a type check with `typescript`             |
| `yarn lint`       | Lint with `eslint`                             |
| `yarn clean`      | Remove build artefact (`.tgz` file)            |
| `yarn build-test` | Builds, packs and installs to `example` folder |

### Workflow

1. Make changes
2. `yarn build-test` and verify that your changes work.
3. Commit to `master` or make `PR`

#### Release

1. `yarn release:prepare` - Sets up your library for release
2. If everything worked in the previous step: `yarn release`

---
_Source: https://npm.io/package/create-world · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
