Browse Learn topics

Learn/Shape Generator/Authoring & distribution

Editing workflow

At a glance

  • Open the shapes folder, edit the selected file, save, then hit Refresh to re-run setup()
  • Rename, describe, and categorize entirely from code—no parallel metadata files to keep in sync

The action row at the bottom of the Shape Generator dialog — Refresh, Edit, Open Folder, Import, Export — is the whole authoring loop. You can go from "this shape is almost right" to a customized version without leaving the app.

Edit in place

Select a shape and hit Edit to open it in JetCad3's built-in code editor with JavaScript highlighting, Save, and Save As. When you close the editor the shape list refreshes automatically: setup() re-runs, so a changed name, category, parameter, or default shows up immediately, and the live preview regenerates with your edited generate(). Everything the browser displays comes from the code — rename or recategorize a shape by editing two lines, with no sidecar metadata files to keep in sync.

Or use your own editor

Open Folder reveals the user shapes folder in your file manager. Edit there with whatever you normally write code in, save, and hit Refresh in the dialog to rebuild the list. A file that fails to load doesn't vanish — it's listed under an Invalid category with its error message, so a typo is a visible, clickable thing rather than a mystery. Dropping new .jshape files into the folder and refreshing is also a perfectly good way to install shapes in bulk.

Customizing a stock shape

Bundled shapes are refreshed from the app on upgrade: when a newer stock version ships, the copy with that filename in your shapes folder is updated. So before reworking a built-in, save a copy under a new filename in the shapes folder — files you name yourself are never touched. The stock files make excellent starting points; see Create & Share for the full API they're written against.