A collection of OpenJSCAD 3D designs
https://danmarshall.github.io/jscad-gallery
This project uses Jekyll to create a web site that you can host on GitHub pages.
- Fork this repo.
- On your fork's GitHub page, go to Settings.
- On the Settings page, scroll to the GitHub Pages section, and enable it on your master branch.
- In about one minute, visit
https://your-github-username.github.io/jscad-gallery/
to see your personal jsad-gallery.
- Install Jekyll
- Clone your fork on your local machine.
- cd to your
jscad-gallery
clone's folder npm install
jekyll serve
- See your local site on http://localhost:4000
-
Install your package:
npm install your-package-name
or, if you aren't published to NPM:
npm install your-git-remote-url
-
Generate your design files:
npm run build-design your-package-name
-
npm run build-jscad path-to-your-jscad-file.jscad
Note - this will convert your .jscad file to a Node.js module. Look in your
node_modules/@jscad-gallery
folder.If you would like to edit your design's metadata, change the
node_modules/@jscad-gallery/your-package-name/package.json
file. You can then regenerate the new Node.js module directly by callingnpm run build-design @jscad-gallery/your-jscad-package-name
as above.
After invoking either type of command above, a temporary local web page will appear. Follow the instructions to create a thumbnail image and post metadata. You may need to close all browser tabs to complete the process.
This will create 4 files that enable your jscad design on the site:
browser_modules/your-package-name/version-number.js
- The browserified executable module that creates your 3D design.browser_modules/your-package-name/compact-binary.js
- The cached 3D solid data for a quick preview rendering of your design in the jscad viewer.browser_modules/your-package-name/thumbnail.png
- A thumbnail image of your design._posts/yyyy-mm-dd-your-package-name.md
- The Jekyll database entry for your design.
Refresh your http://localhost:4000 to see your design on the site.
-
Stage your local changes:
git add .
-
Commit your local changes:
git commit -m "added your-package-name"
-
Push to your remote fork:
git push
In about a minute, your design will be live on your site at https://your-github-username.github.io/jscad-gallery/