mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 22:24:17 +01:00
add a README.md
This commit is contained in:
45
README.md
45
README.md
@@ -1 +1,44 @@
|
|||||||
# Yet Another CAD Viewer
|
# Yet Another CAD Viewer
|
||||||
|
|
||||||
|
This is a CAD viewer capable of displaying [OCP](https://github.com/CadQuery/OCP)
|
||||||
|
models ([CadQuery](https://github.com/CadQuery/cadquery)/[Build123d](https://github.com/gumyr/build123d)/...)
|
||||||
|
in a web browser.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Cross-platform: works on any modern web browser.
|
||||||
|
- All [GLTF 2.0](https://www.khronos.org/gltf/) features (textures, PBR materials, animations...).
|
||||||
|
- All [model-viewer](https://modelviewer.dev/) features (smooth controls, augmented reality...).
|
||||||
|
- Load multiple models at once, load external models and even images as quads.
|
||||||
|
- View and interact with topological entities: faces, edges, vertices and locations.
|
||||||
|
- Control clipping planes and transparency of each model.
|
||||||
|
- Select any entity and measure bounding box size and distances.
|
||||||
|
- Fully-featured [static deployment](#static-deployment): just upload the viewer and models to your server.
|
||||||
|
- [Live lazy updates](#live-updates) while editing the CAD model (using the [yacv_server](yacv_server)).
|
||||||
|
|
||||||
|
## Usage & demo
|
||||||
|
|
||||||
|
The latest build is available at https://yeicor-3d.github.io/yet-another-cad-viewer/.
|
||||||
|
|
||||||
|
### Live updates
|
||||||
|
|
||||||
|
To see the live updates you will need to run the [yacv_server](yacv_server) and
|
||||||
|
open [the viewer](https://yeicor-3d.github.io/yet-another-cad-viewer/) with
|
||||||
|
the `preloadModels=ws://<host>:32323/` query parameter (by default it already tries localhost).
|
||||||
|
|
||||||
|
Note that [yacv_server](yacv_server) also hosts the frontend at `http://localhost:32323/` if you have no access to the
|
||||||
|
internet.
|
||||||
|
|
||||||
|
### Static deployment
|
||||||
|
|
||||||
|
To deploy the viewer and models as a static website you can simply copy the latest build directory to your server.
|
||||||
|
To load models use the `preloadModels=...` query parameter in the URL.
|
||||||
|
It can be set multiple times to load multiple models.
|
||||||
|
|
||||||
|
Note that you can simply reuse the [main deployment](https://yeicor-3d.github.io/yet-another-cad-viewer/) and host only
|
||||||
|
your own models (linking them from the viewer with the `preloadModels` query parameter).
|
||||||
|
|
||||||
|
To see a working example of a static deployment you can check out
|
||||||
|
the [demo](https://yeicor-3d.github.io/yet-another-cad-viewer/?preloadModels=base.glb&preloadModels=fox.glb&preloadModels=img.jpg.glb&preloadModels=location.glb).
|
||||||
|
|
||||||
|

|
||||||
|
|||||||
BIN
assets/screenshot.png
Normal file
BIN
assets/screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 308 KiB |
@@ -14,7 +14,7 @@ export const settings = {
|
|||||||
],
|
],
|
||||||
displayLoadingEveryMs: 1000, /* How often to display partially loaded models */
|
displayLoadingEveryMs: 1000, /* How often to display partially loaded models */
|
||||||
monitorEveryMs: 100,
|
monitorEveryMs: 100,
|
||||||
monitorOpenTimeoutMs: 10000,
|
monitorOpenTimeoutMs: 100,
|
||||||
// ModelViewer settings
|
// ModelViewer settings
|
||||||
autoplay: true,
|
autoplay: true,
|
||||||
arModes: 'webxr scene-viewer quick-look',
|
arModes: 'webxr scene-viewer quick-look',
|
||||||
|
|||||||
Reference in New Issue
Block a user