a library to speed up the development of Fivem scripts and frameworks
fivem-ts - Documentation v0.7.5 • Docs
fivem-ts - Documentation v0.7.5 / Client / Size
Represents the size of a 2D object with width and height dimensions.
This class is used to define the dimensions of 2D elements, such as UI components
or screen areas, typically in the context of FiveM scripts. The Size
class includes
width
and height
properties to specify these dimensions.
const size = new Size(1920, 1080);
console.log(size.width); // Output: 1920
console.log(size.height); // Output: 1080
new Size(
w
,h
):Size
Creates an instance of Size
with specified width and height.
• w: number
= 0
The width dimension of the size. Defaults to 0
.
• h: number
= 0
The height dimension of the size. Defaults to 0
.
height:
number
width:
number