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.38 kB
import{c as t,g as e}from"./KHR_interactivity-D4lwBSW9.esm.min.js";import{R as i,d as s,j as n,F as a}from"./declarationMapper-D_filC93.esm.min.js";import{u as o}from"./index-BPURObVq.esm.min.js";import"./objectModelMapping-ClgDmo5Q.esm.min.js";import"./spotLight.pure-5s2DDDIt.esm.min.js";class r extends t{constructor(t){super(t),this.startIndex=this.registerDataInput("startIndex",i,0),this.endIndex=this.registerDataInput("endIndex",i),this.step=this.registerDataInput("step",s,1),this.index=this.registerDataOutput("index",n,new a(e(t?.initialIndex??0))),this.executionFlow=this._registerSignalOutput("executionFlow"),this.completed=this._registerSignalOutput("completed"),this._unregisterSignalOutput("out")}_execute(t){const i=e(this.startIndex.getValue(t)),s=this.step.getValue(t);let n=e(this.endIndex.getValue(t));for(let o=i;o<n&&(this.index.setValue(new a(o),t),this.executionFlow._activateSignal(t),n=e(this.endIndex.getValue(t)),!(o>r.MaxLoopIterations*s));o+=s);this.config?.incrementIndexWhenLoopDone&&this.index.setValue(new a(e(this.index.getValue(t))+s),t),this.completed._activateSignal(t)}getClassName(){return"FlowGraphForLoopBlock"}}r.MaxLoopIterations=1e3;let p=!1;function l(){p||(p=!0,o("FlowGraphForLoopBlock",r))}l();export{r as FlowGraphForLoopBlock,l as RegisterFlowGraphForLoopBlock}; //# sourceMappingURL=flowGraphForLoopBlock-DRGQeMQ6.esm.min.js.map