{
  "schema_version": 1,
  "type": "skill",
  "slug": "basic-3d-viewer",
  "title": "Basic3dView",
  "brief": "Minimal GLB 3D viewer for the Adom Viewer — renders GLB files exactly as-is with zero post-processing. No material fixups, no overlays, no camera tours. Includes toolbar (ground, wireframe, axes, meas",
  "version": "1.0.0",
  "tags": [],
  "license": "MIT",
  "source_path": "SKILL.md",
  "readme": "## What It Does\n\nBasic3dView is a stripped-down Babylon.js 3D viewer that shows GLB files exactly as the file contains them. No material fixups, no laser etch markings, no synthetic pad overlays, no FR4 detection, no cinematic camera tours.\n\n### Why?\n\nThe full 3dView applies material fixup (dark body, silver leads, copper pads), laser etch markings, synthetic pad overlays, FR4 detection, and cinematic camera tours. This is great for presentation but makes it hard to debug what the raw GLB actually contains. Basic3dView fills that gap — use it for testing, comparison, and raw inspection.\n\n## Usage\n\n### MCP Tool\n\n```\nav_basic_3d_display({ glb_path: \"/path/to/model.glb\", title: \"My Part\" })\n```\n\n### Drag & Drop\n\nOpen the Adom Viewer and drag any `.glb` or `.gltf` file directly onto the viewer.\n\n### HTTP API\n\n```bash\n# Step 1: Copy GLB to serving directory\nSERVE=$(curl -s -X POST http://localhost:8771/api \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"serve_glb\",\"glbPath\":\"/path/to/model.glb\"}')\n\n# Step 2: Extract the URL\nGLB_URL=$(echo \"$SERVE\" | python3 -c 'import sys,json; print(json.load(sys.stdin)[\"glbUrl\"])')\n\n# Step 3: Display in Basic3dView\ncurl -s -X POST http://localhost:8771/api \\\n  -H 'Content-Type: application/json' \\\n  -d \"{\\\"action\\\":\\\"show_basic_3d\\\",\\\"modelUrl\\\":\\\"$GLB_URL\\\",\\\"options\\\":{\\\"title\\\":\\\"My Component\\\"}}\"\n```\n\n## Toolbar\n\n| Button | Feature | Default |\n|--------|---------|---------|\n| Home | Reset camera to initial position | — |\n| Frame | Zoom to fit model | — |\n| Ground | Toggle ground plane | ON |\n| Wireframe | Toggle wireframe rendering on all meshes | OFF |\n| Axes | Toggle XYZ axis lines (R=X, G=Y, B=Z) | OFF |\n| Measure | Measure distance between two points (mm) | OFF |\n| Meshes | Open mesh list panel (draggable) | OFF |\n\n### Mesh Panel\n\nThe mesh list panel shows all meshes in the loaded model with per-mesh controls:\n\n- **Eye toggle** — show/hide individual meshes. Hidden meshes show a strikethrough name and dimmed eye icon. Useful for isolating specific parts of a model (e.g. show only wheels, hide body).\n- **Axis toggle** — show/hide RGB origin axes at the mesh's local pivot point (R=X, G=Y, B=Z) with a white dot at the origin. Useful for verifying rotation pivots (e.g. wheel axles). Axis length auto-scales to 30% of the mesh's bounding diagonal.\n- **Draggable** — grab the \"Meshes\" header to drag the panel anywhere in the viewport.\n\nThe panel state (visibility, axes) is reflected in `av_capture` composite screenshots.\n\n### Measure Tool\n\nClick the ruler icon to enter measure mode (cursor becomes crosshair). Click a first point on the model (teal marker), then click a second point — a white measurement line appears with a floating mm label at the midpoint. The label tracks the camera as you orbit. Press **Escape** to exit measure mode and clear the measurement.\n\n## Programmatic Control\n\nToggle toolbar features, set camera angles, captions, and fill colors remotely — useful for automated screenshots or scripted demos.\n\n```bash\n# Toggle a toolbar button\ncurl -s -X POST http://localhost:8771/api \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"basic3d_toggle\",\"name\":\"wireframe\"}'\n\n# Set camera angle\ncurl -s -X POST http://localhost:8771/api \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"basic3d_set_camera\",\"alpha\":-2.5,\"beta\":1.0}'\n\n# Set caption text (shown above the info bar)\ncurl -s -X POST http://localhost:8771/api \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"basic3d_set_caption\",\"text\":\"Description here\"}'\n\n# Red-box calibration (fill iframe for pixel-perfect screenshot cropping)\ncurl -s -X POST http://localhost:8771/api \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"action\":\"basic3d_fill\",\"color\":\"#FF0000\"}'\n```\n\nToggle names: `ground`, `wireframe`, `axes`, `measure`, `meshes`\n\n### Mesh Visibility Control\n\n```bash\n# Hide meshes by name substring\ncurl -s -X POST http://localhost:8771 -H 'Content-Type: application/json' -d '{\n  \"action\": \"post_message\",\n  \"message\": {\"type\":\"mesh_visibility\",\"match\":\"body\",\"visible\":false}\n}'\n\n# Solo mode — show only matching meshes, hide all others\ncurl -s -X POST http://localhost:8771 -H 'Content-Type: application/json' -d '{\n  \"action\": \"post_message\",\n  \"message\": {\"type\":\"mesh_visibility\",\"match\":\"wheel\",\"solo\":true}\n}'\n\n# Show all meshes again\ncurl -s -X POST http://localhost:8771 -H 'Content-Type: application/json' -d '{\n  \"action\": \"post_message\",\n  \"message\": {\"type\":\"mesh_show_all\"}\n}'\n```\n\n### Remote Measure\n\n```bash\n# Place measurement between two 3D points (coordinates in GLB meters)\ncurl -s -X POST http://localhost:8771 -H 'Content-Type: application/json' -d '{\n  \"action\": \"post_message\",\n  \"message\": {\"type\":\"measure\",\"pointA\":{\"x\":-0.0025,\"y\":-0.002,\"z\":0.001},\"pointB\":{\"x\":0.0025,\"y\":0.002,\"z\":0.001}}\n}'\n\n# Clear measurement\ncurl -s -X POST http://localhost:8771 -H 'Content-Type: application/json' -d '{\n  \"action\": \"post_message\",\n  \"message\": {\"type\":\"clear_measure\"}\n}'\n```\n\n## Info Bar\n\nThe bottom info bar shows:\n- Model filename, bounding box (W x D x H mm), mesh count, and vertex count (left)\n- **Basic3dView** label (right) — identifies this viewer\n\n## When to Use This vs Other Viewers\n\n| Viewer | Use Case |\n|--------|----------|\n| **Basic3dView** (this) | Raw GLB inspection — no transforms, no overlays, testing/comparison |\n| **3dView** (`av_3d_display`) | Full 3D with material fixup, laser etch, pad highlighting, camera tour |\n| **Fp3dView** (`fp-to-3d.js`) | Footprint pad geometry: copper shapes, dimensions, land pattern |\n| **LibView** (`av_library_review`) | Complete library review: symbol + footprint + 3D side-by-side |",
  "author": {
    "id": "695820315b5f1e4db2fcf602",
    "name": "Kyle Bergstedt",
    "email": "[email protected]"
  },
  "visibility": {
    "public": true
  },
  "hero": null,
  "sample_prompts": [],
  "discovery_triggers": [],
  "discovery_pitch": null,
  "metadata": {},
  "created_at": "2026-05-28T05:30:14.436Z",
  "updated_at": "2026-05-28T05:30:14.436Z",
  "sub_skills": [],
  "parent_app": null
}