create-jscad-project

1.1.5 • Public • Published

Create JsCad Project

Introduction

An NPX starter template designed to kickstart your JsCad projects using TypeScript and Hot Reload preview. This tool simplifies the process of setting up a JsCad project, allowing you to focus on creating fully parametric CAD drawings with ease.

Demo GIF

Features

  • 🚀 Easy Setup: Initialize your JsCad project with a single command.
  • 💻 TypeScript Support: Leverage the power of TypeScript for more robust code.
  • 🔁 Hot Reload Preview: Instantly view changes in your CAD design as you code.
  • 🔧 Automatic Interactive Controls: If you define parameters in your design, the viewport will render interactive controls that can be changed in the UI.
  • 📁 Automated Structure and Dependency Management: Automatically creates the necessary folder structure and installs dependencies.
  • 🎨 Focus on Design: Spend more time designing and less on setup.
  • 🛠️ Integrated VSCode Experience: Recommended extensions and launch configurations for a seamless development experience.
  • 📤 Advanced Export Options: Export your designs to X3D, 3MF, and SVG formats.

Like this project? ❤

Please consider:

Getting Started

Prerequisites

Ensure you have Node.js installed on your system to use npm or npx.

Installation

To create a new JsCad project, run the following command in your terminal:

npm init jscad-project <your-project-name>

or

npx create-jscad-project <your-project-name>

This command will create a new directory with your project name, set up the folder structure, and install all the necessary dependencies.

Templates

To use a specific template, pass the --template argument when creating a new project. For example:

npm init jscad-project <your-project-name> -- --template=screw-and-nut

To list available templates you can run:

npx create-jscad-project --list-templates

There are currently two templates available:

  • default: A blank canvas for whatever project you're working on.
  • screw-and-nut: Contains a screw and nut for you to play with.

More templates will be added soon, hopefully by contributors too!

VSCode Integration

  • Recommended Extensions: The generated .vscode directory contains recommendations for helpful extensions. Please review and install them to enhance your development experience.
  • Launch Configuration: Use the "Launch JsCad" configuration in the Run and Debug section of VSCode. This will open the drawing.ts file, run npm run dev, and open the preview browser.
    • Note: The first time you run this, the preview browser may initially display a white screen. Please wait until the debug output indicates that it's safe to reload the simple browser panel.

Alternatively - Development in other IDEs

If you are NOT using VSCode, or if you'd rather run the dev environment manually, then, after setting up your project, navigate to your project directory and start the development server:

cd <your-project-name>
npm run dev

Preview and Export

  • In the preview window, you have the option to export your designs to X3D and 3MF file formats.
  • To export to SVG, project any parts into 2D and ensure the "Projection" checkbox is turned on.

Related Projects and Resources

create-jscad-project is built upon and inspired by the capabilities of JSCAD. Here are some resources and related projects that can enhance your experience with JsCad:

  • JSCAD: The core framework upon which this project is based. For more information and documentation, visit JSCAD's Github.

  • JsCad Cheat Sheet: A handy guide for quick reference to JsCad syntax and features. Perfect for beginners and experienced users alike. Check out the JsCad Cheat Sheet.

  • Parametric Polysphericon Design Tutorial: Dive into a practical example of parametric design with JSCAD in this informative YouTube video by CodeDoodle. Watch the Parametric Polysphericon Design using JSCAD for insights and inspiration.

Contributing

Contributions are welcome! Feel free to submit pull requests or open issues to improve create-jscad-project.

Contributors

jeanlescure springbov

License

This project is licensed under the Apache-2.0.

Happy Designing with create-jscad-project!

Package Sidebar

Install

npm i create-jscad-project

Weekly Downloads

12

Version

1.1.5

License

Apache-2.0

Unpacked Size

566 kB

Total Files

63

Last publish

Collaborators

  • jeanlescure