height 설정
Retrieves the rectangular dimensions of the parent DOM element of the HTML canvas.
The DOMRect object representing the dimensions of the parent element.
현재 width, height, renderScale 기반 렌더링될 실제 pixel(정수)단위의 Rect를 배열로 반환
현재 width, height, renderScale 기반 렌더링될 실제 pixel(정수)단위의 Rect를 객체로 반환
렌더링 스케일 반환
Sets the rendering scale.
The rendering scale. If the value is less than or equal to 0, it will be converted to 0.01.
width 설정
Sets the size of the element. If width and height are not provided, the current width and height values are used.
Optional
w: string | number = ...The new width of the element.
Optional
h: string | number = ...The new height of the element.
Static
calculateCalculates the size value based on the given rect
object, key
, and value
.
If the value
contains a percentage sign (%), the method returns the calculated size value.
If the value
does not contain a percentage sign, the method returns the size value as is.
The rectangle object containing x
, y
, width
, and height
properties.
The key corresponding to the property of the rect
object that should be used for calculations.
The value to calculate the size from. Can be a percentage with a %
suffix or pixel value with a px
suffix.
value
and rect
object.Static
getStatic
validate포지션으로 사용가능한 값인지 체크 * number, px, % 만 허용
Static
validate사이즈로 사용가능한 값인지 체크 * positive number, px, % 만 허용
The RedGPUContextSizeManager class manages the size and scale of the RedGPUContext.