0.2.8 • Published 11 months ago

pw-js-api v0.2.8

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

11 months ago

0.2.8-dev.f914ab6

11 months ago

0.2.7

11 months ago

0.2.8-dev.ea1c897

11 months ago

0.2.6

11 months ago

0.2.6-dev.051f1b4

11 months ago

0.2.6-dev.50c1173

11 months ago

0.2.6-dev.2559c92

11 months ago

0.2.5

11 months ago

0.2.6-dev.45f6eee

11 months ago

0.2.6-dev.fea2e93

11 months ago

0.2.6-dev.9ec7613

12 months ago

0.2.4

12 months ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.9

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago