I am referring to the dimensions section in the annotations chapter of the examples part in model-viewer. As the comment shows in the following code cell, the measuring unit is hard-coded by writing cm here. But now i have the case that i have a lot of different sizes of 3D objects (some are in meters, and some are in millimeters) to be put on the website, so i am wondering if there is a way to determine the measuring unit based on our objects dynamically? Otherwise, it seems not possible to get the dimensions of different objects in the right measurement unit.
Description
I am referring to the dimensions section in the annotations chapter of the examples part in model-viewer. As the comment shows in the following code cell, the measuring unit is hard-coded by writing
cm
here. But now i have the case that i have a lot of different sizes of 3D objects (some are in meters, and some are in millimeters) to be put on the website, so i am wondering if there is a way to determine the measuring unit based on our objects dynamically? Otherwise, it seems not possible to get the dimensions of different objects in the right measurement unit.Live Demo
https://modelviewer.dev/examples/annotations/index.html#dimensions
Version