0.2.8 • Published 3 months ago

pw-js-api v0.2.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

PW-JS-Api

PixelWalker API implementation for Node.js, Bun and modern browsers. NPM can be available here: https://www.npmjs.com/package/pw-js-api

Some of the typings may be incomplete, please let me know on discord (doomester) if you need help or clarifications.

Install

NPM:

npm i pw-js-api

PNPM:

pnpm i pw-js-api

Yarn:

yarn add pw-js-api

Bun:

bun i pw-js-api

NOTE: installing pw-js-api#dev is also available if you wish, there may be no difference but if so, it could be from minor to major changes that changes the way the lib works.

Install (Browser)

You could use a CDN like jsdelivr or unpkg. You can put this in your HTML page:

<script src="https://cdn.jsdelivr.net/npm/pw-js-api@0.1.1/browser/pw.prod.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pw-js-api@0.1.1/browser/pw.dev.js"></script>

When you have these scripts in your HTML file, you will be able to use the global variable PW which contains PWGameClient, PWApiClient and Constants.

Example

Feel free to take a look at the source code for an example bot that only does snake and listen to certain chat commands (.ping, .say and .disconnect)

Why?

The difference between this and preexisting libraries is that this project aims to be as minimal as possible, trying to be more direct. As such, there are no helpers that comes along with the package itself.

License

MIT License.

0.2.8

3 months ago

0.2.8-dev.f914ab6

3 months ago

0.2.7

4 months ago

0.2.8-dev.ea1c897

4 months ago

0.2.6

4 months ago

0.2.6-dev.051f1b4

4 months ago

0.2.6-dev.50c1173

4 months ago

0.2.6-dev.2559c92

4 months ago

0.2.5

4 months ago

0.2.6-dev.45f6eee

4 months ago

0.2.6-dev.fea2e93

4 months ago

0.2.6-dev.9ec7613

4 months ago

0.2.4

4 months ago

0.2.3

5 months ago

0.2.4-dev.d8631f3

5 months ago

0.2.3-dev.aec93c6

5 months ago

0.2.2

5 months ago

0.2.3-dev.4760188

5 months ago

0.2.3-dev.bf21f34

5 months ago

0.2.2-dev.8bac497

5 months ago

0.2.2-dev.073a13b

5 months ago

0.2.1

5 months ago

0.2.1-dev.6b09e9a

5 months ago

0.2.0

5 months ago

0.1.3

5 months ago

0.1.3-dev.95ab0ec

5 months ago

0.1.3-dev.6e0f0a1

5 months ago

0.1.2

5 months ago

0.1.3-dev.73c0476

5 months ago

0.1.2-dev.eaf846c

5 months ago

0.1.2-dev.8daced6

5 months ago

0.1.2-dev.72bfdfb

5 months ago

0.1.2-dev.913984f

5 months ago

0.1.1

5 months ago

0.1.2-dev.e6a840d

5 months ago

0.1.1-dev.9a7f17b

5 months ago

0.1.0

5 months ago

0.1.1-dev.dfeb897

5 months ago

0.0.10-dev.541514c

5 months ago

0.0.9

5 months ago

0.0.10-dev.c73f009

5 months ago

0.0.7

5 months ago

0.0.8-dev.774d27b

5 months ago

0.0.6-dev.84aec6f

5 months ago

0.0.6

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago