---
url: /api/kiln/functions/defineInstanced.md
---
[Kiln API](../../index.md) / [kiln](../index.md) / defineInstanced

# Function: defineInstanced()

```ts
function defineInstanced(key, def): string;
```

Registers a shared mesh for `Instanced(key)` entities. Geometry and material are shared by every
app and never disposed by Kiln.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `key` | `string` |
| `def` | [`InstancedDefinition`](../interfaces/InstancedDefinition.md) |

## Returns

`string`
