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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@make-live/toolkit

v0.0.4

Published

Provides a way to interact with Make Live instances

Downloads

1

Readme

@make-live/toolkit

An npm module to help Make Live customers create a custom HTML UI for their hosted experience.

Install

The Make Live Toolkit can be integrated into an existing website. Ideally, we recommend setting up a new website with something like Parcel or Vite. You can find a working example application built using Parcel and the Make Live Toolkit here.

To install with npm:

npm install --save @make-live/toolkit

To install with Yarn:

yarn add @make-live/toolkit

Commands

There are two different type of commands your application can send at the moment.

CONSOLE_COMMAND

This command enables you to use the Unreal Engine console to run commands. Please see the Unreal Engine documentation for further details.

instance.sendCommand({
  data: "stat fps",
  type: "CONSOLE_COMMAND",
});

INTERACTION_COMMAND

This command enables you to use send a customer Unreal Engine command that is bespoke to your application. For example, a command that turns a light on or off, or changes the time of day, the possibilities are endless. Please see the Unreal Engine documentation for further details.

instance.sendCommand({
  data: "MyCustomEvent",
  type: "INTERACTION_COMMAND",
});

instance.sendCommand({
  data: {
    LoadLevel: "/Game/Maps/Level_2",
    PlayerCharacter: {
      Name: "Shinbi",
      Skin: "Dynasty",
    },
  },
  type: "INTERACTION_COMMAND",
});

Events

There are a variety of events your application can receive. Some of these are related to Make Live itself.

You can listen for events by calling the addEventListener function on the MakeLiveInstance object. You can add multiple event listeners if required so you can separate concerns in a larger application and just listen for a subset of events.

const instance = createInstance({
  url,
  container: viewport,
});

instance.addEventListener((event) => {
  /// do something with `event`…
});

CONNECT

This event is from Make Live itself and is broadcast when it's time for your application to come to life. Typically, you would enable/show your UI once receiving this as the user is able to interact with the experience.

instance.addEventListener((event) => {
  if (event.type === "CONNECT") {
    /// show UI or start other tasks
  }
});

DISCONNECT

This event is from Make Live itself and is broadcast when it's time for your application shut down. Typically, you would disable/hide your UI once receiving this as the user is unable to interact with the experience. Examples of when this could happen are there the user's session expiring or some other issue causing your experience to no longer continue.

instance.addEventListener((event) => {
  if (event.type === "DISCONNECT") {
    /// show UI or start other tasks
  }
});

RESPONSE

This event is from your Unreal Engine application (via Make Live) and is broadcast when your application wants to alert the UI to something interesting. Maybe the user has entered a certain area and you need to change the UI to show different controls or data? For more information please see the Unreal Engine documentation.

instance.addEventListener((event) => {
  if (event.type === "RESPONSE") {
    // RESPONSE event data will always be a JSON `string`.
    const data = JSON.parse(event.data);
    /// do something with the data
  }
});