#

API Docs for: 1.4.3
Show: Inherited Protected Private Deprecated

# BaseTexture Class

Uses

- EventTarget

Defined in: `src/pixi/textures/BaseTexture.js:11`
Module: PIXI

A texture stores the information that represents an image. All textures have a base texture

## Constructor

### `BaseTexture`

(

- `source`

)

Defined in `src/pixi/textures/BaseTexture.js:11`

#### Parameters:

- `source` String

  the source object (image or canvas)

- Index
- Methods
- Properties

## Item Index

### Methods

- destroy
- destroy
- fromImage static

### Properties

- hasLoaded
- height
- scaleMode
- source
- width

## Methods

### `destroy`

()

Defined in `src/pixi/textures/BaseTexture.js:117`

Destroys this base texture

### `destroy`

()

Defined in `src/pixi/textures/BaseTexture.js:135`

### `fromImage`

(

- `imageUrl`

)
static

Defined in `src/pixi/textures/BaseTexture.js:148`

Helper function that returns a base texture based on an image url If the image is not in the base texture cache it will be created and loaded

#### Parameters:

- `imageUrl` String

  The image url of the texture

#### Returns:

BaseTexture

## Properties

### `hasLoaded`

Boolean

Defined in `src/pixi/textures/BaseTexture.js:49`

[read-only] Describes if the base texture has loaded or not

### `height`

Number

Defined in `src/pixi/textures/BaseTexture.js:32`

[read-only] The height of the base texture set when the image has loaded

### `scaleMode`

PIXI.scaleModes

Defined in `src/pixi/textures/BaseTexture.js:41`

The scale mode to apply when scaling this texture

Default: PIXI.scaleModes.LINEAR

### `source`

Image

Defined in `src/pixi/textures/BaseTexture.js:58`

The source that is loaded to create the texture

### `width`

Number

Defined in `src/pixi/textures/BaseTexture.js:23`

[read-only] The width of the base texture set when the image has loaded