Link Search Menu Expand Document

Size

The size (in meters) of a view or element in the world.

Note that size and scale are different things: size is the semantic size of your app (e g “this button is 2 dm wide”) while scale is the scaling up or down of this semantic size (e g a transformation matrix with a 2.0 X-axis scale and a 2dm width is 4dm wide, but its content is still 2dm wide.)

Constructor

 size = Size(width, height, depth)

Arguments

Name Type Description
width number The width of the component.
height number The height of the component.
depth number The depth of the component.

Returns

Nothing


Methods

Size:copy ()

Creates and returns a copy of a given Size.

Arguments

None

Returns

Type Description
Size A copy of the original Size object.

Size:inset (byWidth, byHeight, byDepth)

Shrinks the Size component by the given parameters.

Arguments

Name Type Description
byWidth number The x component of the size reduction.
byHeight number The y component of the size reduction.
byDepth number The z component of the size reduction.

Returns

Type Description
Size The original Size object, post-resize.