A hands-free creative coding platform. Use face or hand gestures (or the mouse & keyboard) to code with p5.js
# 1) Setup
git clone https://github.com/codemedium/codemedium-editor
cd codemedium-editor
npm install
# 2a) Web based mode (native browser events)
npm start
# 2b) Desktop mode (native desktop events)
npm run desktop
# 3) Point your browser to http://localhost:8080
Troubleshooting
? Windows - If you run into errors after
npm install
it's probably due to Robot.js dependencies (most likely you need Python and node-gyp). If you don't need desktop mode then remove the line inpackage.json
for"robotjs"
and try runningnpm install
again. If you do want desktop mode, then check out this README for a troubleshooting guide.This will be fixed soon!
CodeMedium is a visual, all-in-one gesture mapping and handsfree desktop automation platform designed to help you use devices handsfree! Some use cases include:
CodeMedium is centered around blocks of code that are literally represented visually by blocks. CodeMedium is broken up into several views:
The Studio is where you actually snap the blocks together to map gestures to things. All of the blocks in a Studio workspace are collectively referred to as codeblocks
Each individual block represents JavaScript code and The Factory is where you design the shape of these blocks and write its code
The Library is where your Factory Blocks and Studio Codeblocks are stored. You can edit, remix, and delete them there
? More info coming soon
? More info coming soon
? More info coming soon
git clone https://github.com/codemedium/codemedium-editor
cd codemedium
npm install
from the project root to install dependencies (> 250Mb)npm start
from the project's root to start the app at localhost:8080
This project works in all browsers that natively support the Web MIDI API. Currently, the following browsers have built-in support:
For more info, including on how to support Firefox, Internet Explorer, and Safari see the WebMidi docs
Starting with version 77, Chrome deprecates Web MIDI usage on insecure origins. This means that, going forward, the page will need to be hosted on a secure origin (e.g. https://firebase.google.com/products/hostinger will need to authorize usage (no matter if sysex is used or not). Firebase, Netflify, Github, and others provide free hosting.
# DEVELOPMENT
# -----------
# Start the app in development mode with localStorage
npm start
# HANDSFREE DESKTOP
# -----------
# Same as `npm start` but it controls the desktop pointer instead of a virtual one
# Adds a "Desktop Mode" toggle
npm run desktop
# PRODUCTION
# ----------
# Build the app for production with localStorage
npm run build
# DEPLOY
# ----------
# Push the app to firebase. Must have:
# - Firebase Tools: npm i -g firebase-tools
# - Initialized with: firebase init
npm run deploy
window.app
The following is available through your browser's dev console:
window.app = {
$, // Main Vue instance
$studio, // The Studio component (only present when on that route)
$factory // The Factory component (only present when on that route)
}
? More info coming soon
The following is available inside localStorage
:
{
blocks: [], // All loaded Factory Blocks
codeblocks: [], // All loaded Studio codeblocks
currentFactory: {}, // The Factory's last state (autosave)
currentStudio: {}, // The Studio's last state (autosave)
splitter: 50
}
? More info coming soon
Location | Shortcut | Action |
---|---|---|
Anywhere | s | Navigate to the Studio |
Anywhere | f | Navigate to the Factory |
Factory | ctrl + s | Save the current block |
Copyright 2020 CodeBlocks
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.