import { a as PixiVNJsonValueSet, m as PixiVNJsonFunction, P as PixiVNJsonIfElse, c as PixiVNJsonValueGet, f as PixiVNJsonConditionalStatements } from './PixiVNJsonIfElse-CgOnelja.cjs'; import { CanvasBaseInterface, ImageSprite, ShakeEffectProps, BounceEffectProps, PulseEffectProps, HopEffectProps, WiggleEffectProps, NodEffectProps, SwayEffectProps, PunchEffectProps, GlitchEffectProps, ChromaticAberrationEffectProps, ShockwaveEffectProps, RadialBlurEffectProps, BlurPulseEffectProps, VignettePulseEffectProps, DesaturateEffectProps, GlowPulseEffectProps, ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps, PushInOutProps, WipeInOutProps, IrisInOutProps, SplitInOutProps, BlurInOutProps, PixelateInOutProps, FlashInOutProps, GlitchInOutProps, TwistInOutProps, WarpInOutProps, RippleInOutProps, NoiseDissolveInOutProps, TvInOutProps, PinchInOutProps, ContainerOptions, ImageContainerOptions, ImageSpriteOptions, TextOptions, ImageSpriteMemory, VideoSpriteMemory, ImageContainerMemory, TextMemory, ContainerMemory, SoundPlayOptionsWithChannel, MediaInterface, LabelRunModeType, StorageObjectType, StepLabelPropsType } from '@drincs/pixi-vn'; import { KeyframesType, AnimationOptions, ObjectSegment, ObjectSegmentWithTransition, SequenceOptions } from '@drincs/pixi-vn/motion'; import { UPDATE_PRIORITY } from 'pixi.js'; import { AnimatedSpriteSource, AnimatedSpriteOptions, AnimatedSpriteMemory } from '@drincs/pixi-vn/canvas'; /** * Additional options controlling the animation (duration, easing, repeat, etc.). */ interface PixiVNJsonAnimateBaseOptions extends AnimationOptions { } /** * Animates one or more canvas elements simultaneously using keyframe-based animation. */ type PixiVNJsonAnimateBase> = { type: "animate"; /** * Alias (or list of aliases) of the canvas elements to animate. */ alias: string | string[]; /** * The keyframes that define the animation values over time. */ keyframes: KeyframesType; /** * Additional options controlling the animation (duration, easing, repeat, etc.). */ options?: PixiVNJsonAnimateBaseOptions; /** * Pixi.js update priority for this animation ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Additional options controlling the sequence playback. */ interface PixiVNJsonAnimateSequenceOptions extends SequenceOptions { } /** * Animates a canvas element using a sequence of segments (timeline-based animation). */ type PixiVNJsonAnimateSequence> = { type: "animate-sequence"; /** * Alias of the canvas element to animate. */ alias: string; /** * Ordered list of animation segments, each optionally including a transition. */ sequence: (ObjectSegment | ObjectSegmentWithTransition)[]; /** * Additional options controlling the sequence playback. */ options?: PixiVNJsonAnimateSequenceOptions; /** * Pixi.js update priority for this animation ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Union of all canvas animation operations — keyframe-based or sequence-based. */ type PixiVNJsonCanvasAnimate = ImageSprite> = PixiVNJsonAnimateBase | PixiVNJsonAnimateSequence; /** * Applies a shake effect to a canvas element. */ type PixiVNJsonEffectShake = { type: "shake"; /** * Alias of the canvas element to apply the shake effect to. */ alias: string; /** * Configuration properties for the shake effect (amplitude, duration, etc.). */ props: ShakeEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Bounces a canvas element. */ type PixiVNJsonEffectBounce = { type: "bounce"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: BounceEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Pulses (repeated, decaying scale bump) a canvas element. */ type PixiVNJsonEffectPulse = { type: "pulse"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: PulseEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Hops a canvas element. */ type PixiVNJsonEffectHop = { type: "hop"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: HopEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Wiggles a canvas element. */ type PixiVNJsonEffectWiggle = { type: "wiggle"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: WiggleEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Nods a canvas element. */ type PixiVNJsonEffectNod = { type: "nod"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: NodEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Sways a canvas element. */ type PixiVNJsonEffectSway = { type: "sway"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: SwayEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Punches a canvas element. */ type PixiVNJsonEffectPunch = { type: "punch"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: PunchEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Applies a glitch effect to a canvas element. */ type PixiVNJsonEffectGlitch = { type: "glitch"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: GlitchEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Applies a chromatic aberration effect to a canvas element. */ type PixiVNJsonEffectChromaticAberration = { type: "chromatic-aberration"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: ChromaticAberrationEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Applies a shockwave effect to a canvas element. */ type PixiVNJsonEffectShockwave = { type: "shockwave"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: ShockwaveEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Applies a radial blur effect to a canvas element. */ type PixiVNJsonEffectRadialBlur = { type: "radial-blur"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: RadialBlurEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Applies a blur pulse effect to a canvas element. */ type PixiVNJsonEffectBlurPulse = { type: "blur-pulse"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: BlurPulseEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Applies a vignette pulse effect to a canvas element. */ type PixiVNJsonEffectVignettePulse = { type: "vignette-pulse"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: VignettePulseEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Applies a desaturate effect to a canvas element. */ type PixiVNJsonEffectDesaturate = { type: "desaturate"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: DesaturateEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Applies a glow pulse effect to a canvas element. */ type PixiVNJsonEffectGlowPulse = { type: "glow-pulse"; /** * Alias of the canvas element to apply the effect to. */ alias: string; /** * Configuration properties for the effect. */ props?: GlowPulseEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Union of all canvas visual effects. */ type PixiVNJsonCanvasEffect = PixiVNJsonEffectShake | PixiVNJsonEffectBounce | PixiVNJsonEffectPulse | PixiVNJsonEffectHop | PixiVNJsonEffectWiggle | PixiVNJsonEffectNod | PixiVNJsonEffectSway | PixiVNJsonEffectPunch | PixiVNJsonEffectGlitch | PixiVNJsonEffectChromaticAberration | PixiVNJsonEffectShockwave | PixiVNJsonEffectRadialBlur | PixiVNJsonEffectBlurPulse | PixiVNJsonEffectVignettePulse | PixiVNJsonEffectDesaturate | PixiVNJsonEffectGlowPulse; /** * Configuration options for the dissolve transition. */ interface DissolveTransitionProps extends ShowWithDissolveTransitionProps { } /** * Cross-dissolve transition — blends the element in or out by gradually changing its opacity. */ type DissolveTransition = { type: "dissolve"; /** * Configuration options for the dissolve transition. */ props?: DissolveTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the fade transition. */ interface FadeTransitionProps extends ShowWithFadeTransitionProps { } /** * Fade transition — fades the element in or out by animating its alpha value. */ type FadeTransition = { type: "fade"; /** * Configuration options for the fade transition. */ props?: FadeTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the move transition (direction, duration, easing, etc.). */ interface MoveInOutTransitionProps extends MoveInOutProps { } /** * Move-in / Move-out transition — slides the element into or out of the viewport. */ type MoveInOutTransition = { type: "movein" | "moveout"; /** * Configuration options for the move transition (direction, duration, easing, etc.). */ props?: MoveInOutTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the zoom transition (scale, duration, easing, etc.). */ interface ZoomInOutTransitionProps extends ZoomInOutProps { } /** * Zoom-in / Zoom-out transition — scales the element into or out of view. */ type ZoomInOutTransition = { type: "zoomin" | "zoomout"; /** * Configuration options for the zoom transition (scale, duration, easing, etc.). */ props?: ZoomInOutTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the push transition (direction, duration, easing, etc.). */ interface PushInOutTransitionProps extends PushInOutProps { } /** * Push-in / Push-out transition — pushes the element onto or off the viewport, displacing the current content. */ type PushInOutTransition = { type: "pushin" | "pushout"; /** * Configuration options for the push transition (direction, duration, easing, etc.). */ props?: PushInOutTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the wipe transition. */ interface WipeTransitionProps extends WipeInOutProps { } /** * Wipe — reveals or conceals the element with a moving mask edge. */ type WipeInOutTransition = { type: "wipein" | "wipeout"; /** * Configuration options for the wipe transition. */ props?: WipeTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the iris transition. */ interface IrisTransitionProps extends IrisInOutProps { } /** * Iris — reveals or conceals the element with a growing/shrinking circular mask. */ type IrisInOutTransition = { type: "irisin" | "irisout"; /** * Configuration options for the iris transition. */ props?: IrisTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the split transition. */ interface SplitTransitionProps extends SplitInOutProps { } /** * Split — reveals or conceals the element by splitting it into halves. */ type SplitInOutTransition = { type: "splitin" | "splitout"; /** * Configuration options for the split transition. */ props?: SplitTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the blur transition. */ interface BlurTransitionProps extends BlurInOutProps { } /** * Blur — reveals or conceals the element through a blur. */ type BlurInOutTransition = { type: "blurin" | "blurout"; /** * Configuration options for the blur transition. */ props?: BlurTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the pixelate transition. */ interface PixelateTransitionProps extends PixelateInOutProps { } /** * Pixelate — reveals or conceals the element through pixelation. */ type PixelateInOutTransition = { type: "pixelatein" | "pixelateout"; /** * Configuration options for the pixelate transition. */ props?: PixelateTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the flash transition. */ interface FlashTransitionProps extends FlashInOutProps { } /** * Flash — reveals or conceals the element through a colored flash. */ type FlashInOutTransition = { type: "flashin" | "flashout"; /** * Configuration options for the flash transition. */ props?: FlashTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the glitch transition. */ interface GlitchTransitionProps extends GlitchInOutProps { } /** * Glitch — reveals or conceals the element with a digital glitch. */ type GlitchInOutTransition = { type: "glitchin" | "glitchout"; /** * Configuration options for the glitch transition. */ props?: GlitchTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the twist transition. */ interface TwistTransitionProps extends TwistInOutProps { } /** * Twist — reveals or conceals the element with a twisting distortion. */ type TwistInOutTransition = { type: "twistin" | "twistout"; /** * Configuration options for the twist transition. */ props?: TwistTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the warp transition. */ interface WarpTransitionProps extends WarpInOutProps { } /** * Warp — reveals or conceals the element with a warping distortion. */ type WarpInOutTransition = { type: "warpin" | "warpout"; /** * Configuration options for the warp transition. */ props?: WarpTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the ripple transition. */ interface RippleTransitionProps extends RippleInOutProps { } /** * Ripple — reveals or conceals the element with a ripple distortion. */ type RippleInOutTransition = { type: "ripplein" | "rippleout"; /** * Configuration options for the ripple transition. */ props?: RippleTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the noisedissolve transition. */ interface NoiseDissolveTransitionProps extends NoiseDissolveInOutProps { } /** * Noise dissolve — reveals or conceals the element by dissolving it through noise. */ type NoiseDissolveInOutTransition = { type: "noisedissolvein" | "noisedissolveout"; /** * Configuration options for the noisedissolve transition. */ props?: NoiseDissolveTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the tv transition. */ interface TvTransitionProps extends TvInOutProps { } /** * TV — reveals or conceals the element with a CRT-television effect. */ type TvInOutTransition = { type: "tvin" | "tvout"; /** * Configuration options for the tv transition. */ props?: TvTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the pinch transition. */ interface PinchTransitionProps extends PinchInOutProps { } /** * Pinch — reveals or conceals the element with a pinching distortion. */ type PinchInOutTransition = { type: "pinchin" | "pinchout"; /** * Configuration options for the pinch transition. */ props?: PinchTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Union of all supported canvas media transitions. */ type PixiVNJsonMediaTransiotions = DissolveTransition | FadeTransition | MoveInOutTransition | ZoomInOutTransition | PushInOutTransition | WipeInOutTransition | IrisInOutTransition | SplitInOutTransition | BlurInOutTransition | PixelateInOutTransition | FlashInOutTransition | GlitchInOutTransition | TwistInOutTransition | WarpInOutTransition | RippleInOutTransition | NoiseDissolveInOutTransition | TvInOutTransition | PinchInOutTransition; /** * Display options (position, scale, alpha, etc.) for an image or video sprite. */ interface PixiVNJsonCanvasImageVideoShowProps extends ImageSpriteOptions { } /** * Shows an image or video asset on the canvas. */ type PixiVNJsonCanvasImageVideoShow = { type: "image" | "video"; operationType: "show"; /** * Unique identifier (alias) used to reference this element on the canvas. */ alias: string; /** * The url of the image or video. * If the url is not provided, the url will be set to the alias. */ url?: string; /** * Display options (position, scale, alpha, etc.) for the image or video sprite. */ props?: PixiVNJsonCanvasImageVideoShowProps; /** * Optional transition effect applied when the element appears on screen. */ transition?: PixiVNJsonMediaTransiotions; }; /** * Display options for an image container. */ interface PixiVNJsonCanvasImageContainerShowProps extends ImageContainerOptions { } /** * Shows an image container (a group of layered images) on the canvas. */ type PixiVNJsonCanvasImageContainerShow = { type: "imagecontainer"; operationType: "show"; /** * Unique identifier (alias) used to reference this element on the canvas. */ alias: string; /** * The ordered list of image URLs that compose the container layers. */ urls: string[]; /** * Display options for the image container. */ props?: PixiVNJsonCanvasImageContainerShowProps; /** * Optional transition effect applied when the element appears on screen. */ transition?: PixiVNJsonMediaTransiotions; }; /** * Display options (font, style, position, etc.) for a text element. */ interface PixiVNJsonCanvasTextShowProps extends TextOptions { } /** * Shows a text element on the canvas. */ type PixiVNJsonCanvasTextShow = { type: "text"; operationType: "show"; /** * Unique identifier (alias) used to reference this element on the canvas. */ alias: string; /** * The string content to display. */ text: string; /** * Display options (font, style, position, etc.) for the text element. */ props?: PixiVNJsonCanvasTextShowProps; /** * Optional transition effect applied when the element appears on screen. */ transition?: PixiVNJsonMediaTransiotions; }; /** * Shows a spritesheet animation on the canvas. */ type PixiVNJsonCanvasAnimatedSpriteShow = { type: "asprite"; operationType: "show"; /** Unique identifier (alias) used to reference this element on the canvas. */ alias: string; /** Spritesheet alias or serializable description of its animation frames. */ source?: AnimatedSpriteSource | string; /** Display and playback options for the animated sprite. */ props?: AnimatedSpriteOptions; /** Optional transition effect applied when the element appears on screen. */ transition?: PixiVNJsonMediaTransiotions; }; /** * Edits the properties of an existing image sprite on the canvas. */ type PixiVNJsonImageEdit = { type: "image"; operationType: "edit"; /** * Alias of the canvas element to edit. */ alias: string; /** * Partial memory/state properties to update on the image sprite. */ props?: Partial; }; /** * Edits the properties of an existing video sprite on the canvas. */ type PixiVNJsonVideoEdit = { type: "video"; operationType: "edit"; /** * Alias of the canvas element to edit. */ alias: string; /** * Partial memory/state properties to update on the video sprite. */ props?: Partial; }; /** * Edits the properties of an existing image container on the canvas. */ type PixiVNJsonImageContainerEdit = { type: "imagecontainer"; operationType: "edit"; /** * Alias of the canvas element to edit. */ alias: string; /** * Partial memory/state properties to update on the image container. */ props?: Partial; }; /** * Edits the properties of an existing text element on the canvas. */ type PixiVNJsonTextEdit = { type: "text"; operationType: "edit"; /** * Alias of the canvas element to edit. */ alias: string; /** * Partial memory/state properties to update on the text element. */ props?: Partial; }; /** * Edits the properties or frame source of an existing animated sprite. */ type PixiVNJsonAnimatedSpriteEdit = { type: "asprite"; operationType: "edit"; /** Alias of the animated sprite to edit. */ alias: string; /** Partial memory/state properties to update on the animated sprite. */ props?: Partial; }; /** * Edits the properties of an unknown/generic canvas element. * Use this when the specific element type is not one of the built-in kinds. */ type PixiVNJsonUnknownEdit> = { type: "canvaselement"; operationType: "edit"; /** * Alias of the canvas element to edit. */ alias: string; /** * Partial options/properties to update on the canvas element. */ props?: Partial; }; /** * Removes a canvas element from the stage, optionally with a transition. */ type PixiVNJsonCanvasRemove = { type: "image" | "video" | "imagecontainer" | "canvaselement" | "text" | "asprite"; operationType: "remove"; /** * Alias of the canvas element to remove. */ alias: string; /** * Optional transition effect applied while the element disappears. */ transition?: PixiVNJsonMediaTransiotions; }; /** * Removes every element currently on the canvas. */ type PixiVNJsonCanvasClear = { type: "canvas"; operationType: "clear"; }; /** * Pauses or resumes playback of a video sprite on the canvas. */ type PixiVNJsonVideoPauseResume = { type: "video"; operationType: "pause" | "resume"; /** * Alias of the video element to pause or resume. */ alias: string; }; /** * Pauses, resumes, or selects a frame in an animated sprite. */ type PixiVNJsonAnimatedSpriteControl = { type: "asprite"; operationType: "pause" | "resume"; /** Alias of the animated sprite to control. */ alias: string; } | { type: "asprite"; operationType: "goto"; /** Alias of the animated sprite to control. */ alias: string; /** Zero-based frame index. */ frame: number; }; /** * Loads or lazy-loads asset bundles or individual assets into memory. */ type PixiVNJsonAssetsLoad = { type: "assets" | "bundle"; operationType: "load" | "lazyload"; /** * List of asset aliases (or bundle names) to load. */ aliases: string[]; }; type PixiVNJsonCanvasShow = PixiVNJsonCanvasImageContainerShow | PixiVNJsonCanvasImageVideoShow | PixiVNJsonCanvasTextShow | PixiVNJsonCanvasAnimatedSpriteShow; /** * Union of all canvas-element edit operations. */ type PixiVNJsonCanvasEdit = PixiVNJsonImageEdit | PixiVNJsonVideoEdit | PixiVNJsonImageContainerEdit | PixiVNJsonTextEdit | PixiVNJsonAnimatedSpriteEdit | PixiVNJsonUnknownEdit; /** * Union of all canvas operations — show, edit, remove, clear, animate, apply effects, and asset * loading. */ type PixiVNJsonCanvas = PixiVNJsonCanvasShow | PixiVNJsonCanvasEdit | PixiVNJsonCanvasRemove | PixiVNJsonCanvasClear | PixiVNJsonVideoPauseResume | PixiVNJsonAnimatedSpriteControl | PixiVNJsonAssetsLoad | PixiVNJsonCanvasAnimate | PixiVNJsonCanvasEffect; /** * Requests user input during the narrative. * When this operation is encountered, the engine pauses and waits for the player to provide a value. */ type PixiVNJsonInputRequest = { type: "input"; operationType: "request"; /** * The expected value type for the input (e.g. `"string"`, `"number"`, `"boolean"`). * Used by the engine to validate or cast the player's answer. */ valueType?: string; /** * A default value that will be used if the player does not provide any input. */ defaultValue?: any; }; /** * Clears (resets) the current dialogue state. * This is typically used to wipe any displayed text before showing new content. */ type PixiVNJsonDialogue = { type: "dialogue"; operationType: "clean"; }; /** * Narration operation — either a dialogue clear or a user-input request. */ type PixiVNJsonNarration = PixiVNJsonDialogue | PixiVNJsonInputRequest; /** * Playback options such as volume, loop, channel, and start offset. */ interface PixiVNJsonSoundPlayProps extends SoundPlayOptionsWithChannel { } /** * Starts playback of a sound asset. */ type PixiVNJsonSoundPlay = { type: "sound"; operationType: "play"; /** * Unique identifier (alias) used to reference this sound. */ alias: string; /** * URL of the sound file. If omitted, the alias is used as the URL. */ url?: string; /** * Playback options such as volume, loop, channel, and start offset. */ props?: PixiVNJsonSoundPlayProps; }; /** * Stops a playing sound and removes it from the audio context. */ type PixiVNJsonSoundRemove = { type: "sound"; operationType: "stop"; /** * Alias of the sound to stop. */ alias: string; }; /** * Pauses or resumes a sound, a channel, or all audio. */ type PixiVNJsonSoundPauseResume = { type: "sound" | "channel"; operationType: "pause" | "resume"; /** * Alias of the sound or channel to pause/resume. */ alias: string; } | { type: "all"; operationType: "pause" | "resume" | "stop"; }; /** * Partial set of sound properties that can be applied when editing a currently playing sound. */ interface PixiVNJsonSoundEditProps extends Partial>, Partial> { } /** * Edits the properties of a currently playing sound (volume, playbackRate, mute, loop, etc.). */ type PixiVNJsonSoundEdit = { type: "sound"; operationType: "edit"; /** * Alias of the sound to edit. */ alias: string; /** * Partial set of properties to apply to the sound. */ props: PixiVNJsonSoundEditProps; }; /** * Union of all sound operations — play, stop, pause/resume, and edit. */ type PixiVNJsonSound = PixiVNJsonSoundPlay | PixiVNJsonSoundRemove | PixiVNJsonSoundPauseResume | PixiVNJsonSoundEdit; /** * An operation string that holds a list of string/value fragments to be concatenated at runtime. * Used internally to represent string interpolation expressions before they are fully resolved. */ type PixiVNJsonOperationString = { type: "operationtoconvert"; /** * The ordered list of string fragments and/or value-get expressions to concatenate. */ values: (string | PixiVNJsonValueGet | PixiVNJsonConditionalStatements)[]; }; /** * A single resolved operation — a value set, canvas operation, sound operation, * narration operation, or function call — optionally annotated with an origin string. */ type PixiVNJsonOperation = (PixiVNJsonValueSet | PixiVNJsonCanvas | PixiVNJsonSound | PixiVNJsonNarration | PixiVNJsonFunction) & { /** * This value is used by the system to know where this operation is from, for example, if is generated from a string operation. */ $origin?: string; }; /** * A conditional operation — either a plain operation, an if-else that resolves to one, * or an operation-string (string interpolation expression). */ type PixiVNJsonConditionalOperation = PixiVNJsonOperation | PixiVNJsonIfElse | PixiVNJsonOperationString; /** * A player-presentable choice in a menu. */ type PixiVNJsonChoice = { /** * The text to be displayed. */ text: PixiVNJsonDialogText; /** * The label id to be opened. */ label: string; /** * Label opening mode */ type: LabelRunModeType; /** * The properties to be passed to the label. */ props: StorageObjectType; /** * If this is true, the choice can only be made once. */ oneTime?: boolean; /** * If this is true, the choice can see only if there are no other choices. For example, all choices are one-time choices and they are already selected. */ onlyHaveNoChoice?: boolean; /** * If this is true and if is the only choice, it will be automatically selected, and call/jump to the label. */ autoSelect?: boolean; }; /** * A list of choices (possibly conditional) that are shown to the player as a menu. */ type PixiVNJsonChoices = (PixiVNJsonChoice | PixiVNJsonConditionalStatements)[]; /** * The text content of a dialogue line. * Can be a plain string, a dynamic value-get, a conditional expression, or an array of any of these * (which will be concatenated into a single string at runtime). */ type PixiVNJsonDialogText = string | PixiVNJsonValueGet | PixiVNJsonConditionalStatements | (string | PixiVNJsonValueGet | PixiVNJsonConditionalStatements)[]; /** * A dialogue line, optionally attributed to a character. * When a plain `Text` value is used, no character attribution is included. */ type PixiVNJsonDialog = { /** * The character id that will speak. */ character: string; /** * The text to be displayed. */ text: Text; } | Text; /** * Describes a label that should be opened (called or jumped to) during a step. */ type PixiVNJsonLabelToOpen = { /** * The id of the label to open. */ label: string | PixiVNJsonValueGet; /** * Label opening mode */ type: LabelRunModeType; /** * The properties to be passed to the label. if you don't want to pass a object, but a list of parameters, you can use the {@link PixiVNJsonLabelToOpen.params} attribute. */ props?: StepLabelPropsType; /** * **It is not recommended to use it, use it only if necessary**. The parameters to be passed to the label. If you want to pass an object, use the {@link PixiVNJsonLabelToOpen.props} attribute. * "params" attribute will be stored in the temp storage with the key: {@link PIXIVNJSON_PARAM_ID} + ({@link narration.labels.opened.length} - 1). */ params?: unknown[]; }; /** * Steps of a label. * Order of operations: * 1. run all {@link PixiVNJsonLabelStep.operations} * 2. set {@link PixiVNJsonLabelStep.choices}, {@link PixiVNJsonLabelStep.dialogue}, {@link PixiVNJsonLabelStep.glueEnabled} * 3. open {@link PixiVNJsonLabelStep.labelToOpen} * 4. go to next step if {@link PixiVNJsonLabelStep.goNextStep} is true * 5. end the label if {@link PixiVNJsonLabelStep.end} is "label_end" */ type PixiVNJsonLabelStep = { /** * Operations to execute at the start of this step (storage writes, canvas updates, sound, etc.). */ operations?: PixiVNJsonConditionalOperation[]; /** * Variable used to display a choice menu. */ choices?: PixiVNJsonChoices | PixiVNJsonConditionalStatements; /** * Variable used to display a dialog. */ dialogue?: PixiVNJsonDialog | PixiVNJsonConditionalStatements>; /** * This variable is used to add the next dialog text into the current dialog memory. * This value was added to introduce Ink Glue functionality https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md#glue */ glueEnabled?: boolean | PixiVNJsonConditionalStatements; /** * Variable used to open a label. */ labelToOpen?: PixiVNJsonLabelToOpen | PixiVNJsonConditionalStatements | (PixiVNJsonLabelToOpen | PixiVNJsonConditionalStatements)[]; /** * If is true, the next step will be executed automatically. */ goNextStep?: boolean | PixiVNJsonConditionalStatements; /** * Variable used to end some elements of the narrative. * - game_end: ends the game * - label_end: ends the label */ end?: "game_end" | "label_end" | PixiVNJsonConditionalStatements<"game_end" | "label_end">; /** * If set, this step is replaced by the result of evaluating the given conditional statement. * Allows an entire step to be chosen at runtime based on a condition or step-switch strategy. */ conditionalStep?: PixiVNJsonConditionalStatements; }; export type { PixiVNJsonConditionalOperation as $, IrisTransitionProps as A, BlurInOutTransition as B, MoveInOutTransitionProps as C, DissolveTransition as D, NoiseDissolveTransitionProps as E, FadeTransition as F, GlitchInOutTransition as G, PinchInOutTransition as H, IrisInOutTransition as I, PinchTransitionProps as J, PixelateInOutTransition as K, PixelateTransitionProps as L, MoveInOutTransition as M, NoiseDissolveInOutTransition as N, PixiVNJsonAnimateBase as O, PixiVNJsonOperation as P, PixiVNJsonAnimateBaseOptions as Q, PixiVNJsonAnimateSequence as R, PixiVNJsonAnimateSequenceOptions as S, PixiVNJsonCanvas as T, PixiVNJsonCanvasEdit as U, PixiVNJsonCanvasImageContainerShowProps as V, PixiVNJsonCanvasImageVideoShowProps as W, PixiVNJsonCanvasShow as X, PixiVNJsonCanvasTextShowProps as Y, PixiVNJsonChoice as Z, PixiVNJsonChoices as _, PixiVNJsonOperationString as a, PixiVNJsonDialog as a0, PixiVNJsonDialogText as a1, PixiVNJsonDialogue as a2, PixiVNJsonEffectBlurPulse as a3, PixiVNJsonEffectBounce as a4, PixiVNJsonEffectChromaticAberration as a5, PixiVNJsonEffectDesaturate as a6, PixiVNJsonEffectGlitch as a7, PixiVNJsonEffectGlowPulse as a8, PixiVNJsonEffectHop as a9, TwistInOutTransition as aA, TwistTransitionProps as aB, WarpInOutTransition as aC, WarpTransitionProps as aD, WipeInOutTransition as aE, WipeTransitionProps as aF, ZoomInOutTransition as aG, ZoomInOutTransitionProps as aH, PixiVNJsonEffectNod as aa, PixiVNJsonEffectPulse as ab, PixiVNJsonEffectPunch as ac, PixiVNJsonEffectRadialBlur as ad, PixiVNJsonEffectShake as ae, PixiVNJsonEffectShockwave as af, PixiVNJsonEffectSway as ag, PixiVNJsonEffectVignettePulse as ah, PixiVNJsonEffectWiggle as ai, PixiVNJsonInputRequest as aj, PixiVNJsonLabelToOpen as ak, PixiVNJsonMediaTransiotions as al, PixiVNJsonSoundEdit as am, PixiVNJsonSoundEditProps as an, PixiVNJsonSoundPauseResume as ao, PixiVNJsonSoundPlay as ap, PixiVNJsonSoundPlayProps as aq, PixiVNJsonSoundRemove as ar, PushInOutTransition as as, PushInOutTransitionProps as at, RippleInOutTransition as au, RippleTransitionProps as av, SplitInOutTransition as aw, SplitTransitionProps as ax, TvInOutTransition as ay, TvTransitionProps as az, PixiVNJsonSound as b, PixiVNJsonCanvasImageVideoShow as c, PixiVNJsonImageEdit as d, PixiVNJsonCanvasRemove as e, PixiVNJsonVideoEdit as f, PixiVNJsonVideoPauseResume as g, PixiVNJsonCanvasAnimatedSpriteShow as h, PixiVNJsonAnimatedSpriteEdit as i, PixiVNJsonAnimatedSpriteControl as j, PixiVNJsonCanvasImageContainerShow as k, PixiVNJsonImageContainerEdit as l, PixiVNJsonCanvasTextShow as m, PixiVNJsonTextEdit as n, PixiVNJsonUnknownEdit as o, PixiVNJsonNarration as p, PixiVNJsonCanvasEffect as q, PixiVNJsonCanvasAnimate as r, PixiVNJsonCanvasClear as s, PixiVNJsonLabelStep as t, BlurTransitionProps as u, DissolveTransitionProps as v, FadeTransitionProps as w, FlashInOutTransition as x, FlashTransitionProps as y, GlitchTransitionProps as z };