meshlabjs
meshlabjs copied to clipboard
Parameter Widget: Relative Float
Like in meshlab we need a way to input a number that can be easily inserted as a percentage of the bbox of the scene
Like in the above example the two edit field are connected and continuously updated: the left editbox contain the value in world unit (as common float parameter input) and the right one contains the same value expressed as a percentage of the diagonal of the boundingbox of the scene. When the user change one value the other one is updated accordingly.
The widget returns the value in world unit
When specified we imagine something like that
vertRatioWidget = builder.RelativeFloat({
defperc=1.0,
label: "Vertex Ratio",
tooltip: "Probability that a vertex is randomly selected"
});
where defperc is the default percentage shown in the widget at the start