Class RedGPUContext

RedGPU.initialize 실행이후 생성 제공되는 객체.

  • WebGPU 초기화시 얻어낸 기본 정보들을 속성으로 가진다
  • View3D 객체를 소유하며 실제 최상위 컨테이너 역활을 한다.

Hierarchy (View Summary)

Constructors

Properties

currentRequestAnimationFrame: number
currentTime: number
onResize: (width: number, height: number) => void = null

Accessors

  • get alphaMode(): GPUCanvasAlphaMode

    Retrieves the alpha mode of the GPUCanvas object.

    Returns GPUCanvasAlphaMode

    The alpha mode of the GPUCanvas.

  • set alphaMode(value: GPUCanvasAlphaMode): void

    Sets the alpha mode of the GPUCanvas.

    Parameters

    • value: GPUCanvasAlphaMode

      The new alpha mode value to be set.

    Returns void

  • get configurationDescription(): GPUCanvasConfiguration

    Retrieves the GPU canvas configuration description.

    Returns GPUCanvasConfiguration

    The configuration description.

  • get height(): string | number

    Retrieves the height of the sizeManager.

    Returns string | number

    The height of the sizeManager.

  • set height(value: string | number): void

    Sets the height value of the element.

    Parameters

    • value: string | number

      The height value to set. It can be either a number or a string.

    Returns void

  • get htmlCanvas(): HTMLCanvasElement

    Retrieves the HTML canvas element associated with the current instance of the class.

    Returns HTMLCanvasElement

    The HTML canvas element.

  • get renderScale(): number

    Retrieves the render scale value from the size manager.

    Returns number

    The render scale value.

  • set renderScale(value: number): void

    Sets the render scale for the size manager.

    Parameters

    • value: number

      The render scale value to set.

    Returns void

  • get screenRectObject(): { height: number; width: number; x: number; y: number }

    Returns { height: number; width: number; x: number; y: number }

  • get width(): string | number

    Retrieves the width of the object.

    Returns string | number

    The width of the object.

  • set width(value: string | number): void

    Sets the width value for the size manager.

    Parameters

    • value: string | number

      The width value to set. It can be either a number or a string.

    Returns void

Methods

  • Destroys the GPU device. It releases any allocated resources and cleans up the GPU device.

    Returns void

  • Sets the size of the element.

    Parameters

    • Optionalw: string | number = ...

      The width of the element. It can be either a string or a number. Defaults to the current width.

    • Optionalh: string | number = ...

      The height of the element. It can be either a string or a number. Defaults to the current height.

    Returns void

  • Sets the view at the specified index in the viewList of the RedGPUContext instance.

    Parameters

    • view: View3D

      The View3D instance to set at the specified index.

    • index: number

      The index at which to set the view.

    Returns void

    If the input view is not registered in the RedGPUContext instance.

    If the index is out of bounds, i.e., greater than or equal to the length of viewList.

  • Swaps two views at the specified indices in the view list.

    Parameters

    • index1: number

      The index of the first view to swap.

    • index2: number

      The index of the second view to swap.

    Returns void

    • If either index1 or index2 is not a positive integer. If either index1 or index2 is larger than or equal to the length of the view list.