PaddingPercent Interface
Specifies padding to apply around a view volume for methods like lookAtVolume and zoomToElements, expanding or
contracting the viewed volume by a fraction of its original size.
The margin values represent a fraction of the view volume's width (for left and right) or height (for top and bottom).
Positive values add additional volume along the specified edge, negative values subtract it, and zero values have no effect.
All properties default to zero if undefined
.
For example, if the original volume has a width of 100 and the padding is specified as { left: 1 }
, the width will be doubled to 200, with 100 padding on the left side of the view.
If a padding of 0.25 is specified for each of left, right, top, and bottom, then the final volume will be inset such that 25% of the original volume falls outside
of the view on each side.
@note Margins are only applied in 2d views, or 3d views in which the camera has been turned off.
@see paddingPercent.
Properties
Name | Type | Description | |
---|---|---|---|
bottom | number | undefined | ||
left | number | undefined | ||
right | number | undefined | ||
top | number | undefined |
Defined in
Last Updated: 21 November, 2024