@crystaldesign/real-time-viewer 25.14.0-beta.8 → 25.14.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/build/esm/index.js +159 -78
  2. package/build/types/real-time-viewer/src/grids/index.d.ts.map +1 -1
  3. package/build/types/real-time-viewer/src/parser/buildScene/index.d.ts.map +1 -1
  4. package/build/types/real-time-viewer/src/store/GridStore.d.ts.map +1 -1
  5. package/build/types/real-time-viewer/src/store/UIStore.d.ts.map +1 -1
  6. package/build/types/real-time-viewer/src/types.d.ts +8 -1
  7. package/build/types/real-time-viewer/src/types.d.ts.map +1 -1
  8. package/build/types/real-time-viewer/src/useRealTimeRenderData.d.ts +1 -1
  9. package/build/types/real-time-viewer/src/useRealTimeRenderData.d.ts.map +1 -1
  10. package/build/umd/1020.real-time-viewer.umd.min.js +1 -1
  11. package/build/umd/1107.real-time-viewer.umd.min.js +2 -0
  12. package/build/umd/1107.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  13. package/build/umd/1153.real-time-viewer.umd.min.js +1 -1
  14. package/build/umd/1399.real-time-viewer.umd.min.js +2 -0
  15. package/build/umd/1399.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  16. package/build/umd/1499.real-time-viewer.umd.min.js +1 -1
  17. package/build/umd/1808.real-time-viewer.umd.min.js +2 -0
  18. package/build/umd/1808.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  19. package/build/umd/1924.real-time-viewer.umd.min.js +1 -1
  20. package/build/umd/2128.real-time-viewer.umd.min.js +2 -0
  21. package/build/umd/2128.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  22. package/build/umd/2265.real-time-viewer.umd.min.js +1 -1
  23. package/build/umd/2371.real-time-viewer.umd.min.js +1 -1
  24. package/build/umd/2439.real-time-viewer.umd.min.js +1 -1
  25. package/build/umd/2796.real-time-viewer.umd.min.js +2 -0
  26. package/build/umd/2796.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  27. package/build/umd/3040.real-time-viewer.umd.min.js +1 -1
  28. package/build/umd/3116.real-time-viewer.umd.min.js +1 -1
  29. package/build/umd/3210.real-time-viewer.umd.min.js +2 -0
  30. package/build/umd/3210.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  31. package/build/umd/3243.real-time-viewer.umd.min.js +2 -0
  32. package/build/umd/3243.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  33. package/build/umd/4022.real-time-viewer.umd.min.js +2 -0
  34. package/build/umd/4022.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  35. package/build/umd/4049.real-time-viewer.umd.min.js +1 -1
  36. package/build/umd/4153.real-time-viewer.umd.min.js +1 -1
  37. package/build/umd/4431.real-time-viewer.umd.min.js +1 -1
  38. package/build/umd/4486.real-time-viewer.umd.min.js +1 -1
  39. package/build/umd/4623.real-time-viewer.umd.min.js +1 -1
  40. package/build/umd/4667.real-time-viewer.umd.min.js +1 -1
  41. package/build/umd/5498.real-time-viewer.umd.min.js +2 -0
  42. package/build/umd/5498.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  43. package/build/umd/5573.real-time-viewer.umd.min.js +2 -0
  44. package/build/umd/5573.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  45. package/build/umd/5750.real-time-viewer.umd.min.js +2 -0
  46. package/build/umd/5750.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  47. package/build/umd/580.real-time-viewer.umd.min.js +2 -0
  48. package/build/umd/580.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  49. package/build/umd/6057.real-time-viewer.umd.min.js +2 -0
  50. package/build/umd/6057.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  51. package/build/umd/6095.real-time-viewer.umd.min.js +1 -1
  52. package/build/umd/6141.real-time-viewer.umd.min.js +2 -0
  53. package/build/umd/6141.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  54. package/build/umd/615.real-time-viewer.umd.min.js +1 -1
  55. package/build/umd/6442.real-time-viewer.umd.min.js +2 -0
  56. package/build/umd/6442.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  57. package/build/umd/6656.real-time-viewer.umd.min.js +1 -1
  58. package/build/umd/6748.real-time-viewer.umd.min.js +1 -1
  59. package/build/umd/6954.real-time-viewer.umd.min.js +1 -1
  60. package/build/umd/7074.real-time-viewer.umd.min.js +2 -0
  61. package/build/umd/7074.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  62. package/build/umd/7142.real-time-viewer.umd.min.js +1 -1
  63. package/build/umd/7229.real-time-viewer.umd.min.js +1 -1
  64. package/build/umd/7352.real-time-viewer.umd.min.js +1 -1
  65. package/build/umd/7489.real-time-viewer.umd.min.js +2 -0
  66. package/build/umd/7489.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  67. package/build/umd/7501.real-time-viewer.umd.min.js +1 -1
  68. package/build/umd/7751.real-time-viewer.umd.min.js +1 -1
  69. package/build/umd/8008.real-time-viewer.umd.min.js +2 -0
  70. package/build/umd/8008.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  71. package/build/umd/815.real-time-viewer.umd.min.js +1 -1
  72. package/build/umd/8240.real-time-viewer.umd.min.js +1 -1
  73. package/build/umd/8620.real-time-viewer.umd.min.js +1 -1
  74. package/build/umd/8833.real-time-viewer.umd.min.js +2 -0
  75. package/build/umd/8833.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  76. package/build/umd/8954.real-time-viewer.umd.min.js +1 -1
  77. package/build/umd/9046.real-time-viewer.umd.min.js +2 -0
  78. package/build/umd/9046.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  79. package/build/umd/9078.real-time-viewer.umd.min.js +1 -1
  80. package/build/umd/9199.real-time-viewer.umd.min.js +2 -0
  81. package/build/umd/9199.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  82. package/build/umd/9383.real-time-viewer.umd.min.js +1 -1
  83. package/build/umd/9487.real-time-viewer.umd.min.js +1 -1
  84. package/build/umd/9643.real-time-viewer.umd.min.js +2 -0
  85. package/build/umd/9643.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  86. package/build/umd/9712.real-time-viewer.umd.min.js +1 -1
  87. package/build/umd/9959.real-time-viewer.umd.min.js +2 -0
  88. package/build/umd/9959.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  89. package/build/umd/9990.real-time-viewer.umd.min.js +1 -1
  90. package/build/umd/real-time-viewer.umd.min.js +1 -1
  91. package/build/umd/report.html +1 -1
  92. package/package.json +13 -13
  93. package/build/umd/2528.real-time-viewer.umd.min.js +0 -2
  94. package/build/umd/2528.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
  95. package/build/umd/5925.real-time-viewer.umd.min.js +0 -2
  96. package/build/umd/5925.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
  97. package/build/umd/6030.real-time-viewer.umd.min.js +0 -2
  98. package/build/umd/6030.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
  99. package/build/umd/957.real-time-viewer.umd.min.js +0 -2
  100. package/build/umd/957.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 4049.real-time-viewer.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4049],{94049:(o,r,a)=>{a.r(r),a.d(r,{FlowGraphAbsBlock:()=>FlowGraphAbsBlock,FlowGraphAcosBlock:()=>FlowGraphAcosBlock,FlowGraphAcoshBlock:()=>FlowGraphAcoshBlock,FlowGraphAddBlock:()=>FlowGraphAddBlock,FlowGraphAsinBlock:()=>FlowGraphAsinBlock,FlowGraphAsinhBlock:()=>FlowGraphAsinhBlock,FlowGraphAtan2Block:()=>FlowGraphAtan2Block,FlowGraphAtanBlock:()=>FlowGraphAtanBlock,FlowGraphAtanhBlock:()=>FlowGraphAtanhBlock,FlowGraphBitwiseAndBlock:()=>FlowGraphBitwiseAndBlock,FlowGraphBitwiseLeftShiftBlock:()=>FlowGraphBitwiseLeftShiftBlock,FlowGraphBitwiseNotBlock:()=>FlowGraphBitwiseNotBlock,FlowGraphBitwiseOrBlock:()=>FlowGraphBitwiseOrBlock,FlowGraphBitwiseRightShiftBlock:()=>FlowGraphBitwiseRightShiftBlock,FlowGraphBitwiseXorBlock:()=>FlowGraphBitwiseXorBlock,FlowGraphCeilBlock:()=>FlowGraphCeilBlock,FlowGraphClampBlock:()=>FlowGraphClampBlock,FlowGraphCosBlock:()=>FlowGraphCosBlock,FlowGraphCoshBlock:()=>FlowGraphCoshBlock,FlowGraphCubeRootBlock:()=>FlowGraphCubeRootBlock,FlowGraphDegToRadBlock:()=>FlowGraphDegToRadBlock,FlowGraphDivideBlock:()=>FlowGraphDivideBlock,FlowGraphEBlock:()=>FlowGraphEBlock,FlowGraphEqualityBlock:()=>FlowGraphEqualityBlock,FlowGraphExpBlock:()=>FlowGraphExpBlock,FlowGraphFloorBlock:()=>FlowGraphFloorBlock,FlowGraphFractionBlock:()=>FlowGraphFractionBlock,FlowGraphGreaterThanBlock:()=>FlowGraphGreaterThanBlock,FlowGraphGreaterThanOrEqualBlock:()=>FlowGraphGreaterThanOrEqualBlock,FlowGraphInfBlock:()=>FlowGraphInfBlock,FlowGraphIsInfinityBlock:()=>FlowGraphIsInfinityBlock,FlowGraphIsNanBlock:()=>FlowGraphIsNanBlock,FlowGraphLeadingZerosBlock:()=>FlowGraphLeadingZerosBlock,FlowGraphLessThanBlock:()=>FlowGraphLessThanBlock,FlowGraphLessThanOrEqualBlock:()=>FlowGraphLessThanOrEqualBlock,FlowGraphLog10Block:()=>FlowGraphLog10Block,FlowGraphLog2Block:()=>FlowGraphLog2Block,FlowGraphLogBlock:()=>FlowGraphLogBlock,FlowGraphMathInterpolationBlock:()=>FlowGraphMathInterpolationBlock,FlowGraphMaxBlock:()=>FlowGraphMaxBlock,FlowGraphMinBlock:()=>FlowGraphMinBlock,FlowGraphModuloBlock:()=>FlowGraphModuloBlock,FlowGraphMultiplyBlock:()=>FlowGraphMultiplyBlock,FlowGraphNaNBlock:()=>FlowGraphNaNBlock,FlowGraphNegationBlock:()=>FlowGraphNegationBlock,FlowGraphOneBitsCounterBlock:()=>FlowGraphOneBitsCounterBlock,FlowGraphPiBlock:()=>FlowGraphPiBlock,FlowGraphPowerBlock:()=>FlowGraphPowerBlock,FlowGraphRadToDegBlock:()=>FlowGraphRadToDegBlock,FlowGraphRandomBlock:()=>FlowGraphRandomBlock,FlowGraphRoundBlock:()=>FlowGraphRoundBlock,FlowGraphSaturateBlock:()=>FlowGraphSaturateBlock,FlowGraphSignBlock:()=>FlowGraphSignBlock,FlowGraphSinBlock:()=>FlowGraphSinBlock,FlowGraphSinhBlock:()=>FlowGraphSinhBlock,FlowGraphSquareRootBlock:()=>FlowGraphSquareRootBlock,FlowGraphSubtractBlock:()=>FlowGraphSubtractBlock,FlowGraphTanBlock:()=>FlowGraphTanBlock,FlowGraphTanhBlock:()=>FlowGraphTanhBlock,FlowGraphTrailingZerosBlock:()=>FlowGraphTrailingZerosBlock,FlowGraphTruncBlock:()=>FlowGraphTruncBlock});var l=a(20538),e=a(39426),t=a(41554),n=a(49492);class FlowGraphConstantOperationBlock extends n.D{constructor(o,r,a,l){super(o,l),this._operation=r,this._className=a}_doOperation(o){return this._operation(o)}getClassName(){return this._className}}var p=a(49486),s=a(86562);class FlowGraphTernaryOperationBlock extends n.D{constructor(o,r,a,l,e,t,n){super(l,n),this._operation=e,this._className=t,this.a=this.registerDataInput("a",o),this.b=this.registerDataInput("b",r),this.c=this.registerDataInput("c",a)}_doOperation(o){return this._operation(this.a.getValue(o),this.b.getValue(o),this.c.getValue(o))}getClassName(){return this._className}}var c=a(234),h=a(33203),i=a(7181);class FlowGraphAddBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicAdd(o,r)),"FlowGraphAddBlock",o)}_polymorphicAdd(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.RV)(a,l)||(0,i.bh)(a,l)||(0,i.s1)(a,l))return o.add(r);if("Quaternion"===a||"Vector4"===l)return new p.Lt(o.x,o.y,o.z,o.w).addInPlace(r);if("Vector4"===a||"Quaternion"===l)return o.add(r);if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)+(0,i.J0)(r)}}(0,l.H7)("FlowGraphAddBlock",FlowGraphAddBlock);class FlowGraphSubtractBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicSubtract(o,r)),"FlowGraphSubtractBlock",o)}_polymorphicSubtract(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.RV)(a,l)||(0,i.s1)(a,l)||(0,i.bh)(a,l))return o.subtract(r);if("Quaternion"===a||"Vector4"===l)return new p.Lt(o.x,o.y,o.z,o.w).subtractInPlace(r);if("Vector4"===a||"Quaternion"===l)return o.subtract(r);if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)-(0,i.J0)(r)}}(0,l.H7)("FlowGraphSubtractBlock",FlowGraphSubtractBlock);class FlowGraphMultiplyBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicMultiply(o,r)),"FlowGraphMultiplyBlock",o)}_polymorphicMultiply(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.RV)(a,l)||(0,i.s1)(a,l))return o.multiply(r);if("Quaternion"===a||"Vector4"===l)return new p.Lt(o.x,o.y,o.z,o.w).multiplyInPlace(r);if("Vector4"===a||"Quaternion"===l)return o.multiply(r);if((0,i.bh)(a,l)){if(this.config?.useMatrixPerComponent){const l=o.m;for(let o=0;o<l.length;o++)l[o]*=r.m[o];return"Matrix2D"===a?new h.x(l):"Matrix3D"===a?new h.o(l):p.y3.FromArray(l)}return o=o,(r=r).multiply(o)}if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)*(0,i.J0)(r)}}(0,l.H7)("FlowGraphMultiplyBlock",FlowGraphMultiplyBlock);class FlowGraphDivideBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicDivide(o,r)),"FlowGraphDivideBlock",o)}_polymorphicDivide(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.RV)(a,l)||(0,i.s1)(a,l))return o.divide(r);if("Quaternion"===a||"Quaternion"===l){const a=o.clone();return a.x/=r.x,a.y/=r.y,a.z/=r.z,a.w/=r.w,a}if("Quaternion"===a||"Vector4"===l)return new p.Lt(o.x,o.y,o.z,o.w).divideInPlace(r);if("Vector4"===a||"Quaternion"===l)return o.divide(r);if((0,i.bh)(a,l)){if(this.config?.useMatrixPerComponent){const l=o.m;for(let o=0;o<l.length;o++)l[o]/=r.m[o];return"Matrix2D"===a?new h.x(l):"Matrix3D"===a?new h.o(l):p.y3.FromArray(l)}return r=r,(o=o).divide(r)}if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)/(0,i.J0)(r)}}(0,l.H7)("FlowGraphDivideBlock",FlowGraphDivideBlock);class FlowGraphRandomBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(o=>this._random(o)),"FlowGraphRandomBlock",o),this.min=this.registerDataInput("min",e.ab,o?.min??0),this.max=this.registerDataInput("max",e.ab,o?.max??1),o?.seed&&(this._seed=o.seed)}_isSeed(o=this._seed){return void 0!==o}_getRandomValue(){if(this._isSeed(this._seed)){const o=1e4*Math.sin(this._seed++);return o-Math.floor(o)}return Math.random()}_random(o){const r=this.min.getValue(o),a=this.max.getValue(o);return this._getRandomValue()*(a-r)+r}}(0,l.H7)("FlowGraphRandomBlock",FlowGraphRandomBlock);class FlowGraphEBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Math.E),"FlowGraphEBlock",o)}}(0,l.H7)("FlowGraphEBlock",FlowGraphEBlock);class FlowGraphPiBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Math.PI),"FlowGraphPIBlock",o)}}(0,l.H7)("FlowGraphPIBlock",FlowGraphPiBlock);class FlowGraphInfBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Number.POSITIVE_INFINITY),"FlowGraphInfBlock",o)}}(0,l.H7)("FlowGraphInfBlock",FlowGraphInfBlock);class FlowGraphNaNBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Number.NaN),"FlowGraphNaNBlock",o)}}function ComponentWiseUnaryOperation(o,r){switch((0,i.JP)(o)){case"FlowGraphInteger":return o=o,new c.K(r(o.value));case"Vector2":return o=o,new p.FM(r(o.x),r(o.y));case"Vector3":return o=o,new p.P(r(o.x),r(o.y),r(o.z));case"Vector4":return o=o,new p.Lt(r(o.x),r(o.y),r(o.z),r(o.w));case"Quaternion":return o=o,new p._f(r(o.x),r(o.y),r(o.z),r(o.w));case"Matrix":return o=o,p.y3.FromArray(o.m.map(r));case"Matrix2D":return o=o,new h.x(o.m.map(r));case"Matrix3D":return o=o,new h.o(o.m.map(r));default:return r(o=o)}}(0,l.H7)("FlowGraphNaNBlock",FlowGraphNaNBlock);class FlowGraphAbsBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAbs(o)),"FlowGraphAbsBlock",o)}_polymorphicAbs(o){return ComponentWiseUnaryOperation(o,Math.abs)}}(0,l.H7)("FlowGraphAbsBlock",FlowGraphAbsBlock);class FlowGraphSignBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicSign(o)),"FlowGraphSignBlock",o)}_polymorphicSign(o){return ComponentWiseUnaryOperation(o,Math.sign)}}(0,l.H7)("FlowGraphSignBlock",FlowGraphSignBlock);class FlowGraphTruncBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicTrunc(o)),"FlowGraphTruncBlock",o)}_polymorphicTrunc(o){return ComponentWiseUnaryOperation(o,Math.trunc)}}(0,l.H7)("FlowGraphTruncBlock",FlowGraphTruncBlock);class FlowGraphFloorBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicFloor(o)),"FlowGraphFloorBlock",o)}_polymorphicFloor(o){return ComponentWiseUnaryOperation(o,Math.floor)}}(0,l.H7)("FlowGraphFloorBlock",FlowGraphFloorBlock);class FlowGraphCeilBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicCeiling(o)),"FlowGraphCeilBlock",o)}_polymorphicCeiling(o){return ComponentWiseUnaryOperation(o,Math.ceil)}}(0,l.H7)("FlowGraphCeilBlock",FlowGraphCeilBlock);class FlowGraphRoundBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicRound(o)),"FlowGraphRoundBlock",o)}_polymorphicRound(o){return ComponentWiseUnaryOperation(o,(o=>o<0&&this.config?.roundHalfAwayFromZero?-Math.round(-o):Math.round(o)))}}(0,l.H7)("FlowGraphRoundBlock",FlowGraphRoundBlock);class FlowGraphFractionBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicFraction(o)),"FlowGraphFractBlock",o)}_polymorphicFraction(o){return ComponentWiseUnaryOperation(o,(o=>o-Math.floor(o)))}}(0,l.H7)("FlowGraphFractBlock",FlowGraphFractionBlock);class FlowGraphNegationBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicNeg(o)),"FlowGraphNegationBlock",o)}_polymorphicNeg(o){return ComponentWiseUnaryOperation(o,(o=>-o))}}function ComponentWiseBinaryOperation(o,r,a){switch((0,i.JP)(o)){case"FlowGraphInteger":return o=o,r=r,new c.K(a(o.value,r.value));case"Vector2":return o=o,r=r,new p.FM(a(o.x,r.x),a(o.y,r.y));case"Vector3":return o=o,r=r,new p.P(a(o.x,r.x),a(o.y,r.y),a(o.z,r.z));case"Vector4":return o=o,r=r,new p.Lt(a(o.x,r.x),a(o.y,r.y),a(o.z,r.z),a(o.w,r.w));case"Quaternion":return o=o,r=r,new p._f(a(o.x,r.x),a(o.y,r.y),a(o.z,r.z),a(o.w,r.w));case"Matrix":return o=o,p.y3.FromArray(o.m.map(((o,l)=>a(o,r.m[l]))));case"Matrix2D":return o=o,new h.x(o.m.map(((o,l)=>a(o,r.m[l]))));case"Matrix3D":return o=o,new h.o(o.m.map(((o,l)=>a(o,r.m[l]))));default:return a((0,i.J0)(o),(0,i.J0)(r))}}(0,l.H7)("FlowGraphNegationBlock",FlowGraphNegationBlock);class FlowGraphModuloBlock extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicRemainder(o,r)),"FlowGraphModuloBlock",o)}_polymorphicRemainder(o,r){return ComponentWiseBinaryOperation(o,r,((o,r)=>o%r))}}(0,l.H7)("FlowGraphModuloBlock",FlowGraphModuloBlock);class FlowGraphMinBlock extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicMin(o,r)),"FlowGraphMinBlock",o)}_polymorphicMin(o,r){return ComponentWiseBinaryOperation(o,r,Math.min)}}(0,l.H7)("FlowGraphMinBlock",FlowGraphMinBlock);class FlowGraphMaxBlock extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicMax(o,r)),"FlowGraphMaxBlock",o)}_polymorphicMax(o,r){return ComponentWiseBinaryOperation(o,r,Math.max)}}function Clamp(o,r,a){return Math.min(Math.max(o,Math.min(r,a)),Math.max(r,a))}function ComponentWiseTernaryOperation(o,r,a,l){switch((0,i.JP)(o)){case"FlowGraphInteger":return o=o,r=r,a=a,new c.K(l(o.value,r.value,a.value));case"Vector2":return o=o,r=r,a=a,new p.FM(l(o.x,r.x,a.x),l(o.y,r.y,a.y));case"Vector3":return o=o,r=r,a=a,new p.P(l(o.x,r.x,a.x),l(o.y,r.y,a.y),l(o.z,r.z,a.z));case"Vector4":return o=o,r=r,a=a,new p.Lt(l(o.x,r.x,a.x),l(o.y,r.y,a.y),l(o.z,r.z,a.z),l(o.w,r.w,a.w));case"Quaternion":return o=o,r=r,a=a,new p._f(l(o.x,r.x,a.x),l(o.y,r.y,a.y),l(o.z,r.z,a.z),l(o.w,r.w,a.w));case"Matrix":return p.y3.FromArray(o.m.map(((o,e)=>l(o,r.m[e],a.m[e]))));case"Matrix2D":return new h.x(o.m.map(((o,e)=>l(o,r.m[e],a.m[e]))));case"Matrix3D":return new h.o(o.m.map(((o,e)=>l(o,r.m[e],a.m[e]))));default:return l((0,i.J0)(o),(0,i.J0)(r),(0,i.J0)(a))}}(0,l.H7)("FlowGraphMaxBlock",FlowGraphMaxBlock);class FlowGraphClampBlock extends FlowGraphTernaryOperationBlock{constructor(o){super(e.s8,e.s8,e.s8,e.s8,((o,r,a)=>this._polymorphicClamp(o,r,a)),"FlowGraphClampBlock",o)}_polymorphicClamp(o,r,a){return ComponentWiseTernaryOperation(o,r,a,Clamp)}}function Saturate(o){return Math.min(Math.max(o,0),1)}(0,l.H7)("FlowGraphClampBlock",FlowGraphClampBlock);class FlowGraphSaturateBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicSaturate(o)),"FlowGraphSaturateBlock",o)}_polymorphicSaturate(o){return ComponentWiseUnaryOperation(o,Saturate)}}function Interpolate(o,r,a){return(1-a)*o+a*r}(0,l.H7)("FlowGraphSaturateBlock",FlowGraphSaturateBlock);class FlowGraphMathInterpolationBlock extends FlowGraphTernaryOperationBlock{constructor(o){super(e.s8,e.s8,e.s8,e.s8,((o,r,a)=>this._polymorphicInterpolate(o,r,a)),"FlowGraphMathInterpolationBlock",o)}_polymorphicInterpolate(o,r,a){return ComponentWiseTernaryOperation(o,r,a,Interpolate)}}(0,l.H7)("FlowGraphMathInterpolationBlock",FlowGraphMathInterpolationBlock);class FlowGraphEqualityBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicEq(o,r)),"FlowGraphEqualityBlock",o)}_polymorphicEq(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);return typeof o==typeof r&&((0,i.RV)(a,l)||(0,i.bh)(a,l)||(0,i.s1)(a,l)?o.equals(r):o===r)}}function ComparisonOperators(o,r,a){if((0,i.kE)(o)&&(0,i.kE)(r))return a((0,i.J0)(o),(0,i.J0)(r));throw new Error(`Cannot compare ${o} and ${r}`)}(0,l.H7)("FlowGraphEqualityBlock",FlowGraphEqualityBlock);class FlowGraphLessThanBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicLessThan(o,r)),"FlowGraphLessThanBlock",o)}_polymorphicLessThan(o,r){return ComparisonOperators(o,r,((o,r)=>o<r))}}(0,l.H7)("FlowGraphLessThanBlock",FlowGraphLessThanBlock);class FlowGraphLessThanOrEqualBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicLessThanOrEqual(o,r)),"FlowGraphLessThanOrEqualBlock",o)}_polymorphicLessThanOrEqual(o,r){return ComparisonOperators(o,r,((o,r)=>o<=r))}}(0,l.H7)("FlowGraphLessThanOrEqualBlock",FlowGraphLessThanOrEqualBlock);class FlowGraphGreaterThanBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicGreaterThan(o,r)),"FlowGraphGreaterThanBlock",o)}_polymorphicGreaterThan(o,r){return ComparisonOperators(o,r,((o,r)=>o>r))}}(0,l.H7)("FlowGraphGreaterThanBlock",FlowGraphGreaterThanBlock);class FlowGraphGreaterThanOrEqualBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicGreaterThanOrEqual(o,r)),"FlowGraphGreaterThanOrEqualBlock",o)}_polymorphicGreaterThanOrEqual(o,r){return ComparisonOperators(o,r,((o,r)=>o>=r))}}(0,l.H7)("FlowGraphGreaterThanOrEqualBlock",FlowGraphGreaterThanOrEqualBlock);class FlowGraphIsNanBlock extends s.p{constructor(o){super(e.s8,e.PE,(o=>this._polymorphicIsNan(o)),"FlowGraphIsNaNBlock",o)}_polymorphicIsNan(o){if((0,i.kE)(o,!0))return isNaN((0,i.J0)(o));throw new Error(`Cannot get NaN of ${o}`)}}(0,l.H7)("FlowGraphIsNaNBlock",FlowGraphIsNanBlock);class FlowGraphIsInfinityBlock extends s.p{constructor(o){super(e.s8,e.PE,(o=>this._polymorphicIsInf(o)),"FlowGraphIsInfBlock",o)}_polymorphicIsInf(o){if((0,i.kE)(o))return!isFinite((0,i.J0)(o));throw new Error(`Cannot get isInf of ${o}`)}}(0,l.H7)("FlowGraphIsInfBlock",FlowGraphIsInfinityBlock);class FlowGraphDegToRadBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicDegToRad(o)),"FlowGraphDegToRadBlock",o)}_degToRad(o){return o*Math.PI/180}_polymorphicDegToRad(o){return ComponentWiseUnaryOperation(o,this._degToRad)}}(0,l.H7)("FlowGraphDegToRadBlock",FlowGraphDegToRadBlock);class FlowGraphRadToDegBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicRadToDeg(o)),"FlowGraphRadToDegBlock",o)}_radToDeg(o){return 180*o/Math.PI}_polymorphicRadToDeg(o){return ComponentWiseUnaryOperation(o,this._radToDeg)}}(0,l.H7)("FlowGraphRadToDegBlock",FlowGraphRadToDegBlock);class FlowGraphSinBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicSin(o)),"FlowGraphSinBlock",o)}_polymorphicSin(o){return ComponentWiseUnaryOperation(o,Math.sin)}}class FlowGraphCosBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicCos(o)),"FlowGraphCosBlock",o)}_polymorphicCos(o){return ComponentWiseUnaryOperation(o,Math.cos)}}class FlowGraphTanBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicTan(o)),"FlowGraphTanBlock",o)}_polymorphicTan(o){return ComponentWiseUnaryOperation(o,Math.tan)}}class FlowGraphAsinBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAsin(o)),"FlowGraphASinBlock",o)}_polymorphicAsin(o){return ComponentWiseUnaryOperation(o,Math.asin)}}(0,l.H7)("FlowGraphASinBlock",FlowGraphAsinBlock);class FlowGraphAcosBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAcos(o)),"FlowGraphACosBlock",o)}_polymorphicAcos(o){return ComponentWiseUnaryOperation(o,Math.acos)}}(0,l.H7)("FlowGraphACosBlock",FlowGraphAcosBlock);class FlowGraphAtanBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAtan(o)),"FlowGraphATanBlock",o)}_polymorphicAtan(o){return ComponentWiseUnaryOperation(o,Math.atan)}}(0,l.H7)("FlowGraphATanBlock",FlowGraphAtanBlock);class FlowGraphAtan2Block extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicAtan2(o,r)),"FlowGraphATan2Block",o)}_polymorphicAtan2(o,r){return ComponentWiseBinaryOperation(o,r,Math.atan2)}}(0,l.H7)("FlowGraphATan2Block",FlowGraphAtan2Block);class FlowGraphSinhBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicSinh(o)),"FlowGraphSinhBlock",o)}_polymorphicSinh(o){return ComponentWiseUnaryOperation(o,Math.sinh)}}(0,l.H7)("FlowGraphSinhBlock",FlowGraphSinhBlock);class FlowGraphCoshBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicCosh(o)),"FlowGraphCoshBlock",o)}_polymorphicCosh(o){return ComponentWiseUnaryOperation(o,Math.cosh)}}(0,l.H7)("FlowGraphCoshBlock",FlowGraphCoshBlock);class FlowGraphTanhBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicTanh(o)),"FlowGraphTanhBlock",o)}_polymorphicTanh(o){return ComponentWiseUnaryOperation(o,Math.tanh)}}(0,l.H7)("FlowGraphTanhBlock",FlowGraphTanhBlock);class FlowGraphAsinhBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicAsinh(o)),"FlowGraphASinhBlock",o)}_polymorphicAsinh(o){return ComponentWiseUnaryOperation(o,Math.asinh)}}(0,l.H7)("FlowGraphASinhBlock",FlowGraphAsinhBlock);class FlowGraphAcoshBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicAcosh(o)),"FlowGraphACoshBlock",o)}_polymorphicAcosh(o){return ComponentWiseUnaryOperation(o,Math.acosh)}}(0,l.H7)("FlowGraphACoshBlock",FlowGraphAcoshBlock);class FlowGraphAtanhBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicAtanh(o)),"FlowGraphATanhBlock",o)}_polymorphicAtanh(o){return ComponentWiseUnaryOperation(o,Math.atanh)}}(0,l.H7)("FlowGraphATanhBlock",FlowGraphAtanhBlock);class FlowGraphExpBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicExp(o)),"FlowGraphExponentialBlock",o)}_polymorphicExp(o){return ComponentWiseUnaryOperation(o,Math.exp)}}(0,l.H7)("FlowGraphExponentialBlock",FlowGraphExpBlock);class FlowGraphLogBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicLog(o)),"FlowGraphLogBlock",o)}_polymorphicLog(o){return ComponentWiseUnaryOperation(o,Math.log)}}(0,l.H7)("FlowGraphLogBlock",FlowGraphLogBlock);class FlowGraphLog2Block extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicLog2(o)),"FlowGraphLog2Block",o)}_polymorphicLog2(o){return ComponentWiseUnaryOperation(o,Math.log2)}}(0,l.H7)("FlowGraphLog2Block",FlowGraphLog2Block);class FlowGraphLog10Block extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicLog10(o)),"FlowGraphLog10Block",o)}_polymorphicLog10(o){return ComponentWiseUnaryOperation(o,Math.log10)}}(0,l.H7)("FlowGraphLog10Block",FlowGraphLog10Block);class FlowGraphSquareRootBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicSqrt(o)),"FlowGraphSquareRootBlock",o)}_polymorphicSqrt(o){return ComponentWiseUnaryOperation(o,Math.sqrt)}}(0,l.H7)("FlowGraphSquareRootBlock",FlowGraphSquareRootBlock);class FlowGraphCubeRootBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicCubeRoot(o)),"FlowGraphCubeRootBlock",o)}_polymorphicCubeRoot(o){return ComponentWiseUnaryOperation(o,Math.cbrt)}}(0,l.H7)("FlowGraphCubeRootBlock",FlowGraphCubeRootBlock);class FlowGraphPowerBlock extends t.V{constructor(o){super(e.s8,e.ab,e.ab,((o,r)=>this._polymorphicPow(o,r)),"FlowGraphPowerBlock",o)}_polymorphicPow(o,r){return ComponentWiseBinaryOperation(o,r,Math.pow)}}(0,l.H7)("FlowGraphPowerBlock",FlowGraphPowerBlock);class FlowGraphBitwiseNotBlock extends s.p{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(o=>"boolean"==typeof o?!o:"number"==typeof o?~o:new c.K(~o.value)),"FlowGraphBitwiseNotBlock",o)}}(0,l.H7)("FlowGraphBitwiseNotBlock",FlowGraphBitwiseNotBlock);class FlowGraphBitwiseAndBlock extends t.V{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),((o,r)=>{if("boolean"==typeof o&&"boolean"==typeof r)return o&&r;if("number"==typeof o&&"number"==typeof r)return o&r;if("object"==typeof o&&"object"==typeof r)return new c.K(o.value&r.value);throw new Error(`Cannot perform bitwise AND on ${o} and ${r}`)}),"FlowGraphBitwiseAndBlock",o)}}(0,l.H7)("FlowGraphBitwiseAndBlock",FlowGraphBitwiseAndBlock);class FlowGraphBitwiseOrBlock extends t.V{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),((o,r)=>{if("boolean"==typeof o&&"boolean"==typeof r)return o||r;if("number"==typeof o&&"number"==typeof r)return o|r;if("object"==typeof o&&"object"==typeof r)return new c.K(o.value|r.value);throw new Error(`Cannot perform bitwise OR on ${o} and ${r}`)}),"FlowGraphBitwiseOrBlock",o)}}(0,l.H7)("FlowGraphBitwiseOrBlock",FlowGraphBitwiseOrBlock);class FlowGraphBitwiseXorBlock extends t.V{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),((o,r)=>{if("boolean"==typeof o&&"boolean"==typeof r)return o!==r;if("number"==typeof o&&"number"==typeof r)return o^r;if("object"==typeof o&&"object"==typeof r)return new c.K(o.value^r.value);throw new Error(`Cannot perform bitwise XOR on ${o} and ${r}`)}),"FlowGraphBitwiseXorBlock",o)}}(0,l.H7)("FlowGraphBitwiseXorBlock",FlowGraphBitwiseXorBlock);class FlowGraphBitwiseLeftShiftBlock extends t.V{constructor(o){super(e.fj,e.fj,e.fj,((o,r)=>new c.K(o.value<<r.value)),"FlowGraphBitwiseLeftShiftBlock",o)}}(0,l.H7)("FlowGraphBitwiseLeftShiftBlock",FlowGraphBitwiseLeftShiftBlock);class FlowGraphBitwiseRightShiftBlock extends t.V{constructor(o){super(e.fj,e.fj,e.fj,((o,r)=>new c.K(o.value>>r.value)),"FlowGraphBitwiseRightShiftBlock",o)}}(0,l.H7)("FlowGraphBitwiseRightShiftBlock",FlowGraphBitwiseRightShiftBlock);class FlowGraphLeadingZerosBlock extends s.p{constructor(o){super(e.fj,e.fj,(o=>new c.K(Math.clz32(o.value))),"FlowGraphLeadingZerosBlock",o)}}(0,l.H7)("FlowGraphLeadingZerosBlock",FlowGraphLeadingZerosBlock);class FlowGraphTrailingZerosBlock extends s.p{constructor(o){super(e.fj,e.fj,(o=>new c.K(o.value?31-Math.clz32(o.value&-o.value):32)),"FlowGraphTrailingZerosBlock",o)}}(0,l.H7)("FlowGraphTrailingZerosBlock",FlowGraphTrailingZerosBlock);class FlowGraphOneBitsCounterBlock extends s.p{constructor(o){super(e.fj,e.fj,(o=>new c.K(function CountOnes(o){let r=0;for(;o;)r+=1&o,o>>=1;return r}(o.value))),"FlowGraphOneBitsCounterBlock",o)}}(0,l.H7)("FlowGraphOneBitsCounterBlock",FlowGraphOneBitsCounterBlock)},41554:(o,r,a)=>{a.d(r,{V:()=>FlowGraphBinaryOperationBlock});var l=a(49492);class FlowGraphBinaryOperationBlock extends l.D{constructor(o,r,a,l,e,t){super(a,t),this._operation=l,this._className=e,this.a=this.registerDataInput("a",o),this.b=this.registerDataInput("b",r)}_doOperation(o){const r=this.a.getValue(o),a=this.b.getValue(o);return this._operation(r,a)}getClassName(){return this._className}}},49492:(o,r,a)=>{a.d(r,{D:()=>FlowGraphCachedOperationBlock});var l=a(43890),e=a(39426);const t="cachedOperationValue",n="cachedExecutionId";class FlowGraphCachedOperationBlock extends l.A{constructor(o,r){super(r),this.value=this.registerDataOutput("value",o),this.isValid=this.registerDataOutput("isValid",e.PE)}_updateOutputs(o){const r=o._getExecutionVariable(this,n,-1),a=o._getExecutionVariable(this,t,null);if(null!=a&&r===o.executionId)this.isValid.setValue(!0,o),this.value.setValue(a,o);else try{const r=this._doOperation(o);if(null==r)return void this.isValid.setValue(!1,o);o._setExecutionVariable(this,t,r),o._setExecutionVariable(this,n,o.executionId),this.value.setValue(r,o),this.isValid.setValue(!0,o)}catch(r){this.isValid.setValue(!1,o)}}}},86562:(o,r,a)=>{a.d(r,{p:()=>FlowGraphUnaryOperationBlock});var l=a(49492);class FlowGraphUnaryOperationBlock extends l.D{constructor(o,r,a,l,e){super(r,e),this._operation=a,this._className=l,this.a=this.registerDataInput("a",o)}_doOperation(o){return this._operation(this.a.getValue(o))}getClassName(){return this._className}}}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4049],{94049:(o,r,a)=>{a.r(r),a.d(r,{FlowGraphAbsBlock:()=>FlowGraphAbsBlock,FlowGraphAcosBlock:()=>FlowGraphAcosBlock,FlowGraphAcoshBlock:()=>FlowGraphAcoshBlock,FlowGraphAddBlock:()=>FlowGraphAddBlock,FlowGraphAsinBlock:()=>FlowGraphAsinBlock,FlowGraphAsinhBlock:()=>FlowGraphAsinhBlock,FlowGraphAtan2Block:()=>FlowGraphAtan2Block,FlowGraphAtanBlock:()=>FlowGraphAtanBlock,FlowGraphAtanhBlock:()=>FlowGraphAtanhBlock,FlowGraphBitwiseAndBlock:()=>FlowGraphBitwiseAndBlock,FlowGraphBitwiseLeftShiftBlock:()=>FlowGraphBitwiseLeftShiftBlock,FlowGraphBitwiseNotBlock:()=>FlowGraphBitwiseNotBlock,FlowGraphBitwiseOrBlock:()=>FlowGraphBitwiseOrBlock,FlowGraphBitwiseRightShiftBlock:()=>FlowGraphBitwiseRightShiftBlock,FlowGraphBitwiseXorBlock:()=>FlowGraphBitwiseXorBlock,FlowGraphCeilBlock:()=>FlowGraphCeilBlock,FlowGraphClampBlock:()=>FlowGraphClampBlock,FlowGraphCosBlock:()=>FlowGraphCosBlock,FlowGraphCoshBlock:()=>FlowGraphCoshBlock,FlowGraphCubeRootBlock:()=>FlowGraphCubeRootBlock,FlowGraphDegToRadBlock:()=>FlowGraphDegToRadBlock,FlowGraphDivideBlock:()=>FlowGraphDivideBlock,FlowGraphEBlock:()=>FlowGraphEBlock,FlowGraphEqualityBlock:()=>FlowGraphEqualityBlock,FlowGraphExpBlock:()=>FlowGraphExpBlock,FlowGraphFloorBlock:()=>FlowGraphFloorBlock,FlowGraphFractionBlock:()=>FlowGraphFractionBlock,FlowGraphGreaterThanBlock:()=>FlowGraphGreaterThanBlock,FlowGraphGreaterThanOrEqualBlock:()=>FlowGraphGreaterThanOrEqualBlock,FlowGraphInfBlock:()=>FlowGraphInfBlock,FlowGraphIsInfinityBlock:()=>FlowGraphIsInfinityBlock,FlowGraphIsNanBlock:()=>FlowGraphIsNanBlock,FlowGraphLeadingZerosBlock:()=>FlowGraphLeadingZerosBlock,FlowGraphLessThanBlock:()=>FlowGraphLessThanBlock,FlowGraphLessThanOrEqualBlock:()=>FlowGraphLessThanOrEqualBlock,FlowGraphLog10Block:()=>FlowGraphLog10Block,FlowGraphLog2Block:()=>FlowGraphLog2Block,FlowGraphLogBlock:()=>FlowGraphLogBlock,FlowGraphMathInterpolationBlock:()=>FlowGraphMathInterpolationBlock,FlowGraphMaxBlock:()=>FlowGraphMaxBlock,FlowGraphMinBlock:()=>FlowGraphMinBlock,FlowGraphModuloBlock:()=>FlowGraphModuloBlock,FlowGraphMultiplyBlock:()=>FlowGraphMultiplyBlock,FlowGraphNaNBlock:()=>FlowGraphNaNBlock,FlowGraphNegationBlock:()=>FlowGraphNegationBlock,FlowGraphOneBitsCounterBlock:()=>FlowGraphOneBitsCounterBlock,FlowGraphPiBlock:()=>FlowGraphPiBlock,FlowGraphPowerBlock:()=>FlowGraphPowerBlock,FlowGraphRadToDegBlock:()=>FlowGraphRadToDegBlock,FlowGraphRandomBlock:()=>FlowGraphRandomBlock,FlowGraphRoundBlock:()=>FlowGraphRoundBlock,FlowGraphSaturateBlock:()=>FlowGraphSaturateBlock,FlowGraphSignBlock:()=>FlowGraphSignBlock,FlowGraphSinBlock:()=>FlowGraphSinBlock,FlowGraphSinhBlock:()=>FlowGraphSinhBlock,FlowGraphSquareRootBlock:()=>FlowGraphSquareRootBlock,FlowGraphSubtractBlock:()=>FlowGraphSubtractBlock,FlowGraphTanBlock:()=>FlowGraphTanBlock,FlowGraphTanhBlock:()=>FlowGraphTanhBlock,FlowGraphTrailingZerosBlock:()=>FlowGraphTrailingZerosBlock,FlowGraphTruncBlock:()=>FlowGraphTruncBlock});var l=a(20538),e=a(39426),t=a(41554),n=a(49492);class FlowGraphConstantOperationBlock extends n.D{constructor(o,r,a,l){super(o,l),this._operation=r,this._className=a}_doOperation(o){return this._operation(o)}getClassName(){return this._className}}var p=a(72781),s=a(86562);class FlowGraphTernaryOperationBlock extends n.D{constructor(o,r,a,l,e,t,n){super(l,n),this._operation=e,this._className=t,this.a=this.registerDataInput("a",o),this.b=this.registerDataInput("b",r),this.c=this.registerDataInput("c",a)}_doOperation(o){return this._operation(this.a.getValue(o),this.b.getValue(o),this.c.getValue(o))}getClassName(){return this._className}}var c=a(234),h=a(33203),i=a(7181);class FlowGraphAddBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicAdd(o,r)),"FlowGraphAddBlock",o)}_polymorphicAdd(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.RV)(a,l)||(0,i.bh)(a,l)||(0,i.s1)(a,l))return o.add(r);if("Quaternion"===a||"Vector4"===l)return new p.Lt(o.x,o.y,o.z,o.w).addInPlace(r);if("Vector4"===a||"Quaternion"===l)return o.add(r);if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)+(0,i.J0)(r)}}(0,l.H7)("FlowGraphAddBlock",FlowGraphAddBlock);class FlowGraphSubtractBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicSubtract(o,r)),"FlowGraphSubtractBlock",o)}_polymorphicSubtract(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.RV)(a,l)||(0,i.s1)(a,l)||(0,i.bh)(a,l))return o.subtract(r);if("Quaternion"===a||"Vector4"===l)return new p.Lt(o.x,o.y,o.z,o.w).subtractInPlace(r);if("Vector4"===a||"Quaternion"===l)return o.subtract(r);if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)-(0,i.J0)(r)}}(0,l.H7)("FlowGraphSubtractBlock",FlowGraphSubtractBlock);class FlowGraphMultiplyBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicMultiply(o,r)),"FlowGraphMultiplyBlock",o)}_polymorphicMultiply(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.RV)(a,l)||(0,i.s1)(a,l))return o.multiply(r);if("Quaternion"===a||"Vector4"===l)return new p.Lt(o.x,o.y,o.z,o.w).multiplyInPlace(r);if("Vector4"===a||"Quaternion"===l)return o.multiply(r);if((0,i.bh)(a,l)){if(this.config?.useMatrixPerComponent){const l=o.m;for(let o=0;o<l.length;o++)l[o]*=r.m[o];return"Matrix2D"===a?new h.x(l):"Matrix3D"===a?new h.o(l):p.y3.FromArray(l)}return o=o,(r=r).multiply(o)}if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)*(0,i.J0)(r)}}(0,l.H7)("FlowGraphMultiplyBlock",FlowGraphMultiplyBlock);class FlowGraphDivideBlock extends t.V{constructor(o){super((0,e._M)(o?.type),(0,e._M)(o?.type),(0,e._M)(o?.type),((o,r)=>this._polymorphicDivide(o,r)),"FlowGraphDivideBlock",o)}_polymorphicDivide(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);if((0,i.RV)(a,l)||(0,i.s1)(a,l))return o.divide(r);if("Quaternion"===a||"Quaternion"===l){const a=o.clone();return a.x/=r.x,a.y/=r.y,a.z/=r.z,a.w/=r.w,a}if("Quaternion"===a||"Vector4"===l)return new p.Lt(o.x,o.y,o.z,o.w).divideInPlace(r);if("Vector4"===a||"Quaternion"===l)return o.divide(r);if((0,i.bh)(a,l)){if(this.config?.useMatrixPerComponent){const l=o.m;for(let o=0;o<l.length;o++)l[o]/=r.m[o];return"Matrix2D"===a?new h.x(l):"Matrix3D"===a?new h.o(l):p.y3.FromArray(l)}return r=r,(o=o).divide(r)}if(this.config?.preventIntegerFloatArithmetic&&typeof o!=typeof r)throw new Error("Cannot add different types of numbers.");return(0,i.J0)(o)/(0,i.J0)(r)}}(0,l.H7)("FlowGraphDivideBlock",FlowGraphDivideBlock);class FlowGraphRandomBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(o=>this._random(o)),"FlowGraphRandomBlock",o),this.min=this.registerDataInput("min",e.ab,o?.min??0),this.max=this.registerDataInput("max",e.ab,o?.max??1),o?.seed&&(this._seed=o.seed)}_isSeed(o=this._seed){return void 0!==o}_getRandomValue(){if(this._isSeed(this._seed)){const o=1e4*Math.sin(this._seed++);return o-Math.floor(o)}return Math.random()}_random(o){const r=this.min.getValue(o),a=this.max.getValue(o);return this._getRandomValue()*(a-r)+r}}(0,l.H7)("FlowGraphRandomBlock",FlowGraphRandomBlock);class FlowGraphEBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Math.E),"FlowGraphEBlock",o)}}(0,l.H7)("FlowGraphEBlock",FlowGraphEBlock);class FlowGraphPiBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Math.PI),"FlowGraphPIBlock",o)}}(0,l.H7)("FlowGraphPIBlock",FlowGraphPiBlock);class FlowGraphInfBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Number.POSITIVE_INFINITY),"FlowGraphInfBlock",o)}}(0,l.H7)("FlowGraphInfBlock",FlowGraphInfBlock);class FlowGraphNaNBlock extends FlowGraphConstantOperationBlock{constructor(o){super(e.ab,(()=>Number.NaN),"FlowGraphNaNBlock",o)}}function ComponentWiseUnaryOperation(o,r){switch((0,i.JP)(o)){case"FlowGraphInteger":return o=o,new c.K(r(o.value));case"Vector2":return o=o,new p.FM(r(o.x),r(o.y));case"Vector3":return o=o,new p.P(r(o.x),r(o.y),r(o.z));case"Vector4":return o=o,new p.Lt(r(o.x),r(o.y),r(o.z),r(o.w));case"Quaternion":return o=o,new p._f(r(o.x),r(o.y),r(o.z),r(o.w));case"Matrix":return o=o,p.y3.FromArray(o.m.map(r));case"Matrix2D":return o=o,new h.x(o.m.map(r));case"Matrix3D":return o=o,new h.o(o.m.map(r));default:return r(o=o)}}(0,l.H7)("FlowGraphNaNBlock",FlowGraphNaNBlock);class FlowGraphAbsBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAbs(o)),"FlowGraphAbsBlock",o)}_polymorphicAbs(o){return ComponentWiseUnaryOperation(o,Math.abs)}}(0,l.H7)("FlowGraphAbsBlock",FlowGraphAbsBlock);class FlowGraphSignBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicSign(o)),"FlowGraphSignBlock",o)}_polymorphicSign(o){return ComponentWiseUnaryOperation(o,Math.sign)}}(0,l.H7)("FlowGraphSignBlock",FlowGraphSignBlock);class FlowGraphTruncBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicTrunc(o)),"FlowGraphTruncBlock",o)}_polymorphicTrunc(o){return ComponentWiseUnaryOperation(o,Math.trunc)}}(0,l.H7)("FlowGraphTruncBlock",FlowGraphTruncBlock);class FlowGraphFloorBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicFloor(o)),"FlowGraphFloorBlock",o)}_polymorphicFloor(o){return ComponentWiseUnaryOperation(o,Math.floor)}}(0,l.H7)("FlowGraphFloorBlock",FlowGraphFloorBlock);class FlowGraphCeilBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicCeiling(o)),"FlowGraphCeilBlock",o)}_polymorphicCeiling(o){return ComponentWiseUnaryOperation(o,Math.ceil)}}(0,l.H7)("FlowGraphCeilBlock",FlowGraphCeilBlock);class FlowGraphRoundBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicRound(o)),"FlowGraphRoundBlock",o)}_polymorphicRound(o){return ComponentWiseUnaryOperation(o,(o=>o<0&&this.config?.roundHalfAwayFromZero?-Math.round(-o):Math.round(o)))}}(0,l.H7)("FlowGraphRoundBlock",FlowGraphRoundBlock);class FlowGraphFractionBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicFraction(o)),"FlowGraphFractBlock",o)}_polymorphicFraction(o){return ComponentWiseUnaryOperation(o,(o=>o-Math.floor(o)))}}(0,l.H7)("FlowGraphFractBlock",FlowGraphFractionBlock);class FlowGraphNegationBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicNeg(o)),"FlowGraphNegationBlock",o)}_polymorphicNeg(o){return ComponentWiseUnaryOperation(o,(o=>-o))}}function ComponentWiseBinaryOperation(o,r,a){switch((0,i.JP)(o)){case"FlowGraphInteger":return o=o,r=r,new c.K(a(o.value,r.value));case"Vector2":return o=o,r=r,new p.FM(a(o.x,r.x),a(o.y,r.y));case"Vector3":return o=o,r=r,new p.P(a(o.x,r.x),a(o.y,r.y),a(o.z,r.z));case"Vector4":return o=o,r=r,new p.Lt(a(o.x,r.x),a(o.y,r.y),a(o.z,r.z),a(o.w,r.w));case"Quaternion":return o=o,r=r,new p._f(a(o.x,r.x),a(o.y,r.y),a(o.z,r.z),a(o.w,r.w));case"Matrix":return o=o,p.y3.FromArray(o.m.map(((o,l)=>a(o,r.m[l]))));case"Matrix2D":return o=o,new h.x(o.m.map(((o,l)=>a(o,r.m[l]))));case"Matrix3D":return o=o,new h.o(o.m.map(((o,l)=>a(o,r.m[l]))));default:return a((0,i.J0)(o),(0,i.J0)(r))}}(0,l.H7)("FlowGraphNegationBlock",FlowGraphNegationBlock);class FlowGraphModuloBlock extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicRemainder(o,r)),"FlowGraphModuloBlock",o)}_polymorphicRemainder(o,r){return ComponentWiseBinaryOperation(o,r,((o,r)=>o%r))}}(0,l.H7)("FlowGraphModuloBlock",FlowGraphModuloBlock);class FlowGraphMinBlock extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicMin(o,r)),"FlowGraphMinBlock",o)}_polymorphicMin(o,r){return ComponentWiseBinaryOperation(o,r,Math.min)}}(0,l.H7)("FlowGraphMinBlock",FlowGraphMinBlock);class FlowGraphMaxBlock extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicMax(o,r)),"FlowGraphMaxBlock",o)}_polymorphicMax(o,r){return ComponentWiseBinaryOperation(o,r,Math.max)}}function Clamp(o,r,a){return Math.min(Math.max(o,Math.min(r,a)),Math.max(r,a))}function ComponentWiseTernaryOperation(o,r,a,l){switch((0,i.JP)(o)){case"FlowGraphInteger":return o=o,r=r,a=a,new c.K(l(o.value,r.value,a.value));case"Vector2":return o=o,r=r,a=a,new p.FM(l(o.x,r.x,a.x),l(o.y,r.y,a.y));case"Vector3":return o=o,r=r,a=a,new p.P(l(o.x,r.x,a.x),l(o.y,r.y,a.y),l(o.z,r.z,a.z));case"Vector4":return o=o,r=r,a=a,new p.Lt(l(o.x,r.x,a.x),l(o.y,r.y,a.y),l(o.z,r.z,a.z),l(o.w,r.w,a.w));case"Quaternion":return o=o,r=r,a=a,new p._f(l(o.x,r.x,a.x),l(o.y,r.y,a.y),l(o.z,r.z,a.z),l(o.w,r.w,a.w));case"Matrix":return p.y3.FromArray(o.m.map(((o,e)=>l(o,r.m[e],a.m[e]))));case"Matrix2D":return new h.x(o.m.map(((o,e)=>l(o,r.m[e],a.m[e]))));case"Matrix3D":return new h.o(o.m.map(((o,e)=>l(o,r.m[e],a.m[e]))));default:return l((0,i.J0)(o),(0,i.J0)(r),(0,i.J0)(a))}}(0,l.H7)("FlowGraphMaxBlock",FlowGraphMaxBlock);class FlowGraphClampBlock extends FlowGraphTernaryOperationBlock{constructor(o){super(e.s8,e.s8,e.s8,e.s8,((o,r,a)=>this._polymorphicClamp(o,r,a)),"FlowGraphClampBlock",o)}_polymorphicClamp(o,r,a){return ComponentWiseTernaryOperation(o,r,a,Clamp)}}function Saturate(o){return Math.min(Math.max(o,0),1)}(0,l.H7)("FlowGraphClampBlock",FlowGraphClampBlock);class FlowGraphSaturateBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicSaturate(o)),"FlowGraphSaturateBlock",o)}_polymorphicSaturate(o){return ComponentWiseUnaryOperation(o,Saturate)}}function Interpolate(o,r,a){return(1-a)*o+a*r}(0,l.H7)("FlowGraphSaturateBlock",FlowGraphSaturateBlock);class FlowGraphMathInterpolationBlock extends FlowGraphTernaryOperationBlock{constructor(o){super(e.s8,e.s8,e.s8,e.s8,((o,r,a)=>this._polymorphicInterpolate(o,r,a)),"FlowGraphMathInterpolationBlock",o)}_polymorphicInterpolate(o,r,a){return ComponentWiseTernaryOperation(o,r,a,Interpolate)}}(0,l.H7)("FlowGraphMathInterpolationBlock",FlowGraphMathInterpolationBlock);class FlowGraphEqualityBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicEq(o,r)),"FlowGraphEqualityBlock",o)}_polymorphicEq(o,r){const a=(0,i.JP)(o),l=(0,i.JP)(r);return typeof o==typeof r&&((0,i.RV)(a,l)||(0,i.bh)(a,l)||(0,i.s1)(a,l)?o.equals(r):o===r)}}function ComparisonOperators(o,r,a){if((0,i.kE)(o)&&(0,i.kE)(r))return a((0,i.J0)(o),(0,i.J0)(r));throw new Error(`Cannot compare ${o} and ${r}`)}(0,l.H7)("FlowGraphEqualityBlock",FlowGraphEqualityBlock);class FlowGraphLessThanBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicLessThan(o,r)),"FlowGraphLessThanBlock",o)}_polymorphicLessThan(o,r){return ComparisonOperators(o,r,((o,r)=>o<r))}}(0,l.H7)("FlowGraphLessThanBlock",FlowGraphLessThanBlock);class FlowGraphLessThanOrEqualBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicLessThanOrEqual(o,r)),"FlowGraphLessThanOrEqualBlock",o)}_polymorphicLessThanOrEqual(o,r){return ComparisonOperators(o,r,((o,r)=>o<=r))}}(0,l.H7)("FlowGraphLessThanOrEqualBlock",FlowGraphLessThanOrEqualBlock);class FlowGraphGreaterThanBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicGreaterThan(o,r)),"FlowGraphGreaterThanBlock",o)}_polymorphicGreaterThan(o,r){return ComparisonOperators(o,r,((o,r)=>o>r))}}(0,l.H7)("FlowGraphGreaterThanBlock",FlowGraphGreaterThanBlock);class FlowGraphGreaterThanOrEqualBlock extends t.V{constructor(o){super(e.s8,e.s8,e.PE,((o,r)=>this._polymorphicGreaterThanOrEqual(o,r)),"FlowGraphGreaterThanOrEqualBlock",o)}_polymorphicGreaterThanOrEqual(o,r){return ComparisonOperators(o,r,((o,r)=>o>=r))}}(0,l.H7)("FlowGraphGreaterThanOrEqualBlock",FlowGraphGreaterThanOrEqualBlock);class FlowGraphIsNanBlock extends s.p{constructor(o){super(e.s8,e.PE,(o=>this._polymorphicIsNan(o)),"FlowGraphIsNaNBlock",o)}_polymorphicIsNan(o){if((0,i.kE)(o,!0))return isNaN((0,i.J0)(o));throw new Error(`Cannot get NaN of ${o}`)}}(0,l.H7)("FlowGraphIsNaNBlock",FlowGraphIsNanBlock);class FlowGraphIsInfinityBlock extends s.p{constructor(o){super(e.s8,e.PE,(o=>this._polymorphicIsInf(o)),"FlowGraphIsInfBlock",o)}_polymorphicIsInf(o){if((0,i.kE)(o))return!isFinite((0,i.J0)(o));throw new Error(`Cannot get isInf of ${o}`)}}(0,l.H7)("FlowGraphIsInfBlock",FlowGraphIsInfinityBlock);class FlowGraphDegToRadBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicDegToRad(o)),"FlowGraphDegToRadBlock",o)}_degToRad(o){return o*Math.PI/180}_polymorphicDegToRad(o){return ComponentWiseUnaryOperation(o,this._degToRad)}}(0,l.H7)("FlowGraphDegToRadBlock",FlowGraphDegToRadBlock);class FlowGraphRadToDegBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicRadToDeg(o)),"FlowGraphRadToDegBlock",o)}_radToDeg(o){return 180*o/Math.PI}_polymorphicRadToDeg(o){return ComponentWiseUnaryOperation(o,this._radToDeg)}}(0,l.H7)("FlowGraphRadToDegBlock",FlowGraphRadToDegBlock);class FlowGraphSinBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicSin(o)),"FlowGraphSinBlock",o)}_polymorphicSin(o){return ComponentWiseUnaryOperation(o,Math.sin)}}class FlowGraphCosBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicCos(o)),"FlowGraphCosBlock",o)}_polymorphicCos(o){return ComponentWiseUnaryOperation(o,Math.cos)}}class FlowGraphTanBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicTan(o)),"FlowGraphTanBlock",o)}_polymorphicTan(o){return ComponentWiseUnaryOperation(o,Math.tan)}}class FlowGraphAsinBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAsin(o)),"FlowGraphASinBlock",o)}_polymorphicAsin(o){return ComponentWiseUnaryOperation(o,Math.asin)}}(0,l.H7)("FlowGraphASinBlock",FlowGraphAsinBlock);class FlowGraphAcosBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAcos(o)),"FlowGraphACosBlock",o)}_polymorphicAcos(o){return ComponentWiseUnaryOperation(o,Math.acos)}}(0,l.H7)("FlowGraphACosBlock",FlowGraphAcosBlock);class FlowGraphAtanBlock extends s.p{constructor(o){super(e.ab,e.ab,(o=>this._polymorphicAtan(o)),"FlowGraphATanBlock",o)}_polymorphicAtan(o){return ComponentWiseUnaryOperation(o,Math.atan)}}(0,l.H7)("FlowGraphATanBlock",FlowGraphAtanBlock);class FlowGraphAtan2Block extends t.V{constructor(o){super(e.s8,e.s8,e.s8,((o,r)=>this._polymorphicAtan2(o,r)),"FlowGraphATan2Block",o)}_polymorphicAtan2(o,r){return ComponentWiseBinaryOperation(o,r,Math.atan2)}}(0,l.H7)("FlowGraphATan2Block",FlowGraphAtan2Block);class FlowGraphSinhBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicSinh(o)),"FlowGraphSinhBlock",o)}_polymorphicSinh(o){return ComponentWiseUnaryOperation(o,Math.sinh)}}(0,l.H7)("FlowGraphSinhBlock",FlowGraphSinhBlock);class FlowGraphCoshBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicCosh(o)),"FlowGraphCoshBlock",o)}_polymorphicCosh(o){return ComponentWiseUnaryOperation(o,Math.cosh)}}(0,l.H7)("FlowGraphCoshBlock",FlowGraphCoshBlock);class FlowGraphTanhBlock extends s.p{constructor(o){super(e.s8,e.s8,(o=>this._polymorphicTanh(o)),"FlowGraphTanhBlock",o)}_polymorphicTanh(o){return ComponentWiseUnaryOperation(o,Math.tanh)}}(0,l.H7)("FlowGraphTanhBlock",FlowGraphTanhBlock);class FlowGraphAsinhBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicAsinh(o)),"FlowGraphASinhBlock",o)}_polymorphicAsinh(o){return ComponentWiseUnaryOperation(o,Math.asinh)}}(0,l.H7)("FlowGraphASinhBlock",FlowGraphAsinhBlock);class FlowGraphAcoshBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicAcosh(o)),"FlowGraphACoshBlock",o)}_polymorphicAcosh(o){return ComponentWiseUnaryOperation(o,Math.acosh)}}(0,l.H7)("FlowGraphACoshBlock",FlowGraphAcoshBlock);class FlowGraphAtanhBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicAtanh(o)),"FlowGraphATanhBlock",o)}_polymorphicAtanh(o){return ComponentWiseUnaryOperation(o,Math.atanh)}}(0,l.H7)("FlowGraphATanhBlock",FlowGraphAtanhBlock);class FlowGraphExpBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicExp(o)),"FlowGraphExponentialBlock",o)}_polymorphicExp(o){return ComponentWiseUnaryOperation(o,Math.exp)}}(0,l.H7)("FlowGraphExponentialBlock",FlowGraphExpBlock);class FlowGraphLogBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicLog(o)),"FlowGraphLogBlock",o)}_polymorphicLog(o){return ComponentWiseUnaryOperation(o,Math.log)}}(0,l.H7)("FlowGraphLogBlock",FlowGraphLogBlock);class FlowGraphLog2Block extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicLog2(o)),"FlowGraphLog2Block",o)}_polymorphicLog2(o){return ComponentWiseUnaryOperation(o,Math.log2)}}(0,l.H7)("FlowGraphLog2Block",FlowGraphLog2Block);class FlowGraphLog10Block extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicLog10(o)),"FlowGraphLog10Block",o)}_polymorphicLog10(o){return ComponentWiseUnaryOperation(o,Math.log10)}}(0,l.H7)("FlowGraphLog10Block",FlowGraphLog10Block);class FlowGraphSquareRootBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicSqrt(o)),"FlowGraphSquareRootBlock",o)}_polymorphicSqrt(o){return ComponentWiseUnaryOperation(o,Math.sqrt)}}(0,l.H7)("FlowGraphSquareRootBlock",FlowGraphSquareRootBlock);class FlowGraphCubeRootBlock extends s.p{constructor(o){super(e.s8,e.ab,(o=>this._polymorphicCubeRoot(o)),"FlowGraphCubeRootBlock",o)}_polymorphicCubeRoot(o){return ComponentWiseUnaryOperation(o,Math.cbrt)}}(0,l.H7)("FlowGraphCubeRootBlock",FlowGraphCubeRootBlock);class FlowGraphPowerBlock extends t.V{constructor(o){super(e.s8,e.ab,e.ab,((o,r)=>this._polymorphicPow(o,r)),"FlowGraphPowerBlock",o)}_polymorphicPow(o,r){return ComponentWiseBinaryOperation(o,r,Math.pow)}}(0,l.H7)("FlowGraphPowerBlock",FlowGraphPowerBlock);class FlowGraphBitwiseNotBlock extends s.p{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(o=>"boolean"==typeof o?!o:"number"==typeof o?~o:new c.K(~o.value)),"FlowGraphBitwiseNotBlock",o)}}(0,l.H7)("FlowGraphBitwiseNotBlock",FlowGraphBitwiseNotBlock);class FlowGraphBitwiseAndBlock extends t.V{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),((o,r)=>{if("boolean"==typeof o&&"boolean"==typeof r)return o&&r;if("number"==typeof o&&"number"==typeof r)return o&r;if("object"==typeof o&&"object"==typeof r)return new c.K(o.value&r.value);throw new Error(`Cannot perform bitwise AND on ${o} and ${r}`)}),"FlowGraphBitwiseAndBlock",o)}}(0,l.H7)("FlowGraphBitwiseAndBlock",FlowGraphBitwiseAndBlock);class FlowGraphBitwiseOrBlock extends t.V{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),((o,r)=>{if("boolean"==typeof o&&"boolean"==typeof r)return o||r;if("number"==typeof o&&"number"==typeof r)return o|r;if("object"==typeof o&&"object"==typeof r)return new c.K(o.value|r.value);throw new Error(`Cannot perform bitwise OR on ${o} and ${r}`)}),"FlowGraphBitwiseOrBlock",o)}}(0,l.H7)("FlowGraphBitwiseOrBlock",FlowGraphBitwiseOrBlock);class FlowGraphBitwiseXorBlock extends t.V{constructor(o){super((0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),(0,e._M)(o?.valueType||"FlowGraphInteger"),((o,r)=>{if("boolean"==typeof o&&"boolean"==typeof r)return o!==r;if("number"==typeof o&&"number"==typeof r)return o^r;if("object"==typeof o&&"object"==typeof r)return new c.K(o.value^r.value);throw new Error(`Cannot perform bitwise XOR on ${o} and ${r}`)}),"FlowGraphBitwiseXorBlock",o)}}(0,l.H7)("FlowGraphBitwiseXorBlock",FlowGraphBitwiseXorBlock);class FlowGraphBitwiseLeftShiftBlock extends t.V{constructor(o){super(e.fj,e.fj,e.fj,((o,r)=>new c.K(o.value<<r.value)),"FlowGraphBitwiseLeftShiftBlock",o)}}(0,l.H7)("FlowGraphBitwiseLeftShiftBlock",FlowGraphBitwiseLeftShiftBlock);class FlowGraphBitwiseRightShiftBlock extends t.V{constructor(o){super(e.fj,e.fj,e.fj,((o,r)=>new c.K(o.value>>r.value)),"FlowGraphBitwiseRightShiftBlock",o)}}(0,l.H7)("FlowGraphBitwiseRightShiftBlock",FlowGraphBitwiseRightShiftBlock);class FlowGraphLeadingZerosBlock extends s.p{constructor(o){super(e.fj,e.fj,(o=>new c.K(Math.clz32(o.value))),"FlowGraphLeadingZerosBlock",o)}}(0,l.H7)("FlowGraphLeadingZerosBlock",FlowGraphLeadingZerosBlock);class FlowGraphTrailingZerosBlock extends s.p{constructor(o){super(e.fj,e.fj,(o=>new c.K(o.value?31-Math.clz32(o.value&-o.value):32)),"FlowGraphTrailingZerosBlock",o)}}(0,l.H7)("FlowGraphTrailingZerosBlock",FlowGraphTrailingZerosBlock);class FlowGraphOneBitsCounterBlock extends s.p{constructor(o){super(e.fj,e.fj,(o=>new c.K(function CountOnes(o){let r=0;for(;o;)r+=1&o,o>>=1;return r}(o.value))),"FlowGraphOneBitsCounterBlock",o)}}(0,l.H7)("FlowGraphOneBitsCounterBlock",FlowGraphOneBitsCounterBlock)},41554:(o,r,a)=>{a.d(r,{V:()=>FlowGraphBinaryOperationBlock});var l=a(49492);class FlowGraphBinaryOperationBlock extends l.D{constructor(o,r,a,l,e,t){super(a,t),this._operation=l,this._className=e,this.a=this.registerDataInput("a",o),this.b=this.registerDataInput("b",r)}_doOperation(o){const r=this.a.getValue(o),a=this.b.getValue(o);return this._operation(r,a)}getClassName(){return this._className}}},49492:(o,r,a)=>{a.d(r,{D:()=>FlowGraphCachedOperationBlock});var l=a(43890),e=a(39426);const t="cachedOperationValue",n="cachedExecutionId";class FlowGraphCachedOperationBlock extends l.A{constructor(o,r){super(r),this.value=this.registerDataOutput("value",o),this.isValid=this.registerDataOutput("isValid",e.PE)}_updateOutputs(o){const r=o._getExecutionVariable(this,n,-1),a=o._getExecutionVariable(this,t,null);if(null!=a&&r===o.executionId)this.isValid.setValue(!0,o),this.value.setValue(a,o);else try{const r=this._doOperation(o);if(null==r)return void this.isValid.setValue(!1,o);o._setExecutionVariable(this,t,r),o._setExecutionVariable(this,n,o.executionId),this.value.setValue(r,o),this.isValid.setValue(!0,o)}catch(r){this.isValid.setValue(!1,o)}}}},86562:(o,r,a)=>{a.d(r,{p:()=>FlowGraphUnaryOperationBlock});var l=a(49492);class FlowGraphUnaryOperationBlock extends l.D{constructor(o,r,a,l,e){super(r,e),this._operation=a,this._className=l,this.a=this.registerDataInput("a",o)}_doOperation(o){return this._operation(this.a.getValue(o))}getClassName(){return this._className}}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 4153.real-time-viewer.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4153],{31740:(e,n,i)=>{var o=i(17416);i(2889);const t="backgroundUboDeclaration",r="layout(std140,column_major) uniform;uniform Material\n{uniform vec4 vPrimaryColor;uniform vec4 vPrimaryColorShadow;uniform vec2 vDiffuseInfos;uniform vec2 vReflectionInfos;uniform mat4 diffuseMatrix;uniform mat4 reflectionMatrix;uniform vec3 vReflectionMicrosurfaceInfos;uniform float fFovMultiplier;uniform float pointSize;uniform float shadowLevel;uniform float alpha;uniform vec3 vBackgroundCenter;uniform vec4 vReflectionControl;uniform vec2 projectedGroundInfos;};\n#include<sceneUboDeclaration>\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},57987:(e,n,i)=>{var o=i(17416);const t="fogVertex",r="#ifdef FOG\nvFogDistance=(view*worldPos).xyz;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},10373:(e,n,i)=>{var o=i(17416);const t="fogVertexDeclaration",r="#ifdef FOG\nvarying vec3 vFogDistance;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},76589:(e,n,i)=>{var o=i(17416);const t="lightVxFragmentDeclaration",r="#ifdef LIGHT{X}\nuniform vec4 vLightData{X};uniform vec4 vLightDiffuse{X};\n#ifdef SPECULARTERM\nuniform vec4 vLightSpecular{X};\n#else\nvec4 vLightSpecular{X}=vec4(0.);\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};\n#endif\nuniform vec4 shadowsInfo{X};uniform vec2 depthValues{X};\n#endif\n#ifdef SPOTLIGHT{X}\nuniform vec4 vLightDirection{X};uniform vec4 vLightFalloff{X};\n#elif defined(POINTLIGHT{X})\nuniform vec4 vLightFalloff{X};\n#elif defined(HEMILIGHT{X})\nuniform vec3 vLightGround{X};\n#endif\n#if defined(AREALIGHT{X})\nuniform vec4 vLightWidth{X};uniform vec4 vLightHeight{X};\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},15377:(e,n,i)=>{var o=i(17416);const t="lightVxUboDeclaration",r="#ifdef LIGHT{X}\nuniform Light{X}\n{vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular;\n#ifdef SPOTLIGHT{X}\nvec4 vLightDirection;vec4 vLightFalloff;\n#elif defined(POINTLIGHT{X})\nvec4 vLightFalloff;\n#elif defined(HEMILIGHT{X})\nvec3 vLightGround;\n#endif\n#if defined(AREALIGHT{X})\nvec4 vLightWidth;vec4 vLightHeight;\n#endif\nvec4 shadowsInfo;vec2 depthValues;} light{X};\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};\n#endif\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},89481:(e,n,i)=>{var o=i(17416);const t="logDepthDeclaration",r="#ifdef LOGARITHMICDEPTH\nuniform float logarithmicDepthConstant;varying float vFragmentDepth;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},50627:(e,n,i)=>{var o=i(17416);const t="logDepthVertex",r="#ifdef LOGARITHMICDEPTH\nvFragmentDepth=1.0+gl_Position.w;gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},18520:(e,n,i)=>{var o=i(17416);const t="shadowsVertex",r="#ifdef SHADOWS\n#if defined(SHADOWCSM{X})\nvPositionFromCamera{X}=view*worldPos;for (int i=0; i<SHADOWCSMNUM_CASCADES{X}; i++) {vPositionFromLight{X}[i]=lightMatrix{X}[i]*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetric{X}[i]=(-vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvDepthMetric{X}[i]=(vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n}\n#elif defined(SHADOW{X}) && !defined(SHADOWCUBE{X})\nvPositionFromLight{X}=lightMatrix{X}*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetric{X}=(-vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvDepthMetric{X}=(vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},14153:(e,n,i)=>{i.r(n),i.d(n,{backgroundVertexShader:()=>d});var o=i(17416);const t="uniform mat4 view;uniform mat4 viewProjection;\n#ifdef MULTIVIEW\nuniform mat4 viewProjectionR;\n#endif\nuniform float shadowLevel;\n#ifdef DIFFUSE\nuniform mat4 diffuseMatrix;uniform vec2 vDiffuseInfos;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;uniform mat4 reflectionMatrix;uniform vec3 vReflectionMicrosurfaceInfos;uniform float fFovMultiplier;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n";o.v.IncludesShadersStore.backgroundVertexDeclaration||(o.v.IncludesShadersStore.backgroundVertexDeclaration=t);i(31740),i(65276),i(33827),i(72335),i(34122),i(60110),i(10373),i(76589),i(15377),i(89481),i(39449),i(86096),i(73749),i(43888),i(57987),i(18520),i(50627);const r="backgroundVertexShader",f="precision highp float;\n#include<__decl__backgroundVertex>\n#include<helperFunctions>\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV==0\nvarying vec2 vDiffuseUV;\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightVxFragment>[0..maxSimultaneousLights]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include<logDepthDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#ifdef REFLECTIONMAP_SKYBOX\nvPositionUVW=position;\n#endif\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {gl_Position=viewProjection*finalWorld*vec4(position,1.0);} else {gl_Position=viewProjectionR*finalWorld*vec4(position,1.0);}\n#else\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\n#endif\nvec4 worldPos=finalWorld*vec4(position,1.0);vPositionW=vec3(worldPos);\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normal);\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(position,0.0)));\n#ifdef EQUIRECTANGULAR_RELFECTION_FOV\nmat3 screenToWorld=inverseMat3(mat3(finalWorld*viewProjection));vec3 segment=mix(vDirectionW,screenToWorld*vec3(0.0,0.0,1.0),abs(fFovMultiplier-1.0));if (fFovMultiplier<=1.0) {vDirectionW=normalize(segment);} else {vDirectionW=normalize(vDirectionW+(vDirectionW-segment));}\n#endif\n#endif\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uv;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV==0\nif (vDiffuseInfos.x==0.)\n{vDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));}\nelse\n{vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));}\n#endif\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#ifdef VERTEXCOLOR\nvColor=colorUpdated;\n#endif\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#include<logDepthVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}\n";o.v.ShadersStore.backgroundVertexShader||(o.v.ShadersStore.backgroundVertexShader=f);const d={name:r,shader:f}}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4153],{31740:(e,n,i)=>{var o=i(17416);i(2889);const t="backgroundUboDeclaration",r="layout(std140,column_major) uniform;uniform Material\n{uniform vec4 vPrimaryColor;uniform vec4 vPrimaryColorShadow;uniform vec2 vDiffuseInfos;uniform mat4 diffuseMatrix;uniform float fFovMultiplier;uniform float pointSize;uniform float shadowLevel;uniform float alpha;uniform vec3 vBackgroundCenter;uniform vec4 vReflectionControl;uniform vec2 projectedGroundInfos;uniform vec2 vReflectionInfos;uniform mat4 reflectionMatrix;uniform vec3 vReflectionMicrosurfaceInfos;};\n#include<sceneUboDeclaration>\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},57987:(e,n,i)=>{var o=i(17416);const t="fogVertex",r="#ifdef FOG\nvFogDistance=(view*worldPos).xyz;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},10373:(e,n,i)=>{var o=i(17416);const t="fogVertexDeclaration",r="#ifdef FOG\nvarying vec3 vFogDistance;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},76589:(e,n,i)=>{var o=i(17416);const t="lightVxFragmentDeclaration",r="#ifdef LIGHT{X}\nuniform vec4 vLightData{X};uniform vec4 vLightDiffuse{X};\n#ifdef SPECULARTERM\nuniform vec4 vLightSpecular{X};\n#else\nvec4 vLightSpecular{X}=vec4(0.);\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};\n#endif\nuniform vec4 shadowsInfo{X};uniform vec2 depthValues{X};\n#endif\n#ifdef SPOTLIGHT{X}\nuniform vec4 vLightDirection{X};uniform vec4 vLightFalloff{X};\n#elif defined(POINTLIGHT{X})\nuniform vec4 vLightFalloff{X};\n#elif defined(HEMILIGHT{X})\nuniform vec3 vLightGround{X};\n#endif\n#if defined(AREALIGHT{X})\nuniform vec4 vLightWidth{X};uniform vec4 vLightHeight{X};\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},15377:(e,n,i)=>{var o=i(17416);const t="lightVxUboDeclaration",r="#ifdef LIGHT{X}\nuniform Light{X}\n{vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular;\n#ifdef SPOTLIGHT{X}\nvec4 vLightDirection;vec4 vLightFalloff;\n#elif defined(POINTLIGHT{X})\nvec4 vLightFalloff;\n#elif defined(HEMILIGHT{X})\nvec3 vLightGround;\n#elif defined(CLUSTLIGHT{X})\nvec2 vSliceData;vec2 vSliceRanges[CLUSTLIGHT_SLICES];\n#endif\n#if defined(AREALIGHT{X})\nvec4 vLightWidth;vec4 vLightHeight;\n#endif\nvec4 shadowsInfo;vec2 depthValues;} light{X};\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};\n#endif\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},89481:(e,n,i)=>{var o=i(17416);const t="logDepthDeclaration",r="#ifdef LOGARITHMICDEPTH\nuniform float logarithmicDepthConstant;varying float vFragmentDepth;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},50627:(e,n,i)=>{var o=i(17416);const t="logDepthVertex",r="#ifdef LOGARITHMICDEPTH\nvFragmentDepth=1.0+gl_Position.w;gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},18520:(e,n,i)=>{var o=i(17416);const t="shadowsVertex",r="#ifdef SHADOWS\n#if defined(SHADOWCSM{X})\nvPositionFromCamera{X}=view*worldPos;for (int i=0; i<SHADOWCSMNUM_CASCADES{X}; i++) {vPositionFromLight{X}[i]=lightMatrix{X}[i]*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetric{X}[i]=(-vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvDepthMetric{X}[i]=(vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n}\n#elif defined(SHADOW{X}) && !defined(SHADOWCUBE{X})\nvPositionFromLight{X}=lightMatrix{X}*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetric{X}=(-vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvDepthMetric{X}=(vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=r)},14153:(e,n,i)=>{i.r(n),i.d(n,{backgroundVertexShader:()=>d});var o=i(17416);const t="uniform mat4 view;uniform mat4 viewProjection;\n#ifdef MULTIVIEW\nuniform mat4 viewProjectionR;\n#endif\nuniform float shadowLevel;\n#ifdef DIFFUSE\nuniform mat4 diffuseMatrix;uniform vec2 vDiffuseInfos;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;uniform mat4 reflectionMatrix;uniform vec3 vReflectionMicrosurfaceInfos;uniform float fFovMultiplier;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n";o.v.IncludesShadersStore.backgroundVertexDeclaration||(o.v.IncludesShadersStore.backgroundVertexDeclaration=t);i(31740),i(65276),i(33827),i(72335),i(34122),i(60110),i(10373),i(76589),i(15377),i(89481),i(39449),i(86096),i(73749),i(43888),i(57987),i(18520),i(50627);const r="backgroundVertexShader",f="precision highp float;\n#include<__decl__backgroundVertex>\n#include<helperFunctions>\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV==0\nvarying vec2 vDiffuseUV;\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightVxFragment>[0..maxSimultaneousLights]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include<logDepthDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#ifdef REFLECTIONMAP_SKYBOX\nvPositionUVW=position;\n#endif\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {gl_Position=viewProjection*finalWorld*vec4(position,1.0);} else {gl_Position=viewProjectionR*finalWorld*vec4(position,1.0);}\n#else\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\n#endif\nvec4 worldPos=finalWorld*vec4(position,1.0);vPositionW=vec3(worldPos);\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normal);\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(position,0.0)));\n#ifdef EQUIRECTANGULAR_RELFECTION_FOV\nmat3 screenToWorld=inverseMat3(mat3(finalWorld*viewProjection));vec3 segment=mix(vDirectionW,screenToWorld*vec3(0.0,0.0,1.0),abs(fFovMultiplier-1.0));if (fFovMultiplier<=1.0) {vDirectionW=normalize(segment);} else {vDirectionW=normalize(vDirectionW+(vDirectionW-segment));}\n#endif\n#endif\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uv;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV==0\nif (vDiffuseInfos.x==0.)\n{vDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));}\nelse\n{vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));}\n#endif\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#ifdef VERTEXCOLOR\nvColor=colorUpdated;\n#endif\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#include<logDepthVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}\n";o.v.ShadersStore.backgroundVertexShader||(o.v.ShadersStore.backgroundVertexShader=f);const d={name:r,shader:f}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 4431.real-time-viewer.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4431],{31596:(e,r,n)=>{var t=n(17416);const i="imageProcessingDeclaration",f="#ifdef EXPOSURE\nuniform exposureLinear: f32;\n#endif\n#ifdef CONTRAST\nuniform contrast: f32;\n#endif\n#if defined(VIGNETTE) || defined(DITHER)\nuniform vInverseScreenSize: vec2f;\n#endif\n#ifdef VIGNETTE\nuniform vignetteSettings1: vec4f;uniform vignetteSettings2: vec4f;\n#endif\n#ifdef COLORCURVES\nuniform vCameraColorCurveNegative: vec4f;uniform vCameraColorCurveNeutral: vec4f;uniform vCameraColorCurvePositive: vec4f;\n#endif\n#ifdef COLORGRADING\n#ifdef COLORGRADING3D\nvar txColorTransformSampler: sampler;var txColorTransform: texture_3d<f32>;\n#else\nvar txColorTransformSampler: sampler;var txColorTransform: texture_2d<f32>;\n#endif\nuniform colorTransformSettings: vec4f;\n#endif\n#ifdef DITHER\nuniform ditherIntensity: f32;\n#endif\n";t.v.IncludesShadersStoreWGSL[i]||(t.v.IncludesShadersStoreWGSL[i]=f)},81916:(e,r,n)=>{var t=n(17416);const i="imageProcessingFunctions",f="#if TONEMAPPING==3\nconst PBRNeutralStartCompression: f32=0.8-0.04;const PBRNeutralDesaturation: f32=0.15;fn PBRNeutralToneMapping( color: vec3f )->vec3f {var x: f32=min(color.r,min(color.g,color.b));var offset: f32=select(0.04,x-6.25*x*x,x<0.08);var result=color;result-=offset;var peak: f32=max(result.r,max(result.g,result.b));if (peak<PBRNeutralStartCompression) {return result;}\nvar d: f32=1.-PBRNeutralStartCompression;var newPeak: f32=1.-d*d/(peak+d-PBRNeutralStartCompression);result*=newPeak/peak;var g: f32=1.-1./(PBRNeutralDesaturation*(peak-newPeak)+1.);return mix(result,newPeak* vec3f(1,1,1),g);}\n#endif\n#if TONEMAPPING==2\nconst ACESInputMat: mat3x3f= mat3x3f(\nvec3f(0.59719,0.07600,0.02840),\nvec3f(0.35458,0.90834,0.13383),\nvec3f(0.04823,0.01566,0.83777)\n);const ACESOutputMat: mat3x3f= mat3x3f(\nvec3f( 1.60475,-0.10208,-0.00327),\nvec3f(-0.53108, 1.10813,-0.07276),\nvec3f(-0.07367,-0.00605, 1.07602)\n);fn RRTAndODTFit(v: vec3f)->vec3f\n{var a: vec3f=v*(v+0.0245786)-0.000090537;var b: vec3f=v*(0.983729*v+0.4329510)+0.238081;return a/b;}\nfn ACESFitted(color: vec3f)->vec3f\n{var output=ACESInputMat*color;output=RRTAndODTFit(output);output=ACESOutputMat*output;output=saturateVec3(output);return output;}\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_DEFINITIONS\nfn applyImageProcessing(result: vec4f)->vec4f {\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATSTART\nvar rgb=result.rgb;;\n#ifdef EXPOSURE\nrgb*=uniforms.exposureLinear;\n#endif\n#ifdef VIGNETTE\nvar viewportXY: vec2f=fragmentInputs.position.xy*uniforms.vInverseScreenSize;viewportXY=viewportXY*2.0-1.0;var vignetteXY1: vec3f= vec3f(viewportXY*uniforms.vignetteSettings1.xy+uniforms.vignetteSettings1.zw,1.0);var vignetteTerm: f32=dot(vignetteXY1,vignetteXY1);var vignette: f32=pow(vignetteTerm,uniforms.vignetteSettings2.w);var vignetteColor: vec3f=uniforms.vignetteSettings2.rgb;\n#ifdef VIGNETTEBLENDMODEMULTIPLY\nvar vignetteColorMultiplier: vec3f=mix(vignetteColor, vec3f(1,1,1),vignette);rgb*=vignetteColorMultiplier;\n#endif\n#ifdef VIGNETTEBLENDMODEOPAQUE\nrgb=mix(vignetteColor,rgb,vignette);\n#endif\n#endif\n#if TONEMAPPING==3\nrgb=PBRNeutralToneMapping(rgb);\n#elif TONEMAPPING==2\nrgb=ACESFitted(rgb);\n#elif TONEMAPPING==1\nconst tonemappingCalibration: f32=1.590579;rgb=1.0-exp2(-tonemappingCalibration*rgb);\n#endif\nrgb=toGammaSpaceVec3(rgb);rgb=saturateVec3(rgb);\n#ifdef CONTRAST\nvar resultHighContrast: vec3f=rgb*rgb*(3.0-2.0*rgb);if (uniforms.contrast<1.0) {rgb=mix( vec3f(0.5,0.5,0.5),rgb,uniforms.contrast);} else {rgb=mix(rgb,resultHighContrast,uniforms.contrast-1.0);}\n#endif\n#ifdef COLORGRADING\nvar colorTransformInput: vec3f=rgb*uniforms.colorTransformSettings.xxx+uniforms.colorTransformSettings.yyy;\n#ifdef COLORGRADING3D\nvar colorTransformOutput: vec3f=textureSample(txColorTransform,txColorTransformSampler,colorTransformInput).rgb;\n#else\nvar colorTransformOutput: vec3f=textureSample(txColorTransform,txColorTransformSampler,colorTransformInput,uniforms.colorTransformSettings.yz).rgb;\n#endif\nrgb=mix(rgb,colorTransformOutput,uniforms.colorTransformSettings.www);\n#endif\n#ifdef COLORCURVES\nvar luma: f32=getLuminance(rgb);var curveMix: vec2f=clamp( vec2f(luma*3.0-1.5,luma*-3.0+1.5), vec2f(0.0), vec2f(1.0));var colorCurve: vec4f=uniforms.vCameraColorCurveNeutral+curveMix.x*uniforms.vCameraColorCurvePositive-curveMix.y*uniforms.vCameraColorCurveNegative;rgb*=colorCurve.rgb;rgb=mix( vec3f(luma),rgb,colorCurve.a);\n#endif\n#ifdef DITHER\nvar rand: f32=getRand(fragmentInputs.position.xy*uniforms.vInverseScreenSize);var dither: f32=mix(-uniforms.ditherIntensity,uniforms.ditherIntensity,rand);rgb=saturateVec3(rgb+ vec3f(dither));\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATEND\nreturn vec4f(rgb,result.a);}";t.v.IncludesShadersStoreWGSL[i]||(t.v.IncludesShadersStoreWGSL[i]=f)},34431:(e,r,n)=>{n.r(r),n.d(r,{imageProcessingPixelShaderWGSL:()=>o});var t=n(17416);n(31596),n(22842),n(81916);const i="imageProcessingPixelShader",f="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<imageProcessingDeclaration>\n#include<helperFunctions>\n#include<imageProcessingFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var result: vec4f=textureSample(textureSampler,textureSamplerSampler,input.vUV);result=vec4f(max(result.rgb,vec3f(0.)),result.a);\n#ifdef IMAGEPROCESSING\n#ifndef FROMLINEARSPACE\nresult=vec4f(toLinearSpaceVec3(result.rgb),result.a);\n#endif\nresult=applyImageProcessing(result);\n#else\n#ifdef FROMLINEARSPACE\nresult=applyImageProcessing(result);\n#endif\n#endif\nfragmentOutputs.color=result;}";t.v.ShadersStoreWGSL[i]||(t.v.ShadersStoreWGSL[i]=f);const o={name:i,shader:f}}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4431],{31596:(e,r,n)=>{var t=n(17416);const i="imageProcessingDeclaration",f="#ifdef EXPOSURE\nuniform exposureLinear: f32;\n#endif\n#ifdef CONTRAST\nuniform contrast: f32;\n#endif\n#if defined(VIGNETTE) || defined(DITHER)\nuniform vInverseScreenSize: vec2f;\n#endif\n#ifdef VIGNETTE\nuniform vignetteSettings1: vec4f;uniform vignetteSettings2: vec4f;\n#endif\n#ifdef COLORCURVES\nuniform vCameraColorCurveNegative: vec4f;uniform vCameraColorCurveNeutral: vec4f;uniform vCameraColorCurvePositive: vec4f;\n#endif\n#ifdef COLORGRADING\n#ifdef COLORGRADING3D\nvar txColorTransformSampler: sampler;var txColorTransform: texture_3d<f32>;\n#else\nvar txColorTransformSampler: sampler;var txColorTransform: texture_2d<f32>;\n#endif\nuniform colorTransformSettings: vec4f;\n#endif\n#ifdef DITHER\nuniform ditherIntensity: f32;\n#endif\n";t.v.IncludesShadersStoreWGSL[i]||(t.v.IncludesShadersStoreWGSL[i]=f)},81916:(e,r,n)=>{var t=n(17416);const i="imageProcessingFunctions",f="#if TONEMAPPING==3\nconst PBRNeutralStartCompression: f32=0.8-0.04;const PBRNeutralDesaturation: f32=0.15;fn PBRNeutralToneMapping( color: vec3f )->vec3f {var x: f32=min(color.r,min(color.g,color.b));var offset: f32=select(0.04,x-6.25*x*x,x<0.08);var result=color;result-=offset;var peak: f32=max(result.r,max(result.g,result.b));if (peak<PBRNeutralStartCompression) {return result;}\nvar d: f32=1.-PBRNeutralStartCompression;var newPeak: f32=1.-d*d/(peak+d-PBRNeutralStartCompression);result*=newPeak/peak;var g: f32=1.-1./(PBRNeutralDesaturation*(peak-newPeak)+1.);return mix(result,newPeak* vec3f(1,1,1),g);}\n#endif\n#if TONEMAPPING==2\nconst ACESInputMat: mat3x3f= mat3x3f(\nvec3f(0.59719,0.07600,0.02840),\nvec3f(0.35458,0.90834,0.13383),\nvec3f(0.04823,0.01566,0.83777)\n);const ACESOutputMat: mat3x3f= mat3x3f(\nvec3f( 1.60475,-0.10208,-0.00327),\nvec3f(-0.53108, 1.10813,-0.07276),\nvec3f(-0.07367,-0.00605, 1.07602)\n);fn RRTAndODTFit(v: vec3f)->vec3f\n{var a: vec3f=v*(v+0.0245786)-0.000090537;var b: vec3f=v*(0.983729*v+0.4329510)+0.238081;return a/b;}\nfn ACESFitted(color: vec3f)->vec3f\n{var output=ACESInputMat*color;output=RRTAndODTFit(output);output=ACESOutputMat*output;output=saturateVec3(output);return output;}\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_DEFINITIONS\nfn applyImageProcessing(result: vec4f)->vec4f {\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATSTART\nvar rgb=result.rgb;;\n#ifdef EXPOSURE\nrgb*=uniforms.exposureLinear;\n#endif\n#ifdef VIGNETTE\nvar viewportXY: vec2f=fragmentInputs.position.xy*uniforms.vInverseScreenSize;viewportXY=viewportXY*2.0-1.0;var vignetteXY1: vec3f= vec3f(viewportXY*uniforms.vignetteSettings1.xy+uniforms.vignetteSettings1.zw,1.0);var vignetteTerm: f32=dot(vignetteXY1,vignetteXY1);var vignette: f32=pow(vignetteTerm,uniforms.vignetteSettings2.w);var vignetteColor: vec3f=uniforms.vignetteSettings2.rgb;\n#ifdef VIGNETTEBLENDMODEMULTIPLY\nvar vignetteColorMultiplier: vec3f=mix(vignetteColor, vec3f(1,1,1),vignette);rgb*=vignetteColorMultiplier;\n#endif\n#ifdef VIGNETTEBLENDMODEOPAQUE\nrgb=mix(vignetteColor,rgb,vignette);\n#endif\n#endif\n#if TONEMAPPING==3\nrgb=PBRNeutralToneMapping(rgb);\n#elif TONEMAPPING==2\nrgb=ACESFitted(rgb);\n#elif TONEMAPPING==1\nconst tonemappingCalibration: f32=1.590579;rgb=1.0-exp2(-tonemappingCalibration*rgb);\n#endif\nrgb=toGammaSpaceVec3(rgb);rgb=saturateVec3(rgb);\n#ifdef CONTRAST\nvar resultHighContrast: vec3f=rgb*rgb*(3.0-2.0*rgb);if (uniforms.contrast<1.0) {rgb=mix( vec3f(0.5,0.5,0.5),rgb,uniforms.contrast);} else {rgb=mix(rgb,resultHighContrast,uniforms.contrast-1.0);}\nrgb=max(rgb,vec3f(0.));\n#endif\n#ifdef COLORGRADING\nvar colorTransformInput: vec3f=rgb*uniforms.colorTransformSettings.xxx+uniforms.colorTransformSettings.yyy;\n#ifdef COLORGRADING3D\nvar colorTransformOutput: vec3f=textureSample(txColorTransform,txColorTransformSampler,colorTransformInput).rgb;\n#else\nvar colorTransformOutput: vec3f=textureSample(txColorTransform,txColorTransformSampler,colorTransformInput,uniforms.colorTransformSettings.yz).rgb;\n#endif\nrgb=mix(rgb,colorTransformOutput,uniforms.colorTransformSettings.www);\n#endif\n#ifdef COLORCURVES\nvar luma: f32=getLuminance(rgb);var curveMix: vec2f=clamp( vec2f(luma*3.0-1.5,luma*-3.0+1.5), vec2f(0.0), vec2f(1.0));var colorCurve: vec4f=uniforms.vCameraColorCurveNeutral+curveMix.x*uniforms.vCameraColorCurvePositive-curveMix.y*uniforms.vCameraColorCurveNegative;rgb*=colorCurve.rgb;rgb=mix( vec3f(luma),rgb,colorCurve.a);\n#endif\n#ifdef DITHER\nvar rand: f32=getRand(fragmentInputs.position.xy*uniforms.vInverseScreenSize);var dither: f32=mix(-uniforms.ditherIntensity,uniforms.ditherIntensity,rand);rgb=saturateVec3(rgb+ vec3f(dither));\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATEND\nreturn vec4f(rgb,result.a);}";t.v.IncludesShadersStoreWGSL[i]||(t.v.IncludesShadersStoreWGSL[i]=f)},34431:(e,r,n)=>{n.r(r),n.d(r,{imageProcessingPixelShaderWGSL:()=>o});var t=n(17416);n(31596),n(22842),n(81916);const i="imageProcessingPixelShader",f="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<imageProcessingDeclaration>\n#include<helperFunctions>\n#include<imageProcessingFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var result: vec4f=textureSample(textureSampler,textureSamplerSampler,input.vUV);result=vec4f(max(result.rgb,vec3f(0.)),result.a);\n#ifdef IMAGEPROCESSING\n#ifndef FROMLINEARSPACE\nresult=vec4f(toLinearSpaceVec3(result.rgb),result.a);\n#endif\nresult=applyImageProcessing(result);\n#else\n#ifdef FROMLINEARSPACE\nresult=applyImageProcessing(result);\n#endif\n#endif\nfragmentOutputs.color=result;}";t.v.ShadersStoreWGSL[i]||(t.v.ShadersStoreWGSL[i]=f);const o={name:i,shader:f}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 4486.real-time-viewer.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4486],{58632:(e,n,f)=>{var r=f(17416);const a="hdrFilteringFunctions",t="#ifdef NUM_SAMPLES\n#if NUM_SAMPLES>0\nfn radicalInverse_VdC(value: u32)->f32 \n{var bits=(value<<16u) | (value>>16u);bits=((bits & 0x55555555u)<<1u) | ((bits & 0xAAAAAAAAu)>>1u);bits=((bits & 0x33333333u)<<2u) | ((bits & 0xCCCCCCCCu)>>2u);bits=((bits & 0x0F0F0F0Fu)<<4u) | ((bits & 0xF0F0F0F0u)>>4u);bits=((bits & 0x00FF00FFu)<<8u) | ((bits & 0xFF00FF00u)>>8u);return f32(bits)*2.3283064365386963e-10; }\nfn hammersley(i: u32,N: u32)->vec2f\n{return vec2f( f32(i)/ f32(N),radicalInverse_VdC(i));}\nfn log4(x: f32)->f32 {return log2(x)/2.;}\nfn uv_to_normal(uv: vec2f)->vec3f {var N: vec3f;var uvRange: vec2f=uv;var theta: f32=uvRange.x*2.0*PI;var phi: f32=uvRange.y*PI;N.x=cos(theta)*sin(phi);N.z=sin(theta)*sin(phi);N.y=cos(phi);return N;}\nconst NUM_SAMPLES_FLOAT: f32= f32(NUM_SAMPLES);const NUM_SAMPLES_FLOAT_INVERSED: f32=1./NUM_SAMPLES_FLOAT;const K: f32=4.;fn irradiance(\n#ifdef CUSTOM_IRRADIANCE_FILTERING_INPUT\nCUSTOM_IRRADIANCE_FILTERING_INPUT\n#else\ninputTexture: texture_cube<f32>,inputSampler: sampler,\n#endif\ninputN: vec3f,\nfilteringInfo: vec2f,\ndiffuseRoughness: f32,\nsurfaceAlbedo: vec3f,\ninputV: vec3f\n#ifdef IBL_CDF_FILTERING\n,icdfSampler: texture_2d<f32>,icdfSamplerSampler: sampler\n#endif\n)->vec3f\n{var n: vec3f=normalize(inputN);var result: vec3f= vec3f(0.0);\n#ifndef IBL_CDF_FILTERING\nvar tangent: vec3f=select(vec3f(1.,0.,0.),vec3f(0.,0.,1.),abs(n.z)<0.999);tangent=normalize(cross(tangent,n));var bitangent: vec3f=cross(n,tangent);var tbn: mat3x3f= mat3x3f(tangent,bitangent,n);var tbnInverse: mat3x3f=transpose(tbn);\n#endif\nvar maxLevel: f32=filteringInfo.y;var dim0: f32=filteringInfo.x;var omegaP: f32=(4.*PI)/(6.*dim0*dim0);var clampedAlbedo: vec3f=clamp(surfaceAlbedo,vec3f(0.1),vec3f(1.0));for(var i: u32=0u; i<NUM_SAMPLES; i++)\n{var Xi: vec2f=hammersley(i,NUM_SAMPLES);\n#ifdef IBL_CDF_FILTERING\nvar T: vec2f;T.x=textureSampleLevel(icdfSampler,icdfSamplerSampler,vec2(Xi.x,0.0),0.0).x;T.y=textureSampleLevel(icdfSampler,icdfSamplerSampler,vec2(T.x,Xi.y),0.0).y;var Ls: vec3f=uv_to_normal(vec2f(1.0-fract(T.x+0.25),T.y));var NoL: f32=dot(n,Ls);var NoV: f32=dot(n,inputV);\n#if BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_EON\nvar LoV: f32=dot(Ls,inputV);\n#elif BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_BURLEY\nvar H: vec3f=(inputV+Ls)*0.5;var VoH: f32=dot(inputV,H);\n#endif \n#else\nvar Ls: vec3f=hemisphereCosSample(Xi);Ls=normalize(Ls);var Ns: vec3f= vec3f(0.,0.,1.);var NoL: f32=dot(Ns,Ls);var V: vec3f=tbnInverse*inputV;var NoV: f32=dot(Ns,V);\n#if BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_EON\nvar LoV: f32=dot(Ls,V);\n#elif BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_BURLEY\nvar H: vec3f=(V+Ls)*0.5;var VoH: f32=dot(V,H);\n#endif\n#endif\nif (NoL>0.) {\n#ifdef IBL_CDF_FILTERING\nvar pdf: f32=textureSampleLevel(icdfSampler,icdfSamplerSampler,T,0.0).z;var c: vec3f=textureSampleLevel(inputTexture,inputSampler,Ls,0.0).rgb;\n#else\nvar pdf_inversed: f32=PI/NoL;var omegaS: f32=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed;var l: f32=log4(omegaS)-log4(omegaP)+log4(K);var mipLevel: f32=clamp(l,0.0,maxLevel);\n#ifdef CUSTOM_IRRADIANCE_FILTERING_FUNCTION\nCUSTOM_IRRADIANCE_FILTERING_FUNCTION\n#else\nvar c: vec3f=textureSampleLevel(inputTexture,inputSampler,tbn*Ls,mipLevel).rgb;\n#endif\n#endif\n#ifdef GAMMA_INPUT\nc=toLinearSpaceVec3(c);\n#endif\nvar diffuseRoughnessTerm: vec3f=vec3f(1.0);\n#if BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_EON\ndiffuseRoughnessTerm=diffuseBRDF_EON(clampedAlbedo,diffuseRoughness,NoL,NoV,LoV)*PI;\n#elif BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_BURLEY\ndiffuseRoughnessTerm=vec3f(diffuseBRDF_Burley(NoL,NoV,VoH,diffuseRoughness)*PI);\n#endif\n#ifdef IBL_CDF_FILTERING\nvar light: vec3f=vec3f(0.0);if (pdf>1e-6) {light=vec3f(1.0)/vec3f(pdf)*c;}\nresult+=NoL*diffuseRoughnessTerm*light;\n#else\nresult+=c*diffuseRoughnessTerm;\n#endif\n}}\nresult=result*NUM_SAMPLES_FLOAT_INVERSED;\n#if BASE_DIFFUSE_MODEL==BRDF_DIFFUSE_MODEL_EON\nresult=result/clampedAlbedo;\n#endif\nreturn result;}\nfn radiance(alphaG: f32,inputTexture: texture_cube<f32>,inputSampler: sampler,inputN: vec3f,filteringInfo: vec2f)->vec3f\n{var n: vec3f=normalize(inputN);var c: vec3f=textureSample(inputTexture,inputSampler,n).rgb; \nif (alphaG==0.) {\n#ifdef GAMMA_INPUT\nc=toLinearSpace(c);\n#endif\nreturn c;} else {var result: vec3f= vec3f(0.);var tangent: vec3f=select(vec3f(1.,0.,0.),vec3f(0.,0.,1.),abs(n.z)<0.999);tangent=normalize(cross(tangent,n));var bitangent: vec3f=cross(n,tangent);var tbn: mat3x3f= mat3x3f(tangent,bitangent,n);var maxLevel: f32=filteringInfo.y;var dim0: f32=filteringInfo.x;var omegaP: f32=(4.*PI)/(6.*dim0*dim0);var weight: f32=0.;for(var i: u32=0u; i<NUM_SAMPLES; i++)\n{var Xi: vec2f=hammersley(i,NUM_SAMPLES);var H: vec3f=hemisphereImportanceSampleDggx(Xi,alphaG);var NoV: f32=1.;var NoH: f32=H.z;var NoH2: f32=H.z*H.z;var NoL: f32=2.*NoH2-1.;var L: vec3f= vec3f(2.*NoH*H.x,2.*NoH*H.y,NoL);L=normalize(L);if (NoL>0.) {var pdf_inversed: f32=4./normalDistributionFunction_TrowbridgeReitzGGX(NoH,alphaG);var omegaS: f32=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed;var l: f32=log4(omegaS)-log4(omegaP)+log4(K);var mipLevel: f32=clamp( f32(l),0.0,maxLevel);weight+=NoL;var c: vec3f=textureSampleLevel(inputTexture,inputSampler,tbn*L,mipLevel).rgb;\n#ifdef GAMMA_INPUT\nc=toLinearSpace(c);\n#endif\nresult+=c*NoL;}}\nresult=result/weight;return result;}}\n#endif\n#endif\n";r.v.IncludesShadersStoreWGSL[a]||(r.v.IncludesShadersStoreWGSL[a]=t)},5442:(e,n,f)=>{var r=f(17416);const a="importanceSampling",t="fn hemisphereCosSample(u: vec2f)->vec3f {var phi: f32=2.*PI*u.x;var cosTheta2: f32=1.-u.y;var cosTheta: f32=sqrt(cosTheta2);var sinTheta: f32=sqrt(1.-cosTheta2);return vec3f(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}\nfn hemisphereImportanceSampleDggx(u: vec2f,a: f32)->vec3f {var phi: f32=2.*PI*u.x;var cosTheta2: f32=(1.-u.y)/(1.+(a+1.)*((a-1.)*u.y));var cosTheta: f32=sqrt(cosTheta2);var sinTheta: f32=sqrt(1.-cosTheta2);return vec3f(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}\nfn hemisphereImportanceSampleDCharlie(u: vec2f,a: f32)->vec3f { \nvar phi: f32=2.*PI*u.x;var sinTheta: f32=pow(u.y,a/(2.*a+1.));var cosTheta: f32=sqrt(1.-sinTheta*sinTheta);return vec3f(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}";r.v.IncludesShadersStoreWGSL[a]||(r.v.IncludesShadersStoreWGSL[a]=t)},34366:(e,n,f)=>{var r=f(17416);const a="pbrBRDFFunctions",t="#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\n#define BRDF_DIFFUSE_MODEL_EON 0\n#define BRDF_DIFFUSE_MODEL_BURLEY 1\n#define BRDF_DIFFUSE_MODEL_LAMBERT 2\n#define BRDF_DIFFUSE_MODEL_LEGACY 3\n#define DIELECTRIC_SPECULAR_MODEL_GLTF 0\n#define DIELECTRIC_SPECULAR_MODEL_OPENPBR 1\n#define CONDUCTOR_SPECULAR_MODEL_GLTF 0\n#define CONDUCTOR_SPECULAR_MODEL_OPENPBR 1\n#ifndef PBR_VERTEX_SHADER\n#ifdef MS_BRDF_ENERGY_CONSERVATION\nfn getEnergyConservationFactor(specularEnvironmentR0: vec3f,environmentBrdf: vec3f)->vec3f {return 1.0+specularEnvironmentR0*(1.0/environmentBrdf.y-1.0);}\n#endif\n#if CONDUCTOR_SPECULAR_MODEL==CONDUCTOR_SPECULAR_MODEL_OPENPBR \nfn getF82Specular(NdotV: f32,F0: vec3f,edgeTint: vec3f,roughness: f32)->vec3f {const cos_theta_max: f32=0.142857143; \nconst one_minus_cos_theta_max_to_the_fifth: f32=0.462664366; \nconst one_minus_cos_theta_max_to_the_sixth: f32=0.396569457; \nlet white_minus_F0: vec3f=vec3f(1.0f)-F0;let b_numerator: vec3f=(F0+white_minus_F0*one_minus_cos_theta_max_to_the_fifth)*(vec3f(1.0)-edgeTint);const b_denominator: f32=cos_theta_max*one_minus_cos_theta_max_to_the_sixth;const b_denominator_reciprocal: f32=1.0f/b_denominator;let b: vec3f=b_numerator*b_denominator_reciprocal; \nlet cos_theta: f32=max(roughness,NdotV);let one_minus_cos_theta: f32=1.0-cos_theta;let offset_from_F0: vec3f=(white_minus_F0-b*cos_theta*one_minus_cos_theta)*pow(one_minus_cos_theta,5.0f);return clamp(F0+offset_from_F0,vec3f(0.0f),vec3f(1.0f));}\n#endif\n#ifdef ENVIRONMENTBRDF\nfn getBRDFLookup(NdotV: f32,perceptualRoughness: f32)->vec3f {var UV: vec2f= vec2f(NdotV,perceptualRoughness);var brdfLookup: vec4f= textureSample(environmentBrdfSampler,environmentBrdfSamplerSampler,UV);\n#ifdef ENVIRONMENTBRDF_RGBD\nbrdfLookup=vec4f(fromRGBD(brdfLookup.rgba),brdfLookup.a);\n#endif\nreturn brdfLookup.rgb;}\nfn getReflectanceFromBRDFWithEnvLookup(specularEnvironmentR0: vec3f,specularEnvironmentR90: vec3f,environmentBrdf: vec3f)->vec3f {\n#ifdef BRDF_V_HEIGHT_CORRELATED\nvar reflectance: vec3f=(specularEnvironmentR90-specularEnvironmentR0)*environmentBrdf.x+specularEnvironmentR0*environmentBrdf.y;\n#else\nvar reflectance: vec3f=specularEnvironmentR0*environmentBrdf.x+specularEnvironmentR90*environmentBrdf.y;\n#endif\nreturn reflectance;}\nfn getReflectanceFromBRDFLookup(specularEnvironmentR0: vec3f,environmentBrdf: vec3f)->vec3f {\n#ifdef BRDF_V_HEIGHT_CORRELATED\nvar reflectance: vec3f=mix(environmentBrdf.xxx,environmentBrdf.yyy,specularEnvironmentR0);\n#else\nvar reflectance: vec3f=specularEnvironmentR0*environmentBrdf.x+environmentBrdf.y;\n#endif\nreturn reflectance;}\n#endif\n/* NOT USED\n#if defined(SHEEN) && defined(SHEEN_SOFTER)\nfn getBRDFLookupCharlieSheen(NdotV: f32,perceptualRoughness: f32)->f32\n{var c: f32=1.0-NdotV;var c3: f32=c*c*c;return 0.65584461*c3+1.0/(4.16526551+exp(-7.97291361*perceptualRoughness+6.33516894));}\n#endif\n*/\n#if !defined(ENVIRONMENTBRDF) || defined(REFLECTIONMAP_SKYBOX) || defined(ALPHAFRESNEL)\nfn getReflectanceFromAnalyticalBRDFLookup_Jones(VdotN: f32,reflectance0: vec3f,reflectance90: vec3f,smoothness: f32)->vec3f\n{var weight: f32=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);return reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN));}\n#endif\n#if defined(SHEEN) && defined(ENVIRONMENTBRDF)\n/**\n* The sheen BRDF not containing F can be easily stored in the blue channel of the BRDF texture.\n* The blue channel contains DCharlie*VAshikhmin*NdotL as a lokkup table\n*/\nfn getSheenReflectanceFromBRDFLookup(reflectance0: vec3f,environmentBrdf: vec3f)->vec3f {var sheenEnvironmentReflectance: vec3f=reflectance0*environmentBrdf.b;return sheenEnvironmentReflectance;}\n#endif\nfn fresnelSchlickGGXVec3(VdotH: f32,reflectance0: vec3f,reflectance90: vec3f)->vec3f\n{return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);}\nfn fresnelSchlickGGX(VdotH: f32,reflectance0: f32,reflectance90: f32)->f32\n{return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);}\n#ifdef CLEARCOAT\nfn getR0RemappedForClearCoat(f0: vec3f)->vec3f {\n#ifdef CLEARCOAT_DEFAULTIOR\n#ifdef MOBILE\nreturn saturateVec3(f0*(f0*0.526868+0.529324)-0.0482256);\n#else\nreturn saturateVec3(f0*(f0*(0.941892-0.263008*f0)+0.346479)-0.0285998);\n#endif\n#else\nvar s: vec3f=sqrt(f0);var t: vec3f=(uniforms.vClearCoatRefractionParams.z+uniforms.vClearCoatRefractionParams.w*s)/(uniforms.vClearCoatRefractionParams.w+uniforms.vClearCoatRefractionParams.z*s);return squareVec3(t);\n#endif\n}\n#endif\n#ifdef IRIDESCENCE\nconst XYZ_TO_REC709: mat3x3f= mat3x3f(\n3.2404542,-0.9692660, 0.0556434,\n-1.5371385, 1.8760108,-0.2040259,\n-0.4985314, 0.0415560, 1.0572252\n);fn getIORTfromAirToSurfaceR0(f0: vec3f)->vec3f {var sqrtF0: vec3f=sqrt(f0);return (1.+sqrtF0)/(1.-sqrtF0);}\nfn getR0fromIORsVec3(iorT: vec3f,iorI: f32)->vec3f {return squareVec3((iorT- vec3f(iorI))/(iorT+ vec3f(iorI)));}\nfn getR0fromIORs(iorT: f32,iorI: f32)->f32 {return square((iorT-iorI)/(iorT+iorI));}\nfn evalSensitivity(opd: f32,shift: vec3f)->vec3f {var phase: f32=2.0*PI*opd*1.0e-9;const val: vec3f= vec3f(5.4856e-13,4.4201e-13,5.2481e-13);const pos: vec3f= vec3f(1.6810e+06,1.7953e+06,2.2084e+06);const vr: vec3f= vec3f(4.3278e+09,9.3046e+09,6.6121e+09);var xyz: vec3f=val*sqrt(2.0*PI*vr)*cos(pos*phase+shift)*exp(-square(phase)*vr);xyz.x+=9.7470e-14*sqrt(2.0*PI*4.5282e+09)*cos(2.2399e+06*phase+shift[0])*exp(-4.5282e+09*square(phase));xyz/=1.0685e-7;var srgb: vec3f=XYZ_TO_REC709*xyz;return srgb;}\nfn evalIridescence(outsideIOR: f32,eta2: f32,cosTheta1: f32,thinFilmThickness: f32,baseF0: vec3f)->vec3f {var I: vec3f= vec3f(1.0);var iridescenceIOR: f32=mix(outsideIOR,eta2,smoothstep(0.0,0.03,thinFilmThickness));var sinTheta2Sq: f32=square(outsideIOR/iridescenceIOR)*(1.0-square(cosTheta1));var cosTheta2Sq: f32=1.0-sinTheta2Sq;if (cosTheta2Sq<0.0) {return I;}\nvar cosTheta2: f32=sqrt(cosTheta2Sq);var R0: f32=getR0fromIORs(iridescenceIOR,outsideIOR);var R12: f32=fresnelSchlickGGX(cosTheta1,R0,1.);var R21: f32=R12;var T121: f32=1.0-R12;var phi12: f32=0.0;if (iridescenceIOR<outsideIOR) {phi12=PI;}\nvar phi21: f32=PI-phi12;var baseIOR: vec3f=getIORTfromAirToSurfaceR0(clamp(baseF0,vec3f(0.0),vec3f(0.9999))); \nvar R1: vec3f=getR0fromIORsVec3(baseIOR,iridescenceIOR);var R23: vec3f=fresnelSchlickGGXVec3(cosTheta2,R1, vec3f(1.));var phi23: vec3f= vec3f(0.0);if (baseIOR[0]<iridescenceIOR) {phi23[0]=PI;}\nif (baseIOR[1]<iridescenceIOR) {phi23[1]=PI;}\nif (baseIOR[2]<iridescenceIOR) {phi23[2]=PI;}\nvar opd: f32=2.0*iridescenceIOR*thinFilmThickness*cosTheta2;var phi: vec3f= vec3f(phi21)+phi23;var R123: vec3f=clamp(R12*R23,vec3f(1e-5),vec3f(0.9999));var r123: vec3f=sqrt(R123);var Rs: vec3f=(T121*T121)*R23/( vec3f(1.0)-R123);var C0: vec3f=R12+Rs;I=C0;var Cm: vec3f=Rs-T121;for (var m: i32=1; m<=2; m++)\n{Cm*=r123;var Sm: vec3f=2.0*evalSensitivity( f32(m)*opd, f32(m)*phi);I+=Cm*Sm;}\nreturn max(I, vec3f(0.0));}\n#endif\nfn normalDistributionFunction_TrowbridgeReitzGGX(NdotH: f32,alphaG: f32)->f32\n{var a2: f32=alphaG*alphaG;var d: f32=NdotH*NdotH*(a2-1.0)+1.0;return a2/(PI*d*d);}\n#ifdef SHEEN\nfn normalDistributionFunction_CharlieSheen(NdotH: f32,alphaG: f32)->f32\n{var invR: f32=1./alphaG;var cos2h: f32=NdotH*NdotH;var sin2h: f32=1.-cos2h;return (2.+invR)*pow(sin2h,invR*.5)/(2.*PI);}\n#endif\n#ifdef ANISOTROPIC\nfn normalDistributionFunction_BurleyGGX_Anisotropic(NdotH: f32,TdotH: f32,BdotH: f32,alphaTB: vec2f)->f32 {var a2: f32=alphaTB.x*alphaTB.y;var v: vec3f= vec3f(alphaTB.y*TdotH,alphaTB.x *BdotH,a2*NdotH);var v2: f32=dot(v,v);var w2: f32=a2/v2;return a2*w2*w2*RECIPROCAL_PI;}\n#endif\n#ifdef BRDF_V_HEIGHT_CORRELATED\nfn smithVisibility_GGXCorrelated(NdotL: f32,NdotV: f32,alphaG: f32)->f32 {\n#ifdef MOBILE\nvar GGXV: f32=NdotL*(NdotV*(1.0-alphaG)+alphaG);var GGXL: f32=NdotV*(NdotL*(1.0-alphaG)+alphaG);return 0.5/(GGXV+GGXL);\n#else\nvar a2: f32=alphaG*alphaG;var GGXV: f32=NdotL*sqrt(NdotV*(NdotV-a2*NdotV)+a2);var GGXL: f32=NdotV*sqrt(NdotL*(NdotL-a2*NdotL)+a2);return 0.5/(GGXV+GGXL);\n#endif\n}\n#else\nfn smithVisibilityG1_TrowbridgeReitzGGXFast(dot: f32,alphaG: f32)->f32\n{\n#ifdef MOBILE\nreturn 1.0/(dot+alphaG+(1.0-alphaG)*dot ));\n#else\nvar alphaSquared: f32=alphaG*alphaG;return 1.0/(dot+sqrt(alphaSquared+(1.0-alphaSquared)*dot*dot));\n#endif\n}\nfn smithVisibility_TrowbridgeReitzGGXFast(NdotL: f32,NdotV: f32,alphaG: f32)->f32\n{var visibility: f32=smithVisibilityG1_TrowbridgeReitzGGXFast(NdotL,alphaG)*smithVisibilityG1_TrowbridgeReitzGGXFast(NdotV,alphaG);return visibility;}\n#endif\n#ifdef ANISOTROPIC\nfn smithVisibility_GGXCorrelated_Anisotropic(NdotL: f32,NdotV: f32,TdotV: f32,BdotV: f32,TdotL: f32,BdotL: f32,alphaTB: vec2f)->f32 {var lambdaV: f32=NdotL*length( vec3f(alphaTB.x*TdotV,alphaTB.y*BdotV,NdotV));var lambdaL: f32=NdotV*length( vec3f(alphaTB.x*TdotL,alphaTB.y*BdotL,NdotL));var v: f32=0.5/(lambdaV+lambdaL);return v;}\n#endif\n#ifdef CLEARCOAT\nfn visibility_Kelemen(VdotH: f32)->f32 {return 0.25/(VdotH*VdotH); }\n#endif\n#ifdef SHEEN\nfn visibility_Ashikhmin(NdotL: f32,NdotV: f32)->f32\n{return 1./(4.*(NdotL+NdotV-NdotL*NdotV));}\n/* NOT USED\n#ifdef SHEEN_SOFTER\nfn l(x: f32,alphaG: f32)->f32\n{var oneMinusAlphaSq: f32=(1.0-alphaG)*(1.0-alphaG);var a: f32=mix(21.5473,25.3245,oneMinusAlphaSq);var b: f32=mix(3.82987,3.32435,oneMinusAlphaSq);var c: f32=mix(0.19823,0.16801,oneMinusAlphaSq);var d: f32=mix(-1.97760,-1.27393,oneMinusAlphaSq);var e: f32=mix(-4.32054,-4.85967,oneMinusAlphaSq);return a/(1.0+b*pow(x,c))+d*x+e;}\nfn lambdaSheen(cosTheta: f32,alphaG: f32)->f32\n{return abs(cosTheta)<0.5 ? exp(l(cosTheta,alphaG)) : exp(2.0*l(0.5,alphaG)-l(1.0-cosTheta,alphaG));}\nfn visibility_CharlieSheen(NdotL: f32,NdotV: f32,alphaG: f32)->f32\n{var G: f32=1.0/(1.0+lambdaSheen(NdotV,alphaG)+lambdaSheen(NdotL,alphaG));return G/(4.0*NdotV*NdotL);}\n#endif\n*/\n#endif\nconst constant1_FON: f32=0.5f-2.0f/(3.0f*PI);const constant2_FON: f32=2.0f/3.0f-28.0f/(15.0f*PI);fn E_FON_approx(mu: f32,roughness: f32)->f32\n{var sigma: f32=roughness; \nvar mucomp: f32=1.0f-mu;var mucomp2: f32=mucomp*mucomp;const Gcoeffs: mat2x2f=mat2x2f(0.0571085289f,-0.332181442f,\n0.491881867f,0.0714429953f);var GoverPi: f32=dot(Gcoeffs*vec2f(mucomp,mucomp2),vec2f(1.0f,mucomp2));return (1.0f+sigma*GoverPi)/(1.0f+constant1_FON*sigma);}\nfn diffuseBRDF_EON(albedo: vec3f,roughness: f32,NdotL: f32,NdotV: f32,LdotV: f32)->vec3f\n{var rho: vec3f=albedo;var sigma: f32=roughness; \nvar mu_i: f32=NdotL; \nvar mu_o: f32=NdotV; \nvar s: f32=LdotV-mu_i*mu_o; \nvar sovertF: f32=select(s,s/max(mu_i,mu_o),s>0.0f); \nvar AF: f32=1.0f/(1.0f+constant1_FON*sigma); \nvar f_ss: vec3f=(rho*RECIPROCAL_PI)*AF*(1.0f+sigma*sovertF); \nvar EFo: f32=E_FON_approx(mu_o,sigma); \nvar EFi: f32=E_FON_approx(mu_i,sigma); \nvar avgEF: f32=AF*(1.0f+constant2_FON*sigma); \nvar rho_ms: vec3f=(rho*rho)*avgEF/(vec3f(1.0f)-rho*(1.0f-avgEF));const eps: f32=1.0e-7f;var f_ms: vec3f=(rho_ms*RECIPROCAL_PI)*max(eps,1.0f-EFo) \n* max(eps,1.0f-EFi)\n/ max(eps,1.0f-avgEF);return (f_ss+f_ms);}\nfn diffuseBRDF_Burley(NdotL: f32,NdotV: f32,VdotH: f32,roughness: f32)->f32 {var diffuseFresnelNV: f32=pow5(saturateEps(1.0-NdotL));var diffuseFresnelNL: f32=pow5(saturateEps(1.0-NdotV));var diffuseFresnel90: f32=0.5+2.0*VdotH*VdotH*roughness;var fresnel: f32 =\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNL) *\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNV);return fresnel/PI;}\n#ifdef SS_TRANSLUCENCY\nfn transmittanceBRDF_Burley(tintColor: vec3f,diffusionDistance: vec3f,thickness: f32)->vec3f {var S: vec3f=1./maxEpsVec3(diffusionDistance);var temp: vec3f=exp((-0.333333333*thickness)*S);return tintColor.rgb*0.25*(temp*temp*temp+3.0*temp);}\nfn computeWrappedDiffuseNdotL(NdotL: f32,w: f32)->f32 {var t: f32=1.0+w;var invt2: f32=1.0/(t*t);return saturate((NdotL+w)*invt2);}\n#endif\n#endif \n";r.v.IncludesShadersStoreWGSL[a]||(r.v.IncludesShadersStoreWGSL[a]=t)},34486:(e,n,f)=>{f.r(n),f.d(n,{hdrIrradianceFilteringPixelShaderWGSL:()=>i});var r=f(17416);f(22842),f(5442),f(34366),f(58632);const a="hdrIrradianceFilteringPixelShader",t="#include<helperFunctions>\n#include<importanceSampling>\n#include<pbrBRDFFunctions>\n#include<hdrFilteringFunctions>\nvar inputTextureSampler: sampler;var inputTexture: texture_cube<f32>;\n#ifdef IBL_CDF_FILTERING\nvar icdfTextureSampler: sampler;var icdfTexture: texture_2d<f32>;\n#endif\nuniform vFilteringInfo: vec2f;uniform hdrScale: f32;varying direction: vec3f;@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var color: vec3f=irradiance(inputTexture,inputTextureSampler,input.direction,uniforms.vFilteringInfo,0.0,vec3f(1.0),input.direction\n#ifdef IBL_CDF_FILTERING\n,icdfTexture,icdfTextureSampler\n#endif\n);fragmentOutputs.color= vec4f(color*uniforms.hdrScale,1.0);}";r.v.ShadersStoreWGSL[a]||(r.v.ShadersStoreWGSL[a]=t);const i={name:a,shader:t}}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4486],{34486:(e,r,n)=>{n.r(r),n.d(r,{hdrIrradianceFilteringPixelShaderWGSL:()=>u});var i=n(17416);n(22842),n(5442),n(34366),n(58632);const t="hdrIrradianceFilteringPixelShader",a="#include<helperFunctions>\n#include<importanceSampling>\n#include<pbrBRDFFunctions>\n#include<hdrFilteringFunctions>\nvar inputTextureSampler: sampler;var inputTexture: texture_cube<f32>;\n#ifdef IBL_CDF_FILTERING\nvar icdfTextureSampler: sampler;var icdfTexture: texture_2d<f32>;\n#endif\nuniform vFilteringInfo: vec2f;uniform hdrScale: f32;varying direction: vec3f;@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var color: vec3f=irradiance(inputTexture,inputTextureSampler,input.direction,uniforms.vFilteringInfo,0.0,vec3f(1.0),input.direction\n#ifdef IBL_CDF_FILTERING\n,icdfTexture,icdfTextureSampler\n#endif\n);fragmentOutputs.color= vec4f(color*uniforms.hdrScale,1.0);}";i.v.ShadersStoreWGSL[t]||(i.v.ShadersStoreWGSL[t]=a);const u={name:t,shader:a}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 4623.real-time-viewer.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4623],{24623:(o,t,e)=>{e.r(t),e.d(t,{FlowGraphAngleBetweenBlock:()=>FlowGraphAngleBetweenBlock,FlowGraphAxisAngleFromQuaternionBlock:()=>FlowGraphAxisAngleFromQuaternionBlock,FlowGraphConjugateBlock:()=>FlowGraphConjugateBlock,FlowGraphCrossBlock:()=>FlowGraphCrossBlock,FlowGraphDotBlock:()=>FlowGraphDotBlock,FlowGraphLengthBlock:()=>FlowGraphLengthBlock,FlowGraphNormalizeBlock:()=>FlowGraphNormalizeBlock,FlowGraphQuaternionFromAxisAngleBlock:()=>FlowGraphQuaternionFromAxisAngleBlock,FlowGraphQuaternionFromDirectionsBlock:()=>FlowGraphQuaternionFromDirectionsBlock,FlowGraphRotate2DBlock:()=>FlowGraphRotate2DBlock,FlowGraphRotate3DBlock:()=>FlowGraphRotate3DBlock,FlowGraphTransformBlock:()=>FlowGraphTransformBlock,FlowGraphTransformCoordinatesBlock:()=>FlowGraphTransformCoordinatesBlock});var r=e(43890),a=e(39426),l=e(20538),s=e(41554),n=e(86562),c=e(49486),i=e(7181),h=e(61494);function GetQuaternionFromDirections(o,t){const e=new c._f;return function GetQuaternionFromDirectionsToRef(o,t,e){const r=c.P.Cross(o,t),a=Math.acos((0,h.Clamp)(c.P.Dot(o,t),-1,1));return c._f.RotationAxisToRef(r,a,e),e}(o,t,e),e}const u="cachedOperationAxis",p="cachedOperationAngle",w="cachedExecutionId";class FlowGraphLengthBlock extends n.p{constructor(o){super(a.s8,a.ab,(o=>this._polymorphicLength(o)),"FlowGraphLengthBlock",o)}_polymorphicLength(o){switch((0,i.JP)(o)){case"Vector2":case"Vector3":case"Vector4":case"Quaternion":return o.length();default:throw new Error(`Cannot compute length of value ${o}`)}}}(0,l.H7)("FlowGraphLengthBlock",FlowGraphLengthBlock);class FlowGraphNormalizeBlock extends n.p{constructor(o){super(a.s8,a.s8,(o=>this._polymorphicNormalize(o)),"FlowGraphNormalizeBlock",o)}_polymorphicNormalize(o){let t;switch((0,i.JP)(o)){case"Vector2":case"Vector3":case"Vector4":case"Quaternion":if(t=o.normalizeToNew(),this.config?.nanOnZeroLength){0===o.length()&&t.setAll(NaN)}return t;default:throw new Error(`Cannot normalize value ${o}`)}}}(0,l.H7)("FlowGraphNormalizeBlock",FlowGraphNormalizeBlock);class FlowGraphDotBlock extends s.V{constructor(o){super(a.s8,a.s8,a.ab,((o,t)=>this._polymorphicDot(o,t)),"FlowGraphDotBlock",o)}_polymorphicDot(o,t){switch((0,i.JP)(o)){case"Vector2":case"Vector3":case"Vector4":case"Quaternion":return o.dot(t);default:throw new Error(`Cannot get dot product of ${o} and ${t}`)}}}(0,l.H7)("FlowGraphDotBlock",FlowGraphDotBlock);class FlowGraphCrossBlock extends s.V{constructor(o){super(a.FO,a.FO,a.FO,((o,t)=>c.P.Cross(o,t)),"FlowGraphCrossBlock",o)}}(0,l.H7)("FlowGraphCrossBlock",FlowGraphCrossBlock);class FlowGraphRotate2DBlock extends s.V{constructor(o){super(a.rh,a.ab,a.rh,((o,t)=>o.rotate(t)),"FlowGraphRotate2DBlock",o)}}(0,l.H7)("FlowGraphRotate2DBlock",FlowGraphRotate2DBlock);class FlowGraphRotate3DBlock extends s.V{constructor(o){super(a.FO,a.N3,a.FO,((o,t)=>o.applyRotationQuaternion(t)),"FlowGraphRotate3DBlock",o)}}function TransformVector(o,t){switch((0,i.JP)(o)){case"Vector2":case"Vector3":return t.transformVector(o);case"Vector4":return o=o,new c.Lt(o.x*t.m[0]+o.y*t.m[1]+o.z*t.m[2]+o.w*t.m[3],o.x*t.m[4]+o.y*t.m[5]+o.z*t.m[6]+o.w*t.m[7],o.x*t.m[8]+o.y*t.m[9]+o.z*t.m[10]+o.w*t.m[11],o.x*t.m[12]+o.y*t.m[13]+o.z*t.m[14]+o.w*t.m[15]);default:throw new Error(`Cannot transform value ${o}`)}}(0,l.H7)("FlowGraphRotate3DBlock",FlowGraphRotate3DBlock);class FlowGraphTransformBlock extends s.V{constructor(o){const t=o?.vectorType||"Vector3",e="Vector2"===t?"Matrix2D":"Vector3"===t?"Matrix3D":"Matrix";super((0,a._M)(t),(0,a._M)(e),(0,a._M)(t),TransformVector,"FlowGraphTransformVectorBlock",o)}}(0,l.H7)("FlowGraphTransformVectorBlock",FlowGraphTransformBlock);class FlowGraphTransformCoordinatesBlock extends s.V{constructor(o){super(a.FO,a.WT,a.FO,((o,t)=>c.P.TransformCoordinates(o,t)),"FlowGraphTransformCoordinatesBlock",o)}}(0,l.H7)("FlowGraphTransformCoordinatesBlock",FlowGraphTransformCoordinatesBlock);class FlowGraphConjugateBlock extends n.p{constructor(o){super(a.N3,a.N3,(o=>o.conjugate()),"FlowGraphConjugateBlock",o)}}(0,l.H7)("FlowGraphConjugateBlock",FlowGraphConjugateBlock);class FlowGraphAngleBetweenBlock extends s.V{constructor(o){super(a.N3,a.N3,a.ab,((o,t)=>function GetAngleBetweenQuaternions(o,t){return 2*Math.acos((0,h.Clamp)(c._f.Dot(o,t)))}(o,t)),"FlowGraphAngleBetweenBlock",o)}}(0,l.H7)("FlowGraphAngleBetweenBlock",FlowGraphAngleBetweenBlock);class FlowGraphQuaternionFromAxisAngleBlock extends s.V{constructor(o){super(a.FO,a.ab,a.N3,((o,t)=>c._f.RotationAxis(o,t)),"FlowGraphQuaternionFromAxisAngleBlock",o)}}(0,l.H7)("FlowGraphQuaternionFromAxisAngleBlock",FlowGraphQuaternionFromAxisAngleBlock);class FlowGraphAxisAngleFromQuaternionBlock extends r.A{constructor(o){super(o),this.a=this.registerDataInput("a",a.N3),this.axis=this.registerDataOutput("axis",a.FO),this.angle=this.registerDataOutput("angle",a.ab),this.isValid=this.registerDataOutput("isValid",a.PE)}_updateOutputs(o){const t=o._getExecutionVariable(this,w,-1),e=o._getExecutionVariable(this,u,null),r=o._getExecutionVariable(this,p,null);if(null!=e&&null!=r&&t===o.executionId)this.axis.setValue(e,o),this.angle.setValue(r,o);else try{const{axis:t,angle:e}=this.a.getValue(o).toAxisAngle();o._setExecutionVariable(this,u,t),o._setExecutionVariable(this,p,e),o._setExecutionVariable(this,w,o.executionId),this.axis.setValue(t,o),this.angle.setValue(e,o),this.isValid.setValue(!0,o)}catch(t){this.isValid.setValue(!1,o)}}getClassName(){return"FlowGraphAxisAngleFromQuaternionBlock"}}(0,l.H7)("FlowGraphAxisAngleFromQuaternionBlock",FlowGraphAxisAngleFromQuaternionBlock);class FlowGraphQuaternionFromDirectionsBlock extends s.V{constructor(o){super(a.FO,a.FO,a.N3,((o,t)=>GetQuaternionFromDirections(o,t)),"FlowGraphQuaternionFromDirectionsBlock",o)}}},41554:(o,t,e)=>{e.d(t,{V:()=>FlowGraphBinaryOperationBlock});var r=e(49492);class FlowGraphBinaryOperationBlock extends r.D{constructor(o,t,e,r,a,l){super(e,l),this._operation=r,this._className=a,this.a=this.registerDataInput("a",o),this.b=this.registerDataInput("b",t)}_doOperation(o){const t=this.a.getValue(o),e=this.b.getValue(o);return this._operation(t,e)}getClassName(){return this._className}}},49492:(o,t,e)=>{e.d(t,{D:()=>FlowGraphCachedOperationBlock});var r=e(43890),a=e(39426);const l="cachedOperationValue",s="cachedExecutionId";class FlowGraphCachedOperationBlock extends r.A{constructor(o,t){super(t),this.value=this.registerDataOutput("value",o),this.isValid=this.registerDataOutput("isValid",a.PE)}_updateOutputs(o){const t=o._getExecutionVariable(this,s,-1),e=o._getExecutionVariable(this,l,null);if(null!=e&&t===o.executionId)this.isValid.setValue(!0,o),this.value.setValue(e,o);else try{const t=this._doOperation(o);if(null==t)return void this.isValid.setValue(!1,o);o._setExecutionVariable(this,l,t),o._setExecutionVariable(this,s,o.executionId),this.value.setValue(t,o),this.isValid.setValue(!0,o)}catch(t){this.isValid.setValue(!1,o)}}}},86562:(o,t,e)=>{e.d(t,{p:()=>FlowGraphUnaryOperationBlock});var r=e(49492);class FlowGraphUnaryOperationBlock extends r.D{constructor(o,t,e,r,a){super(t,a),this._operation=e,this._className=r,this.a=this.registerDataInput("a",o)}_doOperation(o){return this._operation(this.a.getValue(o))}getClassName(){return this._className}}}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4623],{24623:(o,t,e)=>{e.r(t),e.d(t,{FlowGraphAngleBetweenBlock:()=>FlowGraphAngleBetweenBlock,FlowGraphAxisAngleFromQuaternionBlock:()=>FlowGraphAxisAngleFromQuaternionBlock,FlowGraphConjugateBlock:()=>FlowGraphConjugateBlock,FlowGraphCrossBlock:()=>FlowGraphCrossBlock,FlowGraphDotBlock:()=>FlowGraphDotBlock,FlowGraphLengthBlock:()=>FlowGraphLengthBlock,FlowGraphNormalizeBlock:()=>FlowGraphNormalizeBlock,FlowGraphQuaternionFromAxisAngleBlock:()=>FlowGraphQuaternionFromAxisAngleBlock,FlowGraphQuaternionFromDirectionsBlock:()=>FlowGraphQuaternionFromDirectionsBlock,FlowGraphRotate2DBlock:()=>FlowGraphRotate2DBlock,FlowGraphRotate3DBlock:()=>FlowGraphRotate3DBlock,FlowGraphTransformBlock:()=>FlowGraphTransformBlock,FlowGraphTransformCoordinatesBlock:()=>FlowGraphTransformCoordinatesBlock});var r=e(43890),a=e(39426),l=e(20538),s=e(41554),n=e(86562),c=e(72781),i=e(7181),h=e(61494);function GetQuaternionFromDirections(o,t){const e=new c._f;return function GetQuaternionFromDirectionsToRef(o,t,e){const r=c.P.Cross(o,t),a=Math.acos((0,h.Clamp)(function Vector3Dot(o,t){return o.x*t.x+o.y*t.y+o.z*t.z}(o,t),-1,1));return c._f.RotationAxisToRef(r,a,e),e}(o,t,e),e}const u="cachedOperationAxis",p="cachedOperationAngle",w="cachedExecutionId";class FlowGraphLengthBlock extends n.p{constructor(o){super(a.s8,a.ab,(o=>this._polymorphicLength(o)),"FlowGraphLengthBlock",o)}_polymorphicLength(o){switch((0,i.JP)(o)){case"Vector2":case"Vector3":case"Vector4":case"Quaternion":return o.length();default:throw new Error(`Cannot compute length of value ${o}`)}}}(0,l.H7)("FlowGraphLengthBlock",FlowGraphLengthBlock);class FlowGraphNormalizeBlock extends n.p{constructor(o){super(a.s8,a.s8,(o=>this._polymorphicNormalize(o)),"FlowGraphNormalizeBlock",o)}_polymorphicNormalize(o){let t;switch((0,i.JP)(o)){case"Vector2":case"Vector3":case"Vector4":case"Quaternion":if(t=o.normalizeToNew(),this.config?.nanOnZeroLength){0===o.length()&&t.setAll(NaN)}return t;default:throw new Error(`Cannot normalize value ${o}`)}}}(0,l.H7)("FlowGraphNormalizeBlock",FlowGraphNormalizeBlock);class FlowGraphDotBlock extends s.V{constructor(o){super(a.s8,a.s8,a.ab,((o,t)=>this._polymorphicDot(o,t)),"FlowGraphDotBlock",o)}_polymorphicDot(o,t){switch((0,i.JP)(o)){case"Vector2":case"Vector3":case"Vector4":case"Quaternion":return o.dot(t);default:throw new Error(`Cannot get dot product of ${o} and ${t}`)}}}(0,l.H7)("FlowGraphDotBlock",FlowGraphDotBlock);class FlowGraphCrossBlock extends s.V{constructor(o){super(a.FO,a.FO,a.FO,((o,t)=>c.P.Cross(o,t)),"FlowGraphCrossBlock",o)}}(0,l.H7)("FlowGraphCrossBlock",FlowGraphCrossBlock);class FlowGraphRotate2DBlock extends s.V{constructor(o){super(a.rh,a.ab,a.rh,((o,t)=>o.rotate(t)),"FlowGraphRotate2DBlock",o)}}(0,l.H7)("FlowGraphRotate2DBlock",FlowGraphRotate2DBlock);class FlowGraphRotate3DBlock extends s.V{constructor(o){super(a.FO,a.N3,a.FO,((o,t)=>o.applyRotationQuaternion(t)),"FlowGraphRotate3DBlock",o)}}function TransformVector(o,t){switch((0,i.JP)(o)){case"Vector2":case"Vector3":return t.transformVector(o);case"Vector4":return o=o,new c.Lt(o.x*t.m[0]+o.y*t.m[1]+o.z*t.m[2]+o.w*t.m[3],o.x*t.m[4]+o.y*t.m[5]+o.z*t.m[6]+o.w*t.m[7],o.x*t.m[8]+o.y*t.m[9]+o.z*t.m[10]+o.w*t.m[11],o.x*t.m[12]+o.y*t.m[13]+o.z*t.m[14]+o.w*t.m[15]);default:throw new Error(`Cannot transform value ${o}`)}}(0,l.H7)("FlowGraphRotate3DBlock",FlowGraphRotate3DBlock);class FlowGraphTransformBlock extends s.V{constructor(o){const t=o?.vectorType||"Vector3",e="Vector2"===t?"Matrix2D":"Vector3"===t?"Matrix3D":"Matrix";super((0,a._M)(t),(0,a._M)(e),(0,a._M)(t),TransformVector,"FlowGraphTransformVectorBlock",o)}}(0,l.H7)("FlowGraphTransformVectorBlock",FlowGraphTransformBlock);class FlowGraphTransformCoordinatesBlock extends s.V{constructor(o){super(a.FO,a.WT,a.FO,((o,t)=>c.P.TransformCoordinates(o,t)),"FlowGraphTransformCoordinatesBlock",o)}}(0,l.H7)("FlowGraphTransformCoordinatesBlock",FlowGraphTransformCoordinatesBlock);class FlowGraphConjugateBlock extends n.p{constructor(o){super(a.N3,a.N3,(o=>o.conjugate()),"FlowGraphConjugateBlock",o)}}(0,l.H7)("FlowGraphConjugateBlock",FlowGraphConjugateBlock);class FlowGraphAngleBetweenBlock extends s.V{constructor(o){super(a.N3,a.N3,a.ab,((o,t)=>function GetAngleBetweenQuaternions(o,t){return 2*Math.acos((0,h.Clamp)(function Vector4Dot(o,t){return o.x*t.x+o.y*t.y+o.z*t.z+o.w*t.w}(o,t)))}(o,t)),"FlowGraphAngleBetweenBlock",o)}}(0,l.H7)("FlowGraphAngleBetweenBlock",FlowGraphAngleBetweenBlock);class FlowGraphQuaternionFromAxisAngleBlock extends s.V{constructor(o){super(a.FO,a.ab,a.N3,((o,t)=>c._f.RotationAxis(o,t)),"FlowGraphQuaternionFromAxisAngleBlock",o)}}(0,l.H7)("FlowGraphQuaternionFromAxisAngleBlock",FlowGraphQuaternionFromAxisAngleBlock);class FlowGraphAxisAngleFromQuaternionBlock extends r.A{constructor(o){super(o),this.a=this.registerDataInput("a",a.N3),this.axis=this.registerDataOutput("axis",a.FO),this.angle=this.registerDataOutput("angle",a.ab),this.isValid=this.registerDataOutput("isValid",a.PE)}_updateOutputs(o){const t=o._getExecutionVariable(this,w,-1),e=o._getExecutionVariable(this,u,null),r=o._getExecutionVariable(this,p,null);if(null!=e&&null!=r&&t===o.executionId)this.axis.setValue(e,o),this.angle.setValue(r,o);else try{const{axis:t,angle:e}=this.a.getValue(o).toAxisAngle();o._setExecutionVariable(this,u,t),o._setExecutionVariable(this,p,e),o._setExecutionVariable(this,w,o.executionId),this.axis.setValue(t,o),this.angle.setValue(e,o),this.isValid.setValue(!0,o)}catch(t){this.isValid.setValue(!1,o)}}getClassName(){return"FlowGraphAxisAngleFromQuaternionBlock"}}(0,l.H7)("FlowGraphAxisAngleFromQuaternionBlock",FlowGraphAxisAngleFromQuaternionBlock);class FlowGraphQuaternionFromDirectionsBlock extends s.V{constructor(o){super(a.FO,a.FO,a.N3,((o,t)=>GetQuaternionFromDirections(o,t)),"FlowGraphQuaternionFromDirectionsBlock",o)}}},41554:(o,t,e)=>{e.d(t,{V:()=>FlowGraphBinaryOperationBlock});var r=e(49492);class FlowGraphBinaryOperationBlock extends r.D{constructor(o,t,e,r,a,l){super(e,l),this._operation=r,this._className=a,this.a=this.registerDataInput("a",o),this.b=this.registerDataInput("b",t)}_doOperation(o){const t=this.a.getValue(o),e=this.b.getValue(o);return this._operation(t,e)}getClassName(){return this._className}}},49492:(o,t,e)=>{e.d(t,{D:()=>FlowGraphCachedOperationBlock});var r=e(43890),a=e(39426);const l="cachedOperationValue",s="cachedExecutionId";class FlowGraphCachedOperationBlock extends r.A{constructor(o,t){super(t),this.value=this.registerDataOutput("value",o),this.isValid=this.registerDataOutput("isValid",a.PE)}_updateOutputs(o){const t=o._getExecutionVariable(this,s,-1),e=o._getExecutionVariable(this,l,null);if(null!=e&&t===o.executionId)this.isValid.setValue(!0,o),this.value.setValue(e,o);else try{const t=this._doOperation(o);if(null==t)return void this.isValid.setValue(!1,o);o._setExecutionVariable(this,l,t),o._setExecutionVariable(this,s,o.executionId),this.value.setValue(t,o),this.isValid.setValue(!0,o)}catch(t){this.isValid.setValue(!1,o)}}}},86562:(o,t,e)=>{e.d(t,{p:()=>FlowGraphUnaryOperationBlock});var r=e(49492);class FlowGraphUnaryOperationBlock extends r.D{constructor(o,t,e,r,a){super(t,a),this._operation=e,this._className=r,this.a=this.registerDataInput("a",o)}_doOperation(o){return this._operation(this.a.getValue(o))}getClassName(){return this._className}}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 4667.real-time-viewer.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4667],{64667:(t,e,a)=>{a.r(e),a.d(e,{FlowGraphDeterminantBlock:()=>FlowGraphDeterminantBlock,FlowGraphInvertMatrixBlock:()=>FlowGraphInvertMatrixBlock,FlowGraphMatrixComposeBlock:()=>FlowGraphMatrixComposeBlock,FlowGraphMatrixDecomposeBlock:()=>FlowGraphMatrixDecomposeBlock,FlowGraphMatrixMultiplicationBlock:()=>FlowGraphMatrixMultiplicationBlock,FlowGraphTransposeBlock:()=>FlowGraphTransposeBlock});var i=a(43890),s=a(39426),o=a(49486),r=a(20538),l=a(86562),n=a(41554);class FlowGraphTransposeBlock extends l.p{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),(t=>t.transpose?t.transpose():o.y3.Transpose(t)),"FlowGraphTransposeBlock",t)}}(0,r.H7)("FlowGraphTransposeBlock",FlowGraphTransposeBlock);class FlowGraphDeterminantBlock extends l.p{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),s.ab,(t=>t.determinant()),"FlowGraphDeterminantBlock",t)}}(0,r.H7)("FlowGraphDeterminantBlock",FlowGraphDeterminantBlock);class FlowGraphInvertMatrixBlock extends l.p{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),(t=>t.inverse?t.inverse():o.y3.Invert(t)),"FlowGraphInvertMatrixBlock",t)}}(0,r.H7)("FlowGraphInvertMatrixBlock",FlowGraphInvertMatrixBlock);class FlowGraphMatrixMultiplicationBlock extends n.V{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),((t,e)=>e.multiply(t)),"FlowGraphMatrixMultiplicationBlock",t)}}(0,r.H7)("FlowGraphMatrixMultiplicationBlock",FlowGraphMatrixMultiplicationBlock);class FlowGraphMatrixDecomposeBlock extends i.A{constructor(t){super(t),this.input=this.registerDataInput("input",s.WT),this.position=this.registerDataOutput("position",s.FO),this.rotationQuaternion=this.registerDataOutput("rotationQuaternion",s.N3),this.scaling=this.registerDataOutput("scaling",s.FO),this.isValid=this.registerDataOutput("isValid",s.PE,!1)}_updateOutputs(t){const e=t._getExecutionVariable(this,"executionId",-1),a=t._getExecutionVariable(this,"cachedPosition",null),i=t._getExecutionVariable(this,"cachedRotation",null),s=t._getExecutionVariable(this,"cachedScaling",null);if(e===t.executionId&&a&&i&&s)this.position.setValue(a,t),this.rotationQuaternion.setValue(i,t),this.scaling.setValue(s,t);else{const e=this.input.getValue(t),r=a||new o.P,l=i||new o._f,n=s||new o.P,c=Math.round(1e4*e.m[3])/1e4,u=Math.round(1e4*e.m[7])/1e4,h=Math.round(1e4*e.m[11])/1e4,p=Math.round(1e4*e.m[15])/1e4;if(0!==c||0!==u||0!==h||1!==p)return this.isValid.setValue(!1,t),this.position.setValue(o.P.Zero(),t),this.rotationQuaternion.setValue(o._f.Identity(),t),void this.scaling.setValue(o.P.One(),t);const x=e.decompose(n,l,r);this.isValid.setValue(x,t),this.position.setValue(r,t),this.rotationQuaternion.setValue(l,t),this.scaling.setValue(n,t),t._setExecutionVariable(this,"cachedPosition",r),t._setExecutionVariable(this,"cachedRotation",l),t._setExecutionVariable(this,"cachedScaling",n),t._setExecutionVariable(this,"executionId",t.executionId)}}getClassName(){return"FlowGraphMatrixDecompose"}}(0,r.H7)("FlowGraphMatrixDecompose",FlowGraphMatrixDecomposeBlock);class FlowGraphMatrixComposeBlock extends i.A{constructor(t){super(t),this.position=this.registerDataInput("position",s.FO),this.rotationQuaternion=this.registerDataInput("rotationQuaternion",s.N3),this.scaling=this.registerDataInput("scaling",s.FO),this.value=this.registerDataOutput("value",s.WT)}_updateOutputs(t){const e=t._getExecutionVariable(this,"executionId",-1),a=t._getExecutionVariable(this,"cachedMatrix",null);if(e===t.executionId&&a)this.value.setValue(a,t);else{const e=o.y3.Compose(this.scaling.getValue(t),this.rotationQuaternion.getValue(t),this.position.getValue(t));this.value.setValue(e,t),t._setExecutionVariable(this,"cachedMatrix",e),t._setExecutionVariable(this,"executionId",t.executionId)}}getClassName(){return"FlowGraphMatrixCompose"}}(0,r.H7)("FlowGraphMatrixCompose",FlowGraphMatrixComposeBlock)},41554:(t,e,a)=>{a.d(e,{V:()=>FlowGraphBinaryOperationBlock});var i=a(49492);class FlowGraphBinaryOperationBlock extends i.D{constructor(t,e,a,i,s,o){super(a,o),this._operation=i,this._className=s,this.a=this.registerDataInput("a",t),this.b=this.registerDataInput("b",e)}_doOperation(t){const e=this.a.getValue(t),a=this.b.getValue(t);return this._operation(e,a)}getClassName(){return this._className}}},49492:(t,e,a)=>{a.d(e,{D:()=>FlowGraphCachedOperationBlock});var i=a(43890),s=a(39426);const o="cachedOperationValue",r="cachedExecutionId";class FlowGraphCachedOperationBlock extends i.A{constructor(t,e){super(e),this.value=this.registerDataOutput("value",t),this.isValid=this.registerDataOutput("isValid",s.PE)}_updateOutputs(t){const e=t._getExecutionVariable(this,r,-1),a=t._getExecutionVariable(this,o,null);if(null!=a&&e===t.executionId)this.isValid.setValue(!0,t),this.value.setValue(a,t);else try{const e=this._doOperation(t);if(null==e)return void this.isValid.setValue(!1,t);t._setExecutionVariable(this,o,e),t._setExecutionVariable(this,r,t.executionId),this.value.setValue(e,t),this.isValid.setValue(!0,t)}catch(e){this.isValid.setValue(!1,t)}}}},86562:(t,e,a)=>{a.d(e,{p:()=>FlowGraphUnaryOperationBlock});var i=a(49492);class FlowGraphUnaryOperationBlock extends i.D{constructor(t,e,a,i,s){super(e,s),this._operation=a,this._className=i,this.a=this.registerDataInput("a",t)}_doOperation(t){return this._operation(this.a.getValue(t))}getClassName(){return this._className}}}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4667],{64667:(t,e,a)=>{a.r(e),a.d(e,{FlowGraphDeterminantBlock:()=>FlowGraphDeterminantBlock,FlowGraphInvertMatrixBlock:()=>FlowGraphInvertMatrixBlock,FlowGraphMatrixComposeBlock:()=>FlowGraphMatrixComposeBlock,FlowGraphMatrixDecomposeBlock:()=>FlowGraphMatrixDecomposeBlock,FlowGraphMatrixMultiplicationBlock:()=>FlowGraphMatrixMultiplicationBlock,FlowGraphTransposeBlock:()=>FlowGraphTransposeBlock});var i=a(43890),s=a(39426),o=a(72781),r=a(20538),l=a(86562),n=a(41554);class FlowGraphTransposeBlock extends l.p{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),(t=>t.transpose?t.transpose():o.y3.Transpose(t)),"FlowGraphTransposeBlock",t)}}(0,r.H7)("FlowGraphTransposeBlock",FlowGraphTransposeBlock);class FlowGraphDeterminantBlock extends l.p{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),s.ab,(t=>t.determinant()),"FlowGraphDeterminantBlock",t)}}(0,r.H7)("FlowGraphDeterminantBlock",FlowGraphDeterminantBlock);class FlowGraphInvertMatrixBlock extends l.p{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),(t=>t.inverse?t.inverse():o.y3.Invert(t)),"FlowGraphInvertMatrixBlock",t)}}(0,r.H7)("FlowGraphInvertMatrixBlock",FlowGraphInvertMatrixBlock);class FlowGraphMatrixMultiplicationBlock extends n.V{constructor(t){super((0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),(0,s._M)(t?.matrixType||"Matrix"),((t,e)=>e.multiply(t)),"FlowGraphMatrixMultiplicationBlock",t)}}(0,r.H7)("FlowGraphMatrixMultiplicationBlock",FlowGraphMatrixMultiplicationBlock);class FlowGraphMatrixDecomposeBlock extends i.A{constructor(t){super(t),this.input=this.registerDataInput("input",s.WT),this.position=this.registerDataOutput("position",s.FO),this.rotationQuaternion=this.registerDataOutput("rotationQuaternion",s.N3),this.scaling=this.registerDataOutput("scaling",s.FO),this.isValid=this.registerDataOutput("isValid",s.PE,!1)}_updateOutputs(t){const e=t._getExecutionVariable(this,"executionId",-1),a=t._getExecutionVariable(this,"cachedPosition",null),i=t._getExecutionVariable(this,"cachedRotation",null),s=t._getExecutionVariable(this,"cachedScaling",null);if(e===t.executionId&&a&&i&&s)this.position.setValue(a,t),this.rotationQuaternion.setValue(i,t),this.scaling.setValue(s,t);else{const e=this.input.getValue(t),r=a||new o.P,l=i||new o._f,n=s||new o.P,c=Math.round(1e4*e.m[3])/1e4,u=Math.round(1e4*e.m[7])/1e4,h=Math.round(1e4*e.m[11])/1e4,p=Math.round(1e4*e.m[15])/1e4;if(0!==c||0!==u||0!==h||1!==p)return this.isValid.setValue(!1,t),this.position.setValue(o.P.Zero(),t),this.rotationQuaternion.setValue(o._f.Identity(),t),void this.scaling.setValue(o.P.One(),t);const x=e.decompose(n,l,r);this.isValid.setValue(x,t),this.position.setValue(r,t),this.rotationQuaternion.setValue(l,t),this.scaling.setValue(n,t),t._setExecutionVariable(this,"cachedPosition",r),t._setExecutionVariable(this,"cachedRotation",l),t._setExecutionVariable(this,"cachedScaling",n),t._setExecutionVariable(this,"executionId",t.executionId)}}getClassName(){return"FlowGraphMatrixDecompose"}}(0,r.H7)("FlowGraphMatrixDecompose",FlowGraphMatrixDecomposeBlock);class FlowGraphMatrixComposeBlock extends i.A{constructor(t){super(t),this.position=this.registerDataInput("position",s.FO),this.rotationQuaternion=this.registerDataInput("rotationQuaternion",s.N3),this.scaling=this.registerDataInput("scaling",s.FO),this.value=this.registerDataOutput("value",s.WT)}_updateOutputs(t){const e=t._getExecutionVariable(this,"executionId",-1),a=t._getExecutionVariable(this,"cachedMatrix",null);if(e===t.executionId&&a)this.value.setValue(a,t);else{const e=o.y3.Compose(this.scaling.getValue(t),this.rotationQuaternion.getValue(t),this.position.getValue(t));this.value.setValue(e,t),t._setExecutionVariable(this,"cachedMatrix",e),t._setExecutionVariable(this,"executionId",t.executionId)}}getClassName(){return"FlowGraphMatrixCompose"}}(0,r.H7)("FlowGraphMatrixCompose",FlowGraphMatrixComposeBlock)},41554:(t,e,a)=>{a.d(e,{V:()=>FlowGraphBinaryOperationBlock});var i=a(49492);class FlowGraphBinaryOperationBlock extends i.D{constructor(t,e,a,i,s,o){super(a,o),this._operation=i,this._className=s,this.a=this.registerDataInput("a",t),this.b=this.registerDataInput("b",e)}_doOperation(t){const e=this.a.getValue(t),a=this.b.getValue(t);return this._operation(e,a)}getClassName(){return this._className}}},49492:(t,e,a)=>{a.d(e,{D:()=>FlowGraphCachedOperationBlock});var i=a(43890),s=a(39426);const o="cachedOperationValue",r="cachedExecutionId";class FlowGraphCachedOperationBlock extends i.A{constructor(t,e){super(e),this.value=this.registerDataOutput("value",t),this.isValid=this.registerDataOutput("isValid",s.PE)}_updateOutputs(t){const e=t._getExecutionVariable(this,r,-1),a=t._getExecutionVariable(this,o,null);if(null!=a&&e===t.executionId)this.isValid.setValue(!0,t),this.value.setValue(a,t);else try{const e=this._doOperation(t);if(null==e)return void this.isValid.setValue(!1,t);t._setExecutionVariable(this,o,e),t._setExecutionVariable(this,r,t.executionId),this.value.setValue(e,t),this.isValid.setValue(!0,t)}catch(e){this.isValid.setValue(!1,t)}}}},86562:(t,e,a)=>{a.d(e,{p:()=>FlowGraphUnaryOperationBlock});var i=a(49492);class FlowGraphUnaryOperationBlock extends i.D{constructor(t,e,a,i,s){super(e,s),this._operation=a,this._className=i,this.a=this.registerDataInput("a",t)}_doOperation(t){return this._operation(this.a.getValue(t))}getClassName(){return this._className}}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 5498.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[5498],{94648:(e,n,i)=>{var o=i(17416);const t="decalVertexDeclaration",a="#ifdef DECAL\nuniform vec4 vDecalInfos;uniform mat4 decalMatrix;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},57987:(e,n,i)=>{var o=i(17416);const t="fogVertex",a="#ifdef FOG\nvFogDistance=(view*worldPos).xyz;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},10373:(e,n,i)=>{var o=i(17416);const t="fogVertexDeclaration",a="#ifdef FOG\nvarying vec3 vFogDistance;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},48882:(e,n,i)=>{var o=i(17416);const t="harmonicsFunctions",a="#ifdef USESPHERICALFROMREFLECTIONMAP\n#ifdef SPHERICAL_HARMONICS\nvec3 computeEnvironmentIrradiance(vec3 normal) {return vSphericalL00\n+ vSphericalL1_1*(normal.y)\n+ vSphericalL10*(normal.z)\n+ vSphericalL11*(normal.x)\n+ vSphericalL2_2*(normal.y*normal.x)\n+ vSphericalL2_1*(normal.y*normal.z)\n+ vSphericalL20*((3.0*normal.z*normal.z)-1.0)\n+ vSphericalL21*(normal.z*normal.x)\n+ vSphericalL22*(normal.x*normal.x-(normal.y*normal.y));}\n#else\nvec3 computeEnvironmentIrradiance(vec3 normal) {float Nx=normal.x;float Ny=normal.y;float Nz=normal.z;vec3 C1=vSphericalZZ.rgb;vec3 Cx=vSphericalX.rgb;vec3 Cy=vSphericalY.rgb;vec3 Cz=vSphericalZ.rgb;vec3 Cxx_zz=vSphericalXX_ZZ.rgb;vec3 Cyy_zz=vSphericalYY_ZZ.rgb;vec3 Cxy=vSphericalXY.rgb;vec3 Cyz=vSphericalYZ.rgb;vec3 Czx=vSphericalZX.rgb;vec3 a1=Cyy_zz*Ny+Cy;vec3 a2=Cyz*Nz+a1;vec3 b1=Czx*Nz+Cx;vec3 b2=Cxy*Ny+b1;vec3 b3=Cxx_zz*Nx+b2;vec3 t1=Cz *Nz+C1;vec3 t2=a2 *Ny+t1;vec3 t3=b3 *Nx+t2;return t3;}\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},76589:(e,n,i)=>{var o=i(17416);const t="lightVxFragmentDeclaration",a="#ifdef LIGHT{X}\nuniform vec4 vLightData{X};uniform vec4 vLightDiffuse{X};\n#ifdef SPECULARTERM\nuniform vec4 vLightSpecular{X};\n#else\nvec4 vLightSpecular{X}=vec4(0.);\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};\n#endif\nuniform vec4 shadowsInfo{X};uniform vec2 depthValues{X};\n#endif\n#ifdef SPOTLIGHT{X}\nuniform vec4 vLightDirection{X};uniform vec4 vLightFalloff{X};\n#elif defined(POINTLIGHT{X})\nuniform vec4 vLightFalloff{X};\n#elif defined(HEMILIGHT{X})\nuniform vec3 vLightGround{X};\n#endif\n#if defined(AREALIGHT{X})\nuniform vec4 vLightWidth{X};uniform vec4 vLightHeight{X};\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},15377:(e,n,i)=>{var o=i(17416);const t="lightVxUboDeclaration",a="#ifdef LIGHT{X}\nuniform Light{X}\n{vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular;\n#ifdef SPOTLIGHT{X}\nvec4 vLightDirection;vec4 vLightFalloff;\n#elif defined(POINTLIGHT{X})\nvec4 vLightFalloff;\n#elif defined(HEMILIGHT{X})\nvec3 vLightGround;\n#elif defined(CLUSTLIGHT{X})\nvec2 vSliceData;vec2 vSliceRanges[CLUSTLIGHT_SLICES];\n#endif\n#if defined(AREALIGHT{X})\nvec4 vLightWidth;vec4 vLightHeight;\n#endif\nvec4 shadowsInfo;vec2 depthValues;} light{X};\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};\n#endif\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},89481:(e,n,i)=>{var o=i(17416);const t="logDepthDeclaration",a="#ifdef LOGARITHMICDEPTH\nuniform float logarithmicDepthConstant;varying float vFragmentDepth;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},50627:(e,n,i)=>{var o=i(17416);const t="logDepthVertex",a="#ifdef LOGARITHMICDEPTH\nvFragmentDepth=1.0+gl_Position.w;gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},78378:(e,n,i)=>{var o=i(17416);const t="mainUVVaryingDeclaration",a="#ifdef MAINUV{X}\nvarying vec2 vMainUV{X};\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},66703:(e,n,i)=>{var o=i(17416);const t="meshUboDeclaration",a="#ifdef WEBGL2\nuniform mat4 world;uniform float visibility;\n#else\nlayout(std140,column_major) uniform;uniform Mesh\n{mat4 world;float visibility;};\n#endif\n#define WORLD_UBO\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},54009:(e,n,i)=>{var o=i(17416);i(2889),i(66703);const t="openpbrUboDeclaration",a="layout(std140,column_major) uniform;uniform Material {vec2 vTangentSpaceParams;vec4 vLightingIntensity;float pointSize;vec2 vDebugMode;vec4 cameraInfo;vec2 vReflectionInfos;mat4 reflectionMatrix;vec3 vReflectionMicrosurfaceInfos;vec3 vReflectionPosition;vec3 vReflectionSize;vec2 vReflectionFilteringInfo;vec3 vReflectionDominantDirection;vec3 vReflectionColor;vec3 vSphericalL00;vec3 vSphericalL1_1;vec3 vSphericalL10;vec3 vSphericalL11;vec3 vSphericalL2_2;vec3 vSphericalL2_1;vec3 vSphericalL20;vec3 vSphericalL21;vec3 vSphericalL22;vec3 vSphericalX;vec3 vSphericalY;vec3 vSphericalZ;vec3 vSphericalXX_ZZ;vec3 vSphericalYY_ZZ;vec3 vSphericalZZ;vec3 vSphericalXY;vec3 vSphericalYZ;vec3 vSphericalZX;float vBaseWeight;vec4 vBaseColor;float vBaseDiffuseRoughness;vec4 vReflectanceInfo;vec4 vSpecularColor;vec3 vSpecularAnisotropy;float vCoatWeight;vec3 vCoatColor;float vCoatRoughness;float vCoatRoughnessAnisotropy;float vCoatIor;float vCoatDarkening;float vFuzzWeight;vec3 vFuzzColor;float vFuzzRoughness;vec2 vGeometryCoatTangent;vec3 vEmissionColor;float vThinFilmWeight;vec2 vThinFilmThickness;float vThinFilmIor;vec2 vBaseWeightInfos;mat4 baseWeightMatrix;vec2 vBaseColorInfos;mat4 baseColorMatrix;vec2 vBaseDiffuseRoughnessInfos;mat4 baseDiffuseRoughnessMatrix;vec2 vBaseMetalnessInfos;mat4 baseMetalnessMatrix;vec2 vSpecularWeightInfos;mat4 specularWeightMatrix;vec2 vSpecularColorInfos;mat4 specularColorMatrix;vec2 vSpecularRoughnessInfos;mat4 specularRoughnessMatrix;vec2 vSpecularRoughnessAnisotropyInfos;mat4 specularRoughnessAnisotropyMatrix;vec2 vCoatWeightInfos;mat4 coatWeightMatrix;vec2 vCoatColorInfos;mat4 coatColorMatrix;vec2 vCoatRoughnessInfos;mat4 coatRoughnessMatrix;vec2 vCoatRoughnessAnisotropyInfos;mat4 coatRoughnessAnisotropyMatrix;vec2 vCoatDarkeningInfos;mat4 coatDarkeningMatrix;vec2 vFuzzWeightInfos;mat4 fuzzWeightMatrix;vec2 vFuzzColorInfos;mat4 fuzzColorMatrix;vec2 vFuzzRoughnessInfos;mat4 fuzzRoughnessMatrix;vec2 vGeometryNormalInfos;mat4 geometryNormalMatrix;vec2 vGeometryTangentInfos;mat4 geometryTangentMatrix;vec2 vGeometryCoatNormalInfos;mat4 geometryCoatNormalMatrix;vec2 vGeometryCoatTangentInfos;mat4 geometryCoatTangentMatrix;vec2 vGeometryOpacityInfos;mat4 geometryOpacityMatrix;vec2 vEmissionColorInfos;mat4 emissionColorMatrix;vec2 vThinFilmWeightInfos;mat4 thinFilmWeightMatrix;vec2 vThinFilmThicknessInfos;mat4 thinFilmThicknessMatrix;vec2 vAmbientOcclusionInfos;mat4 ambientOcclusionMatrix;\n#define ADDITIONAL_UBO_DECLARATION\n};\n#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},22880:(e,n,i)=>{var o=i(17416);const t="pbrBRDFFunctions",a="#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\n#define BRDF_DIFFUSE_MODEL_EON 0\n#define BRDF_DIFFUSE_MODEL_BURLEY 1\n#define BRDF_DIFFUSE_MODEL_LAMBERT 2\n#define BRDF_DIFFUSE_MODEL_LEGACY 3\n#define DIELECTRIC_SPECULAR_MODEL_GLTF 0\n#define DIELECTRIC_SPECULAR_MODEL_OPENPBR 1\n#define CONDUCTOR_SPECULAR_MODEL_GLTF 0\n#define CONDUCTOR_SPECULAR_MODEL_OPENPBR 1\n#if !defined(PBR_VERTEX_SHADER) && !defined(OPENPBR_VERTEX_SHADER)\n#ifdef MS_BRDF_ENERGY_CONSERVATION\nvec3 getEnergyConservationFactor(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) {return 1.0+specularEnvironmentR0*(1.0/environmentBrdf.y-1.0);}\n#endif\n#if CONDUCTOR_SPECULAR_MODEL==CONDUCTOR_SPECULAR_MODEL_OPENPBR \nvec3 getF82Specular(float NdotV,vec3 F0,vec3 edgeTint,float roughness) {const float cos_theta_max=0.142857143; \nconst float one_minus_cos_theta_max_to_the_fifth=0.462664366; \nconst float one_minus_cos_theta_max_to_the_sixth=0.396569457; \nvec3 white_minus_F0=vec3(1.0)-F0;vec3 b_numerator=(F0+white_minus_F0*one_minus_cos_theta_max_to_the_fifth)*(vec3(1.0)-edgeTint);const float b_denominator=cos_theta_max*one_minus_cos_theta_max_to_the_sixth;const float b_denominator_reciprocal=1.0/b_denominator;vec3 b=b_numerator*b_denominator_reciprocal; \nfloat cos_theta=max(roughness,NdotV);float one_minus_cos_theta=1.0-cos_theta;vec3 offset_from_F0=(white_minus_F0-b*cos_theta*one_minus_cos_theta)*pow(one_minus_cos_theta,5.0);return clamp(F0+offset_from_F0,0.0,1.0);}\n#endif\n#ifdef FUZZENVIRONMENTBRDF\nvec3 getFuzzBRDFLookup(float NdotV,float perceptualRoughness) {vec2 UV=vec2(perceptualRoughness,NdotV);vec4 brdfLookup=texture2D(environmentFuzzBrdfSampler,UV);const vec2 RiRange=vec2(0.0,0.75);const vec2 ARange =vec2(0.005,0.88);const vec2 BRange =vec2(-0.18,0.002);brdfLookup.r=mix(ARange.x, ARange.y, brdfLookup.r);brdfLookup.g=mix(BRange.x, BRange.y, brdfLookup.g);brdfLookup.b=mix(RiRange.x,RiRange.y,brdfLookup.b);return brdfLookup.rgb;}\n#endif\n#ifdef ENVIRONMENTBRDF\nvec3 getBRDFLookup(float NdotV,float perceptualRoughness) {vec2 UV=vec2(NdotV,perceptualRoughness);vec4 brdfLookup=texture2D(environmentBrdfSampler,UV);\n#ifdef ENVIRONMENTBRDF_RGBD\nbrdfLookup.rgb=fromRGBD(brdfLookup.rgba);\n#endif\nreturn brdfLookup.rgb;}\nvec3 getReflectanceFromBRDFLookup(const vec3 specularEnvironmentR0,const vec3 specularEnvironmentR90,const vec3 environmentBrdf) {\n#ifdef BRDF_V_HEIGHT_CORRELATED\nvec3 reflectance=(specularEnvironmentR90-specularEnvironmentR0)*environmentBrdf.x+specularEnvironmentR0*environmentBrdf.y;\n#else\nvec3 reflectance=specularEnvironmentR0*environmentBrdf.x+specularEnvironmentR90*environmentBrdf.y;\n#endif\nreturn reflectance;}\nvec3 getReflectanceFromBRDFLookup(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) {\n#ifdef BRDF_V_HEIGHT_CORRELATED\nvec3 reflectance=mix(environmentBrdf.xxx,environmentBrdf.yyy,specularEnvironmentR0);\n#else\nvec3 reflectance=specularEnvironmentR0*environmentBrdf.x+environmentBrdf.y;\n#endif\nreturn reflectance;}\n#endif\n/* NOT USED\n#if defined(SHEEN) && defined(SHEEN_SOFTER)\nfloat getBRDFLookupCharlieSheen(float NdotV,float perceptualRoughness)\n{float c=1.0-NdotV;float c3=c*c*c;return 0.65584461*c3+1.0/(4.16526551+exp(-7.97291361*perceptualRoughness+6.33516894));}\n#endif\n*/\n#if !defined(ENVIRONMENTBRDF) || defined(REFLECTIONMAP_SKYBOX) || defined(ALPHAFRESNEL)\nvec3 getReflectanceFromAnalyticalBRDFLookup_Jones(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness)\n{float weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);return reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN));}\n#endif\n#if defined(SHEEN) && defined(ENVIRONMENTBRDF)\n/**\n* The sheen BRDF not containing F can be easily stored in the blue channel of the BRDF texture.\n* The blue channel contains DCharlie*VAshikhmin*NdotL as a lokkup table\n*/\nvec3 getSheenReflectanceFromBRDFLookup(const vec3 reflectance0,const vec3 environmentBrdf) {vec3 sheenEnvironmentReflectance=reflectance0*environmentBrdf.b;return sheenEnvironmentReflectance;}\n#endif\nvec3 fresnelSchlickGGX(float VdotH,vec3 reflectance0,vec3 reflectance90)\n{return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);}\nfloat fresnelSchlickGGX(float VdotH,float reflectance0,float reflectance90)\n{return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH);}\n#ifdef CLEARCOAT\nvec3 getR0RemappedForClearCoat(vec3 f0) {\n#ifdef CLEARCOAT_DEFAULTIOR\n#ifdef MOBILE\nreturn saturate(f0*(f0*0.526868+0.529324)-0.0482256);\n#else\nreturn saturate(f0*(f0*(0.941892-0.263008*f0)+0.346479)-0.0285998);\n#endif\n#else\nvec3 s=sqrt(f0);vec3 t=(vClearCoatRefractionParams.z+vClearCoatRefractionParams.w*s)/(vClearCoatRefractionParams.w+vClearCoatRefractionParams.z*s);return square(t);\n#endif\n}\n#endif\n#ifdef IRIDESCENCE\nconst mat3 XYZ_TO_REC709=mat3(\n3.2404542,-0.9692660, 0.0556434,\n-1.5371385, 1.8760108,-0.2040259,\n-0.4985314, 0.0415560, 1.0572252\n);vec3 getIORTfromAirToSurfaceR0(vec3 f0) {vec3 sqrtF0=sqrt(f0);return (1.+sqrtF0)/(1.-sqrtF0);}\nvec3 getR0fromIORs(vec3 iorT,float iorI) {return square((iorT-vec3(iorI))/(iorT+vec3(iorI)));}\nfloat getR0fromIORs(float iorT,float iorI) {return square((iorT-iorI)/(iorT+iorI));}\nvec3 evalSensitivity(float opd,vec3 shift) {float phase=2.0*PI*opd*1.0e-9;const vec3 val=vec3(5.4856e-13,4.4201e-13,5.2481e-13);const vec3 pos=vec3(1.6810e+06,1.7953e+06,2.2084e+06);const vec3 var=vec3(4.3278e+09,9.3046e+09,6.6121e+09);vec3 xyz=val*sqrt(2.0*PI*var)*cos(pos*phase+shift)*exp(-square(phase)*var);xyz.x+=9.7470e-14*sqrt(2.0*PI*4.5282e+09)*cos(2.2399e+06*phase+shift[0])*exp(-4.5282e+09*square(phase));xyz/=1.0685e-7;vec3 srgb=XYZ_TO_REC709*xyz;return srgb;}\nvec3 evalIridescence(float outsideIOR,float eta2,float cosTheta1,float thinFilmThickness,vec3 baseF0) {vec3 I=vec3(1.0);float iridescenceIOR=mix(outsideIOR,eta2,smoothstep(0.0,0.03,thinFilmThickness));float sinTheta2Sq=square(outsideIOR/iridescenceIOR)*(1.0-square(cosTheta1));float cosTheta2Sq=1.0-sinTheta2Sq;if (cosTheta2Sq<0.0) {return I;}\nfloat cosTheta2=sqrt(cosTheta2Sq);float R0=getR0fromIORs(iridescenceIOR,outsideIOR);float R12=fresnelSchlickGGX(cosTheta1,R0,1.);float R21=R12;float T121=1.0-R12;float phi12=0.0;if (iridescenceIOR<outsideIOR) phi12=PI;float phi21=PI-phi12;vec3 baseIOR=getIORTfromAirToSurfaceR0(clamp(baseF0,0.0,0.9999)); \nvec3 R1=getR0fromIORs(baseIOR,iridescenceIOR);vec3 R23=fresnelSchlickGGX(cosTheta2,R1,vec3(1.));vec3 phi23=vec3(0.0);if (baseIOR[0]<iridescenceIOR) phi23[0]=PI;if (baseIOR[1]<iridescenceIOR) phi23[1]=PI;if (baseIOR[2]<iridescenceIOR) phi23[2]=PI;float opd=2.0*iridescenceIOR*thinFilmThickness*cosTheta2;vec3 phi=vec3(phi21)+phi23;vec3 R123=clamp(R12*R23,1e-5,0.9999);vec3 r123=sqrt(R123);vec3 Rs=square(T121)*R23/(vec3(1.0)-R123);vec3 C0=R12+Rs;I=C0;vec3 Cm=Rs-T121;for (int m=1; m<=2; ++m)\n{Cm*=r123;vec3 Sm=2.0*evalSensitivity(float(m)*opd,float(m)*phi);I+=Cm*Sm;}\nreturn max(I,vec3(0.0));}\n#endif\nfloat normalDistributionFunction_TrowbridgeReitzGGX(float NdotH,float alphaG)\n{float a2=square(alphaG);float d=NdotH*NdotH*(a2-1.0)+1.0;return a2/(PI*d*d);}\n#ifdef SHEEN\nfloat normalDistributionFunction_CharlieSheen(float NdotH,float alphaG)\n{float invR=1./alphaG;float cos2h=NdotH*NdotH;float sin2h=1.-cos2h;return (2.+invR)*pow(sin2h,invR*.5)/(2.*PI);}\n#endif\n#ifdef ANISOTROPIC\nfloat normalDistributionFunction_BurleyGGX_Anisotropic(float NdotH,float TdotH,float BdotH,const vec2 alphaTB) {float a2=alphaTB.x*alphaTB.y;vec3 v=vec3(alphaTB.y*TdotH,alphaTB.x *BdotH,a2*NdotH);float v2=dot(v,v);float w2=a2/v2;return a2*w2*w2*RECIPROCAL_PI;}\n#endif\n#ifdef BRDF_V_HEIGHT_CORRELATED\nfloat smithVisibility_GGXCorrelated(float NdotL,float NdotV,float alphaG) {\n#ifdef MOBILE\nfloat GGXV=NdotL*(NdotV*(1.0-alphaG)+alphaG);float GGXL=NdotV*(NdotL*(1.0-alphaG)+alphaG);return 0.5/(GGXV+GGXL);\n#else\nfloat a2=alphaG*alphaG;float GGXV=NdotL*sqrt(NdotV*(NdotV-a2*NdotV)+a2);float GGXL=NdotV*sqrt(NdotL*(NdotL-a2*NdotL)+a2);return 0.5/(GGXV+GGXL);\n#endif\n}\n#else\nfloat smithVisibilityG1_TrowbridgeReitzGGXFast(float dot,float alphaG)\n{\n#ifdef MOBILE\nreturn 1.0/(dot+alphaG+(1.0-alphaG)*dot ));\n#else\nfloat alphaSquared=alphaG*alphaG;return 1.0/(dot+sqrt(alphaSquared+(1.0-alphaSquared)*dot*dot));\n#endif\n}\nfloat smithVisibility_TrowbridgeReitzGGXFast(float NdotL,float NdotV,float alphaG)\n{float visibility=smithVisibilityG1_TrowbridgeReitzGGXFast(NdotL,alphaG)*smithVisibilityG1_TrowbridgeReitzGGXFast(NdotV,alphaG);return visibility;}\n#endif\n#ifdef ANISOTROPIC\nfloat smithVisibility_GGXCorrelated_Anisotropic(float NdotL,float NdotV,float TdotV,float BdotV,float TdotL,float BdotL,const vec2 alphaTB) {float lambdaV=NdotL*length(vec3(alphaTB.x*TdotV,alphaTB.y*BdotV,NdotV));float lambdaL=NdotV*length(vec3(alphaTB.x*TdotL,alphaTB.y*BdotL,NdotL));float v=0.5/(lambdaV+lambdaL);return v;}\n#endif\n#ifdef CLEARCOAT\nfloat visibility_Kelemen(float VdotH) {return 0.25/(VdotH*VdotH); }\n#endif\n#ifdef SHEEN\nfloat visibility_Ashikhmin(float NdotL,float NdotV)\n{return 1./(4.*(NdotL+NdotV-NdotL*NdotV));}\n/* NOT USED\n#ifdef SHEEN_SOFTER\nfloat l(float x,float alphaG)\n{float oneMinusAlphaSq=(1.0-alphaG)*(1.0-alphaG);float a=mix(21.5473,25.3245,oneMinusAlphaSq);float b=mix(3.82987,3.32435,oneMinusAlphaSq);float c=mix(0.19823,0.16801,oneMinusAlphaSq);float d=mix(-1.97760,-1.27393,oneMinusAlphaSq);float e=mix(-4.32054,-4.85967,oneMinusAlphaSq);return a/(1.0+b*pow(x,c))+d*x+e;}\nfloat lambdaSheen(float cosTheta,float alphaG)\n{return abs(cosTheta)<0.5 ? exp(l(cosTheta,alphaG)) : exp(2.0*l(0.5,alphaG)-l(1.0-cosTheta,alphaG));}\nfloat visibility_CharlieSheen(float NdotL,float NdotV,float alphaG)\n{float G=1.0/(1.0+lambdaSheen(NdotV,alphaG)+lambdaSheen(NdotL,alphaG));return G/(4.0*NdotV*NdotL);}\n#endif\n*/\n#endif\nfloat diffuseBRDF_Burley(float NdotL,float NdotV,float VdotH,float roughness) {float diffuseFresnelNV=pow5(saturateEps(1.0-NdotL));float diffuseFresnelNL=pow5(saturateEps(1.0-NdotV));float diffuseFresnel90=0.5+2.0*VdotH*VdotH*roughness;float fresnel =\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNL) *\n(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNV);return fresnel/PI;}\nconst float constant1_FON=0.5-2.0/(3.0*PI);const float constant2_FON=2.0/3.0-28.0/(15.0*PI);float E_FON_approx(float mu,float roughness)\n{float sigma=roughness; \nfloat mucomp=1.0-mu;float mucomp2=mucomp*mucomp;const mat2 Gcoeffs=mat2(0.0571085289,-0.332181442,\n0.491881867,0.0714429953);float GoverPi=dot(Gcoeffs*vec2(mucomp,mucomp2),vec2(1.0,mucomp2));return (1.0+sigma*GoverPi)/(1.0+constant1_FON*sigma);}\nvec3 diffuseBRDF_EON(vec3 albedo,float roughness,float NdotL,float NdotV,float LdotV)\n{vec3 rho=albedo;float sigma=roughness; \nfloat mu_i=NdotL; \nfloat mu_o=NdotV; \nfloat s=LdotV-mu_i*mu_o; \nfloat sovertF=s>0.0 ? s/max(mu_i,mu_o) : s; \nfloat AF=1.0/(1.0+constant1_FON*sigma); \nvec3 f_ss=(rho*RECIPROCAL_PI)*AF*(1.0+sigma*sovertF); \nfloat EFo=E_FON_approx(mu_o,sigma); \nfloat EFi=E_FON_approx(mu_i,sigma); \nfloat avgEF=AF*(1.0+constant2_FON*sigma); \nvec3 rho_ms=(rho*rho)*avgEF/(vec3(1.0)-rho*(1.0-avgEF));const float eps=1.0e-7;vec3 f_ms=(rho_ms*RECIPROCAL_PI)*max(eps,1.0-EFo) \n* max(eps,1.0-EFi)\n/ max(eps,1.0-avgEF);return (f_ss+f_ms);}\n#ifdef SS_TRANSLUCENCY\nvec3 transmittanceBRDF_Burley(const vec3 tintColor,const vec3 diffusionDistance,float thickness) {vec3 S=1./maxEps(diffusionDistance);vec3 temp=exp((-0.333333333*thickness)*S);return tintColor.rgb*0.25*(temp*temp*temp+3.0*temp);}\nfloat computeWrappedDiffuseNdotL(float NdotL,float w) {float t=1.0+w;float invt2=1.0/square(t);return saturate((NdotL+w)*invt2);}\n#endif\n#endif \n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},8461:(e,n,i)=>{var o=i(17416);const t="prePassVertex",a="#ifdef PREPASS_DEPTH\nvViewPos=(view*worldPos).rgb;\n#endif\n#ifdef PREPASS_NORMALIZED_VIEW_DEPTH\nvNormViewDepth=((view*worldPos).z-cameraInfo.x)/(cameraInfo.y-cameraInfo.x);\n#endif\n#ifdef PREPASS_LOCAL_POSITION\nvPosition=positionUpdated.xyz;\n#endif\n#if (defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*worldPos;\n#if NUM_BONE_INFLUENCERS>0\nmat4 previousInfluence;previousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\npreviousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1];\n#endif \n#if NUM_BONE_INFLUENCERS>2\npreviousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2];\n#endif \n#if NUM_BONE_INFLUENCERS>3\npreviousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];\n#endif \n#if NUM_BONE_INFLUENCERS>5\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];\n#endif \n#if NUM_BONE_INFLUENCERS>6\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];\n#endif \n#if NUM_BONE_INFLUENCERS>7\npreviousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];\n#endif\nvPreviousPosition=previousViewProjection*finalPreviousWorld*previousInfluence*vec4(positionUpdated,1.0);\n#else\nvPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},51444:(e,n,i)=>{var o=i(17416);const t="prePassVertexDeclaration",a="#ifdef PREPASS\n#ifdef PREPASS_LOCAL_POSITION\nvarying vec3 vPosition;\n#endif\n#ifdef PREPASS_DEPTH\nvarying vec3 vViewPos;\n#endif\n#ifdef PREPASS_NORMALIZED_VIEW_DEPTH\nvarying float vNormViewDepth;\n#endif\n#if defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)\nuniform mat4 previousViewProjection;varying vec4 vCurrentPosition;varying vec4 vPreviousPosition;\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},64231:(e,n,i)=>{var o=i(17416);const t="samplerVertexDeclaration",a="#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0\nvarying vec2 v_VARYINGNAME_UV;\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},22759:(e,n,i)=>{var o=i(17416);const t="samplerVertexImplementation",a="#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0\nif (v_INFONAME_==0.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uvUpdated,1.0,0.0));}\n#ifdef UV2\nelse if (v_INFONAME_==1.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv2Updated,1.0,0.0));}\n#endif\n#ifdef UV3\nelse if (v_INFONAME_==2.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv3,1.0,0.0));}\n#endif\n#ifdef UV4\nelse if (v_INFONAME_==3.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv4,1.0,0.0));}\n#endif\n#ifdef UV5\nelse if (v_INFONAME_==4.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv5,1.0,0.0));}\n#endif\n#ifdef UV6\nelse if (v_INFONAME_==5.)\n{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv6,1.0,0.0));}\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},18520:(e,n,i)=>{var o=i(17416);const t="shadowsVertex",a="#ifdef SHADOWS\n#if defined(SHADOWCSM{X})\nvPositionFromCamera{X}=view*worldPos;for (int i=0; i<SHADOWCSMNUM_CASCADES{X}; i++) {vPositionFromLight{X}[i]=lightMatrix{X}[i]*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetric{X}[i]=(-vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvDepthMetric{X}[i]=(vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n}\n#elif defined(SHADOW{X}) && !defined(SHADOWCUBE{X})\nvPositionFromLight{X}=lightMatrix{X}*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetric{X}=(-vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvDepthMetric{X}=(vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},51506:(e,n,i)=>{var o=i(17416);const t="uvAttributeDeclaration",a="#ifdef UV{X}\nattribute vec2 uv{X};\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},31421:(e,n,i)=>{var o=i(17416);const t="uvVariableDeclaration",a="#if !defined(UV{X}) && defined(MAINUV{X})\nvec2 uv{X}=vec2(0.,0.);\n#endif\n#ifdef MAINUV{X}\nvMainUV{X}=uv{X};\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},85095:(e,n,i)=>{var o=i(17416);const t="vertexColorMixing",a="#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvColor=vec4(1.0);\n#ifdef VERTEXCOLOR\n#ifdef VERTEXALPHA\nvColor*=colorUpdated;\n#else\nvColor.rgb*=colorUpdated.rgb;\n#endif\n#endif\n#ifdef INSTANCESCOLOR\nvColor*=instanceColor;\n#endif\n#endif\n";o.v.IncludesShadersStore[t]||(o.v.IncludesShadersStore[t]=a)},35498:(e,n,i)=>{i.r(n),i.d(n,{openpbrVertexShader:()=>s});var o=i(17416);i(94648);const t="uniform mat4 view;uniform mat4 viewProjection;uniform vec4 vEyePosition;\n#ifdef MULTIVIEW\nmat4 viewProjectionR;\n#endif\n#ifdef BASE_COLOR\nuniform vec2 vBaseColorInfos;uniform mat4 baseColorMatrix;\n#endif\n#ifdef BASE_WEIGHT\nuniform mat4 baseWeightMatrix;uniform vec2 vBaseWeightInfos;\n#endif\nuniform float vBaseDiffuseRoughness;\n#ifdef BASE_DIFFUSE_ROUGHNESS\nuniform mat4 baseDiffuseRoughnessMatrix;uniform vec2 vBaseDiffuseRoughnessInfos;\n#endif\n#ifdef AMBIENT_OCCLUSION\nuniform vec2 vAmbientOcclusionInfos;uniform mat4 ambientOcclusionMatrix;\n#endif\n#ifdef EMISSION_COLOR\nuniform vec2 vEmissionColorInfos;uniform mat4 emissionColorMatrix;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;uniform mat4 lightmapMatrix;\n#endif\n#ifdef BASE_METALNESS\nuniform vec2 vBaseMetalnessInfos;uniform mat4 baseMetalnessMatrix;\n#endif\n#ifdef SPECULAR_WEIGHT\nuniform vec2 vSpecularWeightInfos;uniform mat4 specularWeightMatrix;\n#endif\n#ifdef SPECULAR_COLOR\nuniform vec2 vSpecularColorInfos;uniform mat4 specularColorMatrix;\n#endif\n#ifdef SPECULAR_ROUGHNESS\nuniform vec2 vSpecularRoughnessInfos;uniform mat4 specularRoughnessMatrix;\n#endif\n#ifdef SPECULAR_ROUGHNESS_ANISOTROPY\nuniform vec2 vSpecularRoughnessAnisotropyInfos;uniform mat4 specularRoughnessAnisotropyMatrix;\n#endif\n#ifdef COAT_WEIGHT\nuniform vec2 vCoatWeightInfos;uniform mat4 coatWeightMatrix;\n#endif\n#ifdef COAT_COLOR\nuniform vec2 vCoatColorInfos;uniform mat4 coatColorMatrix;\n#endif\n#ifdef COAT_ROUGHNESS\nuniform vec2 vCoatRoughnessInfos;uniform mat4 coatRoughnessMatrix;\n#endif\n#ifdef COAT_ROUGHNESS_ANISOTROPY\nuniform vec2 vCoatRoughnessAnisotropyInfos;uniform mat4 coatRoughnessAnisotropyMatrix;\n#endif\n#ifdef COAT_IOR\nuniform vec2 vCoatIorInfos;uniform mat4 coatIorMatrix;\n#endif\n#ifdef COAT_DARKENING\nuniform vec2 vCoatDarkeningInfos;uniform mat4 coatDarkeningMatrix;\n#endif\n#ifdef FUZZ_WEIGHT\nuniform vec2 vFuzzWeightInfos;uniform mat4 fuzzWeightMatrix;\n#endif\n#ifdef FUZZ_COLOR\nuniform vec2 vFuzzColorInfos;uniform mat4 fuzzColorMatrix;\n#endif\n#ifdef FUZZ_ROUGHNESS\nuniform vec2 vFuzzRoughnessInfos;uniform mat4 fuzzRoughnessMatrix;\n#endif\n#ifdef GEOMETRY_NORMAL\nuniform vec2 vGeometryNormalInfos;uniform mat4 geometryNormalMatrix;\n#endif\n#ifdef GEOMETRY_TANGENT\nuniform vec2 vGeometryTangentInfos;uniform mat4 geometryTangentMatrix;\n#endif\n#ifdef GEOMETRY_COAT_NORMAL\nuniform vec2 vGeometryCoatNormalInfos;uniform mat4 geometryCoatNormalMatrix;\n#endif\n#ifdef THIN_FILM_WEIGHT\nuniform vec2 vThinFilmWeightInfos;uniform mat4 thinFilmWeightMatrix;\n#endif\n#ifdef THIN_FILM_THICKNESS\nuniform vec2 vThinFilmThicknessInfos;uniform mat4 thinFilmThicknessMatrix;\n#endif\n#ifdef GEOMETRY_OPACITY\nuniform mat4 geometryOpacityMatrix;uniform vec2 vGeometryOpacityInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\nuniform vec4 cameraInfo;\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;uniform mat4 reflectionMatrix;\n#endif\n#ifdef NORMAL\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#ifdef SPHERICAL_HARMONICS\nuniform vec3 vSphericalL00;uniform vec3 vSphericalL1_1;uniform vec3 vSphericalL10;uniform vec3 vSphericalL11;uniform vec3 vSphericalL2_2;uniform vec3 vSphericalL2_1;uniform vec3 vSphericalL20;uniform vec3 vSphericalL21;uniform vec3 vSphericalL22;\n#else\nuniform vec3 vSphericalX;uniform vec3 vSphericalY;uniform vec3 vSphericalZ;uniform vec3 vSphericalXX_ZZ;uniform vec3 vSphericalYY_ZZ;uniform vec3 vSphericalZZ;uniform vec3 vSphericalXY;uniform vec3 vSphericalYZ;uniform vec3 vSphericalZX;\n#endif\n#endif\n#endif\n#endif\n#ifdef DETAIL\nuniform vec4 vDetailInfos;uniform mat4 detailMatrix;\n#endif\n#include<decalVertexDeclaration>\n#define ADDITIONAL_VERTEX_DECLARATION\n";o.v.IncludesShadersStore.openpbrVertexDeclaration||(o.v.IncludesShadersStore.openpbrVertexDeclaration=t);i(54009),i(51506),i(78378),i(65276),i(22880),i(33827),i(72335),i(34122),i(51444),i(64231),i(48882);const a="#if defined(GEOMETRY_NORMAL) || defined(PARALLAX) || defined(GEOMETRY_COAT_NORMAL) || defined(ANISOTROPIC) || defined(FUZZ)\n#if defined(TANGENT) && defined(NORMAL) \nvarying mat3 vTBN;\n#endif\n#endif\n";o.v.IncludesShadersStore.openpbrNormalMapVertexDeclaration||(o.v.IncludesShadersStore.openpbrNormalMapVertexDeclaration=a);i(60110),i(10373),i(76589),i(15377),i(58059),i(12230),i(89481),i(58107),i(93592),i(39449),i(86096),i(73749),i(8461),i(31421),i(22759);const r="#if defined(GEOMETRY_NORMAL) || defined(PARALLAX) || defined(GEOMETRY_COAT_NORMAL) || defined(ANISOTROPIC) || defined(FUZZ)\n#if defined(TANGENT) && defined(NORMAL)\nvec3 tbnNormal=normalize(normalUpdated);vec3 tbnTangent=normalize(tangentUpdated.xyz);vec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w;vTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal);\n#endif\n#endif\n";o.v.IncludesShadersStore.openpbrNormalMapVertex||(o.v.IncludesShadersStore.openpbrNormalMapVertex=r);i(43888),i(57987),i(18520),i(85095),i(50627);const f="openpbrVertexShader",l="#define OPENPBR_VERTEX_SHADER\n#define CUSTOM_VERTEX_EXTENSION\nprecision highp float;\n#include<__decl__openpbrVertex>\n#define CUSTOM_VERTEX_BEGIN\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef TANGENT\nattribute vec4 tangent;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#include<uvAttributeDeclaration>[2..7]\n#include<mainUVVaryingDeclaration>[1..7]\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include<helperFunctions>\n#include<pbrBRDFFunctions>\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\n#include<prePassVertexDeclaration>\n#include<samplerVertexDeclaration>(_DEFINENAME_,BASE_COLOR,_VARYINGNAME_,BaseColor)\n#include<samplerVertexDeclaration>(_DEFINENAME_,BASE_WEIGHT,_VARYINGNAME_,BaseWeight)\n#include<samplerVertexDeclaration>(_DEFINENAME_,BASE_DIFFUSE_ROUGHNESS,_VARYINGNAME_,BaseDiffuseRoughness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,BASE_METALNESS,_VARYINGNAME_,BaseMetalness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR_WEIGHT,_VARYINGNAME_,SpecularWeight)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR_COLOR,_VARYINGNAME_,SpecularColor)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR_ROUGHNESS,_VARYINGNAME_,SpecularRoughness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SPECULAR_ROUGHNESS_ANISOTROPY,_VARYINGNAME_,SpecularRoughnessAnisotropy)\n#include<samplerVertexDeclaration>(_DEFINENAME_,COAT_WEIGHT,_VARYINGNAME_,CoatWeight)\n#include<samplerVertexDeclaration>(_DEFINENAME_,COAT_COLOR,_VARYINGNAME_,CoatColor)\n#include<samplerVertexDeclaration>(_DEFINENAME_,COAT_ROUGHNESS,_VARYINGNAME_,CoatRoughness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,COAT_ROUGHNESS_ANISOTROPY,_VARYINGNAME_,CoatRoughnessAnisotropy)\n#include<samplerVertexDeclaration>(_DEFINENAME_,COAT_DARKENING,_VARYINGNAME_,CoatDarkening)\n#include<samplerVertexDeclaration>(_DEFINENAME_,FUZZ_WEIGHT,_VARYINGNAME_,FuzzWeight)\n#include<samplerVertexDeclaration>(_DEFINENAME_,FUZZ_COLOR,_VARYINGNAME_,FuzzColor)\n#include<samplerVertexDeclaration>(_DEFINENAME_,FUZZ_ROUGHNESS,_VARYINGNAME_,FuzzRoughness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,GEOMETRY_NORMAL,_VARYINGNAME_,GeometryNormal)\n#include<samplerVertexDeclaration>(_DEFINENAME_,GEOMETRY_TANGENT,_VARYINGNAME_,GeometryTangent)\n#include<samplerVertexDeclaration>(_DEFINENAME_,GEOMETRY_COAT_NORMAL,_VARYINGNAME_,GeometryCoatNormal)\n#include<samplerVertexDeclaration>(_DEFINENAME_,GEOMETRY_OPACITY,_VARYINGNAME_,GeometryOpacity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,EMISSION_COLOR,_VARYINGNAME_,EmissionColor)\n#include<samplerVertexDeclaration>(_DEFINENAME_,THIN_FILM_WEIGHT,_VARYINGNAME_,ThinFilmWeight)\n#include<samplerVertexDeclaration>(_DEFINENAME_,THIN_FILM_THICKNESS,_VARYINGNAME_,ThinFilmThickness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT_OCCLUSION,_VARYINGNAME_,AmbientOcclusion)\n#include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)\n#include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)\nvarying vec3 vPositionW;\n#if DEBUGMODE>0\nvarying vec4 vClipSpacePosition;\n#endif\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvarying vec3 vEnvironmentIrradiance;\n#include<harmonicsFunctions>\n#endif\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\n#endif\n#include<openpbrNormalMapVertexDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightVxFragment>[0..maxSimultaneousLights]\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include<logDepthDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec3 positionUpdated=position;\n#ifdef NORMAL\nvec3 normalUpdated=normal;\n#endif\n#ifdef TANGENT\nvec4 tangentUpdated=tangent;\n#endif\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#ifdef UV2\nvec2 uv2Updated=uv2;\n#endif\n#ifdef VERTEXCOLOR\nvec4 colorUpdated=color;\n#endif\n#include<morphTargetsVertexGlobal>\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvPositionUVW=positionUpdated;\n#endif\n#define CUSTOM_VERTEX_UPDATE_POSITION\n#define CUSTOM_VERTEX_UPDATE_NORMAL\n#include<instancesVertex>\n#if defined(PREPASS) && ((defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && !defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);\n#endif\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);vPositionW=vec3(worldPos);\n#ifdef PREPASS\n#include<prePassVertex>\n#endif\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#if defined(INSTANCES) && defined(THIN_INSTANCES)\nvNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vNormalW=normalize(normalWorld*vNormalW);\n#else\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normalUpdated);\n#endif\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\n#if BASE_DIFFUSE_MODEL != BRDF_DIFFUSE_MODEL_LAMBERT && BASE_DIFFUSE_MODEL != BRDF_DIFFUSE_MODEL_LEGACY\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n#if !defined(NATIVE) && !defined(WEBGPU)\nbool bbb=any(isnan(position));if (bbb) { }\n#endif\nfloat NdotV=max(dot(vNormalW,viewDirectionW),0.0);vec3 roughNormal=mix(vNormalW,viewDirectionW,(0.5*(1.0-NdotV))*vBaseDiffuseRoughness);vec3 reflectionVector=vec3(reflectionMatrix*vec4(roughNormal,0)).xyz;\n#else\nvec3 reflectionVector=vec3(reflectionMatrix*vec4(vNormalW,0)).xyz;\n#endif\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\nvEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector);\n#endif\n#endif\n#define CUSTOM_VERTEX_UPDATE_WORLDPOS\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;}\n#else\ngl_Position=viewProjection*worldPos;\n#endif\n#if DEBUGMODE>0\nvClipSpacePosition=gl_Position;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));\n#endif\n#ifndef UV1\nvec2 uvUpdated=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2Updated=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uvUpdated;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2Updated;\n#endif\n#include<uvVariableDeclaration>[3..7]\n#include<samplerVertexImplementation>(_DEFINENAME_,BASE_COLOR,_VARYINGNAME_,BaseColor,_MATRIXNAME_,baseColor,_INFONAME_,BaseColorInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,BASE_WEIGHT,_VARYINGNAME_,BaseWeight,_MATRIXNAME_,baseWeight,_INFONAME_,BaseWeightInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,BASE_DIFFUSE_ROUGHNESS,_VARYINGNAME_,BaseDiffuseRoughness,_MATRIXNAME_,baseDiffuseRoughness,_INFONAME_,BaseDiffuseRoughnessInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,BASE_METALNESS,_VARYINGNAME_,BaseMetalness,_MATRIXNAME_,baseMetalness,_INFONAME_,BaseMetalnessInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR_WEIGHT,_VARYINGNAME_,SpecularWeight,_MATRIXNAME_,specularWeight,_INFONAME_,SpecularWeightInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR_COLOR,_VARYINGNAME_,SpecularColor,_MATRIXNAME_,specularColor,_INFONAME_,SpecularColorInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR_ROUGHNESS,_VARYINGNAME_,SpecularRoughness,_MATRIXNAME_,specularRoughness,_INFONAME_,SpecularRoughnessInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SPECULAR_ROUGHNESS_ANISOTROPY,_VARYINGNAME_,SpecularRoughnessAnisotropy,_MATRIXNAME_,specularRoughnessAnisotropy,_INFONAME_,SpecularRoughnessAnisotropyInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,COAT_WEIGHT,_VARYINGNAME_,CoatWeight,_MATRIXNAME_,coatWeight,_INFONAME_,CoatWeightInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,COAT_COLOR,_VARYINGNAME_,CoatColor,_MATRIXNAME_,coatColor,_INFONAME_,CoatColorInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,COAT_ROUGHNESS,_VARYINGNAME_,CoatRoughness,_MATRIXNAME_,coatRoughness,_INFONAME_,CoatRoughnessInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,COAT_ROUGHNESS_ANISOTROPY,_VARYINGNAME_,CoatRoughnessAnisotropy,_MATRIXNAME_,coatRoughnessAnisotropy,_INFONAME_,CoatRoughnessAnisotropyInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,COAT_DARKENING,_VARYINGNAME_,CoatDarkening,_MATRIXNAME_,coatDarkening,_INFONAME_,CoatDarkeningInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,FUZZ_WEIGHT,_VARYINGNAME_,FuzzWeight,_MATRIXNAME_,fuzzWeight,_INFONAME_,FuzzWeightInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,FUZZ_COLOR,_VARYINGNAME_,FuzzColor,_MATRIXNAME_,fuzzColor,_INFONAME_,FuzzColorInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,FUZZ_ROUGHNESS,_VARYINGNAME_,FuzzRoughness,_MATRIXNAME_,fuzzRoughness,_INFONAME_,FuzzRoughnessInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,GEOMETRY_NORMAL,_VARYINGNAME_,GeometryNormal,_MATRIXNAME_,geometryNormal,_INFONAME_,GeometryNormalInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,GEOMETRY_COAT_NORMAL,_VARYINGNAME_,GeometryCoatNormal,_MATRIXNAME_,geometryCoatNormal,_INFONAME_,GeometryCoatNormalInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,GEOMETRY_OPACITY,_VARYINGNAME_,GeometryOpacity,_MATRIXNAME_,geometryOpacity,_INFONAME_,GeometryOpacityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,GEOMETRY_TANGENT,_VARYINGNAME_,GeometryTangent,_MATRIXNAME_,geometryTangent,_INFONAME_,GeometryTangentInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,EMISSION_COLOR,_VARYINGNAME_,EmissionColor,_MATRIXNAME_,emissionColor,_INFONAME_,EmissionColorInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,THIN_FILM_WEIGHT,_VARYINGNAME_,ThinFilmWeight,_MATRIXNAME_,thinFilmWeight,_INFONAME_,ThinFilmWeightInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,THIN_FILM_THICKNESS,_VARYINGNAME_,ThinFilmThickness,_MATRIXNAME_,thinFilmThickness,_INFONAME_,ThinFilmThicknessInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT_OCCLUSION,_VARYINGNAME_,AmbientOcclusion,_MATRIXNAME_,ambientOcclusion,_INFONAME_,AmbientOcclusionInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)\n#include<openpbrNormalMapVertex>\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#include<vertexColorMixing>\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#include<logDepthVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}\n";o.v.ShadersStore.openpbrVertexShader||(o.v.ShadersStore.openpbrVertexShader=l);const s={name:f,shader:l}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:5498 */