makeInstance
function makeInstance<Tag>(id, kind): Instance<Tag>;
Function: makeInstance()
function makeInstance<Tag>(id, kind): Instance<Tag>;Defined in: packages/motion/src/Instance.ts:61
Build an instance handle from an id and a kind.
Type Parameters
| Type Parameter |
|---|
Tag extends | "Audio" | "Line" | "Path" | "Rect" | "Circle" | "Ellipse" | "Text" | "Group" | "Hud" | "Image" | "Camera" |
Parameters
| Parameter | Type |
|---|---|
id | string |
kind | Tag |
Returns
Instance<Tag>
Remarks
Internal plumbing — the scene runner calls this when creating entities.
Author code gets handles from Scene.instantiate instead; constructing
one by hand refers to an entity that may not exist.