UNPKG

@babylonjs/core

Version:

Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.

42 lines (41 loc) 1.64 kB
import { type FlowGraphContext } from "../../../flowGraphContext.js"; import { type FlowGraphDataConnection } from "../../../flowGraphDataConnection.js"; import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal.js"; import { type FlowGraphSignalConnection } from "../../../flowGraphSignalConnection.js"; import { type IFlowGraphBlockConfiguration } from "../../../flowGraphBlock.js"; import { type AbstractSound } from "../../../../AudioV2/abstractAudio/abstractSound.js"; /** * @experimental * A block that plays an Audio V2 sound. */ export declare class FlowGraphPlaySoundBlock extends FlowGraphExecutionBlockWithOutSignal { /** * Input connection: The sound to play. */ readonly sound: FlowGraphDataConnection<AbstractSound>; /** * Input connection: The volume to play at (0–1). Defaults to 1. */ readonly volume: FlowGraphDataConnection<number>; /** * Input connection: The time offset in seconds to start playback from. Defaults to 0. */ readonly startOffset: FlowGraphDataConnection<number>; /** * Input connection: Whether the sound should loop. Defaults to false. */ readonly loop: FlowGraphDataConnection<boolean>; /** * Constructs a new FlowGraphPlaySoundBlock. * @param config - optional configuration for the block */ constructor(config?: IFlowGraphBlockConfiguration); /** * @internal */ _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void; /** * @returns class name of the block. */ getClassName(): string; }