BoundaryShape

lumin.ui. BoundaryShape

Describes a rounded rectangular shaped boundary, from sharp corner to circular,
used for user interface interactions.

This class uses cursor raycasts, instead of a single point, to calculate
cursor promity.

Constructor

new BoundaryShape(size, roundness, offsetopt)

Constructor

Parameters:
Name Type Attributes Default Description
size vec2
roundness number
offset vec3 <optional>
VEC3_ZERO

Methods

getOffset() → {vec3}

Gets the offset of the shape.

Returns:

the shape offset.

Type
vec3

getRoundness() → {number}

Gets the roundness of the shape.

Returns:

the corner roundness.

Type
number

getSize() → {vec2}

Gets the size of the shape.

Returns:

the shape size in X and Y.

Type
vec2

setOffset(offset)

Sets the offset of the shape.

Parameters:
Name Type Description
offset vec3

the offset of the shape.

setRoundness(roundness)

Sets the roundness of the shape.

0 for sharp corners, 1 for fully rounded corners.

Parameters:
Name Type Description
roundness number

the corner roundness

setSize(size)

Sets the size of the shape.

Parameters:
Name Type Description
size vec2

the shape size in X and Y.