Constructor
new Transitions(application)
Creates an application-owned manager for frozen scene-image transitions.
Parameters:
| Name | Type | Description |
|---|---|---|
application |
rune.system.Application | Owning application. |
- Source:
Members
(readonly) active :boolean
Whether a capture, scene change or image transition is in progress.
Type:
- boolean
- Source:
(readonly) needsScene :boolean
Whether the next capture needs the selected scene to render.
Type:
- boolean
- Source:
(readonly) progress :number
Normalized animation progress. Scene initialization does not advance it.
Type:
- number
- Source:
Methods
cancel() → {undefined}
Ends an operation and releases images and effect resources. A scene change
already submitted to Scenes is not rolled back. Before submission it is
simply discarded, leaving the old scene selected.
- Source:
Returns:
- Type
- undefined
load(batch, effect) → {boolean}
Starts an effect before loading a copied scene batch. The scene manager
validates its contents when the old image has been captured, before replacing
current scenes. A rejected or cancelled request does not own the batch.
Parameters:
| Name | Type | Description |
|---|---|---|
batch |
Array.<rune.scene.Scene> | New scene instances. |
effect |
rune.transition.Transition | Effect to play. |
- Source:
Throws:
-
If batch is empty, the manager is disposed or changes are pending.
- Type
- Error
Returns:
Whether the request was accepted.
- Type
- boolean
select(index, effect) → {boolean}
Starts an effect before selecting an index in the current scene batch.
The effect is owned only when the request is accepted.
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | Scene index, a zero-based integer. |
effect |
rune.transition.Transition | Effect to play. |
- Source:
Throws:
-
-
If index is outside the current batch.
- Type
- RangeError
-
-
-
If the manager is disposed or scene changes are pending.
- Type
- Error
-
Returns:
Whether the request was accepted.
- Type
- boolean