GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing modelviewer.2plot.dev — dash-model-viewer | Migrating from 0.0.1 Migrating from 0.0.1
Why a clean break1.0.0 is not a compatible upgrade. That is a deliberate decision rather than an oversight, and the argument for the other choice was real: the package had roughly 253 downloads a month, and a deprecating wrapper would have cost little. What tipped it was that the parts most in need of changing — hotspots, AR defaults, and the complete absence of output props — could not be fixed while preserving the old surface. A compatibility layer would have frozen the exact shapes that made the component hard to use. So: rename, and say so loudly. Side by side
Prop map
Hotspot dictionaries →
|
| Old key | New |
|---|---|
slot | Slot(slot=...) |
position | Slot(position=...) |
normal | Slot(normal=...) |
text | Slot(children="...") — or any component |
children_classname | Slot(class_name=...) |
orbit / target / fov | A callback on Slot.n_clicks writing the camera props |
The last row is the significant one. Camera-preset hotspots used to be declared inside the hotspot dict and handled invisibly by the component's JavaScript. They are now an ordinary callback, which means you can log them, animate them, gate them on auth, or compute them — see Camera and views.
If you copied the 0.0.1 examples you will have an assets/model_viewer_clientside.js and a clientside_callback for anything the component could not report. All of it is replaceable:
| You were doing this in JS | Now |
|---|---|
Reading getCameraOrbit() into a dcc.Store | Input("viewer", "camera") |
getDimensions() for a bounding box | Input("viewer", "model_info") |
availableVariants for a dropdown | model_info["variants"] |
Listening for load / progress | Input("viewer", "model_state") |
Listening for ar-status / ar-tracking | ar_status / ar_tracking |
positionAndNormalFromPoint() on click | pick_on_click=True → scene_point |
| Wiring hotspot clicks | Slot.n_clicks |
Worth calling out separately because it changes behaviour silently rather than loudly. 0.0.1 shipped:
arModes = "basic_annotations scene-viewer quick-look"
basic_annotations is not an AR mode — it was a folder name in usage_tests/. webxr was therefore absent, and in-page WebXR AR never ran in a default configuration. If your code explicitly set arModes, you were unaffected; if it did not, you were running without WebXR and had no way to know.
You can now delete any explicit ar_modes="webxr scene-viewer quick-look" — that is the default. See Augmented reality.
camera["source"] — removed in 1.0.0 before release. The shim reportscamera movement only for user interaction (that is the echo suppression which stops a callback writing camera_orbit from re-triggering itself), so source could only ever hold the single string "user-interaction". A key with one possible value tells a reader nothing, and reading it invited the belief that some other value was reachable. The payload is now {"orbit", "target", "field_of_view"}. The suppression itself is unchanged.
dash_model_viewer.DashModelViewer — renamed.package-info.json inside the package — __version__ now comes frominstalled metadata.
model-viewer 3.5.0 — the bundle ships in the wheelat 4.3.1. If you relied on the CDN behaviour, dmv.configure(use_cdn=True) restores it.
Source: /migrating