# picam3
Raspberry Pi case for HQ camera and miniPiTFT screen
# Running
The jscad project picam3
uses gulp to create a dist/picam3.jscad
file and watches your source for changes. You can drag the dist/picam3.jscad
directory into the drop area on openjscad.org (opens new window). Make sure you check Auto Reload
and any time you save, gulp creates the dist/picam3.jscad
file, and your model should refresh.
# start
npm start
or npm run start
will launch gulp, and create dist/picam3.jscad
. It also watches for file changes and recreates the dist file.
# clean
Deletes the dist
directory when you run npm run clean
.
# inject
Run gulp to combine the source files and inject the dependent libraries with npm run inject
. Libraries are found using a gulp plugin that looks for a jscad.json
file in a package. These files are combined and minimized before injecting into the dist file.
# build
Build the vuepress (opens new window) static site by running npm run build
. This script combines the readme with a vue-openjscad (opens new window) component to display a live view of the model. The baseUrl (opens new window) is set with the BASEPATH
environment variable. It defaults to /picam3/
. When hosted on GitLab (opens new window), the .gitlab-ci.yml
CICD file uses this script to publish to GitLab Pages (opens new window).
See the vue-openjscad (opens new window) package for information on modifying options like the grid or initial camera position.
# serve
Run vuepress (opens new window) in dev mode with npm run serve
. This script watches for file changes and hot reloads changes made to the README file. Changes to the model are not automatically reloaded; a manual reload is required.
# jscad-utils
The example project uses jscad-utils (opens new window). These utilities are a set of utilities that make object creation and alignment easier. To remove it, npm uninstall --save jscad-utils
, and remove the
util.init(CSG);
line in picam3.jscad
.
# Other libraries
You can search NPM (opens new window) for other jscad libraries. Installing them with NPM and running gulp
should create a dist/picam3.jscad
will all dependencies injected into the file.
For example, to load a RaspberryPi jscad library (opens new window) and show a Raspberry Pi Model B, install jscad-raspberrypi using npm install --save jscad-raspberrypi
. Then return a combined BPlus
group from the main()
function.
main() {
util.init(CSG);
return RaspberryPi.BPlus().combine();
}
// ********************************************************
// Other jscad libraries are injected here. Do not remove.
// Install jscad libraries using NPM
// ********************************************************
// include:js
// endinject
# OpenJSCAD.org
If you publish the dist/picam3.jscad
file, you can open it directly in
openjscad.org (opens new window) by using the following URL:
http://openjscad.org/#
+ the url to your file.
# Gist
You can save your file to a GitHub gist (opens new window) and append the URL to the raw gist.
# Gitlab Snippet
If you save to a gitlab public snippet, you can open it using the following URL:
https://openjscad.org/#https://gitlab.com/snippets/1795323/raw.jscad (opens new window)
Make sure you change the snippet id to the correct value and add .jscad
at the end.