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) 8.13 kB
import{F as t}from"./flowGraphCachedOperationBlock-rvkBwo1v.esm.min.js";import{m as e,p as a,j as u,n as i,f as s,q as n,F as p,r,a as l}from"./declarationMapper-13w1YGqM.esm.min.js";import{F as o}from"./KHR_interactivity-CKt1TdMW.esm.min.js";import{M as g,i as c,V as h,a7 as V,R as _}from"./index-Bw2N6w1y.esm.min.js";import"./objectModelMapping-DX92iJ8M.esm.min.js";class D extends t{constructor(t,e,a){super(e,a);for(let e=0;e<t;e++)this.registerDataInput(`input_${e}`,s,0)}}class I extends o{constructor(t,e,a){super(a),this.registerDataInput("input",e);for(let e=0;e<t;e++)this.registerDataOutput(`output_${e}`,s,0)}}class x extends D{constructor(t){super(2,i,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedVector")||t._setExecutionVariable(this,"cachedVector",new V);const e=t._getExecutionVariable(this,"cachedVector",null);return e.set(this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t)),e}getClassName(){return"FlowGraphCombineVector2Block"}}_("FlowGraphCombineVector2Block",x);class m extends D{constructor(t){super(3,u,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedVector")||t._setExecutionVariable(this,"cachedVector",new h);const e=t._getExecutionVariable(this,"cachedVector",null);return e.set(this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_2").getValue(t)),e}getClassName(){return"FlowGraphCombineVector3Block"}}_("FlowGraphCombineVector3Block",m);class d extends D{constructor(t){super(4,a,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedVector")||t._setExecutionVariable(this,"cachedVector",new c);const e=t._getExecutionVariable(this,"cachedVector",null);return e.set(this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_3").getValue(t)),e}getClassName(){return"FlowGraphCombineVector4Block"}}_("FlowGraphCombineVector4Block",d);class w extends D{constructor(t){super(16,e,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedMatrix")||t._setExecutionVariable(this,"cachedMatrix",new g);const e=t._getExecutionVariable(this,"cachedMatrix",null);return this.config?.inputIsColumnMajor?e.set(this.getDataInput("input_0").getValue(t),this.getDataInput("input_4").getValue(t),this.getDataInput("input_8").getValue(t),this.getDataInput("input_12").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_5").getValue(t),this.getDataInput("input_9").getValue(t),this.getDataInput("input_13").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_6").getValue(t),this.getDataInput("input_10").getValue(t),this.getDataInput("input_14").getValue(t),this.getDataInput("input_3").getValue(t),this.getDataInput("input_7").getValue(t),this.getDataInput("input_11").getValue(t),this.getDataInput("input_15").getValue(t)):e.set(this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_3").getValue(t),this.getDataInput("input_4").getValue(t),this.getDataInput("input_5").getValue(t),this.getDataInput("input_6").getValue(t),this.getDataInput("input_7").getValue(t),this.getDataInput("input_8").getValue(t),this.getDataInput("input_9").getValue(t),this.getDataInput("input_10").getValue(t),this.getDataInput("input_11").getValue(t),this.getDataInput("input_12").getValue(t),this.getDataInput("input_13").getValue(t),this.getDataInput("input_14").getValue(t),this.getDataInput("input_15").getValue(t)),e}getClassName(){return"FlowGraphCombineMatrixBlock"}}_("FlowGraphCombineMatrixBlock",w);class b extends D{constructor(t){super(4,n,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedMatrix")||t._setExecutionVariable(this,"cachedMatrix",new p);const e=t._getExecutionVariable(this,"cachedMatrix",null),a=this.config?.inputIsColumnMajor?[this.getDataInput("input_0").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_3").getValue(t)]:[this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_3").getValue(t)];return e.fromArray(a),e}getClassName(){return"FlowGraphCombineMatrix2DBlock"}}_("FlowGraphCombineMatrix2DBlock",b);class E extends D{constructor(t){super(9,r,t)}_doOperation(t){t._hasExecutionVariable(this,"cachedMatrix")||t._setExecutionVariable(this,"cachedMatrix",new l);const e=t._getExecutionVariable(this,"cachedMatrix",null),a=this.config?.inputIsColumnMajor?[this.getDataInput("input_0").getValue(t),this.getDataInput("input_3").getValue(t),this.getDataInput("input_6").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_4").getValue(t),this.getDataInput("input_7").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_5").getValue(t),this.getDataInput("input_8").getValue(t)]:[this.getDataInput("input_0").getValue(t),this.getDataInput("input_1").getValue(t),this.getDataInput("input_2").getValue(t),this.getDataInput("input_3").getValue(t),this.getDataInput("input_4").getValue(t),this.getDataInput("input_5").getValue(t),this.getDataInput("input_6").getValue(t),this.getDataInput("input_7").getValue(t),this.getDataInput("input_8").getValue(t)];return e.fromArray(a),e}getClassName(){return"FlowGraphCombineMatrix3DBlock"}}_("FlowGraphCombineMatrix3DBlock",E);class C extends I{constructor(t){super(2,i,t)}_updateOutputs(t){let e=this.getDataInput("input")?.getValue(t);e||(e=V.Zero(),this.getDataInput("input").setValue(e,t)),this.getDataOutput("output_0").setValue(e.x,t),this.getDataOutput("output_1").setValue(e.y,t)}getClassName(){return"FlowGraphExtractVector2Block"}}_("FlowGraphExtractVector2Block",C);class M extends I{constructor(t){super(3,u,t)}_updateOutputs(t){let e=this.getDataInput("input")?.getValue(t);e||(e=h.Zero(),this.getDataInput("input").setValue(e,t)),this.getDataOutput("output_0").setValue(e.x,t),this.getDataOutput("output_1").setValue(e.y,t),this.getDataOutput("output_2").setValue(e.z,t)}getClassName(){return"FlowGraphExtractVector3Block"}}_("FlowGraphExtractVector3Block",M);class F extends I{constructor(t){super(4,a,t)}_updateOutputs(t){let e=this.getDataInput("input")?.getValue(t);e||(e=c.Zero(),this.getDataInput("input").setValue(e,t)),this.getDataOutput("output_0").setValue(e.x,t),this.getDataOutput("output_1").setValue(e.y,t),this.getDataOutput("output_2").setValue(e.z,t),this.getDataOutput("output_3").setValue(e.w,t)}getClassName(){return"FlowGraphExtractVector4Block"}}_("FlowGraphExtractVector4Block",F);class O extends I{constructor(t){super(16,e,t)}_updateOutputs(t){let e=this.getDataInput("input")?.getValue(t);e||(e=g.Identity(),this.getDataInput("input").setValue(e,t));for(let a=0;a<16;a++)this.getDataOutput(`output_${a}`).setValue(e.m[a],t)}getClassName(){return"FlowGraphExtractMatrixBlock"}}_("FlowGraphExtractMatrixBlock",O);class k extends I{constructor(t){super(4,n,t)}_updateOutputs(t){let e=this.getDataInput("input")?.getValue(t);e||(e=new p,this.getDataInput("input").setValue(e,t));for(let a=0;a<4;a++)this.getDataOutput(`output_${a}`).setValue(e.m[a],t)}getClassName(){return"FlowGraphExtractMatrix2DBlock"}}_("FlowGraphExtractMatrix2DBlock",k);class B extends I{constructor(t){super(9,r,t)}_updateOutputs(t){let e=this.getDataInput("input")?.getValue(t);e||(e=new l,this.getDataInput("input").setValue(e,t));for(let a=0;a<9;a++)this.getDataOutput(`output_${a}`).setValue(e.m[a],t)}getClassName(){return"FlowGraphExtractMatrix3DBlock"}}_("FlowGraphExtractMatrix3DBlock",B);export{b as FlowGraphCombineMatrix2DBlock,E as FlowGraphCombineMatrix3DBlock,w as FlowGraphCombineMatrixBlock,x as FlowGraphCombineVector2Block,m as FlowGraphCombineVector3Block,d as FlowGraphCombineVector4Block,k as FlowGraphExtractMatrix2DBlock,B as FlowGraphExtractMatrix3DBlock,O as FlowGraphExtractMatrixBlock,C as FlowGraphExtractVector2Block,M as FlowGraphExtractVector3Block,F as FlowGraphExtractVector4Block}; //# sourceMappingURL=flowGraphMathCombineExtractBlocks-DncLLKkQ.esm.min.js.map