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

ember-cli-tuio

v0.2.4

Published

Tuio.js Client that transforms OSC/TUIO messages to touch events. The addon ships with a component mixin that integrates hammer.js gestures.

Downloads

37

Readme

Ember-cli-tuio

Tuio.js Client which recives OSC/TUIO messages from a websocket and transforms those to touch events. The addon ships with a component mixin that integrates hammer.js gestures.

Available Gestures:

  • tap
  • doubletap
  • press
  • pan (only horizontal by default)
  • swipe (only horizontal by default)
  • pinch (disabled by default)
  • rotate (disabled by default)

Links

Installation

Your Browser neads to allow touch input. Chrome Go to chrome://flags/ and set "Enable touch events" to enabled.

Firefox Go to about:config and set "dom.w3c_touch_events.enabled" to enable=(1)

ember install ember-cli-tuio

Setup

Add customEvents to application (if ember.js < 1.13.9)

// app/app.js

customEvents: {
  objectadded: 'objectAdded',
  objectmoved: 'objectMoved',
  objectremoved: 'objectRemoved'
}

Usage

Install and Start Tuio.js Server

// app/components/touchable-component.js

import Ember from 'ember';
// Import mixin to get hammer.js gestures
import Gestures from 'ember-cli-tuio/mixins/gestures';

const {
  Component,
  computed
} = Ember;

export default Component.extend(Gestures, {
  // allowed gestures in this component (default: tap, doubletap, press, pan, swipe)
  // hammer gestures are lowercase (pinchstart NOT pinchStart)
  gestures: ['tap', 'press', 'pinch'],

  // change default recognizer settings
  // available options are documented in the hammer.js [documentation](http://hammerjs.github.io/recognizer-pan/)
  recognizers: {
    press: {time: 400},
    pinch: {enable: true}
  },

  tap: function(event) {
    // act on tap
    this.$().hide();
  },

  press: function(event) {
    // act on press
    console.log(event);
  },

  pinch: function(event) {
    // act on pinchstart, pinchmove & pinchend
    console.log(event);
  },


  // Object/Fiducial events don't need the gestures mixin
  objectAdded: function(e) {
    // act if a object is  added to the table
    if(e.symbolId === 1) {
      console.log('Object one is added');
    }
  },

  objectMoved: function() {
    // act on move
  },

  objectRemoved: function() {
    // act if a object is  removed from the table
  }
});

Action helper

This triggers pressAction on press

You nead to add the actions to the customEvents object in app.js to use the helper.

// app/app.js

customEvents: {
  tap: 'tap',
  press: 'press',
  pinchstart: 'pinchStart'
}

Running

  • ember server
  • Visit your app at http://localhost:4200.

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Publishing

ember release
npm publish