- Notifications
You must be signed in to change notification settings - Fork17
Generate Dactyl keyboard designs from your browser.
License
rianadon/dactyl-configurator
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A web configurator for the Dactyl mechanical keyboard.It's based upon the wonderful work of @ibnuda'sweb configurator, which organizes the configuration options in various commuity edits to a single JSON structure.
The site uses ClojureScript and WebAssembly to run all computation in the browser. This means I don't have to pay for expensive servers to render everyone's cad models!
The new developments of this work are:
- All Clojure source files have been translated toClojureScript, which can easily be run in the browser. The two languages are extremely similar, but there are a few key differences (lack of ratios, macro handling) that need to be taken into account.
Using @DSchroer'sWebAssembly build of OpenSCAD, STL generation can happen entirely within the browser.The latest release uses theManifold geometry kernel instead, which produces renders almost 100x faster! Using OpenSCAD is still left as an option.- Fast CSG previews are generated using
theOpenJSCAD project. I've added a new back end to thescad-clj library (which has been copied into this project due to how heavily I've edited it) to generate the OpenJSCAD objects.Since Manifold is such a fast kernel, it is also used for previews. I've written an interop layer to give Manifold the same API as OpenJSCAD. - CSGs are previewed with Three.JS, using theSvelte-cubed bindings.
- The ClojureScript source files are compiled into a web worker, which is run fromSvelte/TypeScript frontend.
- Configurations are compressed withprotobuf and saved to the URL. This makes it easy to share configurations with others. I've also switched to using camelcase for the JSON configuration, which makes integrating with protobuf easier.
- The SCAD output is verified to match that generated by @tshort's original Manuform generator when using settings matching the original and turning off adjustments made by @ibnuda to the thicknesses & dimensions.
- Confusing options have help information explaining what they do.
- I've made a few edits to the presets and Dactyl code to create better default models. These include making TRRS jacks the default instead of RJ9, removing the Pro Micro holder since it rarely correctly attaches to the side of the case, and fixing the TRRS holder so that it's attached to the case.
You'll first need to install Node.js dependencies withnpm install
.ClojureScript and protobuf files can then be built with the Makefile. After you've installed a Java runtime (for compiling ClojureScript)and theprotobuf compiler (it's installed bynpm install
), runmake
to compile the files.
They compiled files are placed in thetarget
directory. To build the website, runnpm run dev
.
- ClojureScript interop with javascript
- JSCAD user guide
- The Noble Effort To Put OpenSCAD In The Browser
index.html
andpublic/
: Static files used for the websitescripts/
: Node.js scripts for testing and developing new featuressrc/
: Source codeassets/
: Models, JSON configuration, and WebAssembly files used by the frontendcljs/
: ClojureScript source codedactyl_generator
: Generate the Dactyl models. Most notably:manuform.cljs
dactyl_node
: Entry point for generating Dactyl models from Node.js and the browserscad_clj
: My modifications to the scad-clj library (simplifies outputting scad code)
lib
: Components and methods used by the frontendproto
: Protobuf definitions
About
Generate Dactyl keyboard designs from your browser.