---
url: https://cri-middleware.github.io/SSPlayerForWeb/api/@spritestudio/ssplayer-core/classes/SSRuntimeInstanceSlot.md
---
# Class: SSRuntimeInstanceSlot

Defined in: wasm/ssruntime.d.ts:320

JS-friendly wrapper of `InstanceSlot`. Same conceptual flow as the C FFI:

1. construct via `create`, 2) call `step` per frame with the resolved
   active event, child context, and timing, 3) on `transitioned == true`
   call `play` on the child context: the slot configures the child for the
   new key without starting it, and an independent child never advances
   otherwise.

## Indexable

> \[`key`: `number`]: () => `void`

## Methods

### child_frame_no()

> **child_frame_no**(): `number`

Defined in: wasm/ssruntime.d.ts:324

#### Returns

`number`

***

### child_looped()

> **child_looped**(): `boolean`

Defined in: wasm/ssruntime.d.ts:325

#### Returns

`boolean`

***

### free()

> **free**(): `void`

Defined in: wasm/ssruntime.d.ts:322

#### Returns

`void`

***

### get_speed()

> **get_speed**(): `number`

Defined in: wasm/ssruntime.d.ts:333

The speed the last `step` drove the child at. Scale the elapsed time
handed to the child's own slots by its absolute value, not by the event's
`speed`, which reads `1.0` while the slot ignores the implicit key. Mirrors
the C-API `ss_instance_slot_get_speed`.

#### Returns

`number`

***

### independent()

> **independent**(): `boolean`

Defined in: wasm/ssruntime.d.ts:334

#### Returns

`boolean`

***

### is_independent()

> **is_independent**(): `boolean`

Defined in: wasm/ssruntime.d.ts:335

#### Returns

`boolean`

***

### reset()

> **reset**(): `void`

Defined in: wasm/ssruntime.d.ts:343

Reset the slot's "last started key" memory to its just-created state
without destroying it. Call on an explicit head-out (replay) so a
re-played animation re-fires the instance child from scratch instead of
debouncing the first key as the same one the slot last started. Mirrors
the C-API `ss_instance_slot_reset`.

#### Returns

`void`

***

### step()

> **step**(`ev`, `child_ctx`, `parent_frame`, `delta_seconds`, `parent_looped`): `boolean`

Defined in: wasm/ssruntime.d.ts:352

Advance one tick. `ev` is the event info returned by
`SSRuntimeContext::get_active_event_instance` (or built manually via
`WebEventInstanceInfo`). `child_ctx` must be the *child* runtime —
label resolution and frame stepping run against it.
Returns `true` if visible. Inspect `transitioned`, `independent`,
`child_frame_no`, `child_looped` via the corresponding getters.

#### Parameters

##### ev

`WebEventInstanceInfo`

##### child_ctx

[`SSRuntimeContext`](SSRuntimeContext.md)

##### parent_frame

`number`

##### delta_seconds

`number`

##### parent_looped

`boolean`

#### Returns

`boolean`

***

### transitioned()

> **transitioned**(): `boolean`

Defined in: wasm/ssruntime.d.ts:353

#### Returns

`boolean`

***

### create()

> `static` **create**(): `SSRuntimeInstanceSlot`

Defined in: wasm/ssruntime.d.ts:326

#### Returns

`SSRuntimeInstanceSlot`
