Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including effectserver-client with all npm packages installed. Try it out:

var effectserverClient = require("effectserver-client")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

effectserver-client v0.1.1

Client for instanssi/effectserver

build status

effectserver-client

Node.js client for instanssi/effectserver. It comes with a couple of sample effects and a demo.

Animation Specification

The system is based on lists. Each list represents a frame. Next frame is shown after given interval (no better control at the moment). Every effect just generates a list compatible with the format. Consider the example below:

[
    [{ // first frame
        id: 10,
        rgb: [0, 0, 255]
    },
    {
        id: 13,
        rgb: [0, 0, 255]
    }],
    [{ // second frame
        id: 10,
        rgb: [255, 0, 0]
    },
    {
        id: 13,
        rgb: [255, 0, 0]
    }]
]

id refers to the light. rgb is just an array of three values [0, 255] each representing a color channel.

License

effectserver-client is available under MIT. See LICENSE for more details.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free