GeometryViewer API Reference ============================= Custom element: geometry-viewer CDN: https://geometryviewer.com/geometryviewer.js Version: 3.1 INTEGRATIONS ------------ Web viewer https://geometryviewer.com — drag-and-drop, no install, no login Android app Google Play TWA — opens files from file manager/email, AR on device Embed Two-line snippet, any site (Shopify, WordPress, Webflow, plain HTML) ModelDirectory https://modeldirectory.org — every model page uses ATTRIBUTES ---------- src string URL of model file to load on mount. Reactive — changing src re-loads. ar boolean Enable AR. WebXR (Android), Quick Look (iOS). No-op on desktop (shows hint). controls boolean Render built-in toolbar: solid view, wireframe, reset camera, fullscreen. METHODS ------- loadBuffer(buffer: ArrayBuffer, format?: string) → void Load a model from an ArrayBuffer. format defaults to 'auto' (magic-byte detection). Valid formats: 'stl' | 'obj' | 'gltf' | 'glb' | '3mf' | 'auto' setWireframe(on: boolean) → void Toggle wireframe rendering on all meshes in the current model. resetCamera() → void Return camera to default orbit position. Also re-enables auto-rotate. resize() → void Force recalculation of canvas dimensions. Call after programmatic container resize. EVENTS ------ gv-loaded CustomEvent Fires when model finishes loading and is visible. Bubbles. gv-error CustomEvent Fires on parse or fetch error. event.detail = Error. Bubbles. DEEP LINK --------- Pattern: https://geometryviewer.com/?url=ENCODED_URL Example: https://geometryviewer.com/?url=https%3A%2F%2Fexample.com%2Fproduct.glb Notes: Model must be CORS-accessible. Supports all 5 formats. No auth required. FORMATS ------- STL ASCII and binary. Auto-detected. Mesh repair recommended for STL from slicers. OBJ Text format. MTL material files not supported; blue default material applied. GLTF JSON format with external refs. Units: meters (converted to mm for AR labels). GLB Binary GLTF. Single-file. PBR materials and textures fully rendered. 3MF ZIP-based. Multi-part assemblies. Each component positioned and colored. AR BEHAVIOUR ------------ Android WebXR immersive-ar session. Hit-test surface detection. Tap to place. Pinch to scale, drag to rotate after placement. Light estimation at 2fps. iOS USDZ generated at load time. Quick Look opens natively in Safari. Desktop No AR session. Pill hint displayed: "View in AR — open on your phone". LICENSE ------- Proprietary. Copyright (c) 2026 PrintShaper. All rights reserved. Use permitted for embedding via official CDN only. Redistribution, self-hosting, modification: prohibited without commercial license. Inquiries: hello@geometryviewer.com