# BaseTexture - Pixi.JS

#

API Docs for: 1.0.0
Show: Inherited Protected Private Deprecated

# BaseTexture Class

Extends EventTarget
Defined in: `src/pixi/textures/BaseTexture.js:9`
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:9`

#### Parameters:

- `source` String

  the source object (image or canvas)

- Index
- Methods
- Properties

## Item Index

### Methods

- fromImage static

### Properties

- height
- source
- width

## Methods

### `fromImage`

(

- `imageUrl`

)
static

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

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

### `height`

Number

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

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

### `source`

Image

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

The source that is loaded to create the texture

### `width`

Number

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

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