// AUTO-GENERATED
///
declare module "godot" {
/** Base class for all texture types.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_texture.html
*/
class Texture extends Resource {
constructor(identifier?: any)
}
/** Texture for 2D and 3D.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_texture2d.html
*/
class Texture2D extends Texture {
constructor(identifier?: any)
/** Called when the [Texture2D]'s width is queried. */
/* gdvirtual */ _get_width(): int64
/** Called when the [Texture2D]'s height is queried. */
/* gdvirtual */ _get_height(): int64
/** Called when a pixel's opaque state in the [Texture2D] is queried at the specified `(x, y)` position. */
/* gdvirtual */ _is_pixel_opaque(x: int64, y: int64): boolean
/** Called when the presence of an alpha channel in the [Texture2D] is queried. */
/* gdvirtual */ _has_alpha(): boolean
/** Called when the entire [Texture2D] is requested to be drawn over a [CanvasItem], with the top-left offset specified in [param pos]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation).
*
* **Note:** This is only used in 2D rendering, not 3D.
*/
/* gdvirtual */ _draw(to_canvas_item: RID, pos: Vector2, modulate: Color, transpose: boolean): void
/** Called when the [Texture2D] is requested to be drawn onto [CanvasItem]'s specified [param rect]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation).
*
* **Note:** This is only used in 2D rendering, not 3D.
*/
/* gdvirtual */ _draw_rect(to_canvas_item: RID, rect: Rect2, tile: boolean, modulate: Color, transpose: boolean): void
/** Called when a part of the [Texture2D] specified by [param src_rect]'s coordinates is requested to be drawn onto [CanvasItem]'s specified [param rect]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation).
*
* **Note:** This is only used in 2D rendering, not 3D.
*/
/* gdvirtual */ _draw_rect_region(to_canvas_item: RID, rect: Rect2, src_rect: Rect2, modulate: Color, transpose: boolean, clip_uv: boolean): void
/** Returns the texture width in pixels. */
get_width(): int64
/** Returns the texture height in pixels. */
get_height(): int64
/** Returns the texture size in pixels. */
get_size(): Vector2
/** Returns `true` if this [Texture2D] has an alpha channel. */
has_alpha(): boolean
/** Draws the texture using a [CanvasItem] with the [RenderingServer] API at the specified [param position]. */
draw(canvas_item: RID, position: Vector2, modulate: Color = new Color(1, 1, 1, 1), transpose: boolean = false): void
/** Draws the texture using a [CanvasItem] with the [RenderingServer] API. */
draw_rect(canvas_item: RID, rect: Rect2, tile: boolean, modulate: Color = new Color(1, 1, 1, 1), transpose: boolean = false): void
/** Draws a part of the texture using a [CanvasItem] with the [RenderingServer] API. */
draw_rect_region(canvas_item: RID, rect: Rect2, src_rect: Rect2, modulate: Color = new Color(1, 1, 1, 1), transpose: boolean = false, clip_uv: boolean = true): void
/** Returns an [Image] that is a copy of data from this [Texture2D] (a new [Image] is created each time). [Image]s can be accessed and manipulated directly.
*
* **Note:** This will return `null` if this [Texture2D] is invalid.
*
* **Note:** This will fetch the texture data from the GPU, which might cause performance problems when overused. Avoid calling [method get_image] every frame, especially on large textures.
*/
get_image(): Image
/** Creates a placeholder version of this resource ([PlaceholderTexture2D]). */
create_placeholder(): Resource
}
/** A single texture resource which consists of multiple, separate images. Each image has the same dimensions and number of mipmap levels.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_texture2darray.html
*/
class Texture2DArray extends ImageTextureLayered {
constructor(identifier?: any)
/** Creates a placeholder version of this resource ([PlaceholderTexture2DArray]). */
create_placeholder(): Resource
}
/** Texture Array for 2D that is bound to a texture created on the [RenderingDevice].
*
* @link https://docs.godotengine.org/en/4.4/classes/class_texture2darrayrd.html
*/
class Texture2DArrayRD extends TextureLayeredRD {
constructor(identifier?: any)
}
/** Texture for 2D that is bound to a texture created on the [RenderingDevice].
*
* @link https://docs.godotengine.org/en/4.4/classes/class_texture2drd.html
*/
class Texture2DRD extends Texture2D {
constructor(identifier?: any)
/** The RID of the texture object created on the [RenderingDevice]. */
get texture_rd_rid(): RID
set texture_rd_rid(value: RID)
}
/** Base class for 3-dimensional textures.
*
* @link https://docs.godotengine.org/en/4.4/classes/class_texture3d.html
*/
class Texture3D extends Texture {
constructor(identifier?: any)
/** Called when the [Texture3D]'s format is queried. */
/* gdvirtual */ _get_format(): Image.Format
/** Called when the [Texture3D]'s width is queried. */
/* gdvirtual */ _get_width(): int64
/** Called when the [Texture3D]'s height is queried. */
/* gdvirtual */ _get_height(): int64
/** Called when the [Texture3D]'s depth is queried. */
/* gdvirtual */ _get_depth(): int64
/** Called when the presence of mipmaps in the [Texture3D] is queried. */
/* gdvirtual */ _has_mipmaps(): boolean
/** Called when the [Texture3D]'s data is queried. */
/* gdvirtual */ _get_data(): GArray
/** Returns the current format being used by this texture. See [enum Image.Format] for details. */
get_format(): Image.Format
/** Returns the [Texture3D]'s width in pixels. Width is typically represented by the X axis. */
get_width(): int64
/** Returns the [Texture3D]'s height in pixels. Width is typically represented by the Y axis. */
get_height(): int64
/** Returns the [Texture3D]'s depth in pixels. Depth is typically represented by the Z axis (a dimension not present in [Texture2D]). */
get_depth(): int64
/** Returns `true` if the [Texture3D] has generated mipmaps. */
has_mipmaps(): boolean
/** Returns the [Texture3D]'s data as an array of [Image]s. Each [Image] represents a *slice* of the [Texture3D], with different slices mapping to different depth (Z axis) levels. */
get_data(): GArray
/** Creates a placeholder version of this resource ([PlaceholderTexture3D]). */
create_placeholder(): Resource
}
class Texture3DEditorPlugin