Releases: google/model-viewer
v3.0.1
Bug fixes
- Fixed
with-credentials, thanks @robertsLando! #4098 - Fixed updating hotspot's
data-surfaceattribute. #4099 - Fixed slow video texture framerate on Firefox. #4105
- Avoid lottie-web dependency errors, thanks @robertsLando! #4108
- Fixed Lottie textures not updating. #4114
Examples
✨ Fixed animated hotspots example for iOS. #4107
✨ Fixed video textures example for Firefox. #4104
✨ Fixed Lottie textures example for Safari by demonstrating proper use of ES-module-shims. #4113
✨ Updated recommended CDN from unpkg to ajax. #4121
Other notable changes
- Updated default DRACO decoder to v1.5.6. #4115
- Updated fidelity comparison with v0.0.13 of three-gpu-pathtracer, thanks @gkjohnson! #4118
- Fixed Babylon.js renderings, thanks @Popov72! #4120, #4123
v3.0.0
✋Breaking Change
- The KHR_materials_pbrSpecularGlossiness extension is no longer supported (renders white), as it has been deprecated for more than a year. This should affect only a small number of our users, but we're giving it a major version to call attention. Our Editor now supports auto-converting any uploaded Spec-Gloss model losslessly to use the modern extensions. If you need to batch-convert, gltf-transform has an excellent utility function. #3997
Features
🆕 Added dynamic hotspots, which follow a point on the model's surface while it animates. These can be generated by the surfaceFromPoint method, which the editor now employs. #3981
🆕 Added animated texture support, for video, canvas2D, and Lottie animations, which can be loaded and applied to any texture slot using our materials API. #3886
Bug fixes
- Apply
with-credentialstoggle to all loaders. #4085 - 'camera-change' event now fires in AR (WebXR mode only). #4067
- Various element lifecycle fixes. #4048, #4046, #4043, #4041
- Fire
camera-changeevent at most once per animation frame. #4027 - Fix skybox and hotspots when an empty GLB is used. #4006
- Set texture anisotropy to 4 for improved oblique renders, thanks @hybridherbst! #4005
- Fix custom hash params interfering with USDZ auto-generation, thanks @milesgreen! #4004
- Make WebXR work on the Quest 2, thanks @cabanier! #3984
Examples
✨ Added animated hotspots example, which also demonstrates animated SVG pointers. #3981
✨ Added animated textures example. #3886
✨ Updated dimensions example to be more performant. #4027
Other notable changes
- Upgraded to Three.js r149
- Added three-gpu-pathtracer to render fidelity comparison, thanks @gkjohnson! #3496
- Added new glTF sample models to fidelity comparison, thanks @gkjohnson! #4069, #4070
- Fixed the fidelity page image comparison tool. #4074
- Added Stellar path-traced renders of new models, thanks @bsdorra! #4078
- Rearranged modelviewer.dev and added an FAQ page. #4011, #4012
Editor
v2.1.1
v2.1.0
Features
🆕 Added queryHotspot() method to enable complex dynamic annotations linked to the scene, thanks @jukibom! #3844
🆕 Re-added interaction-prompt-style which was removed during the v2.0 cleanup, but was returned by popular demand. #3880
🆕 Enabled CSS-style color strings as input to setBaseColorFactor and setEmissiveFactor, giving automatic conversion of sRGB color values. #3931
Bug fixes
- Workaround for
quick-look-button-tappedevent not being fired on iOS 16, thanks @milesgreen! #3850 - When specifying the
variant-nameattribute, the default variant no longer blinks in during load. #3864 - Fixed some memory leaks when creating and destroying
<model-viewer>elements. #3927 - Cleaned up docs titles, thanks @jessej-samuel! #3832
Examples
✨ Updated the Dimensions example to demonstrate SVG dimension lines using queryHotspot(), thanks @jukibom! #3844
✨ Simplified the Change Color example by setting CSS color strings directly. #3931
Other notable changes
- Upgraded to Three.js r146
Editor
v2.0.2
v2.0.1
v2.0.0
We have been carefully following semantic versioning rules to avoid breaking changes for our diverse user base, but this has caused parts of our API to become less beginner-friendly as our newer best-practices have not become defaults. The time has come to reset with a v2.0 release!
The API simplifications have also allowed us to clean up our code base, easing maintenance and reducing the likelihood of future bugs.
To be clear, we still want to make updating to v2.0 easy for our users, so we're changing features that are little-used or will improve the experience on most sites. The changes to defaults can be overridden by specifying attribute values. Regeneration of poster images is strongly recommended. See discussion in #3460.
✋Breaking Changes
Updated Defaults
- Minimum radius is doubled to match the
enable-pandefault, with default field-of-view narrowed to 30 degrees (12 degree default minimum). This gives the default framing a "longer lens" with reduced perspective warp: #3668 - Default
enable-panto true, replacing theenable-panattribute withdisable-pan. Also addeddisable-tapattribute: #3713 - Switch
touch-actiondefault frompan-ytonone: #3712 - Switch default
environment-imagetoneutral, renaming the current default aslegacy: #3676 - Enable USDZ autogeneration by default, by switching the
ar-modesdefault towebxr scene-viewer quick-look: #3802
API Simplification
- Remove the 'bounds' attribute, making the behavior equivalent to
bounds="tight": #3683 - Remove the deprecated
scene-graph-readyevent: #3700 - Remove the
progress-mask; equivalent to setting its part todisplay: none;. This will keep the poster from appearing lightened during loading: #3692 - Remove the "interaction" option from the
revealattribute. Use "manual" anddismissPoster()instead to achieve this behavior: #3688 - Remove the
interaction-policyattribute, allowing only the default "always-allow" behavior: #3686 - Remove the "when-focused" option from the
interaction-promptattribute: #3687 - Remove the
interaction-prompt-styleattribute, allowing only the default "wiggle" behavior: #3685 - Remove
--poster-color, making the poster always have a transparent background: #3701 - Remove the
seamless-posterattribute, making the behavior as though this option is always enabled. Note this in combination with the previous bullet means there is no longer a transition fade between poster and model, so seamless posters as generated bytoBlob({idealAspect: true})or our editor are strongly recommended: #3704 - Remove the
Image.setURImethod from our materials API. Use thecreateTexturemethod instead: #3710 - Update
exportSceneoptions to match three.js r143. Specifically, removeembedImages(always true now) andforcePowerOfTwoTextures. AddforceIndices: #3711 - Remove
preloadevent, as there is no longer any distinction from theloadevent: #3799
TypeScript Updates
- Switch our
package.jsonmoduleto point tolibinstead ofdist. For JS users,mainwill still point to our bundle indist, but this change will send TS users to our lib so they can build and tree-shake it themselves, which is best practice. Also, our lib already contains all our*.d.tsfiles: #3718 - Add
typespointers topackage.jsonas well as a fallbackmodel-viewer.d.tsbundled types file, thanks @subhankar-trisetra! #3774, #3791
Features
🆕 Added External Renderer API to drive e.g. cloud-based or path-tracing renderers: #3482
🆕 Added Material API documentation: #3493
🆕 Added keyboard controls for pan, thanks @clochardM33! #3702
🆕 Added inputSensitivity property: #3719
🆕 Added getBoundingBoxCenter: #3734
Bugfixes
- Move the Exit AR button to the safe zone, thanks @yuta-hayashi! #3464
- Fix fractional pixel sizes causing some blurring, thanks @bcairns! #3555
- Fix
positionAndNormalFromPoint()hitting the floor plane: #3599 - Fix skybox shown in AR when switching
src: #3606 - Fix docs page build failure, thanks @demarijm! #3696
- Ensure the 'load' event fires after the pixels are properly rendered: #3702
- Make JS camera changes cancel interaction prompts and add "automatic" to
camera-changeevent: #3717 - Improve WebXR wall-placement UX: #3736
- Fix
errorevent detail: #3742 - Fix
revealchanges causing rendering breakage: #3745 - Ensure dynamic render scaling always returns to full-res when the model stops moving: #3752
- Ensure
exportSceneis includingscale/orientationchanges: #3772 - Fix iOS AR feature detection for WebViews and iOS16, thanks @milesgreen! #3784
- Fix bounds calculation for quantized models: #3768
Other notable changes
- Updated to Three.js r144
- Dynamic render scaling is now less aggressive, targeting 15-20 fps before down-sampling
- Various loading performance improvements
v1.12.0
Features
🆕 Added interact() method to create synthetic touch gestures that move the model; ideal for creating custom interaction prompts for rotation, zoom, and pan. #3320
🆕 Added 'poster-dismissed` event. Technically it's not new, but was undocumented.
Bug fixes
- Fixed ImageBitmap memory leak. #3399
- Fixed model cache, which was not properly caching GPU memory. #3417
- Fixed glTFs with unused extra texture coordinates rendering incorrectly. #3426
- Ensure the
camera-changeevent is also fired forcamera-targetchanges. #3427 - Updated criteria for detecting baked shadow planes (unlit no longer required). #3431
Examples
✨ Added a custom prompt example to demonstrate interact() and the finger slots. #3320
✨ Fixed zoom sensitivity in the camera views example. #3356
Other notable changes
v1.11.1
Bug fixes
- Fixed a pause/play animation regression: #3349
- Fixed a Windows morph target regression by pulling in three.js r139: #3350
- Tap in pan mode still recenters, but no longer zooms, by popular demand: #3351
- Keep pan sensitivity consistent across zoom levels: #3332
- Don't override user's
oncontextmenufunction: #3333 - Ensure the pan target appears and disappears correctly: #3354
v1.11.0
Features
🆕 Added enable-pan attribute for two-finger or right/meta-click drag, as well as tap recentering. Note that enable-pan also changes the default framing, which will likely become the overall default in v2.0. #3286, #3319
🆕 Improved soft shadows! API is unchanged, but the look is significantly nicer (and softer). Note: you may want to regenerate poster images. #3182
🆕 Added hasBakedShadow() method and we now automatically remove these shadow planes from framing computations and disable them when shadow-intensity is set > 0 to avoid double shadows. Baked shadows are identified as axis-aligned planes with unlit, transparent material. #3295
🆕 Added render-scale event, to get analytics on when your users are GPU-throttling. #3307
🆕 Added timeScale to control speed of animation or play in reverse. Thanks @futahei! #3129, #3304
🆕 Allow textures to have their name set. Thanks @slightHYP! #3175
🆕 Fall back to selection of animation by index if name is not found. Thanks @prefrontalcortex! #3225
🆕 Added with-credentials attribute to load non-public models. Thanks @ymoriaud! #3239
Bug fixes
- Turn off tone mapping for Unlit materials. #3152, #3232
- Stop camera-target from shifting the model in WebXR AR mode. Thanks @futahei! #3171
- Fix out of range mesh when assigning variant userData. Thanks @alexdaube! #3195
- Remove unnecessary async/await in TextureUtils. Thanks @sukolsak! #3212
- Various accessibility improvements, especially reducing distracting annoucements. #3262
- Maintain texture transforms when new textures are set. #3263
- Fixed bounding box computation for animated models. Only applies with
bounds="tight", which will become default in v2.0. #3272 - Fixed
setAlphaModefor BLEND and MASK. #3306
Examples
✨ Added a render-scale example so you can test in real time how our dynamic render scaling operates on different devices and experiment with controlling it. #3307
✨ Dramatically simplified the panning example based on the now available attribute. #3286
Other notable changes
- Hopefully(!) fixed types import for TS users. Note: you'll need to import our
/librather than the bundle. #3200 - Updated to Three.js r138. Includes an upstreamed improvement allowing any resolution of
environment-image: mrdoob/three.js#23322 - Added Dassault Systemes STELLAR path-traced renderer to our fidelity comparisons. Thanks @bsdorra! #3178
- Added details on developing in WSL environment to our README. Thanks @prefrontalcortex! #3230