{"id":28441077,"url":"https://github.com/lf94/summonscript","last_synced_at":"2025-06-14T03:36:12.798Z","repository":{"id":150540755,"uuid":"608983489","full_name":"lf94/summonscript","owner":"lf94","description":"Manifest manifold models with magical machinations.","archived":false,"fork":false,"pushed_at":"2024-11-27T01:43:51.000Z","size":1301,"stargazers_count":38,"open_issues_count":11,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-12T19:54:52.403Z","etag":null,"topics":["3d","cad","codecad","modeling","sdf"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lf94.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-03T05:58:28.000Z","updated_at":"2024-12-12T04:28:54.000Z","dependencies_parsed_at":"2023-09-25T03:03:59.372Z","dependency_job_id":null,"html_url":"https://github.com/lf94/summonscript","commit_stats":null,"previous_names":["lf94/summonscript"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lf94/summonscript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lf94%2Fsummonscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lf94%2Fsummonscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lf94%2Fsummonscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lf94%2Fsummonscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lf94","download_url":"https://codeload.github.com/lf94/summonscript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lf94%2Fsummonscript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259755531,"owners_count":22906582,"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":["3d","cad","codecad","modeling","sdf"],"created_at":"2025-06-06T04:08:51.545Z","updated_at":"2025-06-14T03:36:12.793Z","avatar_url":"https://github.com/lf94.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SummonScript\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"320\" src=\"/logo.png\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eManifest manifold models with magical machinations.\u003c/p\u003e\n\u003cp align=\"center\"\u003eIn other words: use code to model objects.\u003c/p\u003e\n\n## Features\n\n* Use code (JavaScript) to describe models\n* Compatible with any text editor\n* Streaming mesh viewer for a tight feedback loop\n* Forever non-breaking version changes\n* Small technology stack\n* Has a fun theme around magic :D\n* Can possibly make you feel like a young programmer again? :ooo\n\n## Screenshots\n\n![Repeating cubes in a circle](/repeat.png)\n![A gear](/gear.png)\n![A sphere with surface details](/gyroid.png)\n\n## Demos\n\n* Overview: https://youtu.be/kqYgkv2R5Ig\n* Gear case study: https://youtu.be/mS1kLKEyC1g\n* Surface level details: https://youtu.be/o58s1bPI1ZA\n\n## Installation\n\nYou'll need to gather four ingredients: NodeJS 0.19, Zig 0.11, raylib and libfive.\n\nHonestly the versions of these shouldn't matter *too* much.\n\nI suggest searching how to install all of these, as their instructions could\nchange at any time, or could be easier for your platform of choice.\n\nI apologize I don't follow the defacto expectation of binaries being available.\nI have reasons for this but they aren't important to mention here.\n\n---\n\nAfter installing those, run `npm install` so it can install koffi, the FFI\nbinding package. (Imagine that, a single JS dependency for this project :)\n\nFinally, go into `4_viewer/` and build it with `zig build`. The binary is output\nto `zig-out/` so feel free to install it anywhere.\n\nYou have completed the first leg of your journey.\n\n## Usage\n\nYou're going to want to start the viewer first so you can see something.\n\nThe default view is just a white window.\n\nHead on over to `1_tutorial/`. Then check out `2_examples/` and maybe run a couple.\n\nTo run anything, you run it like an ordinary JavaScript file: `node file.js`\n\nAnd that's literally all to it.\n\nHow you want to setup the rest of your environment is completely up to you.\nFor example, in my editor, I type `:cad` and it starts the viewer and opens a\nnew file. On save, it runs the script so the viewer updates. On quit it'll close\nthe viewer too.\n\n## Community\n\nUse GitHub Issues for basically everything.\n\nIf you want more personal communication, come see us in\n[irc.libera.chat #summonscript](https://web.libera.chat/).\n\n## Calling all math wizards and math witches\n\nSDFs are not easy. If you come up with any useful SDFs please consider\ncontributing them! I would love to merge them in. You will see my threshold for\nmerging is very liberal. I care most of all that code CAD is successful, and I\nneed all the help I can get my hands on.\n\n## Background\n\nThis system falls into the realm of [code CAD](https://learn.cadhub.xyz/blog/curated-code-cad/).\n\nWhy another code CAD system? Simple, because systems like OpenSCAD, Cadquery, replicad,\nand basically everything else cannot describe or handle complex models without\nbringing your computer to its knees.\n\nHow am I able to offer something better? By sitting on the shoulder's of giants.\n\nSummonScript is based on SDFs, Signed Distance Fields, a subject which is continually\ngrowing in popularity year over year. It uses libfive to turn these mystical mathematical\nobjects into meshes.\n\nThe language the models are in is JavaScript. No, this doesn't mean code is run\nin web browsers. I have intentionally kept SummonScript a desktop-first technology\nin order to maintain a low tech (low-tech? :) stack. In theory as long as the OS\ncan run NodeJS, SummonScript will run there. Pretty sick right?\n\nThe last puzzle piece was being able to use any text editor to write code and\nbeing able to see the changes quickly. This involved designing a 3D viewer in Zig\nthat uses a UNIX socket to read mesh data from SummonScripts. It's very small and\nwill continue to be. Any other code CAD systems are free to use this as well. It\nremains quick even on complex models because it uses progressive rendering.\n\n## I am looking for businesses who want to try code CAD!\n\nAs a testament to code CAD, I would absolutely love to put code CAD to real\nwork. I'm looking for anyone in particular that would have designed something\nwith traditional CAD, but is willing to put some faith into code CAD.\n\nI will do an evaluation on how much work it would take and what it would cost.\n\nI will also consult fellow code CAD enthusiasts.\n\nYour final CAD product will be put on display here as a seminal case study in\nthe strengths and weaknesses of code CAD.\n\n## Thanks\n\nI would like to first thank those individuals who have created amazing technology\nthat is completely free. In particular this is a shoutout to mkeeter (libfive),\nKoromix (koffi), raysan5 (raylib), the  Zig team, the V8 team, and\nInigo Quilez (SDFs). Without any one of these people, this project would\nprobably not exist.\n\nNext I would sincerely like to thank all of the people in the code CAD space who\nhave given their time to me over the years. I will most likely forget to mention\nsomeone, so please let me know if I've missed you.\n\n* The OpenSCAD team (special thanks to InPhase)\n* Doug Moen\n* #openscad on libera\n* replicad team\n* CadQuery team\n* my partner who's had to deal with me asking \"come look!\" a million times :D\n* my friends who had to suffer similarly\n* rask (code, knowledge contributions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flf94%2Fsummonscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flf94%2Fsummonscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flf94%2Fsummonscript/lists"}