All Projects → konaraddi → Web Riimote

konaraddi / Web Riimote

Licence: mit
🎉 Turn your smartphone into a 3D controller with a web app

Projects that are alternatives of or similar to Web Riimote

texugo
🦡 Fast, flexible, multiplatform, lightweight and, dependency-free message gateway
Stars: ✭ 18 (-96.08%)
Mutual labels:  sockets
SignalR-Core-SqlTableDependency
Shows how the new SignalR Core works with hubs and sockets, also how it can integrate with SqlTableDependency API.
Stars: ✭ 36 (-92.16%)
Mutual labels:  sockets
Message Io
Event-driven message library for building network applications easy and fast.
Stars: ✭ 321 (-30.07%)
Mutual labels:  sockets
Coursera-Clone
Coursera clone
Stars: ✭ 48 (-89.54%)
Mutual labels:  sockets
hare
🐇 CLI tool for websockets and easy to use Golang package
Stars: ✭ 40 (-91.29%)
Mutual labels:  sockets
asl
A C++ cross-platform library including JSON, XML, HTTP, Sockets, WebSockets, threads, processes, logs, file system, CSV, INI files, etc.
Stars: ✭ 44 (-90.41%)
Mutual labels:  sockets
DeskViewer
A Java Project for screen sharing based on TCP protocol. Like TeamViewer
Stars: ✭ 23 (-94.99%)
Mutual labels:  sockets
Kache
A simple in memory cache written using go
Stars: ✭ 349 (-23.97%)
Mutual labels:  sockets
reactor
Asynchronous Event Driven IO for .NET
Stars: ✭ 40 (-91.29%)
Mutual labels:  sockets
Ip2unix
Turn IP sockets into Unix domain sockets
Stars: ✭ 295 (-35.73%)
Mutual labels:  sockets
uC-TCP-IP
A compact, reliable, high-performance TCP/IP protocol stack. Features dual IPv4 and IPv6 support, an SSL/TLS socket option, and support for Ethernet, Wi-Fi, and PHY controllers.
Stars: ✭ 66 (-85.62%)
Mutual labels:  sockets
MQL5-JSON-API
Metaquotes MQL5 - JSON - API
Stars: ✭ 183 (-60.13%)
Mutual labels:  sockets
Pearsend
A simple CLI client for peer-to-peer file or message sending. Written in Python
Stars: ✭ 35 (-92.37%)
Mutual labels:  sockets
Networking
Low-level Swift package for POSIX sockets and Epoll/Kqueue.
Stars: ✭ 21 (-95.42%)
Mutual labels:  sockets
Smoke
Turns a Web Browser into a Web Server with WebRTC
Stars: ✭ 326 (-28.98%)
Mutual labels:  sockets
wocket
A WebSocket library for Deno
Stars: ✭ 103 (-77.56%)
Mutual labels:  sockets
xplatform
every feature build up from scratch
Stars: ✭ 91 (-80.17%)
Mutual labels:  sockets
Cowboy
Cowboy.Sockets is a C# library for building sockets based services.
Stars: ✭ 364 (-20.7%)
Mutual labels:  sockets
Mesh Networking
🌐 LEGO blocks for networking, a Python library to help create and test flexible network topologies across real and simulated physical links.
Stars: ✭ 329 (-28.32%)
Mutual labels:  sockets
Junixsocket
Unix Domain Sockets in Java (AF_UNIX)
Stars: ✭ 265 (-42.27%)
Mutual labels:  sockets

web-riimote

GIF of screen recording of the controller interacting with the main display

Turn your smartphone into a 3D controller (think Wii remote) with a web app. No need to install mobile or desktop apps. ⚠️ Works best on Chrome. ⚠️

Just visit web-riimote.herokuapp.com/ on a laptop/desktop AND a smartphone. Your smartphone will be the controller and your laptop/desktop will be the main display. Here's a video showing this project in action.

In the gif recording above, the user is pointing and wavering around a smartphone to move the cursor. Tilting the smartphone rotates the steering wheel. The smartphone is connected to the display (shown above) using sockets.

Getting Started

This section is for people who would like to run this project on their own machine.

You can run this project without being familiar with the technologies used. But, if you'd like to make changes, then please be familiar with Vue, Node, Koa, and Socket.io. The client uses Vue. The server uses Node, Koa, and Socket.io.

Please be sure to have Node.js installed before continuing. It is the only prerequisite to run this project.

  1. Clone this repository
  2. npm install in both client/ and server/
  3. Create a server_address.js file in client/src/ with the following contents:
// exporting link to server
const PORT = 3000;
const IP_ADDRESS = "123.456.7.890"; // replace this with your laptop's public ip address so you can test it out on your own network
export default `${IP_ADDRESS}:${PORT}`;

The server_address.js file is imported in client/src/main.js and is used when adding the $socket instance property to Vue.

  1. npm run serve in both client/ and server/. Visit the client on a laptop or device with a large screen (this will be the main display) AND a smartphone (this will be the controller).

How to set it up

Here's a poorly, partially sketched illustration of what your set up should look like:

Illustration of an ideal set up

The user visits the web app on two devices. One device will be the main display (this device should be a laptop or desktop computer), and the other device will be the 3D controller (this device should be a smartphone). The controller is used to interact with objects on the main display.

For the best experience:

  1. Hold the controller 2 to 3 feet away from the main display's screen (further away if the main display is larger than a typical laptop's screen)
  2. Point the controller's top edge (the top of the smartphone) at the center of the main display's screen, and refresh the webpage.
  3. You should now be able to point the controller at the screen and see a cursor.

How it works

The Architecture

The server acts as the middleman. The controller emits a message that gets picked up by the server. The server emits the same message but to all clients. Both the controller and main display are clients. So when the server emits a message, the main display can pick it up. This is how the controller can send messages to the main display. Sockets make this possible. Without sockets, the main display would have to constantly check with the server if there are any messages which means a ton of requests per second.

The Client

The client is the web app which has two main web pages. One web page is for the main display; we'll refer to this as the MainDisplayView. The other web page is for the controller; we'll refer to this as the ControllerView. When the user visits the web app on a large screen, they see the web page for the main display. When the user visits the web app on a small screen, like a smartphone, they see the web page for the controller.

The ControllerView uses the DeviceOrientation API to gather data from the controller's sensors. It can gather the following data:

  • the rate of acceleration along the x, y, and z axes
  • the number of degrees by which the device is tilted on the x, y, and z axes (using Euler angles)

There's much more data the controller could gather, but this is all it needs. It sends this data to the server. The server broadcasts the data. The MainDisplayView picks up the data and processes it to determine where the cursor should be and whether the user is shaking the controller.

Built With

  • Vue.js - front end JavaScript framework
  • Buefy - "Lightweight UI components for Vue.js based on Bulma"
  • Node.js - back end JavaScript framework/runtime
  • Koa - "a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs"
  • Socket.io - for "real-time bidirectional event-based communication"

Acknowledgements

The image of the Wii cursor came from wiibrew.org and was made by drmr and is available in the public domain. The image of the Wii wheel came from mariokartwii.wikia.com.

This project was inspired by the 2016 Android Experiments Winner. The 2016 Android Experiments winner turns your smartphone into a 3D controller using Chromecast and an Android app. But web-riimote demonstrates that it's possible to do the same with just a web app.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].