# voxel-items

> an addon to have items in voxel.js.

Latest version **0.0.4** (published 2013-03-15) · 0 weekly downloads

## Install

```sh
npm install voxel-items
pnpm add voxel-items
yarn add voxel-items
bun add voxel-items
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2013-03-15 |
| First published | 2013-03-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jerome Etienne |
| Maintainers | jetienne |

## Links

- npm: https://www.npmjs.com/package/voxel-items
- npm.io page: https://npm.io/package/voxel-items

## Recent versions

- 0.0.4 (latest) — 2013-03-15
- 0.0.3 — 2013-03-14
- 0.0.1 — 2013-03-14

## README

# voxel-items

an example/template node module for voxel.js.

places a items of voxels at some specific game position.

### install it

```
npm install voxel-items
```

## API

### create the items
```
var items = require('voxel-items')()
```

### wait until the image is loaded

```
items.addEventListener('load', function(){
	// you code go here
})
```

### create an item mesh

```
items.createMesh(x, y)
```

get the item which is at x, y in the spritesheet and create a 3d mesh with it

## license

MIT

## TODO
* make alias for each items
  * ```.createMesh('brown-helmet')``` === ```.createMesh(0,0)``` 
  
## Usefull Command Lines

* to install dev dependancy
```
npm install
```

* to publish the package in npm repo - dont forget to bump version number
```
npm publish
```

* to get a live server of the demo
```
npm start
``` 

* to publish on gh-pages
```
  # go on gh-pages branch
  git checkout gh-pages
  
  # merge master branch
  git merge master
  
  # install all dependancies (if not already done)
  npm install
  
  # force to add them (they are in .gitignore)
  git add -f node_modules
  
  # push it to github
  git push 
  
  # come back on master branch
  git checkout master
```

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