@refractionx/rfx-art-net-js

1.0.6 • Public • Published

Checkout Example app

Install

npm i --save @refractionx/rfx-art-net-js

Import

import rfxArtNetLoader from '@refractionx/rfx-art-net-js';

Load

// a compiled WASM module is shipped in build directory of this package
const rfxArtNet = await rfxArtNetLoader(fetch('rfxArtNet.wasm'));
...

Use

let channelsIn;
let channelsOut = new Uint8Array(Array(512).fill(0));
...

// read channels from an Art-Net packet in a WebSocket frame 
channelsIn = rfxArtNet.getChannels(wsMessage.data);

...

// write channels to an Art-Net packet, universe 1, send in a WebSocket frame
ws.send(rfxArtNet.getPacket(channelsOut, 1));

Package Sidebar

Install

npm i @refractionx/rfx-art-net-js

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

6.55 kB

Total Files

7

Last publish

Collaborators

  • samaleksov