npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

matelight

v0.1.2

Published

client for matelight

Readme

node-matelight

matelight client for node.js using CRAP, the "Custom advanced video stReAming Protocol".

Install with:

npm install matelight

Examples are in the matelight playground

If you don't have a matelight, you can also use the emulator.

Usage

var matelight = require('matelight');

var client = matelight.connect();

client.startLoop(function(){
  client.setLight(2, 2, 200, 0, 200);
});

API

matelight.connect(host, port)

Create a new matelight connection. The host and portdefault to matelight.cbrp3.c-base.org:1337. This will be fine if you are at the c-base and your computer is connected to the crew network.

client.clean()

Cleans the matelight screen by setting all lights to off.

client.setLight(x, y, r, g, b)

Sets the light at positon x, y to color RGB(r, g, b)

CAUTION: the x and y values start at 1 as this seemed more intuitiv when pointing at the matelight.

Here is a sample that turns the most upper left light to red and the most lower right light to blue:

  client.setLight(1, 1, 255, 0, 0);
  client.setLight(40, 16, 0, 0, 255);

client.startLoop(cb, [interval])

Starts a loop which will clean the sceen, run the callback and then send all the lights which are set in the callback to the matelight screeen. If no intervall is given, it will default to 300 ms which seems to be a compromise between high framerates and dropped packages.

This example will send a red to the most upper left light every 100 ms:

var client = matelight.connect();

client.startLoop(function(){
  client.setLight(1, 1, 255, 0, 0);
}, 100);

client.stopLoop();

Stops the loop. Nothing will be send to the matelight anymore.

CAUTION: Even if the loop is stopped, some UDP packages might still arrive at the matelight.

Extras

Some things that are exposed through the module. Only mess with this if you know what you are doing.

client.ROWS

The ammount of rows of the matelight

client.COLS

The ammount of columns of the matelight

client.udpClient

The underlying udp client which is used to send the image buffers