UNPKG

@babylonjs/viewer

Version:

The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.

3 lines (2 loc) 1.06 kB
import{c as t}from"./KHR_interactivity-D4lwBSW9.esm.min.js";import{R as s,d as e,a as o}from"./declarationMapper-D_filC93.esm.min.js";import{u as i}from"./index-BPURObVq.esm.min.js";import"./objectModelMapping-ClgDmo5Q.esm.min.js";import"./spotLight.pure-5s2DDDIt.esm.min.js";class a extends t{constructor(t){super(t),this.sound=this.registerDataInput("sound",s),this.volume=this.registerDataInput("volume",e,1),this.startOffset=this.registerDataInput("startOffset",e,0),this.loop=this.registerDataInput("loop",o,!1)}_execute(t,s){const e=this.sound.getValue(t);if(!e)return this._reportError(t,"No sound provided"),void this.out._activateSignal(t);const o=this.volume.getValue(t),i=this.startOffset.getValue(t),a=this.loop.getValue(t);e.play({volume:o,startOffset:i,loop:a}),this.out._activateSignal(t)}getClassName(){return"FlowGraphPlaySoundBlock"}}let r=!1;function n(){r||(r=!0,i("FlowGraphPlaySoundBlock",a))}n();export{a as FlowGraphPlaySoundBlock,n as RegisterFlowGraphPlaySoundBlock}; //# sourceMappingURL=flowGraphPlaySoundBlock-YKqeLMpY.esm.min.js.map