ResoniteLink library written in TypeScript
Find a file
2026-02-12 20:12:50 +00:00
demos big refactor away from namespaces 2026-02-12 19:41:10 +00:00
src big refactor away from namespaces 2026-02-12 19:41:10 +00:00
.gitignore release 2.0.0 2026-02-12 20:11:36 +00:00
.npmignore release 2.0.0 2026-02-12 20:11:36 +00:00
package-lock.json big refactor away from namespaces 2026-02-12 19:41:10 +00:00
package.json release 2.0.0 2026-02-12 20:11:36 +00:00
README.md update readme 2026-02-12 20:12:50 +00:00
tsconfig.json code restructure & support for mesh & audio import 2026-02-12 16:38:19 +00:00

tsrl

tsrl (TypeScript ResoniteLink) is a library for interacting with ResoniteLink in a JavaScript based application. It should work in any environment that exposes a WHATWG-compliant WebSocket implementation.

In browsers it should Just Work, but Node.js' built in WebSocket implementation doesnt seem to work with Resonite (at least in v24.6.0 on Windows), so you should install the ws package.

Installing

npm i @eth0fox/tsrl

Usage

Connect to Resonite by first, opening a Resonite world where you are the host, going to the Session tab in the Dashboard and clicking "Enable ResoniteLink". Use the port number provided to connect.

// Standard
import { ResoniteLink } from "@eth0fox/tsrl";

const PORT = 1337 // change this
let link = await ResoniteLink.connect("ws://127.0.0.1:" + PORT);
// Node.js users should use: 
import { ResoniteLink } from "@eth0fox/tsrl";
import { WebSocket } from "ws";

const PORT = 1337 // change this
let link = await ResoniteLink.connect("ws://127.0.0.1:" + PORT, WebSocket as any);

For further usage instructions, take a look at the demos/

Contact

I'm eth0fox in Resonite, or u1f98a on Discord.