0.1.3 • Published 7 years ago

aframe-oscsend-component v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

aframe-oscsend-component

Version License

Sends OSC messages over a websocket connection.

For A-Frame. Using osc-js.

API

PropertyDescriptionDefault Value
serverURLPath to a websocket serverlocalhost
serverPortPort of websocket server8080
messagePathSend OSC messages with this address''

Installation and Usage

In order to send messages over UDP you need to connect via WebSocket to a bridge server that will forward forward the messages it recieves. Follow this example using osc-js.

Browser

Install and use by directly including the browser files:

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
  <script src="https://rawgit.com/adzialocha/osc-js/master/dist/osc.min.js"></script>        
  <script src="https://unpkg.com/aframe-oscsend-component/dist/aframe-oscsend-component.min.js"></script>
</head>

<body>
  <a-scene>
    <a-entity geometry="box" position="0 1 -2"
        oscsend="
        serverURL: localhost;
        serverPort: 8080;
        messagePath: aframe;
        ">
      <a-animation attribute="rotation"
        dur="05000"
        direction="alternate-reverse"        
        fill="forwards"
        to="0 360 0"
        repeat="indefinite">
      </a-animation>
      <a-animation attribute="position"
        dur="10000"
        direction="alternate-reverse"
        to="0 3 -3"
        repeat="indefinite">
      </a-animation>
    </a-entity>
  </a-scene>
</body>

npm

Install via npm:

npm install aframe-oscsend-component

Then require and use.

require('aframe');
require('aframe-oscsend-component');

TODO

  • Allow users to specify which attributes to send
  • Reconnect behavior
  • Care deeply about performance
  • Demos
0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago