Easily display interactive 3D models on the web and in AR!
APACHE-2.0 License
Bot releases are hidden (Show)
π Added localization API for a11y for WCAG compliance, thanks @cybmiper! #4715
π Added Khronos PBR Neutral tone mapping standard ("neutral") - "commerce" is now an alias for this. #4716, #4760
β¨ Added example of a11y localization, thanks @cybmiper! #4715
Published by elalish 9 months ago
π Added UltraHDR lighting support for 10x-30x smaller environments! #4578
π Added skybox-height
option to project an outdoor skybox onto the ground plane. #4604
π Added AgX tone mapping and Commerce tone mapping is improved and no longer experimental! #4615
π Added a reason property to the progress event, thanks @alexdaube! #4647
CreateVideoTexture()
respect with-credentials
, thanks @navidadelpour! #4635β¨ Added example of toggling visibility of mesh variants. #4528
β¨ Updated lighting examples for UltraHDR example. #4578
β¨ Added Grounded Skybox example. #4604
β¨ Added a tone mapping comparison example. #4615
β¨ Small fixes for examples. #4514, #4627
β¨ Added an FAQ on color accuracy, including links to longer write-ups on tone mapping and model validation. #4637
Published by elalish about 1 year ago
π Added an experimental tone-mapping
attribute to allow switching from our default, aces
, to a new commerce
function designed specifically for color accuracy in 3D commerce. #4495
π Added zoom-sensitivity
and pan-sensitivity
attributes, thanks @nicolas-daures! #4412
Published by diegoteran about 1 year ago
Published by diegoteran over 1 year ago
π Added optional post-processing API with a variety of rendering effects, thanks @Beilinson! #3948
π Added an unbundled build, model-viewer-module.min.js, for use with post-processing or any others who need to de-duplicate three.js using import maps, thanks @Beilinson! #3948
π Added anisotropy support. #4314, https://github.com/mrdoob/three.js/pull/25580
π Added PBR Next material extensions API, including anisotropy, clearcoat, ior, iridescence, sheen, specular, etc. #4319, #4330, #4348
π Added texture transform API to Sampler: setRotation, setScale, and setOffset. #4209
β¨ Added many post-processing examples, thanks @Beilinson! #3948
β¨ Added transform textures example. #4209
jasmine
for mocha
in the space-opera
tests. #4268Published by elalish over 1 year ago
currentTime
when animation has not been played. #4231Published by elalish over 1 year ago
Most of the updates this time were pulled from upstream in Three.js rather than directly in our code base. The big one is that our last major glTF compliance issue is now fixed: multiple UV channel and texture transform support! This means it's now possible to author GLBs with tiled textures, e.g. for fabric, and still have a non-tiled AO map. This can make for significantly higher-quality models with smaller file size.
β¨ Fixed a bug in the annotations example, thanks @y-71! #4151
Published by elalish over 1 year ago
This does not change our bundled build, so most users will see no change compared to v3.0.1. This changes how our dependencies are represented in npm, which is important for developers that are incorporating <model-viewer>
into a larger TS/JS project. Specifically:
animation
object of a LottieTexture
is now marked any
, so please cast it with image.animation as import('lottie-web').AnimationItem;
if you want type info. #4132three
is installed and the build should continue to work. #4135Published by elalish over 1 year ago
with-credentials
, thanks @robertsLando! #4098data-surface
attribute. #4099β¨ 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
Published by elalish over 1 year ago
π 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
with-credentials
toggle to all loaders. #4085camera-change
event at most once per animation frame. #4027β¨ Added animated hotspots example, which also demonstrates animated SVG pointers. #3981
β¨ Added animated textures example. #3886
β¨ Updated dimensions example to be more performant. #4027
Published by elalish almost 2 years ago
Published by elalish almost 2 years ago
π 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
quick-look-button-tapped
event not being fired on iOS 16, thanks @milesgreen! #3850variant-name
attribute, the default variant no longer blinks in during load. #3864<model-viewer>
elements. #3927β¨ 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
Published by elalish about 2 years ago
Published by elalish about 2 years ago
Fixes model disposal on iOS < 15: #3816
Published by elalish about 2 years ago
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.
enable-pan
default, 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: #3668enable-pan
to true, replacing the enable-pan
attribute with disable-pan
. Also added disable-tap
attribute: #3713touch-action
default from pan-y
to none
: #3712environment-image
to neutral
, renaming the current default as legacy
: #3676ar-modes
default to webxr scene-viewer quick-look
: #3802bounds="tight"
: #3683scene-graph-ready
event: #3700progress-mask
; equivalent to setting its part to display: none;
. This will keep the poster from appearing lightened during loading: #3692reveal
attribute. Use "manual" and dismissPoster()
instead to achieve this behavior: #3688interaction-policy
attribute, allowing only the default "always-allow" behavior: #3686interaction-prompt
attribute: #3687interaction-prompt-style
attribute, allowing only the default "wiggle" behavior: #3685--poster-color
, making the poster always have a transparent background: #3701seamless-poster
attribute, 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 by toBlob({idealAspect: true})
or our editor are strongly recommended: #3704Image.setURI
method from our materials API. Use the createTexture
method instead: #3710exportScene
options to match three.js r143. Specifically, remove embedImages
(always true now) and forcePowerOfTwoTextures
. Add forceIndices
: #3711preload
event, as there is no longer any distinction from the load
event: #3799package.json
module
to point to lib
instead of dist
. For JS users, main
will still point to our bundle in dist
, 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.ts
files: #3718types
pointers to package.json
as well as a fallback model-viewer.d.ts
bundled types file, thanks @subhankar-trisetra! #3774, #3791π 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
positionAndNormalFromPoint()
hitting the floor plane: #3599src
: #3606camera-change
event: #3717error
event detail: #3742reveal
changes causing rendering breakage: #3745exportScene
is including scale
/orientation
changes: #3772Published by elalish over 2 years ago
π 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.
camera-change
event is also fired for camera-target
changes. #3427β¨ Added a custom prompt example to demonstrate interact()
and the finger
slots. #3320
β¨ Fixed zoom sensitivity in the camera views example. #3356
Published by elalish over 2 years ago
oncontextmenu
function: #3333Published by elalish over 2 years ago
π 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
bounds="tight"
, which will become default in v2.0. #3272setAlphaMode
for BLEND and MASK. #3306β¨ 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
/lib
rather than the bundle. #3200environment-image
: https://github.com/mrdoob/three.js/pull/23322
Published by elalish almost 3 years ago
This is actually identical to v1.10.0, but a bad build was pushed to npm, so this is resolving that error.
Published by elalish almost 3 years ago
π Added glTF sheen extension support! We now support all of the released PBR extensions. See fidelity comparisons here. https://github.com/mrdoob/three.js/pull/23069
π Added repetitions
and pingpong
options to the play()
method for better animation control. Thanks @futahei! #3021, #3104
π Added uv
coordinates to the output of positionAndNormalFromPoint()
. Thanks @BR14Nx! #3043
π Added a zoom()
function to allow programmatic camera manipulation equivalent to keyboard/scroll/pinch zoom behavior. #3087
π Default framing now accounts for non-default field of view. This means when you want a custom focal length, you no longer need to calculate and set a corresponding radius in camera-orbit
. #3105
setURI
method now changes a texture for all models that point to it. To individually change a texture when the same model has been reused, please use the newer createTexture
API. #2935setAlphaMode
. Thanks @SrirachaSource! #2985β¨ Added Thor camera views example. Thanks @hybridherbst! #3018
β¨ Fixed example strings. Thanks @benmbark! #3040
β¨ Updated transparency example to demonstrate glTF transmission support. #3112