# Template

Class · category: Framework

Source: https://github.com/playcanvas/engine/blob/f059dc005842f76e052cdf44d8370c8c7ec475ac/src/framework/template.js#L13

Create a Template resource from raw database data.

## Constructors

### constructor

```ts
new Template(app: AppBase, data: any)
```

Create a new Template instance.

**Parameters**

- `app` ([`AppBase`](https://api.playcanvas.com/engine/classes/AppBase.md)): The application.
- `data` (`any`): Asset data from the database.

## Methods

### instantiate

```ts
instantiate(): Entity
```

Create an instance of this template.

**Returns** [`Entity`](https://api.playcanvas.com/engine/classes/Entity.md): The root entity of the created instance.
