Skip to content

prusa3d/ColorMix-Shading

Repository files navigation

ColorMix Shading

Client-side STL/OBJ color-material preview and 3MF export tool.

Live demo: prusa3d.github.io/Color-Mix-Shading

ColorMix Shading preview

Static Deployment

This app is a Vite React single-page app. Build it with:

npm run build

The production output is written to dist/. The Vite config uses base: './' so generated asset URLs are relative and work on static hosts, including deployments served from a subpath.

Vercel

  • Framework preset: Vite
  • Build command: npm run build
  • Output directory: dist

Netlify

  • Build command: npm run build
  • Publish directory: dist

Cloudflare Pages

  • Framework preset: Vite
  • Build command: npm run build
  • Build output directory: dist

GitHub Pages

A workflow at .github/workflows/deploy-pages.yml builds and deploys to GitHub Pages on every push to main (and can also be run manually via the Actions tab).

One-time setup (requires repo admin):

  1. Open the repo on GitHub → SettingsPages.
  2. Under Build and deploymentSource, choose GitHub Actions.
  3. Push to main (or run the Deploy to GitHub Pages workflow manually from the Actions tab) to trigger the first deploy.
  4. Once the workflow completes, the site URL appears at the top of the Pages settings page and on the github-pages environment.

The Vite base: './' setting means the build works whether Pages serves the site from the root domain or a /<repo>/ subpath, so no extra config is needed.

Production Runtime

The deployed app does not need a Node.js runtime. Node is only required during install/build. Mesh parsing, preview rendering, material assignment, and 3MF packaging all run in the browser.

License

Released under the MIT License.

About

A simple web app that takes STLs for 3D printing and applies realistic highlights and shadows based on virtual light in the scene. Intended to work with Prusa ColorMix (in PrusaSlicer and EasyPrint), which allows for mid tones by combining two base colors.

Topics

Resources

License

Stars

Watchers

Forks

Contributors