# RenderHandler

Class · extends [`ResourceHandler`](https://api.playcanvas.com/engine/classes/ResourceHandler.md) · category: Asset

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/framework/handlers/render.js#L19

Resource handler for the `render` asset type. A render asset has no file of its own: it takes
the meshes of one glTF mesh from the container asset named in its data and exposes them as a
`Render`.

## Methods

### load

```ts
load(url: string | { load: string; original: string }, callback: ResourceHandlerCallback, asset?: Asset<string>): void
```

Waits for a render asset's container to supply its meshes. Without an asset, completes
with no render data.

**Parameters**

- `url` (`string | { load: string; original: string }`): The resource URL. Not used for
  container-backed render assets.
- `callback` ([`ResourceHandlerCallback`](https://api.playcanvas.com/engine/types/ResourceHandlerCallback.md)): Called with the container's render data or an error.
- `asset` ([`Asset`](https://api.playcanvas.com/engine/classes/Asset.md)`<string>`, optional): The render asset whose container dependency should be loaded.

### open

```ts
open(url: any, data: any): Render
```

The open function is passed the raw resource data. The handler can then process the data
into a format that can be used at runtime. When parsers are registered, the matching parser's
`open` is used (if it implements one); otherwise the base implementation simply returns the data.

**Parameters**

- `url` (`any`): The URL of the resource to open.
- `data` (`any`): The raw resource data passed by callback from [load](https://api.playcanvas.com/engine/classes/ResourceHandler.md#load).

**Returns** `Render`: The parsed resource data.

### patch

```ts
patch(asset: any, registry: any): void
```

The patch function performs any operations on a resource that requires a dependency on its
asset data or any other asset data. The base implementation does nothing.

**Parameters**

- `asset` (`any`): The asset to patch.
- `registry` (`any`)

## Inherited from [ResourceHandler](https://api.playcanvas.com/engine/classes/ResourceHandler.md)

- `protected _app: AppBase`
- `handlerType: string = ''`
- `get app(): AppBase`
- `get maxRetries(): number` · `set maxRetries(value: number)`
- `get parsers(): ResourceParser[]`
- `addParser(parser: ResourceParser, decider?: any): void`
- `fetch(url: string | { load: string; original: string }, responseType: string, callback: ResourceHandlerCallback, asset?: Asset<string>): void`
- `removeParser(parser: ResourceParser): void`
