@crystaldesign/real-time-viewer 25.3.0-beta.2 → 25.3.0-beta.20
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.
- package/build/esm/index.js +45 -91
- package/build/types/real-time-viewer/src/store/SceneStore.d.ts +1 -1
- package/build/types/real-time-viewer/src/store/SceneStore.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/store/UIStore.d.ts +1 -2
- package/build/types/real-time-viewer/src/store/UIStore.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/useRealTimeRenderData.d.ts.map +1 -1
- package/build/umd/1020.real-time-viewer.umd.min.js +2 -0
- package/build/umd/1020.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1153.real-time-viewer.umd.min.js +2 -0
- package/build/umd/1153.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1499.real-time-viewer.umd.min.js +1 -1
- package/build/umd/1605.real-time-viewer.umd.min.js +2 -0
- package/build/umd/1605.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1731.real-time-viewer.umd.min.js +2 -0
- package/build/umd/1731.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1781.real-time-viewer.umd.min.js +1 -1
- package/build/umd/2011.real-time-viewer.umd.min.js +1 -1
- package/build/umd/2265.real-time-viewer.umd.min.js +2 -0
- package/build/umd/2265.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2439.real-time-viewer.umd.min.js +1 -1
- package/build/umd/2528.real-time-viewer.umd.min.js +2 -0
- package/build/umd/2528.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2795.real-time-viewer.umd.min.js +2 -0
- package/build/umd/2795.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/2871.real-time-viewer.umd.min.js +1 -1
- package/build/umd/3296.real-time-viewer.umd.min.js +2 -0
- package/build/umd/3296.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3917.real-time-viewer.umd.min.js +2 -0
- package/build/umd/3917.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3945.real-time-viewer.umd.min.js +1 -1
- package/build/umd/3956.real-time-viewer.umd.min.js +2 -0
- package/build/umd/3956.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4051.real-time-viewer.umd.min.js +2 -0
- package/build/umd/4051.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4153.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4486.real-time-viewer.umd.min.js +2 -0
- package/build/umd/4486.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4602.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4661.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4823.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4953.real-time-viewer.umd.min.js +2 -0
- package/build/umd/4953.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5477.real-time-viewer.umd.min.js +2 -0
- package/build/umd/5477.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5645.real-time-viewer.umd.min.js +2 -0
- package/build/umd/5645.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5779.real-time-viewer.umd.min.js +2 -0
- package/build/umd/5779.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5846.real-time-viewer.umd.min.js +2 -0
- package/build/umd/5846.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6030.real-time-viewer.umd.min.js +2 -0
- package/build/umd/6030.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6095.real-time-viewer.umd.min.js +1 -1
- package/build/umd/615.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6288.real-time-viewer.umd.min.js +2 -0
- package/build/umd/6288.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6359.real-time-viewer.umd.min.js +2 -0
- package/build/umd/6359.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6373.real-time-viewer.umd.min.js +2 -0
- package/build/umd/6373.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/653.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6656.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6748.real-time-viewer.umd.min.js +2 -0
- package/build/umd/6748.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/6829.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6912.real-time-viewer.umd.min.js +2 -0
- package/build/umd/6912.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7046.real-time-viewer.umd.min.js +2 -0
- package/build/umd/7046.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7142.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7229.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7501.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7607.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7635.real-time-viewer.umd.min.js +2 -0
- package/build/umd/7635.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7647.real-time-viewer.umd.min.js +2 -0
- package/build/umd/7647.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7751.real-time-viewer.umd.min.js +1 -1
- package/build/umd/781.real-time-viewer.umd.min.js +2 -0
- package/build/umd/781.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/815.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8180.real-time-viewer.umd.min.js +2 -0
- package/build/umd/8180.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8240.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8254.real-time-viewer.umd.min.js +2 -0
- package/build/umd/8254.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8333.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8526.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8620.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8627.real-time-viewer.umd.min.js +2 -0
- package/build/umd/8627.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/8728.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9334.real-time-viewer.umd.min.js +2 -0
- package/build/umd/9334.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9568.real-time-viewer.umd.min.js +1 -1
- package/build/umd/957.real-time-viewer.umd.min.js +2 -0
- package/build/umd/957.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/9884.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9990.real-time-viewer.umd.min.js +2 -0
- package/build/umd/9990.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/real-time-viewer.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +12 -12
- package/build/umd/1896.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1896.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3243.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3243.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4542.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4542.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5478.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5478.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7276.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7276.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9473.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9473.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
package/build/esm/index.js
CHANGED
|
@@ -33,10 +33,8 @@ import { Rectangle } from '@babylonjs/gui/2D/controls/rectangle';
|
|
|
33
33
|
import { TextBlock } from '@babylonjs/gui/2D/controls/textBlock';
|
|
34
34
|
import { Mesh } from '@babylonjs/core/Meshes/mesh';
|
|
35
35
|
import { Axis } from '@babylonjs/core/Maths/math.axis';
|
|
36
|
-
import { HighlightLayer } from '@babylonjs/core/Layers/';
|
|
37
36
|
import { StandardMaterial } from '@babylonjs/core/Materials/standardMaterial';
|
|
38
37
|
import { Texture } from '@babylonjs/core/Materials/Textures/texture';
|
|
39
|
-
import { Constants } from '@babylonjs/core/Engines/constants';
|
|
40
38
|
import { Matrix as Matrix$1, Vector3 as Vector3$1 } from '@babylonjs/core/Maths/math';
|
|
41
39
|
import { Engine } from '@babylonjs/core/Engines/engine';
|
|
42
40
|
import { Scene } from '@babylonjs/core/scene';
|
|
@@ -183,8 +181,8 @@ function GetCameraControls(camera) {
|
|
|
183
181
|
}
|
|
184
182
|
function onRotateMouse(event) {
|
|
185
183
|
if (previousTouch != undefined) return;
|
|
186
|
-
var deltaX = event.movementX ||
|
|
187
|
-
var deltaY = event.movementY ||
|
|
184
|
+
var deltaX = event.movementX || 0;
|
|
185
|
+
var deltaY = event.movementY || 0;
|
|
188
186
|
onRotate(deltaX, deltaY);
|
|
189
187
|
}
|
|
190
188
|
function onMouseDown(ev) {
|
|
@@ -204,8 +202,8 @@ function GetCameraControls(camera) {
|
|
|
204
202
|
element === null || element === void 0 || element.removeEventListener('pointermove', onMouseMoveTarget, false);
|
|
205
203
|
}
|
|
206
204
|
function onMouseMoveTarget(event) {
|
|
207
|
-
var deltaX = event.movementX ||
|
|
208
|
-
var deltaY = event.movementY ||
|
|
205
|
+
var deltaX = event.movementX || 0;
|
|
206
|
+
var deltaY = event.movementY || 0;
|
|
209
207
|
moveTarget(deltaX * 0.002, deltaY * 0.002);
|
|
210
208
|
sceneStore.doRenderControlLoop = true;
|
|
211
209
|
}
|
|
@@ -1708,10 +1706,10 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1708
1706
|
_defineProperty(this, "_gridGui", void 0);
|
|
1709
1707
|
_defineProperty(this, "_isStaticBg", void 0);
|
|
1710
1708
|
_defineProperty(this, "_elementsInfo", void 0);
|
|
1711
|
-
_defineProperty(this, "_selectedHl", void 0);
|
|
1712
1709
|
_defineProperty(this, "_diffuseTexture", void 0);
|
|
1713
1710
|
_defineProperty(this, "_plane", void 0);
|
|
1714
1711
|
_defineProperty(this, "_selectedMeshes", []);
|
|
1712
|
+
_defineProperty(this, "_isUnityComb", false);
|
|
1715
1713
|
_defineProperty(this, "updateOverlayImage", function (overlayImage) {
|
|
1716
1714
|
var _this$_diffuseTexture;
|
|
1717
1715
|
if (!overlayImage || !_this._scene || ((_this$_diffuseTexture = _this._diffuseTexture) === null || _this$_diffuseTexture === void 0 ? void 0 : _this$_diffuseTexture.url) == overlayImage.base64) return;
|
|
@@ -1724,6 +1722,7 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1724
1722
|
var plane = MeshBuilder.CreatePlane('overlayplane', {
|
|
1725
1723
|
size: 0.0047
|
|
1726
1724
|
}, scene);
|
|
1725
|
+
plane.visibility = 0;
|
|
1727
1726
|
var mat = new StandardMaterial('planeMat', scene);
|
|
1728
1727
|
this._diffuseTexture = new Texture('data:image/gif;base64,R0lGODlhAQABALMAAAAAAP///////////////////////////////////////////////////////////yH5BAEAAAEALAAAAAABAAEAAAQCMEQAOw==', scene);
|
|
1729
1728
|
mat.diffuseTexture = this._diffuseTexture;
|
|
@@ -1736,8 +1735,6 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1736
1735
|
plane.position.z = 0.011;
|
|
1737
1736
|
plane.isPickable = false;
|
|
1738
1737
|
plane.parent = scene.activeCamera;
|
|
1739
|
-
this._selectedHl = new HighlightLayer('hl', this._scene);
|
|
1740
|
-
this._selectedHl.innerGlow = false;
|
|
1741
1738
|
this._enableSSAO = enableSSAO;
|
|
1742
1739
|
this._utilStore = utilStore;
|
|
1743
1740
|
this._gui = AdvancedDynamicTexture.CreateFullscreenUI('UI');
|
|
@@ -1756,6 +1753,8 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1756
1753
|
}
|
|
1757
1754
|
this._isStaticBg = _overlayImage === null || _overlayImage === void 0 ? void 0 : _overlayImage.isStaticBg;
|
|
1758
1755
|
if (_overlayImage) {
|
|
1756
|
+
this._isUnityComb = true;
|
|
1757
|
+
plane.visibility = 1;
|
|
1759
1758
|
this._diffuseTexture.updateURL(_overlayImage.base64);
|
|
1760
1759
|
this._plane.visibility = 1;
|
|
1761
1760
|
this._enableSSAO(false);
|
|
@@ -1769,7 +1768,7 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1769
1768
|
}, {
|
|
1770
1769
|
key: "unityCombActive",
|
|
1771
1770
|
get: function get() {
|
|
1772
|
-
return !!this.
|
|
1771
|
+
return !!this._isUnityComb;
|
|
1773
1772
|
}
|
|
1774
1773
|
}, {
|
|
1775
1774
|
key: "initSelectionHandler",
|
|
@@ -1792,25 +1791,10 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1792
1791
|
return mesh.isPickable && mesh.isReady() && mesh.isEnabled() && (!_this2._scene.cameraToUseForPointers || (_this2._scene.cameraToUseForPointers.layerMask & mesh.layerMask) !== 0);
|
|
1793
1792
|
};
|
|
1794
1793
|
}
|
|
1795
|
-
}, {
|
|
1796
|
-
key: "highlightObservable",
|
|
1797
|
-
value: function highlightObservable(meshes) {
|
|
1798
|
-
var _this3 = this;
|
|
1799
|
-
meshes.forEach(function (m) {
|
|
1800
|
-
if (_this3._plane.visibility == 1) {
|
|
1801
|
-
m.material.depthFunction = Constants.ALWAYS;
|
|
1802
|
-
m.material.disableColorWrite = true;
|
|
1803
|
-
} else {
|
|
1804
|
-
m.visibility = 1;
|
|
1805
|
-
m.material.depthFunction = Constants.LESS;
|
|
1806
|
-
m.material.disableColorWrite = false;
|
|
1807
|
-
}
|
|
1808
|
-
});
|
|
1809
|
-
}
|
|
1810
1794
|
}, {
|
|
1811
1795
|
key: "createGridGui",
|
|
1812
1796
|
value: function createGridGui(mesh, onClickDel) {
|
|
1813
|
-
var
|
|
1797
|
+
var _this3 = this;
|
|
1814
1798
|
if (!this._selectionHandler || !mesh) return;
|
|
1815
1799
|
this.removeGridGui();
|
|
1816
1800
|
var guiElem = new TransformNode('gridGuiElem', this._scene);
|
|
@@ -1833,10 +1817,10 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1833
1817
|
dbt.height = this._uiConfig.templateConfig == 'standard' ? '40px' : '70%';
|
|
1834
1818
|
dbt.onPointerClickObservable.add(onClickDel);
|
|
1835
1819
|
dtarget.onPointerEnterObservable = new Observable(function () {
|
|
1836
|
-
return dtarget.background =
|
|
1820
|
+
return dtarget.background = _this3._colors.hoverBg;
|
|
1837
1821
|
});
|
|
1838
1822
|
dtarget.onPointerOutObservable = new Observable(function () {
|
|
1839
|
-
return dtarget.background =
|
|
1823
|
+
return dtarget.background = _this3._colors.defaultBg;
|
|
1840
1824
|
});
|
|
1841
1825
|
if (this._uiConfig.templateConfig == 'standard') dtarget.linkOffsetY = -48;
|
|
1842
1826
|
dtarget.addControl(dbt);
|
|
@@ -1869,9 +1853,9 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1869
1853
|
}, {
|
|
1870
1854
|
key: "createPosNr",
|
|
1871
1855
|
value: function createPosNr(elementInfo, element, isBoxPlanner) {
|
|
1872
|
-
var
|
|
1873
|
-
_this$_utilStore$
|
|
1874
|
-
|
|
1856
|
+
var _this$_utilStore$view,
|
|
1857
|
+
_this$_utilStore$view2,
|
|
1858
|
+
_this4 = this;
|
|
1875
1859
|
var guiElem = {
|
|
1876
1860
|
elementId: elementInfo.elementId,
|
|
1877
1861
|
elements: []
|
|
@@ -1916,43 +1900,12 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1916
1900
|
guiElemRightBack.position = _pos;
|
|
1917
1901
|
}
|
|
1918
1902
|
var childMeshes = element.getChildMeshes();
|
|
1919
|
-
this._scene.onBeforeRenderObservable.add(function () {
|
|
1920
|
-
return _this5.highlightObservable(childMeshes);
|
|
1921
|
-
});
|
|
1922
|
-
if (!elementInfo.active) {
|
|
1923
|
-
childMeshes.forEach(function (m) {
|
|
1924
|
-
m.visibility = 0;
|
|
1925
|
-
if (!m.actionManager) m.actionManager = new ActionManager(_this5._scene);
|
|
1926
|
-
m.actionManager.registerAction(new ExecuteCodeAction(ActionManager.OnPointerOverTrigger, function (ev) {
|
|
1927
|
-
_this5._selectedHl.removeAllMeshes();
|
|
1928
|
-
_this5._selectedMeshes.forEach(function (_m) {
|
|
1929
|
-
return _m.visibility = 0;
|
|
1930
|
-
});
|
|
1931
|
-
element.getChildMeshes().forEach(function (_m) {
|
|
1932
|
-
_m.visibility = 1;
|
|
1933
|
-
_this5._selectedHl.addMesh(_m, Color3.Black());
|
|
1934
|
-
});
|
|
1935
|
-
}));
|
|
1936
|
-
m.actionManager.registerAction(new ExecuteCodeAction(ActionManager.OnPointerOutTrigger, function (ev) {
|
|
1937
|
-
_this5._selectedHl.removeAllMeshes();
|
|
1938
|
-
element.getChildMeshes().forEach(function (_m) {
|
|
1939
|
-
return _m.visibility = 0;
|
|
1940
|
-
});
|
|
1941
|
-
_this5._selectedMeshes.forEach(function (_m) {
|
|
1942
|
-
_m.visibility = 1;
|
|
1943
|
-
_this5._selectedHl.addMesh(_m, Color3.Black());
|
|
1944
|
-
});
|
|
1945
|
-
}));
|
|
1946
|
-
});
|
|
1947
|
-
}
|
|
1948
1903
|
if (elementInfo.active && (((_this$_utilStore$view = this._utilStore.viewHandler) === null || _this$_utilStore$view === void 0 ? void 0 : _this$_utilStore$view.tabGroupState.curTabGroup.type) == 'PLANNER' || ((_this$_utilStore$view2 = this._utilStore.viewHandler) === null || _this$_utilStore$view2 === void 0 ? void 0 : _this$_utilStore$view2.tabGroupState.curTabGroup.type) == 'OPTION')) {
|
|
1949
1904
|
var _guiElemRightBack;
|
|
1950
1905
|
this._selectedMeshes = childMeshes;
|
|
1951
1906
|
this._selectedMeshes.forEach(function (_m) {
|
|
1952
1907
|
_m.visibility = 1;
|
|
1953
|
-
_this5._selectedHl.addMesh(_m, Color3.Black());
|
|
1954
1908
|
});
|
|
1955
|
-
this._selectedHl.addExcludedMesh(this._plane);
|
|
1956
1909
|
var dtarget = this._uiConfig.templateConfig == 'standard' ? new Ellipse('deleteEllipse') : new Rectangle('deleteEllipse');
|
|
1957
1910
|
guiElem.elements.push(dtarget);
|
|
1958
1911
|
dtarget.width = this._uiConfig.templateConfig == 'standard' ? '40px' : '35px';
|
|
@@ -1965,7 +1918,7 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1965
1918
|
dbt.width = this._uiConfig.templateConfig == 'standard' ? '40px' : '60%';
|
|
1966
1919
|
dbt.height = this._uiConfig.templateConfig == 'standard' ? '40px' : '70%';
|
|
1967
1920
|
dbt.onPointerClickObservable.add(function () {
|
|
1968
|
-
return
|
|
1921
|
+
return _this4._utilStore.onElementDeleted(elementInfo.setId, elementInfo.elementId);
|
|
1969
1922
|
});
|
|
1970
1923
|
if (this._uiConfig.templateConfig == 'standard' && !guiElemRightBack) dtarget.linkOffsetY = -48;
|
|
1971
1924
|
dtarget.addControl(dbt);
|
|
@@ -1979,7 +1932,7 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
1979
1932
|
value: function createBoxCopyButtons(elementInfo, element) {
|
|
1980
1933
|
var _this$_scene$activeCa,
|
|
1981
1934
|
_this$_scene$activeCa2,
|
|
1982
|
-
|
|
1935
|
+
_this5 = this,
|
|
1983
1936
|
_this$_scene$activeCa3;
|
|
1984
1937
|
var guiElem = {
|
|
1985
1938
|
elementId: elementInfo.elementId,
|
|
@@ -2005,8 +1958,8 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
2005
1958
|
target.rotation = 0;
|
|
2006
1959
|
}
|
|
2007
1960
|
(_this$_scene$activeCa2 = this._scene.activeCamera) === null || _this$_scene$activeCa2 === void 0 || _this$_scene$activeCa2.onViewMatrixChangedObservable.add(function () {
|
|
2008
|
-
var
|
|
2009
|
-
var _dir = (
|
|
1961
|
+
var _this5$_scene$activeC;
|
|
1962
|
+
var _dir = (_this5$_scene$activeC = _this5._scene.activeCamera) === null || _this5$_scene$activeC === void 0 ? void 0 : _this5$_scene$activeC.getDirection(Axis.Z);
|
|
2010
1963
|
if (_dir.z > 0) {
|
|
2011
1964
|
target.rotation = 180 * Math.PI / 180;
|
|
2012
1965
|
} else {
|
|
@@ -2014,8 +1967,8 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
2014
1967
|
}
|
|
2015
1968
|
});
|
|
2016
1969
|
target.onPointerClickObservable.add(function () {
|
|
2017
|
-
var
|
|
2018
|
-
return (
|
|
1970
|
+
var _this5$_onElementCopy;
|
|
1971
|
+
return (_this5$_onElementCopy = _this5._onElementCopy) === null || _this5$_onElementCopy === void 0 ? void 0 : _this5$_onElementCopy.call(_this5, elementInfo.setId, elementInfo.elementId, 'LEFT');
|
|
2019
1972
|
});
|
|
2020
1973
|
break;
|
|
2021
1974
|
case 'BoxCopyRight':
|
|
@@ -2028,8 +1981,8 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
2028
1981
|
guiElement.position = element.absolutePosition.add(new Vector3(-(bbox.max.x - bbox.min.x), (bbox.max.y - bbox.min.y) / 2, bbox.max.z - bbox.min.z));
|
|
2029
1982
|
guiElement.rotation = new Vector3(90 * Math.PI / 180, 0, 0);
|
|
2030
1983
|
(_this$_scene$activeCa3 = this._scene.activeCamera) === null || _this$_scene$activeCa3 === void 0 || _this$_scene$activeCa3.onViewMatrixChangedObservable.add(function () {
|
|
2031
|
-
var
|
|
2032
|
-
var _dir = (
|
|
1984
|
+
var _this5$_scene$activeC2;
|
|
1985
|
+
var _dir = (_this5$_scene$activeC2 = _this5._scene.activeCamera) === null || _this5$_scene$activeC2 === void 0 ? void 0 : _this5$_scene$activeC2.getDirection(Axis.Z);
|
|
2033
1986
|
if (_dir.z < 0) {
|
|
2034
1987
|
target.rotation = 180 * Math.PI / 180;
|
|
2035
1988
|
} else {
|
|
@@ -2037,16 +1990,16 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
2037
1990
|
}
|
|
2038
1991
|
});
|
|
2039
1992
|
target.onPointerClickObservable.add(function () {
|
|
2040
|
-
var
|
|
2041
|
-
return (
|
|
1993
|
+
var _this5$_onElementCopy2;
|
|
1994
|
+
return (_this5$_onElementCopy2 = _this5._onElementCopy) === null || _this5$_onElementCopy2 === void 0 ? void 0 : _this5$_onElementCopy2.call(_this5, elementInfo.setId, elementInfo.elementId, 'RIGHT');
|
|
2042
1995
|
});
|
|
2043
1996
|
break;
|
|
2044
1997
|
case 'BoxCopyTop':
|
|
2045
1998
|
target.rotation = 90 * Math.PI / 180;
|
|
2046
1999
|
guiElement.position = element.absolutePosition.add(new Vector3(-(bbox.max.x - bbox.min.x) / 2, bbox.max.y - bbox.min.y, bbox.max.z - bbox.min.z));
|
|
2047
2000
|
target.onPointerClickObservable.add(function () {
|
|
2048
|
-
var
|
|
2049
|
-
return (
|
|
2001
|
+
var _this5$_onElementCopy3;
|
|
2002
|
+
return (_this5$_onElementCopy3 = _this5._onElementCopy) === null || _this5$_onElementCopy3 === void 0 ? void 0 : _this5$_onElementCopy3.call(_this5, elementInfo.setId, elementInfo.elementId, 'TOP');
|
|
2050
2003
|
});
|
|
2051
2004
|
break;
|
|
2052
2005
|
}
|
|
@@ -2057,7 +2010,7 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
2057
2010
|
}, {
|
|
2058
2011
|
key: "initGui",
|
|
2059
2012
|
value: function initGui(onElSelected, elements) {
|
|
2060
|
-
var
|
|
2013
|
+
var _this6 = this;
|
|
2061
2014
|
if (!this._selectionHandler) this.initSelectionHandler(onElSelected);
|
|
2062
2015
|
if (!this._scene) return;
|
|
2063
2016
|
if (!this._elementsInfo) return;
|
|
@@ -2074,15 +2027,15 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
2074
2027
|
return Number(el.bbn.name.slice(el.bbn.name.lastIndexOf('E') + 1, el.bbn.name.length)) == elementInfo.elementId;
|
|
2075
2028
|
});
|
|
2076
2029
|
if (!emnt) return;
|
|
2077
|
-
var element =
|
|
2030
|
+
var element = _this6._scene.getTransformNodeByName(emnt.bbn.name);
|
|
2078
2031
|
if (!element) return;
|
|
2079
|
-
if (elementInfo.type == 'PosNr')
|
|
2032
|
+
if (elementInfo.type == 'PosNr') _this6.createPosNr(elementInfo, element, isBoxPlanner);else _this6.createBoxCopyButtons(elementInfo, element);
|
|
2080
2033
|
});
|
|
2081
2034
|
}
|
|
2082
2035
|
}, {
|
|
2083
2036
|
key: "selectElem",
|
|
2084
2037
|
value: function selectElem(name) {
|
|
2085
|
-
var
|
|
2038
|
+
var _this7 = this;
|
|
2086
2039
|
var _iterator = _createForOfIteratorHelper$5(this._gui.getControlsByType('ellipse')),
|
|
2087
2040
|
_step;
|
|
2088
2041
|
try {
|
|
@@ -2098,9 +2051,9 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
2098
2051
|
this._guiElements.forEach(function (guiElem) {
|
|
2099
2052
|
return guiElem.elements.forEach(function (element) {
|
|
2100
2053
|
if (element.typeName == 'label') element.color = 'Black';
|
|
2101
|
-
if (element.typeName == 'Ellipse') element.color =
|
|
2054
|
+
if (element.typeName == 'Ellipse') element.color = _this7._colors.defaultBg;
|
|
2102
2055
|
if (guiElem.elementId.toString() == name) {
|
|
2103
|
-
if (element.typeName == 'label') element.color =
|
|
2056
|
+
if (element.typeName == 'label') element.color = _this7._colors.selectedBg;
|
|
2104
2057
|
if (element.typeName == 'Ellipse') element.color = 'White';
|
|
2105
2058
|
}
|
|
2106
2059
|
});
|
|
@@ -2118,12 +2071,11 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
2118
2071
|
this._scene.transformNodes.forEach(function (tN) {
|
|
2119
2072
|
return tN.name.startsWith('guiElem_') && tN.dispose();
|
|
2120
2073
|
});
|
|
2121
|
-
this._selectedHl.removeAllMeshes();
|
|
2122
2074
|
}
|
|
2123
2075
|
}, {
|
|
2124
2076
|
key: "onMove",
|
|
2125
2077
|
value: function onMove() {
|
|
2126
|
-
if (!this.
|
|
2078
|
+
if (!this._isUnityComb) return;
|
|
2127
2079
|
this._plane.visibility = 0;
|
|
2128
2080
|
this._enableSSAO(true);
|
|
2129
2081
|
this._utilStore.updateCam = false;
|
|
@@ -2131,9 +2083,9 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
2131
2083
|
}, {
|
|
2132
2084
|
key: "requestNewOverlayImage",
|
|
2133
2085
|
value: function requestNewOverlayImage(viewpoint, focusedElement, targetCameraPosition) {
|
|
2134
|
-
var
|
|
2086
|
+
var _this8 = this;
|
|
2135
2087
|
//this._overlayImage exists only when unity combi is enabled
|
|
2136
|
-
if (!this.
|
|
2088
|
+
if (!this._isUnityComb) return;
|
|
2137
2089
|
var elementId = undefined;
|
|
2138
2090
|
var setId = undefined;
|
|
2139
2091
|
var ob = this._scene.getTransformNodeByName(focusedElement.name);
|
|
@@ -2147,18 +2099,18 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
2147
2099
|
clearTimeout(this._timeoutId);
|
|
2148
2100
|
if (!this._latestViewpoint || this._latestViewpoint.isOutdated || Math.abs(this._latestViewpoint.pos.x - viewpoint.pos.x) > 0.05 || Math.abs(this._latestViewpoint.pos.y - viewpoint.pos.y) > 0.05 || Math.abs(this._latestViewpoint.pos.z - viewpoint.pos.z) > 0.05 || Math.abs(this._latestViewpoint.rot.x - viewpoint.rot.x) > 0.05 || Math.abs(this._latestViewpoint.rot.y - viewpoint.rot.y) > 0.05 || Math.abs(this._latestViewpoint.rot.z - viewpoint.rot.z) > 0.05) {
|
|
2149
2101
|
this._timeoutId = setTimeout(function () {
|
|
2150
|
-
var
|
|
2151
|
-
|
|
2152
|
-
|
|
2102
|
+
var _this8$_requestNewOve;
|
|
2103
|
+
_this8._utilStore.addOutstandingImage();
|
|
2104
|
+
_this8._latestViewpoint = viewpoint;
|
|
2153
2105
|
console.log('requestNewOverlay Image');
|
|
2154
|
-
(
|
|
2106
|
+
(_this8$_requestNewOve = _this8._requestNewOverlayImage) === null || _this8$_requestNewOve === void 0 || _this8$_requestNewOve.call(_this8, viewpoint, {
|
|
2155
2107
|
adjustZoomInUnity: false,
|
|
2156
2108
|
onlyAdjustZoomBBChanged: false,
|
|
2157
2109
|
rotationCenter: viewpoint.targetPos,
|
|
2158
2110
|
elementId: elementId,
|
|
2159
2111
|
setId: setId
|
|
2160
2112
|
});
|
|
2161
|
-
|
|
2113
|
+
_this8._utilStore.updateCam = true;
|
|
2162
2114
|
}, 200);
|
|
2163
2115
|
} else {
|
|
2164
2116
|
this._plane.visibility = 1;
|
|
@@ -3554,16 +3506,18 @@ function useRealTimeRenderData (_ref) {
|
|
|
3554
3506
|
return _onSceneReady.apply(this, arguments);
|
|
3555
3507
|
}
|
|
3556
3508
|
function onFirstFrame() {
|
|
3557
|
-
var _callbacks$onInitiali2, _sceneStore;
|
|
3509
|
+
var _sceneStore$scene$deb, _sceneStore$scene$deb2, _callbacks$onInitiali2, _sceneStore;
|
|
3558
3510
|
sceneStore.isInitializing = false;
|
|
3559
3511
|
sceneStore.scene.onAfterRenderObservable.removeCallback(onFirstFrame);
|
|
3560
3512
|
if (!overlayImage) actions.toggleLoading('buildScene', false, false);
|
|
3513
|
+
(_sceneStore$scene$deb = sceneStore.scene.debugLayer) === null || _sceneStore$scene$deb === void 0 || (_sceneStore$scene$deb2 = _sceneStore$scene$deb.show) === null || _sceneStore$scene$deb2 === void 0 || _sceneStore$scene$deb2.call(_sceneStore$scene$deb);
|
|
3561
3514
|
(_callbacks$onInitiali2 = callbacks.onInitialized) === null || _callbacks$onInitiali2 === void 0 || _callbacks$onInitiali2.call(callbacks);
|
|
3562
3515
|
(_sceneStore = sceneStore) === null || _sceneStore === void 0 || _sceneStore.optimizeScene();
|
|
3563
3516
|
}
|
|
3564
3517
|
function renderLoop() {
|
|
3565
3518
|
var _sceneStore$controlRe, _sceneStore2;
|
|
3566
3519
|
if (!gameCanvas.current) sceneStore.scene.getEngine().dispose();
|
|
3520
|
+
if (sceneStore.cameraTargetPosition.x == 0 && sceneStore.cameraTargetPosition.y == 0 && sceneStore.cameraTargetPosition.z == 0) sceneStore.setCameraTarget();
|
|
3567
3521
|
(_sceneStore$controlRe = (_sceneStore2 = sceneStore).controlRenderLoop) === null || _sceneStore$controlRe === void 0 || _sceneStore$controlRe.call(_sceneStore2);
|
|
3568
3522
|
sceneStore.scene.render();
|
|
3569
3523
|
}
|
|
@@ -3595,7 +3549,7 @@ function useRealTimeRenderData (_ref) {
|
|
|
3595
3549
|
}
|
|
3596
3550
|
engine = new Engine(gameCanvas.current, true, {
|
|
3597
3551
|
antialias: true,
|
|
3598
|
-
stencil:
|
|
3552
|
+
stencil: false,
|
|
3599
3553
|
audioEngine: false
|
|
3600
3554
|
}, true);
|
|
3601
3555
|
engine.renderEvenInBackground = renderInBackground;
|
|
@@ -83,7 +83,7 @@ export declare class SceneStore {
|
|
|
83
83
|
get hasPlanned(): boolean;
|
|
84
84
|
get cams(): ArcRotateCamera[];
|
|
85
85
|
get previousHQRenderScript(): HQRenderScript | undefined;
|
|
86
|
-
get activeCamera(): import("@babylonjs/core
|
|
86
|
+
get activeCamera(): import("@babylonjs/core").Camera;
|
|
87
87
|
get meshes(): AbstractMesh[];
|
|
88
88
|
get ssao(): SSAO2RenderingPipeline;
|
|
89
89
|
get renderPipeline(): DefaultRenderingPipeline;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneStore.d.ts","sourceRoot":"","sources":["../../../../../src/store/SceneStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAa,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC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AAS,CAAC;IAalD,aAAa;IAIb,eAAe;IAUf,KAAK,CAAC,EAAE,EAAE,IAAI,GAAG,MAAM;IASvB,YAAY,CAAC,IAAI,CAAC,EAAE,aAAa;IAwBjC,iBAAiB;CAMzB"}
|
|
@@ -20,10 +20,10 @@ export declare class UIStore {
|
|
|
20
20
|
private _gridGui?;
|
|
21
21
|
private _isStaticBg?;
|
|
22
22
|
private _elementsInfo?;
|
|
23
|
-
private _selectedHl;
|
|
24
23
|
private _diffuseTexture;
|
|
25
24
|
private _plane;
|
|
26
25
|
private _selectedMeshes;
|
|
26
|
+
private _isUnityComb;
|
|
27
27
|
constructor(scene: Scene, enableSSAO: (enable: boolean) => void, utilStore: UtilStore, uiConfig?: UIConfig, requestNewOverlayImage?: (viewpoint: ViewpointCamInfo) => void, overlayImage?: {
|
|
28
28
|
base64: string;
|
|
29
29
|
isStaticBg: boolean;
|
|
@@ -31,7 +31,6 @@ export declare class UIStore {
|
|
|
31
31
|
get isStaticBg(): boolean;
|
|
32
32
|
get unityCombActive(): boolean;
|
|
33
33
|
private initSelectionHandler;
|
|
34
|
-
private highlightObservable;
|
|
35
34
|
createGridGui(mesh: Mesh, onClickDel?: any): void;
|
|
36
35
|
removeGridGui(): void;
|
|
37
36
|
resize(scene: Scene): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UIStore.d.ts","sourceRoot":"","sources":["../../../../../src/store/UIStore.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"UIStore.d.ts","sourceRoot":"","sources":["../../../../../src/store/UISt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AW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,SAAS,EACT,QAAQ,EACR,kBAAkB,GACnB,EAAE,KAAK;;
|
|
1
|
+
{"version":3,"file":"useRealTimeRenderData.d.ts","sourceRoot":"","sources":["../../../../src/useRealTimeRenderData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAU1B,OAAO,8BAA8B,CAAC;AAOtC,MAAM,CAAC,OAAO,WAAW,EACvB,GAAG,EACH,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,SAAS,EACT,QAAQ,EACR,kBAAkB,GACnB,EAAE,KAAK;;EAuMP"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 1020.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[1020],{4449:(e,n,t)=>{const a="hdrFilteringFunctions",o="#ifdef NUM_SAMPLES\n#if NUM_SAMPLES>0\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nfloat radicalInverse_VdC(uint bits) \n{bits=(bits<<16u) | (bits>>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 float(bits)*2.3283064365386963e-10; }\nvec2 hammersley(uint i,uint N)\n{return vec2(float(i)/float(N),radicalInverse_VdC(i));}\n#else\nfloat vanDerCorpus(int n,int base)\n{float invBase=1.0/float(base);float denom =1.0;float result =0.0;for(int i=0; i<32; ++i)\n{if(n>0)\n{denom =mod(float(n),2.0);result+=denom*invBase;invBase=invBase/2.0;n =int(float(n)/2.0);}}\nreturn result;}\nvec2 hammersley(int i,int N)\n{return vec2(float(i)/float(N),vanDerCorpus(i,2));}\n#endif\nfloat log4(float x) {return log2(x)/2.;}\nvec3 uv_to_normal(vec2 uv) {vec3 N;vec2 uvRange=uv;float theta=uvRange.x*2.0*PI;float phi=uvRange.y*PI;N.x=cos(theta)*sin(phi);N.z=sin(theta)*sin(phi);N.y=cos(phi);return N;}\nconst float NUM_SAMPLES_FLOAT=float(NUM_SAMPLES);const float NUM_SAMPLES_FLOAT_INVERSED=1./NUM_SAMPLES_FLOAT;const float K=4.;\n#define inline\nvec3 irradiance(samplerCube inputTexture,vec3 inputN,vec2 filteringInfo\n#ifdef IBL_CDF_FILTERING\n,sampler2D icdfSampler\n#endif\n)\n{vec3 n=normalize(inputN);vec3 result=vec3(0.0);\n#ifndef IBL_CDF_FILTERING\nvec3 tangent=abs(n.z)<0.999 ? vec3(0.,0.,1.) : vec3(1.,0.,0.);tangent=normalize(cross(tangent,n));vec3 bitangent=cross(n,tangent);mat3 tbn=mat3(tangent,bitangent,n);\n#endif\nfloat maxLevel=filteringInfo.y;float dim0=filteringInfo.x;float omegaP=(4.*PI)/(6.*dim0*dim0);\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nfor(uint i=0u; i<NUM_SAMPLES; ++i)\n#else\nfor(int i=0; i<NUM_SAMPLES; ++i)\n#endif\n{vec2 Xi=hammersley(i,NUM_SAMPLES);\n#ifdef IBL_CDF_FILTERING\nvec2 T;T.x=textureLod(icdfSampler,vec2(Xi.x,0.0),0.0).x;T.y=textureLod(icdfSampler,vec2(T.x,Xi.y),0.0).y;vec3 Ls=uv_to_normal(vec2(1.0-fract(T.x+0.25),T.y));float NoL=dot(n,Ls);\n#else\nvec3 Ls=hemisphereCosSample(Xi);Ls=normalize(Ls);vec3 Ns=vec3(0.,0.,1.);float NoL=dot(Ns,Ls);\n#endif\nif (NoL>0.) {\n#ifdef IBL_CDF_FILTERING\nfloat pdf=textureLod(icdfSampler,T,0.0).z;vec3 c=textureCubeLodEXT(inputTexture,Ls,0.0).rgb;\n#else\nfloat pdf_inversed=PI/NoL;float omegaS=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed;float l=log4(omegaS)-log4(omegaP)+log4(K);float mipLevel=clamp(l,0.0,maxLevel);vec3 c=textureCubeLodEXT(inputTexture,tbn*Ls,mipLevel).rgb;\n#endif\n#ifdef GAMMA_INPUT\nc=toLinearSpace(c);\n#endif\n#ifdef IBL_CDF_FILTERING\nvec3 light=pdf<1e-6 ? vec3(0.0) : vec3(1.0)/vec3(pdf)*c;result+=NoL*light;\n#else\nresult+=c;\n#endif\n}}\nresult=result*NUM_SAMPLES_FLOAT_INVERSED;return result;}\n#define inline\nvec3 radiance(float alphaG,samplerCube inputTexture,vec3 inputN,vec2 filteringInfo)\n{vec3 n=normalize(inputN);vec3 c=textureCube(inputTexture,n).rgb; \nif (alphaG==0.) {\n#ifdef GAMMA_INPUT\nc=toLinearSpace(c);\n#endif\nreturn c;} else {vec3 result=vec3(0.);vec3 tangent=abs(n.z)<0.999 ? vec3(0.,0.,1.) : vec3(1.,0.,0.);tangent=normalize(cross(tangent,n));vec3 bitangent=cross(n,tangent);mat3 tbn=mat3(tangent,bitangent,n);float maxLevel=filteringInfo.y;float dim0=filteringInfo.x;float omegaP=(4.*PI)/(6.*dim0*dim0);float weight=0.;\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nfor(uint i=0u; i<NUM_SAMPLES; ++i)\n#else\nfor(int i=0; i<NUM_SAMPLES; ++i)\n#endif\n{vec2 Xi=hammersley(i,NUM_SAMPLES);vec3 H=hemisphereImportanceSampleDggx(Xi,alphaG);float NoV=1.;float NoH=H.z;float NoH2=H.z*H.z;float NoL=2.*NoH2-1.;vec3 L=vec3(2.*NoH*H.x,2.*NoH*H.y,NoL);L=normalize(L);if (NoL>0.) {float pdf_inversed=4./normalDistributionFunction_TrowbridgeReitzGGX(NoH,alphaG);float omegaS=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed;float l=log4(omegaS)-log4(omegaP)+log4(K);float mipLevel=clamp(float(l),0.0,maxLevel);weight+=NoL;vec3 c=textureCubeLodEXT(inputTexture,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";t(7416).v.IncludesShadersStore[a]=o},1876:(e,n,t)=>{const a="importanceSampling",o="vec3 hemisphereCosSample(vec2 u) {float phi=2.*PI*u.x;float cosTheta2=1.-u.y;float cosTheta=sqrt(cosTheta2);float sinTheta=sqrt(1.-cosTheta2);return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}\nvec3 hemisphereImportanceSampleDggx(vec2 u,float a) {float phi=2.*PI*u.x;float cosTheta2=(1.-u.y)/(1.+(a+1.)*((a-1.)*u.y));float cosTheta=sqrt(cosTheta2);float sinTheta=sqrt(1.-cosTheta2);return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}\nvec3 hemisphereImportanceSampleDCharlie(vec2 u,float a) { \nfloat phi=2.*PI*u.x;float sinTheta=pow(u.y,a/(2.*a+1.));float cosTheta=sqrt(1.-sinTheta*sinTheta);return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta);}";t(7416).v.IncludesShadersStore[a]=o},2880:(e,n,t)=>{const a="pbrBRDFFunctions",o="#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\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#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;}\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";t(7416).v.IncludesShadersStore[a]=o},1020:(e,n,t)=>{t.r(n),t.d(n,{hdrIrradianceFilteringPixelShader:()=>r});var a=t(7416);t(5276),t(1876),t(2880),t(4449);const o="hdrIrradianceFilteringPixelShader",i="#include<helperFunctions>\n#include<importanceSampling>\n#include<pbrBRDFFunctions>\n#include<hdrFilteringFunctions>\nuniform samplerCube inputTexture;\n#ifdef IBL_CDF_FILTERING\nuniform sampler2D icdfTexture;\n#endif\nuniform vec2 vFilteringInfo;uniform float hdrScale;varying vec3 direction;void main() {vec3 color=irradiance(inputTexture,direction,vFilteringInfo\n#ifdef IBL_CDF_FILTERING\n,icdfTexture\n#endif\n);gl_FragColor=vec4(color*hdrScale,1.0);}";a.v.ShadersStore[o]=i;const r={name:o,shader:i}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! filename:1020 */
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 1153.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[1153],{1153:(e,n,l)=>{l.r(n),l.d(n,{_IESTextureLoader:()=>_IESTextureLoader});var a=l(1494);function lineToArray(e){return e.split(" ").filter((e=>""!==e)).map((e=>parseFloat(e)))}function readArray(e,n,l){for(;l.length!==n;){const n=lineToArray(e.lines[e.index++]);l.push(...n)}}function interpolateCandelaValues(e,n,l){let r=0,t=0,i=0,o=0,s=0,u=0;for(let n=0;n<e.numberOfHorizontalAngles-1;n++)if(l<e.horizontalAngles[n+1]||n===e.numberOfHorizontalAngles-2){t=n,i=e.horizontalAngles[n],o=e.horizontalAngles[n+1];break}for(let l=0;l<e.numberOfVerticalAngles-1;l++)if(n<e.verticalAngles[l+1]||l===e.numberOfVerticalAngles-2){r=l,s=e.verticalAngles[l],u=e.verticalAngles[l+1];break}const c=o-i,d=u-s;if(0===d)return 0;const f=0===c?0:(l-i)/c,g=(n-s)/d,A=0===c?t:t+1,b=(0,a.Lerp)(e.candelaValues[t][r],e.candelaValues[A][r],f),h=(0,a.Lerp)(e.candelaValues[t][r+1],e.candelaValues[A][r+1],f);return(0,a.Lerp)(b,h,g)}class _IESTextureLoader{constructor(){this.supportCascades=!1}loadCubeData(){throw".ies not supported in Cube."}loadData(e,n,l){const a=function LoadIESData(e){const n={lines:new TextDecoder("utf-8").decode(e).split("\n"),index:0},l={version:n.lines[0],candelaValues:[],horizontalAngles:[],verticalAngles:[],numberOfHorizontalAngles:0,numberOfVerticalAngles:0};for(n.index=1;n.lines.length>0&&!n.lines[n.index].includes("TILT=");)n.index++;n.lines[n.index].includes("INCLUDE"),n.index++;const a=lineToArray(n.lines[n.index++]);l.numberOfLights=a[0],l.lumensPerLamp=a[1],l.candelaMultiplier=a[2],l.numberOfVerticalAngles=a[3],l.numberOfHorizontalAngles=a[4],l.photometricType=a[5],l.unitsType=a[6],l.width=a[7],l.length=a[8],l.height=a[9];const r=lineToArray(n.lines[n.index++]);l.ballastFactor=r[0],l.fileGenerationType=r[1],l.inputWatts=r[2];for(let e=0;e<l.numberOfHorizontalAngles;e++)l.candelaValues[e]=[];readArray(n,l.numberOfVerticalAngles,l.verticalAngles),readArray(n,l.numberOfHorizontalAngles,l.horizontalAngles);for(let e=0;e<l.numberOfHorizontalAngles;e++)readArray(n,l.numberOfVerticalAngles,l.candelaValues[e]);let t=-1;for(let e=0;e<l.numberOfHorizontalAngles;e++)for(let n=0;n<l.numberOfVerticalAngles;n++)l.candelaValues[e][n]*=l.candelaValues[e][n]*l.candelaMultiplier*l.ballastFactor*l.fileGenerationType,t=Math.max(t,l.candelaValues[e][n]);if(t>0)for(let e=0;e<l.numberOfHorizontalAngles;e++)for(let n=0;n<l.numberOfVerticalAngles;n++)l.candelaValues[e][n]/=t;const i=180,o=360,s=new Float32Array(64800),u=l.horizontalAngles[0],c=l.horizontalAngles[l.numberOfHorizontalAngles-1];for(let e=0;e<64800;e++){let n=e%o;const a=Math.floor(e/o);c-u!=0&&(n<u||n>=c)&&(n%=2*c,n>c&&(n=2*c-n)),s[a+n*i]=interpolateCandelaValues(l,a,n)}return{width:180,height:1,data:s}}(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));l(a.width,a.height,!1,!1,(()=>{const e=n.getEngine();n.type=1,n.format=6,n._gammaSpace=!1,e._uploadDataToTextureDirectly(n,a.data)}))}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! filename:1153 */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 1499.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[1499],{5785:(e,n,i)=>{const t="bumpVertex",r="#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)\n#if defined(TANGENT) && defined(NORMAL)\nvar tbnNormal: vec3f=normalize(normalUpdated);var tbnTangent: vec3f=normalize(tangentUpdated.xyz);var tbnBitangent: vec3f=cross(tbnNormal,tbnTangent)*tangentUpdated.w;var matTemp= mat3x3f(finalWorld[0].xyz,finalWorld[1].xyz,finalWorld[2].xyz)* mat3x3f(tbnTangent,tbnBitangent,tbnNormal);vertexOutputs.vTBN0=matTemp[0];vertexOutputs.vTBN1=matTemp[1];vertexOutputs.vTBN2=matTemp[2];\n#endif\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},1068:(e,n,i)=>{const t="bumpVertexDeclaration",r="#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)\n#if defined(TANGENT) && defined(NORMAL) \nvarying vTBN0: vec3f;varying vTBN1: vec3f;varying vTBN2: vec3f;\n#endif\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},6236:(e,n,i)=>{const t="fogVertex",r="#ifdef FOG\nvertexOutputs.vFogDistance=(scene.view*worldPos).xyz;\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},5472:(e,n,i)=>{const t="fogVertexDeclaration",r="#ifdef FOG\nvarying vFogDistance: vec3f;\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},5143:(e,n,i)=>{const t="harmonicsFunctions",r="#ifdef USESPHERICALFROMREFLECTIONMAP\n#ifdef SPHERICAL_HARMONICS\nfn computeEnvironmentIrradiance(normal: vec3f)->vec3f {return uniforms.vSphericalL00\n+ uniforms.vSphericalL1_1*(normal.y)\n+ uniforms.vSphericalL10*(normal.z)\n+ uniforms.vSphericalL11*(normal.x)\n+ uniforms.vSphericalL2_2*(normal.y*normal.x)\n+ uniforms.vSphericalL2_1*(normal.y*normal.z)\n+ uniforms.vSphericalL20*((3.0*normal.z*normal.z)-1.0)\n+ uniforms.vSphericalL21*(normal.z*normal.x)\n+ uniforms.vSphericalL22*(normal.x*normal.x-(normal.y*normal.y));}\n#else\nfn computeEnvironmentIrradiance(normal: vec3f)->vec3f {var Nx: f32=normal.x;var Ny: f32=normal.y;var Nz: f32=normal.z;var C1: vec3f=uniforms.vSphericalZZ.rgb;var Cx: vec3f=uniforms.vSphericalX.rgb;var Cy: vec3f=uniforms.vSphericalY.rgb;var Cz: vec3f=uniforms.vSphericalZ.rgb;var Cxx_zz: vec3f=uniforms.vSphericalXX_ZZ.rgb;var Cyy_zz: vec3f=uniforms.vSphericalYY_ZZ.rgb;var Cxy: vec3f=uniforms.vSphericalXY.rgb;var Cyz: vec3f=uniforms.vSphericalYZ.rgb;var Czx: vec3f=uniforms.vSphericalZX.rgb;var a1: vec3f=Cyy_zz*Ny+Cy;var a2: vec3f=Cyz*Nz+a1;var b1: vec3f=Czx*Nz+Cx;var b2: vec3f=Cxy*Ny+b1;var b3: vec3f=Cxx_zz*Nx+b2;var t1: vec3f=Cz *Nz+C1;var t2: vec3f=a2 *Ny+t1;var t3: vec3f=b3 *Nx+t2;return t3;}\n#endif\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},5186:(e,n,i)=>{const t="lightVxUboDeclaration",r="#ifdef LIGHT{X}\nstruct Light{X}\n{vLightData: vec4f,\nvLightDiffuse: vec4f,\nvLightSpecular: vec4f,\n#ifdef SPOTLIGHT{X}\nvLightDirection: vec4f,\nvLightFalloff: vec4f,\n#elif defined(POINTLIGHT{X})\nvLightFalloff: vec4f,\n#elif defined(HEMILIGHT{X})\nvLightGround: vec3f,\n#endif\nshadowsInfo: vec4f,\ndepthValues: vec2f} ;var<uniform> light{X} : Light{X};\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform lightMatrix{X}: array<mat4x4f,SHADOWCSMNUM_CASCADES{X}>;varying vPositionFromLight{X}_0: vec4f;varying vDepthMetric{X}_0: f32;varying vPositionFromLight{X}_1: vec4f;varying vDepthMetric{X}_1: f32;varying vPositionFromLight{X}_2: vec4f;varying vDepthMetric{X}_2: f32;varying vPositionFromLight{X}_3: vec4f;varying vDepthMetric{X}_3: f32;varying vPositionFromCamera{X}: vec4f;\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vPositionFromLight{X}: vec4f;varying vDepthMetric{X}: f32;uniform lightMatrix{X}: mat4x4f;\n#endif\n#endif\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},7470:(e,n,i)=>{const t="logDepthDeclaration",r="#ifdef LOGARITHMICDEPTH\nuniform logarithmicDepthConstant: f32;varying vFragmentDepth: f32;\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},7350:(e,n,i)=>{const t="logDepthVertex",r="#ifdef LOGARITHMICDEPTH\nvertexOutputs.vFragmentDepth=1.0+vertexOutputs.position.w;vertexOutputs.position.z=log2(max(0.000001,vertexOutputs.vFragmentDepth))*uniforms.logarithmicDepthConstant;\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},7757:(e,n,i)=>{const t="mainUVVaryingDeclaration",r="#ifdef MAINUV{X}\nvarying vMainUV{X}: vec2f;\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},2:(e,n,i)=>{const t="meshUboDeclaration",r="struct Mesh {world : mat4x4<f32>,\nvisibility : f32,};var<uniform> mesh : Mesh;\n#define WORLD_UBO\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},8015:(e,n,i)=>{var t=i(7416);i(7761),i(2);const r="pbrUboDeclaration",o="uniform vAlbedoInfos: vec2f;uniform vAmbientInfos: vec4f;uniform vOpacityInfos: vec2f;uniform vEmissiveInfos: vec2f;uniform vLightmapInfos: vec2f;uniform vReflectivityInfos: vec3f;uniform vMicroSurfaceSamplerInfos: vec2f;uniform vReflectionInfos: vec2f;uniform vReflectionFilteringInfo: vec2f;uniform vReflectionPosition: vec3f;uniform vReflectionSize: vec3f;uniform vBumpInfos: vec3f;uniform albedoMatrix: mat4x4f;uniform ambientMatrix: mat4x4f;uniform opacityMatrix: mat4x4f;uniform emissiveMatrix: mat4x4f;uniform lightmapMatrix: mat4x4f;uniform reflectivityMatrix: mat4x4f;uniform microSurfaceSamplerMatrix: mat4x4f;uniform bumpMatrix: mat4x4f;uniform vTangentSpaceParams: vec2f;uniform reflectionMatrix: mat4x4f;uniform vReflectionColor: vec3f;uniform vAlbedoColor: vec4f;uniform vLightingIntensity: vec4f;uniform vReflectionMicrosurfaceInfos: vec3f;uniform pointSize: f32;uniform vReflectivityColor: vec4f;uniform vEmissiveColor: vec3f;uniform vAmbientColor: vec3f;uniform vDebugMode: vec2f;uniform vMetallicReflectanceFactors: vec4f;uniform vMetallicReflectanceInfos: vec2f;uniform metallicReflectanceMatrix: mat4x4f;uniform vReflectanceInfos: vec2f;uniform reflectanceMatrix: mat4x4f;uniform vSphericalL00: vec3f;uniform vSphericalL1_1: vec3f;uniform vSphericalL10: vec3f;uniform vSphericalL11: vec3f;uniform vSphericalL2_2: vec3f;uniform vSphericalL2_1: vec3f;uniform vSphericalL20: vec3f;uniform vSphericalL21: vec3f;uniform vSphericalL22: vec3f;uniform vSphericalX: vec3f;uniform vSphericalY: vec3f;uniform vSphericalZ: vec3f;uniform vSphericalXX_ZZ: vec3f;uniform vSphericalYY_ZZ: vec3f;uniform vSphericalZZ: vec3f;uniform vSphericalXY: vec3f;uniform vSphericalYZ: vec3f;uniform vSphericalZX: vec3f;\n#define ADDITIONAL_UBO_DECLARATION\n#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\n";t.v.IncludesShadersStoreWGSL[r]=o},864:(e,n,i)=>{const t="prePassVertex",r="#ifdef PREPASS_DEPTH\nvertexOutputs.vViewPos=(scene.view*worldPos).rgb;\n#endif\n#ifdef PREPASS_LOCAL_POSITION\nvertexOutputs.vPosition=positionUpdated.xyz;\n#endif\n#if defined(PREPASS_VELOCITY) && defined(BONES_VELOCITY_ENABLED) || defined(PREPASS_VELOCITY_LINEAR)\nvertexOutputs.vCurrentPosition=scene.viewProjection*worldPos;\n#if NUM_BONE_INFLUENCERS>0\nvar previousInfluence: mat4x4f;previousInfluence=mPreviousBones[ i32(matricesIndices[0])]*matricesWeights[0];\n#if NUM_BONE_INFLUENCERS>1\npreviousInfluence+=mPreviousBones[ i32(matricesIndices[1])]*matricesWeights[1];\n#endif \n#if NUM_BONE_INFLUENCERS>2\npreviousInfluence+=mPreviousBones[ i32(matricesIndices[2])]*matricesWeights[2];\n#endif \n#if NUM_BONE_INFLUENCERS>3\npreviousInfluence+=mPreviousBones[ i32(matricesIndices[3])]*matricesWeights[3];\n#endif\n#if NUM_BONE_INFLUENCERS>4\npreviousInfluence+=mPreviousBones[ i32(matricesIndicesExtra[0])]*matricesWeightsExtra[0];\n#endif \n#if NUM_BONE_INFLUENCERS>5\npreviousInfluence+=mPreviousBones[ i32(matricesIndicesExtra[1])]*matricesWeightsExtra[1];\n#endif \n#if NUM_BONE_INFLUENCERS>6\npreviousInfluence+=mPreviousBones[ i32(matricesIndicesExtra[2])]*matricesWeightsExtra[2];\n#endif \n#if NUM_BONE_INFLUENCERS>7\npreviousInfluence+=mPreviousBones[ i32(matricesIndicesExtra[3])]*matricesWeightsExtra[3];\n#endif\nvertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*previousInfluence* vec4f(positionUpdated,1.0);\n#else\nvertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld* vec4f(positionUpdated,1.0);\n#endif\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},1472:(e,n,i)=>{const t="prePassVertexDeclaration",r="#ifdef PREPASS\n#ifdef PREPASS_LOCAL_POSITION\nvarying vPosition : vec3f;\n#endif\n#ifdef PREPASS_DEPTH\nvarying vViewPos: vec3f;\n#endif\n#if defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)\nuniform previousViewProjection: mat4x4f;varying vCurrentPosition: vec4f;varying vPreviousPosition: vec4f;\n#endif\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},4037:(e,n,i)=>{const t="samplerVertexDeclaration",r="#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0\nvarying v_VARYINGNAME_UV: vec2f;\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},6541:(e,n,i)=>{const t="samplerVertexImplementation",r="#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0\nif (uniforms.v_INFONAME_==0.)\n{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(uvUpdated,1.0,0.0)).xy;}\n#ifdef UV2\nelse if (uniforms.v_INFONAME_==1.)\n{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv2,1.0,0.0)).xy;}\n#endif\n#ifdef UV3\nelse if (uniforms.v_INFONAME_==2.)\n{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv3,1.0,0.0)).xy;}\n#endif\n#ifdef UV4\nelse if (uniforms.v_INFONAME_==3.)\n{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv4,1.0,0.0)).xy;}\n#endif\n#ifdef UV5\nelse if (uniforms.v_INFONAME_==4.)\n{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv5,1.0,0.0)).xy;}\n#endif\n#ifdef UV6\nelse if (uniforms.v_INFONAME_==5.)\n{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv6,1.0,0.0)).xy;}\n#endif\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},7761:(e,n,i)=>{const t="sceneUboDeclaration",r="struct Scene {viewProjection : mat4x4<f32>,\n#ifdef MULTIVIEW\nviewProjectionR : mat4x4<f32>,\n#endif \nview : mat4x4<f32>,\nprojection : mat4x4<f32>,\nvEyePosition : vec4<f32>,};var<uniform> scene : Scene;\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},1098:(e,n,i)=>{const t="shadowsVertex",r="#ifdef SHADOWS\n#if defined(SHADOWCSM{X})\nvertexOutputs.vPositionFromCamera{X}=scene.view*worldPos;\n#if SHADOWCSMNUM_CASCADES{X}>0\nvertexOutputs.vPositionFromLight{X}_0=uniforms.lightMatrix{X}[0]*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvertexOutputs.vDepthMetric{X}_0=(-vertexOutputs.vPositionFromLight{X}_0.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvertexOutputs.vDepthMetric{X}_0= (vertexOutputs.vPositionFromLight{X}_0.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n#endif\n#if SHADOWCSMNUM_CASCADES{X}>1\nvertexOutputs.vPositionFromLight{X}_1=uniforms.lightMatrix{X}[1]*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvertexOutputs.vDepthMetric{X}_1=(-vertexOutputs.vPositionFromLight{X}_1.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvertexOutputs.vDepthMetric{X}_1= (vertexOutputs.vPositionFromLight{X}_1.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n#endif \n#if SHADOWCSMNUM_CASCADES{X}>2\nvertexOutputs.vPositionFromLight{X}_2=uniforms.lightMatrix{X}[2]*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvertexOutputs.vDepthMetric{X}_2=(-vertexOutputs.vPositionFromLight{X}_2.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvertexOutputs.vDepthMetric{X}_2= (vertexOutputs.vPositionFromLight{X}_2.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n#endif \n#if SHADOWCSMNUM_CASCADES{X}>3\nvertexOutputs.vPositionFromLight{X}_3=uniforms.lightMatrix{X}[3]*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvertexOutputs.vDepthMetric{X}_3=(-vertexOutputs.vPositionFromLight{X}_3.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvertexOutputs.vDepthMetric{X}_3= (vertexOutputs.vPositionFromLight{X}_3.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n#endif \n#elif defined(SHADOW{X}) && !defined(SHADOWCUBE{X})\nvertexOutputs.vPositionFromLight{X}=uniforms.lightMatrix{X}*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvertexOutputs.vDepthMetric{X}=(-vertexOutputs.vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvertexOutputs.vDepthMetric{X}=(vertexOutputs.vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n#endif\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},9452:(e,n,i)=>{const t="uvAttributeDeclaration",r="#ifdef UV{X}\nattribute uv{X}: vec2f;\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},2240:(e,n,i)=>{const t="uvVariableDeclaration",r="#ifdef MAINUV{X}\n#if !defined(UV{X})\nvar uv{X}: vec2f=vec2f(0.,0.);\n#else\nvar uv{X}: vec2f=vertexInputs.uv{X};\n#endif\nvertexOutputs.vMainUV{X}=uv{X};\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},850:(e,n,i)=>{const t="vertexColorMixing",r="#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvertexOutputs.vColor=vec4f(1.0);\n#ifdef VERTEXCOLOR\n#ifdef VERTEXALPHA\nvertexOutputs.vColor*=vertexInputs.color;\n#else\nvertexOutputs.vColor=vec4f(vertexOutputs.vColor.rgb*vertexInputs.color.rgb,vertexOutputs.vColor.a);\n#endif\n#endif\n#ifdef INSTANCESCOLOR\nvertexOutputs.vColor*=vertexInputs.instanceColor;\n#endif\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},1499:(e,n,i)=>{i.r(n),i.d(n,{pbrVertexShaderWGSL:()=>a});var t=i(7416);i(8015),i(9452),i(7757),i(2842),i(7762),i(1990),i(2724),i(1472),i(4037),i(5143),i(1068),i(870),i(5472),i(5186),i(9120),i(6212),i(7470),i(6403),i(9966),i(9413),i(8333),i(8439),i(864),i(2240),i(6541),i(5785),i(6601),i(6236),i(1098),i(850),i(7350);const r="pbrVertexShader",o="#include<pbrUboDeclaration>\n#define CUSTOM_VERTEX_BEGIN\nattribute position: vec3f;\n#ifdef NORMAL\nattribute normal: vec3f;\n#endif\n#ifdef TANGENT\nattribute tangent: vec4f;\n#endif\n#ifdef UV1\nattribute uv: vec2f;\n#endif\n#include<uvAttributeDeclaration>[2..7]\n#include<mainUVVaryingDeclaration>[1..7]\n#ifdef VERTEXCOLOR\nattribute color: vec4f;\n#endif\n#include<helperFunctions>\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\n#include<prePassVertexDeclaration>\n#include<samplerVertexDeclaration>(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo)\n#include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)\n#include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient)\n#include<samplerVertexDeclaration>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive)\n#include<samplerVertexDeclaration>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap)\n#include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler)\n#include<samplerVertexDeclaration>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance)\n#include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance)\n#include<samplerVertexDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump)\n#include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)\n#ifdef CLEARCOAT\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint)\n#endif\n#ifdef IRIDESCENCE\n#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence)\n#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness)\n#endif\n#ifdef SHEEN\n#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness)\n#endif\n#ifdef ANISOTROPIC\n#include<samplerVertexDeclaration>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy)\n#endif\n#ifdef SUBSURFACE\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor)\n#endif\nvarying vPositionW: vec3f;\n#if DEBUGMODE>0\nvarying vClipSpacePosition: vec4f;\n#endif\n#ifdef NORMAL\nvarying vNormalW: vec3f;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvarying vEnvironmentIrradiance: vec3f;\n#include<harmonicsFunctions>\n#endif\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vColor: vec4f;\n#endif\n#include<bumpVertexDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<lightVxUboDeclaration>[0..maxSimultaneousLights]\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vPositionUVW: vec3f;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vDirectionW: vec3f;\n#endif\n#include<logDepthDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvar positionUpdated: vec3f=vertexInputs.position;\n#ifdef NORMAL\nvar normalUpdated: vec3f=vertexInputs.normal;\n#endif\n#ifdef TANGENT\nvar tangentUpdated: vec4f=vertexInputs.tangent;\n#endif\n#ifdef UV1\nvar uvUpdated: vec2f=vertexInputs.uv;\n#endif\n#include<morphTargetsVertexGlobal>\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvertexOutputs.vPositionUVW=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(BONES_VELOCITY_ENABLED) || defined(PREPASS_VELOCITY_LINEAR))\nvertexOutputs.vCurrentPosition=scene.viewProjection*finalWorld* vec4f(positionUpdated,1.0);vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld* vec4f(positionUpdated,1.0);\n#endif\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvar worldPos: vec4f=finalWorld* vec4f(positionUpdated,1.0);vertexOutputs.vPositionW= worldPos.xyz;\n#include<prePassVertex>\n#ifdef NORMAL\nvar normalWorld: mat3x3f= mat3x3f(finalWorld[0].xyz,finalWorld[1].xyz,finalWorld[2].xyz);\n#if defined(INSTANCES) && defined(THIN_INSTANCES)\nvertexOutputs.vNormalW=normalUpdated/ vec3f(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vertexOutputs.vNormalW=normalize(normalWorld*vertexOutputs.vNormalW);\n#else\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvertexOutputs.vNormalW=normalize(normalWorld*normalUpdated);\n#endif\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvar reflectionVector: vec3f= (uniforms.reflectionMatrix* vec4f(vertexOutputs.vNormalW,0)).xyz;\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\nvertexOutputs.vEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector);\n#endif\n#endif\n#define CUSTOM_VERTEX_UPDATE_WORLDPOS\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {vertexOutputs.position=scene.viewProjection*worldPos;} else {vertexOutputs.position=scene.viewProjectionR*worldPos;}\n#else\nvertexOutputs.position=scene.viewProjection*worldPos;\n#endif\n#if DEBUGMODE>0\nvertexOutputs.vClipSpacePosition=vertexOutputs.position;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvertexOutputs.vDirectionW=normalize((finalWorld*vec4f(positionUpdated,0.0)).xyz);\n#endif\n#ifndef UV1\nvar uvUpdated: vec2f= vec2f(0.,0.);\n#endif\n#ifdef MAINUV1\nvertexOutputs.vMainUV1=uvUpdated;\n#endif\n#include<uvVariableDeclaration>[2..7]\n#include<samplerVertexImplementation>(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo,_MATRIXNAME_,albedo,_INFONAME_,AlbedoInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity,_MATRIXNAME_,reflectivity,_INFONAME_,ReflectivityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler,_MATRIXNAME_,microSurfaceSampler,_INFONAME_,MicroSurfaceSamplerInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance,_MATRIXNAME_,metallicReflectance,_INFONAME_,MetallicReflectanceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance,_MATRIXNAME_,reflectance,_INFONAME_,ReflectanceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)\n#ifdef CLEARCOAT\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat,_MATRIXNAME_,clearCoat,_INFONAME_,ClearCoatInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness,_MATRIXNAME_,clearCoatRoughness,_INFONAME_,ClearCoatInfos.z)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump,_MATRIXNAME_,clearCoatBump,_INFONAME_,ClearCoatBumpInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint,_MATRIXNAME_,clearCoatTint,_INFONAME_,ClearCoatTintInfos.x)\n#endif\n#ifdef IRIDESCENCE\n#include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence,_MATRIXNAME_,iridescence,_INFONAME_,IridescenceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness,_MATRIXNAME_,iridescenceThickness,_INFONAME_,IridescenceInfos.z)\n#endif\n#ifdef SHEEN\n#include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen,_MATRIXNAME_,sheen,_INFONAME_,SheenInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness,_MATRIXNAME_,sheenRoughness,_INFONAME_,SheenInfos.z)\n#endif\n#ifdef ANISOTROPIC\n#include<samplerVertexImplementation>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy,_MATRIXNAME_,anisotropy,_INFONAME_,AnisotropyInfos.x)\n#endif\n#ifdef SUBSURFACE\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness,_MATRIXNAME_,thickness,_INFONAME_,ThicknessInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity,_MATRIXNAME_,refractionIntensity,_INFONAME_,RefractionIntensityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity,_MATRIXNAME_,translucencyIntensity,_INFONAME_,TranslucencyIntensityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor,_MATRIXNAME_,translucencyColor,_INFONAME_,TranslucencyColorInfos.x)\n#endif\n#include<bumpVertex>\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#include<vertexColorMixing>\n#include<logDepthVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}";t.v.ShadersStoreWGSL[r]=o;const a={name:r,shader:o}}}]);
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[1499],{5143:(e,n,i)=>{const r="harmonicsFunctions",a="#ifdef USESPHERICALFROMREFLECTIONMAP\n#ifdef SPHERICAL_HARMONICS\nfn computeEnvironmentIrradiance(normal: vec3f)->vec3f {return uniforms.vSphericalL00\n+ uniforms.vSphericalL1_1*(normal.y)\n+ uniforms.vSphericalL10*(normal.z)\n+ uniforms.vSphericalL11*(normal.x)\n+ uniforms.vSphericalL2_2*(normal.y*normal.x)\n+ uniforms.vSphericalL2_1*(normal.y*normal.z)\n+ uniforms.vSphericalL20*((3.0*normal.z*normal.z)-1.0)\n+ uniforms.vSphericalL21*(normal.z*normal.x)\n+ uniforms.vSphericalL22*(normal.x*normal.x-(normal.y*normal.y));}\n#else\nfn computeEnvironmentIrradiance(normal: vec3f)->vec3f {var Nx: f32=normal.x;var Ny: f32=normal.y;var Nz: f32=normal.z;var C1: vec3f=uniforms.vSphericalZZ.rgb;var Cx: vec3f=uniforms.vSphericalX.rgb;var Cy: vec3f=uniforms.vSphericalY.rgb;var Cz: vec3f=uniforms.vSphericalZ.rgb;var Cxx_zz: vec3f=uniforms.vSphericalXX_ZZ.rgb;var Cyy_zz: vec3f=uniforms.vSphericalYY_ZZ.rgb;var Cxy: vec3f=uniforms.vSphericalXY.rgb;var Cyz: vec3f=uniforms.vSphericalYZ.rgb;var Czx: vec3f=uniforms.vSphericalZX.rgb;var a1: vec3f=Cyy_zz*Ny+Cy;var a2: vec3f=Cyz*Nz+a1;var b1: vec3f=Czx*Nz+Cx;var b2: vec3f=Cxy*Ny+b1;var b3: vec3f=Cxx_zz*Nx+b2;var t1: vec3f=Cz *Nz+C1;var t2: vec3f=a2 *Ny+t1;var t3: vec3f=b3 *Nx+t2;return t3;}\n#endif\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[r]=a},8015:(e,n,i)=>{var r=i(7416);i(7761),i(2);const a="pbrUboDeclaration",t="uniform vAlbedoInfos: vec2f;uniform vBaseWeightInfos: vec2f;uniform vAmbientInfos: vec4f;uniform vOpacityInfos: vec2f;uniform vEmissiveInfos: vec2f;uniform vLightmapInfos: vec2f;uniform vReflectivityInfos: vec3f;uniform vMicroSurfaceSamplerInfos: vec2f;uniform vReflectionInfos: vec2f;uniform vReflectionFilteringInfo: vec2f;uniform vReflectionPosition: vec3f;uniform vReflectionSize: vec3f;uniform vBumpInfos: vec3f;uniform albedoMatrix: mat4x4f;uniform baseWeightMatrix: mat4x4f;uniform ambientMatrix: mat4x4f;uniform opacityMatrix: mat4x4f;uniform emissiveMatrix: mat4x4f;uniform lightmapMatrix: mat4x4f;uniform reflectivityMatrix: mat4x4f;uniform microSurfaceSamplerMatrix: mat4x4f;uniform bumpMatrix: mat4x4f;uniform vTangentSpaceParams: vec2f;uniform reflectionMatrix: mat4x4f;uniform vReflectionColor: vec3f;uniform vAlbedoColor: vec4f;uniform baseWeight: f32;uniform vLightingIntensity: vec4f;uniform vReflectionMicrosurfaceInfos: vec3f;uniform pointSize: f32;uniform vReflectivityColor: vec4f;uniform vEmissiveColor: vec3f;uniform vAmbientColor: vec3f;uniform vDebugMode: vec2f;uniform vMetallicReflectanceFactors: vec4f;uniform vMetallicReflectanceInfos: vec2f;uniform metallicReflectanceMatrix: mat4x4f;uniform vReflectanceInfos: vec2f;uniform reflectanceMatrix: mat4x4f;uniform vSphericalL00: vec3f;uniform vSphericalL1_1: vec3f;uniform vSphericalL10: vec3f;uniform vSphericalL11: vec3f;uniform vSphericalL2_2: vec3f;uniform vSphericalL2_1: vec3f;uniform vSphericalL20: vec3f;uniform vSphericalL21: vec3f;uniform vSphericalL22: vec3f;uniform vSphericalX: vec3f;uniform vSphericalY: vec3f;uniform vSphericalZ: vec3f;uniform vSphericalXX_ZZ: vec3f;uniform vSphericalYY_ZZ: vec3f;uniform vSphericalZZ: vec3f;uniform vSphericalXY: vec3f;uniform vSphericalYZ: vec3f;uniform vSphericalZX: vec3f;\n#define ADDITIONAL_UBO_DECLARATION\n#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\n";r.v.IncludesShadersStoreWGSL[a]=t},1499:(e,n,i)=>{i.r(n),i.d(n,{pbrVertexShaderWGSL:()=>E});var r=i(7416);i(8015),i(9452),i(7757),i(2842),i(7762),i(1990),i(2724),i(1472),i(4037),i(5143),i(1068),i(870),i(5472),i(5186),i(9120),i(6212),i(7470),i(6403),i(9966),i(9413),i(7705),i(8439),i(864),i(2240),i(6541),i(5785),i(6601),i(6236),i(1098),i(850),i(7350);const a="pbrVertexShader",t="#include<pbrUboDeclaration>\n#define CUSTOM_VERTEX_BEGIN\nattribute position: vec3f;\n#ifdef NORMAL\nattribute normal: vec3f;\n#endif\n#ifdef TANGENT\nattribute tangent: vec4f;\n#endif\n#ifdef UV1\nattribute uv: vec2f;\n#endif\n#include<uvAttributeDeclaration>[2..7]\n#include<mainUVVaryingDeclaration>[1..7]\n#ifdef VERTEXCOLOR\nattribute color: vec4f;\n#endif\n#include<helperFunctions>\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\n#include<prePassVertexDeclaration>\n#include<samplerVertexDeclaration>(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo)\n#include<samplerVertexDeclaration>(_DEFINENAME_,BASEWEIGHT,_VARYINGNAME_,BaseWeight)\n#include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)\n#include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient)\n#include<samplerVertexDeclaration>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive)\n#include<samplerVertexDeclaration>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap)\n#include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler)\n#include<samplerVertexDeclaration>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance)\n#include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance)\n#include<samplerVertexDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump)\n#include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)\n#ifdef CLEARCOAT\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint)\n#endif\n#ifdef IRIDESCENCE\n#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence)\n#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness)\n#endif\n#ifdef SHEEN\n#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness)\n#endif\n#ifdef ANISOTROPIC\n#include<samplerVertexDeclaration>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy)\n#endif\n#ifdef SUBSURFACE\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor)\n#endif\nvarying vPositionW: vec3f;\n#if DEBUGMODE>0\nvarying vClipSpacePosition: vec4f;\n#endif\n#ifdef NORMAL\nvarying vNormalW: vec3f;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvarying vEnvironmentIrradiance: vec3f;\n#include<harmonicsFunctions>\n#endif\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vColor: vec4f;\n#endif\n#include<bumpVertexDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<lightVxUboDeclaration>[0..maxSimultaneousLights]\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vPositionUVW: vec3f;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vDirectionW: vec3f;\n#endif\n#include<logDepthDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvar positionUpdated: vec3f=vertexInputs.position;\n#ifdef NORMAL\nvar normalUpdated: vec3f=vertexInputs.normal;\n#endif\n#ifdef TANGENT\nvar tangentUpdated: vec4f=vertexInputs.tangent;\n#endif\n#ifdef UV1\nvar uvUpdated: vec2f=vertexInputs.uv;\n#endif\n#ifdef UV2\nvar uv2Updated: vec2f=vertexInputs.uv2;\n#endif\n#include<morphTargetsVertexGlobal>\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvertexOutputs.vPositionUVW=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)\nvertexOutputs.vCurrentPosition=scene.viewProjection*finalWorld*vec4f(positionUpdated,1.0);vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*vec4f(positionUpdated,1.0);\n#endif\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvar worldPos: vec4f=finalWorld* vec4f(positionUpdated,1.0);vertexOutputs.vPositionW= worldPos.xyz;\n#ifdef PREPASS\n#include<prePassVertex>\n#endif\n#ifdef NORMAL\nvar normalWorld: mat3x3f= mat3x3f(finalWorld[0].xyz,finalWorld[1].xyz,finalWorld[2].xyz);\n#if defined(INSTANCES) && defined(THIN_INSTANCES)\nvertexOutputs.vNormalW=normalUpdated/ vec3f(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vertexOutputs.vNormalW=normalize(normalWorld*vertexOutputs.vNormalW);\n#else\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvertexOutputs.vNormalW=normalize(normalWorld*normalUpdated);\n#endif\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvar reflectionVector: vec3f= (uniforms.reflectionMatrix* vec4f(vertexOutputs.vNormalW,0)).xyz;\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\nvertexOutputs.vEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector);\n#endif\n#endif\n#define CUSTOM_VERTEX_UPDATE_WORLDPOS\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {vertexOutputs.position=scene.viewProjection*worldPos;} else {vertexOutputs.position=scene.viewProjectionR*worldPos;}\n#else\nvertexOutputs.position=scene.viewProjection*worldPos;\n#endif\n#if DEBUGMODE>0\nvertexOutputs.vClipSpacePosition=vertexOutputs.position;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvertexOutputs.vDirectionW=normalize((finalWorld*vec4f(positionUpdated,0.0)).xyz);\n#endif\n#ifndef UV1\nvar uvUpdated: vec2f= vec2f(0.,0.);\n#endif\n#ifdef MAINUV1\nvertexOutputs.vMainUV1=uvUpdated;\n#endif\n#ifndef UV2\nvar uv2Updated: vec2f= vec2f(0.,0.);\n#endif\n#ifdef MAINUV2\nvertexOutputs.vMainUV2=uv2Updated;\n#endif\n#include<uvVariableDeclaration>[3..7]\n#include<samplerVertexImplementation>(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo,_MATRIXNAME_,albedo,_INFONAME_,AlbedoInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,BASEWEIGHT,_VARYINGNAME_,BaseWeight,_MATRIXNAME_,baseWeight,_INFONAME_,BaseWeightInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity,_MATRIXNAME_,reflectivity,_INFONAME_,ReflectivityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler,_MATRIXNAME_,microSurfaceSampler,_INFONAME_,MicroSurfaceSamplerInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance,_MATRIXNAME_,metallicReflectance,_INFONAME_,MetallicReflectanceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance,_MATRIXNAME_,reflectance,_INFONAME_,ReflectanceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)\n#ifdef CLEARCOAT\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat,_MATRIXNAME_,clearCoat,_INFONAME_,ClearCoatInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness,_MATRIXNAME_,clearCoatRoughness,_INFONAME_,ClearCoatInfos.z)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump,_MATRIXNAME_,clearCoatBump,_INFONAME_,ClearCoatBumpInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint,_MATRIXNAME_,clearCoatTint,_INFONAME_,ClearCoatTintInfos.x)\n#endif\n#ifdef IRIDESCENCE\n#include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence,_MATRIXNAME_,iridescence,_INFONAME_,IridescenceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness,_MATRIXNAME_,iridescenceThickness,_INFONAME_,IridescenceInfos.z)\n#endif\n#ifdef SHEEN\n#include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen,_MATRIXNAME_,sheen,_INFONAME_,SheenInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness,_MATRIXNAME_,sheenRoughness,_INFONAME_,SheenInfos.z)\n#endif\n#ifdef ANISOTROPIC\n#include<samplerVertexImplementation>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy,_MATRIXNAME_,anisotropy,_INFONAME_,AnisotropyInfos.x)\n#endif\n#ifdef SUBSURFACE\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness,_MATRIXNAME_,thickness,_INFONAME_,ThicknessInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity,_MATRIXNAME_,refractionIntensity,_INFONAME_,RefractionIntensityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity,_MATRIXNAME_,translucencyIntensity,_INFONAME_,TranslucencyIntensityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor,_MATRIXNAME_,translucencyColor,_INFONAME_,TranslucencyColorInfos.x)\n#endif\n#include<bumpVertex>\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#include<vertexColorMixing>\n#include<logDepthVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}";r.v.ShadersStoreWGSL[a]=t;const E={name:a,shader:t}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 1605.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[1605],{2724:(e,r,n)=>{const i="instancesDeclaration",t="#ifdef INSTANCES\nattribute world0 : vec4<f32>;attribute world1 : vec4<f32>;attribute world2 : vec4<f32>;attribute world3 : vec4<f32>;\n#ifdef INSTANCESCOLOR\nattribute instanceColor : vec4<f32>;\n#endif\n#if defined(THIN_INSTANCES) && !defined(WORLD_UBO)\nuniform world : mat4x4<f32>;\n#endif\n#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)\nattribute previousWorld0 : vec4<f32>;attribute previousWorld1 : vec4<f32>;attribute previousWorld2 : vec4<f32>;attribute previousWorld3 : vec4<f32>;\n#ifdef THIN_INSTANCES\nuniform previousWorld : mat4x4<f32>;\n#endif\n#endif\n#else\n#if !defined(WORLD_UBO)\nuniform world : mat4x4<f32>;\n#endif\n#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)\nuniform previousWorld : mat4x4<f32>;\n#endif\n#endif\n";n(7416).v.IncludesShadersStoreWGSL[i]=t},9413:(e,r,n)=>{const i="instancesVertex",t="#ifdef INSTANCES\nvar finalWorld=mat4x4<f32>(vertexInputs.world0,vertexInputs.world1,vertexInputs.world2,vertexInputs.world3);\n#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)\nvar finalPreviousWorld=mat4x4<f32>(\nvertexInputs.previousWorld0,vertexInputs.previousWorld1,\nvertexInputs.previousWorld2,vertexInputs.previousWorld3);\n#endif\n#ifdef THIN_INSTANCES\n#if !defined(WORLD_UBO)\nfinalWorld=uniforms.world*finalWorld;\n#else\nfinalWorld=mesh.world*finalWorld;\n#endif\n#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)\nfinalPreviousWorld=uniforms.previousWorld*finalPreviousWorld;\n#endif\n#endif\n#else\n#if !defined(WORLD_UBO)\nvar finalWorld=uniforms.world;\n#else\nvar finalWorld=mesh.world;\n#endif\n#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)\nvar finalPreviousWorld=uniforms.previousWorld;\n#endif\n#endif\n";n(7416).v.IncludesShadersStoreWGSL[i]=t},2:(e,r,n)=>{const i="meshUboDeclaration",t="struct Mesh {world : mat4x4<f32>,\nvisibility : f32,};var<uniform> mesh : Mesh;\n#define WORLD_UBO\n";n(7416).v.IncludesShadersStoreWGSL[i]=t},7761:(e,r,n)=>{const i="sceneUboDeclaration",t="struct Scene {viewProjection : mat4x4<f32>,\n#ifdef MULTIVIEW\nviewProjectionR : mat4x4<f32>,\n#endif \nview : mat4x4<f32>,\nprojection : mat4x4<f32>,\nvEyePosition : vec4<f32>,};\n#define SCENE_UBO\nvar<uniform> scene : Scene;\n";n(7416).v.IncludesShadersStoreWGSL[i]=t},1605:(e,r,n)=>{n.r(r),n.d(r,{greasedLineVertexShaderWGSL:()=>f});var i=n(7416);n(2724),n(7761),n(2),n(9413);const t="greasedLineVertexShader",l="#include<instancesDeclaration>\n#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\nattribute grl_widths: f32;\n#ifdef GREASED_LINE_USE_OFFSETS\nattribute grl_offsets: vec3f; \n#endif\nattribute grl_colorPointers: f32;attribute position: vec3f;varying grlCounters: f32;varying grlColorPointer: f32;\n#ifdef GREASED_LINE_CAMERA_FACING\nattribute grl_nextAndCounters: vec4f;attribute grl_previousAndSide: vec4f;uniform grlResolution: vec2f;uniform grlAspect: f32;uniform grlWidth: f32;uniform grlSizeAttenuation: f32;fn grlFix(i: vec4f,aspect: f32)->vec2f {var res=i.xy/i.w;res.x*=aspect;return res;}\n#else\nattribute grl_slopes: vec3f;attribute grl_counters: f32;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\nvertexOutputs.grlColorPointer=input.grl_colorPointers;let grlMatrix: mat4x4f=scene.viewProjection*mesh.world ;\n#ifdef GREASED_LINE_CAMERA_FACING\nlet grlBaseWidth: f32=uniforms.grlWidth;let grlPrevious: vec3f=input.grl_previousAndSide.xyz;let grlSide: f32=input.grl_previousAndSide.w;let grlNext: vec3f=input.grl_nextAndCounters.xyz;vertexOutputs.grlCounters=input.grl_nextAndCounters.w;\n#ifdef GREASED_LINE_USE_OFFSETS\nvar grlPositionOffset: vec3f=input.grl_offsets;\n#else\nvar grlPositionOffset=vec3f(0.);\n#endif\nlet grlFinalPosition: vec4f=grlMatrix*vec4f(vertexInputs.position+grlPositionOffset ,1.0);let grlPrevPos: vec4f=grlMatrix*vec4f(grlPrevious+grlPositionOffset,1.0);let grlNextPos: vec4f=grlMatrix*vec4f(grlNext+grlPositionOffset,1.0);let grlCurrentP: vec2f=grlFix(grlFinalPosition,uniforms.grlAspect);let grlPrevP: vec2f=grlFix(grlPrevPos,uniforms.grlAspect);let grlNextP: vec2f= grlFix(grlNextPos,uniforms.grlAspect);let grlWidth:f32=grlBaseWidth*input.grl_widths;var grlDir: vec2f;if (all(grlNextP==grlCurrentP)) {grlDir=normalize(grlCurrentP-grlPrevP);} else if (all(grlPrevP==grlCurrentP)) {grlDir=normalize(grlNextP-grlCurrentP);} else {let grlDir1: vec2f=normalize(grlCurrentP-grlPrevP);let grlDir2: vec2f=normalize(grlNextP-grlCurrentP);grlDir=normalize(grlDir1+grlDir2);}\nvar grlNormal: vec4f=vec4f(-grlDir.y,grlDir.x,0.0,1.0);let grlHalfWidth: f32=0.5*grlWidth;\n#if defined(GREASED_LINE_RIGHT_HANDED_COORDINATE_SYSTEM)\ngrlNormal.x*=-grlHalfWidth;grlNormal.y*=-grlHalfWidth;\n#else\ngrlNormal.x*=grlHalfWidth;grlNormal.y*=grlHalfWidth;\n#endif\ngrlNormal*=scene.projection;if (uniforms.grlSizeAttenuation==1.) {grlNormal.x*=grlFinalPosition.w;grlNormal.y*=grlFinalPosition.w;let pr=vec4f(uniforms.grlResolution,0.0,1.0)*scene.projection;grlNormal.x/=pr.x;grlNormal.y/=pr.y;}\nvertexOutputs.position=vec4f(grlFinalPosition.xy+grlNormal.xy*grlSide,grlFinalPosition.z,grlFinalPosition.w);\n#else\nvertexOutputs.grlCounters=input.grl_counters;vertexOutputs.position=grlMatrix*vec4f((vertexInputs.position+input.grl_offsets)+input.grl_slopes*input.grl_widths,1.0) ;\n#endif\n#define CUSTOM_VERTEX_MAIN_END\n}\n";i.v.ShadersStoreWGSL[t]=l;const f={name:t,shader:l}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! filename:1605 */
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 1731.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[1731],{1731:(e,r,n)=>{n.r(r),n.d(r,{layerPixelShader:()=>l});var a=n(7416);n(5276);const i="layerPixelShader",o="varying vec2 vUV;uniform sampler2D textureSampler;uniform vec4 color;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nvec4 baseColor=texture2D(textureSampler,vUV);\n#if defined(CONVERT_TO_GAMMA)\nbaseColor.rgb=toGammaSpace(baseColor.rgb);\n#elif defined(CONVERT_TO_LINEAR)\nbaseColor.rgb=toLinearSpace(baseColor.rgb);\n#endif\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\ngl_FragColor=baseColor*color;\n#define CUSTOM_FRAGMENT_MAIN_END\n}";a.v.ShadersStore[i]=o;const l={name:i,shader:o}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! filename:1731 */
|