0.2.8 • Published 8 months ago

pw-js-api v0.2.8

Weekly downloads
-
License
MIT
Repository
github
Last release
8 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

8 months ago

0.2.8-dev.f914ab6

8 months ago

0.2.7

8 months ago

0.2.8-dev.ea1c897

8 months ago

0.2.6

9 months ago

0.2.6-dev.051f1b4

9 months ago

0.2.6-dev.50c1173

9 months ago

0.2.6-dev.2559c92

9 months ago

0.2.5

9 months ago

0.2.6-dev.45f6eee

9 months ago

0.2.6-dev.fea2e93

9 months ago

0.2.6-dev.9ec7613

9 months ago

0.2.4

9 months ago

0.2.3

10 months ago

0.2.4-dev.d8631f3

10 months ago

0.2.3-dev.aec93c6

10 months ago

0.2.2

10 months ago

0.2.3-dev.4760188

10 months ago

0.2.3-dev.bf21f34

10 months ago

0.2.2-dev.8bac497

10 months ago

0.2.2-dev.073a13b

10 months ago

0.2.1

10 months ago

0.2.1-dev.6b09e9a

10 months ago

0.2.0

10 months ago

0.1.3

10 months ago

0.1.3-dev.95ab0ec

10 months ago

0.1.3-dev.6e0f0a1

10 months ago

0.1.2

10 months ago

0.1.3-dev.73c0476

10 months ago

0.1.2-dev.eaf846c

10 months ago

0.1.2-dev.8daced6

10 months ago

0.1.2-dev.72bfdfb

10 months ago

0.1.2-dev.913984f

10 months ago

0.1.1

10 months ago

0.1.2-dev.e6a840d

10 months ago

0.1.1-dev.9a7f17b

10 months ago

0.1.0

10 months ago

0.1.1-dev.dfeb897

10 months ago

0.0.10-dev.541514c

10 months ago

0.0.9

10 months ago

0.0.10-dev.c73f009

10 months ago

0.0.7

10 months ago

0.0.8-dev.774d27b

10 months ago

0.0.6-dev.84aec6f

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago