1.4.11 • Published 4 months ago

pixelwalker.js v1.4.11

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

NPM | GitHub | Protocol

npm i --save pixelwalker.js

Example: Connecting

import "dotenv/config";
import { APIClient, Block } from "pixelwalker.js";

const client = APIClient.withToken(process.env.TOKEN!)!;
const game = await client.createGame("r450e0e380a815a");

game.listen("Init", () => {
    console.log("Init!");
});

game.bind();

Using in the browser

Per default, this library will not work in the browser without downloading the polyfill node modules, below is an example how you can achieve this using the vite-plugin-node-polyfills module, which will help with bundling node-native, which this library uses: events

npm i --save pixelwalker.js
npm i --save-dev vite-plugin-node-polyfills
// vite.config.ts
import { defineConfig } from 'vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'

export default defineConfig({
  plugins: [
    nodePolyfills({
      include: ['events'],
      globals: { process: true },
    }),
  ],
})

Contribution

npm install             # Install `node_modules`
npm run build           # Execute this after making changes to the library.

Installing the node packages will also build the project into dist.

1.2.0

7 months ago

1.4.6

4 months ago

1.4.5

5 months ago

1.4.4

5 months ago

1.3.5

7 months ago

1.4.3

5 months ago

1.3.4

7 months ago

1.4.2

5 months ago

1.3.3

7 months ago

1.4.1

5 months ago

1.3.2

7 months ago

1.4.0

5 months ago

1.3.1

7 months ago

1.3.0

7 months ago

1.4.9

4 months ago

1.4.11

4 months ago

1.4.8

4 months ago

1.4.10

4 months ago

1.4.7

4 months ago

1.1.0

11 months ago

1.0.18

11 months ago

1.0.17

12 months ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.10

1 year ago

1.0.2

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago