narraleaf-react 0.24.0 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,6 +15,23 @@ export declare class CharacterAction<T extends typeof CharacterActionTypes[keyof
|
|
|
15
15
|
};
|
|
16
16
|
static getVoice(state: GameState, sentence: Sentence): Sound | null;
|
|
17
17
|
private static endVoiceWithPreference;
|
|
18
|
+
/**
|
|
19
|
+
* The line voice still running past the end of its own sentence, per game.
|
|
20
|
+
*
|
|
21
|
+
* Only `voiceEndMode: "none"` ever leaves one - the other two modes stop the clip at line end.
|
|
22
|
+
* A WeakMap rather than a field on `GameState` because this is bookkeeping between two
|
|
23
|
+
* consecutive `say`s, not state a host or a save has any business seeing.
|
|
24
|
+
*/
|
|
25
|
+
private static readonly trailingVoice;
|
|
26
|
+
/**
|
|
27
|
+
* Cut whatever is still playing from an earlier line before this one's voice starts.
|
|
28
|
+
*
|
|
29
|
+
* "Let it play on" means the clip outlives its own sentence - it does not mean two actors talk
|
|
30
|
+
* at once. Without this, advancing through voiced lines under that mode layered every clip over
|
|
31
|
+
* the last one, and a player clicking quickly could stack three or four. Unvoiced lines pass by
|
|
32
|
+
* without cutting anything, which is the whole point of the mode.
|
|
33
|
+
*/
|
|
34
|
+
static cutTrailingVoice(gameState: GameState, next: Sound | null): void;
|
|
18
35
|
executeAction(gameState: GameState, injection: ActionExecutionInjection): ExecutedActionResult;
|
|
19
36
|
stringify(_story: Story, _seen: Set<LogicAction.Actions>, _strict: boolean): string;
|
|
20
37
|
}
|
|
@@ -41,6 +41,8 @@ export type SceneDataRaw = {
|
|
|
41
41
|
state: Record<string, any>;
|
|
42
42
|
};
|
|
43
43
|
export declare class Scene extends Constructable<LogicAction.Actions, Scene> {
|
|
44
|
+
/** Resolved voice src -> the one `Sound` that plays it. See {@link Scene.getVoice}. */
|
|
45
|
+
private readonly voiceCache;
|
|
44
46
|
get local(): Persistent<any>;
|
|
45
47
|
get background(): Image;
|
|
46
48
|
get backgroundLayer(): Layer;
|