{"id":23500450,"url":"https://github.com/techninja/sockpuppet","last_synced_at":"2025-04-25T08:57:46.154Z","repository":{"id":27137193,"uuid":"30605840","full_name":"techninja/sockpuppet","owner":"techninja","description":"Experimental control of a Web GL Sock puppet chrome demo","archived":false,"fork":false,"pushed_at":"2015-02-11T08:14:36.000Z","size":3336,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-16T16:25:29.477Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/techninja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-10T17:58:21.000Z","updated_at":"2023-10-31T18:21:17.000Z","dependencies_parsed_at":"2022-09-01T00:02:24.999Z","dependency_job_id":null,"html_url":"https://github.com/techninja/sockpuppet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techninja%2Fsockpuppet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techninja%2Fsockpuppet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techninja%2Fsockpuppet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techninja%2Fsockpuppet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techninja","download_url":"https://codeload.github.com/techninja/sockpuppet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250573347,"owners_count":21452345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-25T06:44:20.528Z","updated_at":"2025-04-24T05:53:15.403Z","avatar_url":"https://github.com/techninja.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SockPuppet controller experiment\n\n![Youtube Preview](http://i.imgur.com/TXog9o7.png)\n\n### [\u003e\u003e\u003e Check out a video of this project in action! \u003c\u003c\u003c](https://www.youtube.com/watch?v=-ihExyT1u5Y)\n\n## Background\nAfter seeing the incredible [\"Sock Puppet\" WebGL demo by myp\"](www.mediosyproyectos.com/puppetic/)\nand having tons of fun acting it out via keyboard and mouse, I immediately dreamt\nof implementing some kind of Jim Henson style \"Waldo\" out of spare parts and\nstreaming the data to the web page somewhat as I'd done for @MakerSylvia's\n[DML 2012 demo](https://github.com/techninja/DML2012).\n\nBut immediately I said to myself... why would I do that if I can access the gyro\ndata immediately available in a web ready device in my pocket! And so my lunch\nbreak was spent hacking this little test.\n\n## Installation\nThe intent is that you have (at least) two devices on the same WiFi network:\n * **A:** computer/tablet/mobile device to run the server and display the puppet\non. Technically you can run the server on one computer, but display the puppet\non a third computer/device.\n * **B:** mobile device capable of accessing its gyroscope data via web browser\n\n 0. Make sure you have [node.js \u0026 NPM](http://nodejs.org/) installed on computer\nA. They usually install together and you should be in good shape.\n 0. Clone/download this code to a handy folder, then in a command/terminal\nwindow, navigate to said folder, and run `npm install`, this will\ndownload/install express and socket.io\n 0. From this same window, run `node sockpuppet`, and our server should be\nrunning.\n 0. From this same computer (or some third computer), pull up the IP\naddress/hostname of the server computer, at the port **3883** (this can be changed\nin `sockpuppet.js`) in a modern WebGL capable web browser. If on the same\ncomputer, this would be `http://localhost:3883`\n 0. You should see our happy green puppet guy. Now for the controller:\n 0. On your mobile device on the same WiFi network, enter the IP\naddress/hostname of the server into the browser, eg:\n`http://192.168.10.42/control`\n 0. This should give you a simple white page that will immediately start\nstreaming gyro data and controlling our sock puppet :)\n\n## How's it work?\nNode.js acts as a simple webserver, also allowing us to stream data quickly to\nall clients via websockets. There's _**very little**_ to this thanks to\nsocket.io. The web page on the mobile device uses the\n[gyro.js](https://github.com/tomgco/gyro.js) library to poll for rotational data\nand this is cleaned and pushed directly to the server, where it simply bounces\nit back to all connected clients.\n\nIn the Puppet WebGL experiment, I've added the socket.io client library, and\nsimply trigger manipulation of the bones as the keyboard and mouse controls\nwould be doing, but when gyro or tap data is received. Super easy!\n\n## Now What?\nFeel free and have fun and hack. This could easily be improved in many ways with\nmore hand controls for facial expressions, and likely some kind of\ntween/smoothing for the often quite noisy gyroscope data.\n\n\nCode by TechNinja; MIT Licensed.\nOriginal code for WebGL demo by [myp\"](www.mediosyproyectos.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechninja%2Fsockpuppet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechninja%2Fsockpuppet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechninja%2Fsockpuppet/lists"}