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

loopin-native

v0.10.2

Published

Native binary renderer for Loopin

Downloads

17

Readme

loopin-native contains all that is needed to run Loopin applications using a shared, natively compiled binary: ofxLoopin. It includes the following:

  • C++/openFrameworks source code for the reference Loopin server implementation ofxLoopin.
  • A loopin plugin to interface with the rest of the Loopin stack.
  • node.js functions to automatically build ofxLoopin. src/*
  • Command-line utility loopin-native to manage, build and run ofxLoopin. src/cli.js

To create a Loopin project, use the loopin-base module. You should not need to include in module directly.

Usage

This module must be used as part of a loopin application. For a much more complete example, see loopin-base/node/loopin.js.

const loopin = require('loopin').global()

// Set project root
loopin.plugin('files')
loopin.filesRoot( __dirname )

// Snip a lot of other loopin configuration.

// Load loopin-native as a plugin
loopin.plugin( require('loopin-native'), {
  dev: false,
  useEnv: true
} )

// Start loopin application.
loopin.bootstrap()
.then( function () {
  // Loopin is successfully booted!
})

This will download a pre-compiled binary version of ofxLoopin under ./node_modules/loopin-native/build/ and run it with the loopin project.

Requirements

loopin-native runs best on a 64-bit Mac OSX machine.

Linux, at least ubuntu-amd64, is supported but will need to be build in developer mode.

Raspberry Pi is supported, with specific instructions and developer mode. Some features, such as Kinect, are not enabled. Shaders must be written in OpenGL ES.

Windows support is very new, and may have some weirdness.

Installation

OSX / Windows

Running and installation should be automatic on OSX 10.8 and above and modern versions of Windows. Compiled binaries will be downloaded from github.

Linux

Installations on linux will probably need to install openframeworks dependencies.

'Automatic' Linux Deps Install

# Install the loopin-native module
sudo npm install -g loopin-native

# Attempt to auto-run dependency installers. 
# Downstream scripts will pop up Y/n prompts.
# Y is not always the correct answer! 
sudo loopin-native --deps 

Manual Linux Deps Install

# Install prerequisites using apt-get. This may be yum or dnf on your machine.
sudo apt-get install build-essential git nodejs npm ffmpeg

# Install the loopin-native module
sudo npm install -g loopin-native

# Setup dev environment.
# This will download openFrameworks.
`loopin-native --dev --env`

# Change to loopin-native module directory.
cd "$LOOPIN_NATIVE_ROOT"

# Change to openFrameworks directory
cd lib/of_*

# Change to scripts directory.
# You may need to replace 'ubuntu' with your distribution.
cd scripts/linux/ubuntu/

# openframeworks scripts to auto-install dependencies
# You will need to hit 'Y' a number of times.
sudo ./install_dependencies.sh
sudo ./install_codecs.sh

After this, Loopin applications, whether using pre-compiled binaries or in dev mode, should work. Please report any problems.

Raspberry PI

The procedure for installation on generic Linux should work. A few PI-specific notes:

  • Use raspbian lite image.
  • Don't install desktop!
  • Installer currently forces armv6 architecture.
  • For compatibility reasons, binaries are not distributed for Raspberry PI, so developer mode is forced.
  • Installation and compiling can take hours, even on a PI 3. Deploy early and often! See 'Setting up environment' to use only one copy of loopin-native.

Developer Mode

loopin-native is capable of setting up a development environment and building ofxLoopin binaries in-situ and on-demand. This can be used for ofxLoopin feature development as well as building on platforms that are currently unsupported. Developer mode is automatically enabled on platforms where a pre-packaged binary is not distributed, including Linux. Note that developer mode may automatically download and install libraries and dependencies, totalling more than 100mb.

# Compile ofxLoopin and do a simple test.
loopin-native --dev --verbose --test

Requirements

XCode is required on Mac. Currently, there seems to be an incompatibility between openFrameworks and XCode 10.x.x, so 9.x.x must be used.

Visual Studio Community 2017 is required on Windows.

Potential Troubles

openFrameworks build processes may not work when the installation of this module is in any directory who's path includes dotfiles. Specifically, this can be problem when using nvm. To mitigate this problem, use the instructions below and ensure that the module is installed globally in a path that doesn't have any dotfiles.

Setting up shared environment

When developing ofxLoopin or running multiple Loopin projects, it is recommendeded to use a single, shared copy of this module.

cd WHERE_YOU_PUT_YOUR_CODE/

# Clone this repo
git clone https://github.com/koopero/loopin-native.git

# Install npm deps
cd loopin-native
npm install

# Link module globally.
sudo link npm link

# Show environment variables
loopin-native --dev --env

The output of the last command will look something like this:

export LOOPIN_NATIVE_ROOT=/your/dir/loopin-native/build
export LOOPIN_NATIVE_DEV=1

Copy this output and paste it into a file which is run on login, such as ~/.bashrc or /etc/environment.

Now, all local project which require('loopin-native') will default to using the directory ./loopin-native/build, and will build binaries on demand. You can now edit files in ./loopin-native/ofxLoopin to experiment with or develop ofxLoopin.

Credits

Loopin is created by Vancouver-based creative technologist Samm Zuest Cooper.

Loopin development relies on the patient and enthusiastic support of HFour Design Studio.

ofxLoopin would not be possible without the incredible openFrameworks project.

Thank you to the wonderful organizers and community at Vancouver Creative Technology for feedback and encouragement.

The following, amazing ofxAddons help make Loopin great: