@crystaldesign/real-time-viewer 26.4.0-beta.3 → 26.4.0-beta.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/build/esm/index.js +106 -62
  2. package/build/types/real-time-viewer/src/CustomMaterial/index.d.ts.map +1 -1
  3. package/build/types/real-time-viewer/src/parser/buildScene/index.d.ts.map +1 -1
  4. package/build/types/real-time-viewer/src/parser/findAssets/index.d.ts.map +1 -1
  5. package/build/types/real-time-viewer/src/parser/findMaterials/index.d.ts.map +1 -1
  6. package/build/umd/105.real-time-viewer.umd.min.js +2 -0
  7. package/build/umd/105.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  8. package/build/umd/214.real-time-viewer.umd.min.js +2 -0
  9. package/build/umd/214.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  10. package/build/umd/245.real-time-viewer.umd.min.js +2 -0
  11. package/build/umd/245.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  12. package/build/umd/271.real-time-viewer.umd.min.js +2 -0
  13. package/build/umd/271.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  14. package/build/umd/281.real-time-viewer.umd.min.js +2 -0
  15. package/build/umd/281.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  16. package/build/umd/305.real-time-viewer.umd.min.js +2 -0
  17. package/build/umd/305.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  18. package/build/umd/346.real-time-viewer.umd.min.js +2 -0
  19. package/build/umd/346.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  20. package/build/umd/350.real-time-viewer.umd.min.js +2 -0
  21. package/build/umd/350.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  22. package/build/umd/375.real-time-viewer.umd.min.js +2 -0
  23. package/build/umd/375.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  24. package/build/umd/583.real-time-viewer.umd.min.js +2 -0
  25. package/build/umd/583.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  26. package/build/umd/702.real-time-viewer.umd.min.js +2 -0
  27. package/build/umd/702.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  28. package/build/umd/794.real-time-viewer.umd.min.js +2 -0
  29. package/build/umd/794.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  30. package/build/umd/799.real-time-viewer.umd.min.js +2 -0
  31. package/build/umd/799.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  32. package/build/umd/979.real-time-viewer.umd.min.js +2 -0
  33. package/build/umd/979.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
  34. package/build/umd/real-time-viewer.umd.min.js +1 -1
  35. package/build/umd/report.html +1 -1
  36. package/package.json +16 -13
@@ -49,10 +49,11 @@ import { Matrix as Matrix$1, Vector3 as Vector3$1 } from '@babylonjs/core/Maths/
49
49
  import { EngineFactory } from '@babylonjs/core/Engines/engineFactory';
50
50
  import { Scene } from '@babylonjs/core/scene';
51
51
  import { DracoCompression } from '@babylonjs/core/Meshes/Compression/dracoCompression';
52
- import { loadAssetContainerAsync } from '@babylonjs/core/Loading/index';
53
- import { PBRMetallicRoughnessMaterial as PBRMetallicRoughnessMaterial$1, Texture as Texture$1, WebGPUEngine } from '@babylonjs/core';
52
+ import { LoadAssetContainerAsync } from '@babylonjs/core/Loading/index';
53
+ import { VertexBuffer } from '@babylonjs/core/Buffers/buffer';
54
54
  import '@babylonjs/loaders/glTF/2.0/';
55
55
  import { UniversalCamera } from '@babylonjs/core/Cameras/universalCamera';
56
+ import { WebGPUEngine } from '@babylonjs/core';
56
57
  import { jsxs, jsx } from 'react/jsx-runtime';
57
58
 
58
59
  (function() {
@@ -519,11 +520,12 @@ function Grids () {
519
520
  var _neighbourSize = (_neighbourBottom$plan3 = (_neighbourBottom$plan4 = neighbourBottom.plannedElement) === null || _neighbourBottom$plan4 === void 0 ? void 0 : _neighbourBottom$plan4.size) !== null && _neighbourBottom$plan3 !== void 0 ? _neighbourBottom$plan3 : gp.selectedElement.size;
520
521
  pos = new Vector3(neighbourElementBottom.bbn.position.x + size.width / 200, neighbourElementBottom.bbn.position.y + (_neighbourSize.height + size.height / 2) / 100, 0);
521
522
  } else if (cell.index.x == -1 && neighbourRight) {
523
+ var _neighbourElementRigh;
522
524
  var neighbourElementRight = sceneStore.elements.find(function (el) {
523
525
  var _elementId$toString;
524
526
  return el.hqs.name.endsWith((_elementId$toString = neighbourRight.plannedElement.elementId.toString()) !== null && _elementId$toString !== void 0 ? _elementId$toString : "-1");
525
527
  });
526
- pos = new Vector3(neighbourElementRight.bbn.position.x - size.width / 200, size.height / 200, 0);
528
+ pos = new Vector3(((_neighbourElementRigh = neighbourElementRight === null || neighbourElementRight === void 0 ? void 0 : neighbourElementRight.bbn.position.x) !== null && _neighbourElementRigh !== void 0 ? _neighbourElementRigh : 0) - size.width / 200, size.height / 200, 0);
527
529
  }
528
530
  var box = createPreviewBox('box', name, {
529
531
  width: (size.width + 1) / 100,
@@ -3198,6 +3200,8 @@ var customMat = /*#__PURE__*/function () {
3198
3200
  var reCtrTex = new Texture(texture.url, _customMat.scene);
3199
3201
  reCtrTex.uScale = texture.uScale;
3200
3202
  reCtrTex.vScale = -texture.vScale;
3203
+ reCtrTex.wrapU = Texture.WRAP_ADDRESSMODE;
3204
+ reCtrTex.wrapV = Texture.WRAP_ADDRESSMODE;
3201
3205
  reCtrTex.uOffset = 1;
3202
3206
  reCtrTex.vOffset = -(1 - texture.vScale);
3203
3207
  reCtrTex._mimeType = texture.url.endsWith('.jpg') ? 'image/jpeg' : 'image/png';
@@ -3220,6 +3224,8 @@ var customMat = /*#__PURE__*/function () {
3220
3224
  parsedMat.baseTexture = doReCtrTex(parsedMat.baseTexture);
3221
3225
  parsedMat.metallicRoughnessTexture = doReCtrTex(parsedMat.metallicRoughnessTexture);
3222
3226
  parsedMat.normalTexture = doReCtrTex(parsedMat.normalTexture);
3227
+ parsedMat._useAlphaFromAlbedoTexture = false;
3228
+ parsedMat.transparencyMode = 0;
3223
3229
  found = !!parsedMat.baseTexture;
3224
3230
  if (!found) LOG$1.warn('MISSING_MATERIAL: could not get material ' + _customMat.name + ' for iln ' + _customMat.blob);
3225
3231
  if (setDataRow) useUtilStoreContext().setAnalyzeDataRow({
@@ -3234,8 +3240,8 @@ var customMat = /*#__PURE__*/function () {
3234
3240
  mat: parsedMat,
3235
3241
  found: true
3236
3242
  });
3237
- case 27:
3238
- _context.prev = 27;
3243
+ case 29:
3244
+ _context.prev = 29;
3239
3245
  _context.t0 = _context["catch"](9);
3240
3246
  if (setDataRow) useUtilStoreContext().setAnalyzeDataRow({
3241
3247
  type: 'MAT',
@@ -3245,17 +3251,17 @@ var customMat = /*#__PURE__*/function () {
3245
3251
  path: _customMat.blob,
3246
3252
  sizeMb: 0
3247
3253
  });
3248
- case 30:
3254
+ case 32:
3249
3255
  mat = new PBRMetallicRoughnessMaterial(_customMat.name, sceneStore.scene);
3250
3256
  return _context.abrupt("return", {
3251
3257
  mat: mat,
3252
3258
  found: true
3253
3259
  });
3254
- case 32:
3260
+ case 34:
3255
3261
  case "end":
3256
3262
  return _context.stop();
3257
3263
  }
3258
- }, _callee, null, [[9, 27]]);
3264
+ }, _callee, null, [[9, 29]]);
3259
3265
  }));
3260
3266
  return function customMat(_x) {
3261
3267
  return _ref.apply(this, arguments);
@@ -3277,7 +3283,7 @@ function _findAssets() {
3277
3283
  case 0:
3278
3284
  _importGeo = function _importGeo3() {
3279
3285
  _importGeo = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(geo, path) {
3280
- var geoCached, cachedGeos, unusedGeos, geoCountToDelete, nextToDelete, size, result, mesh, _sceneStore$onMissing;
3286
+ var geoCached, size, result, mesh, _sceneStore$onMissing;
3281
3287
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
3282
3288
  while (1) switch (_context2.prev = _context2.next) {
3283
3289
  case 0:
@@ -3294,31 +3300,11 @@ function _findAssets() {
3294
3300
  };
3295
3301
  return _context2.abrupt("return", geoCached);
3296
3302
  case 4:
3297
- // cache max size otherwise some devices crash (ram to high)
3298
- cachedGeos = cacheGroup.getChildren(undefined, true);
3299
- if (cachedGeos.length > 10) {
3300
- // find unused geos
3301
- unusedGeos = cachedGeos.filter(function (g) {
3302
- return !cache.find(function (c) {
3303
- var _c$geo;
3304
- return ((_c$geo = c.geo) === null || _c$geo === void 0 ? void 0 : _c$geo.geometry.uniqueId) == g.uniqueId;
3305
- });
3306
- });
3307
- geoCountToDelete = cachedGeos.length - 10;
3308
- while (geoCountToDelete > 0 && unusedGeos.length > 0) {
3309
- nextToDelete = unusedGeos.reduce(function (oIdx, cur, curIdx, ar) {
3310
- return cur.metadata.lastUsed < ar[oIdx].metadata.lastUsed ? curIdx : oIdx;
3311
- }, 0);
3312
- unusedGeos[nextToDelete].dispose();
3313
- unusedGeos.splice(nextToDelete, 1);
3314
- geoCountToDelete--;
3315
- }
3316
- }
3317
3303
  size = 0;
3318
- _context2.prev = 7;
3319
- _context2.next = 10;
3320
- return loadAssetContainerAsync(path + geo.name + '.glb', sceneStore.scene);
3321
- case 10:
3304
+ _context2.prev = 5;
3305
+ _context2.next = 8;
3306
+ return LoadAssetContainerAsync(path + geo.name + '.glb', sceneStore.scene);
3307
+ case 8:
3322
3308
  result = _context2.sent;
3323
3309
  utilStore.setAnalyzeDataRow({
3324
3310
  name: geo.name,
@@ -3339,10 +3325,17 @@ function _findAssets() {
3339
3325
  mesh.metadata = {
3340
3326
  lastUsed: Date.now()
3341
3327
  };
3328
+ if (mesh._isMesh()) {
3329
+ mesh.removeVerticesData(VertexBuffer.ColorKind);
3330
+ } else {
3331
+ mesh.getChildMeshes().forEach(function (m) {
3332
+ return m.removeVerticesData(VertexBuffer.ColorKind);
3333
+ });
3334
+ }
3342
3335
  return _context2.abrupt("return", mesh);
3343
- case 24:
3344
- _context2.prev = 24;
3345
- _context2.t0 = _context2["catch"](7);
3336
+ case 23:
3337
+ _context2.prev = 23;
3338
+ _context2.t0 = _context2["catch"](5);
3346
3339
  (_sceneStore$onMissing = sceneStore.onMissingGeo) === null || _sceneStore$onMissing === void 0 || _sceneStore$onMissing.call(sceneStore);
3347
3340
  utilStore.setAnalyzeDataRow({
3348
3341
  name: geo.name,
@@ -3353,11 +3346,11 @@ function _findAssets() {
3353
3346
  found: false
3354
3347
  });
3355
3348
  return _context2.abrupt("return", undefined);
3356
- case 29:
3349
+ case 28:
3357
3350
  case "end":
3358
3351
  return _context2.stop();
3359
3352
  }
3360
- }, _callee2, null, [[7, 24]]);
3353
+ }, _callee2, null, [[5, 23]]);
3361
3354
  }));
3362
3355
  return _importGeo.apply(this, arguments);
3363
3356
  };
@@ -3817,8 +3810,6 @@ var buildScene = function buildScene(_ref) {
3817
3810
  }
3818
3811
  }
3819
3812
  }
3820
-
3821
- // fill onElement for caching and other for applying in findmaterials
3822
3813
  function findMats(curMat, parentNode) {
3823
3814
  var cachedElement = cachedAssets.find(function (assets) {
3824
3815
  return assets.id == curMat.id;
@@ -3905,6 +3896,26 @@ var buildScene = function buildScene(_ref) {
3905
3896
  }
3906
3897
  }
3907
3898
  recursiveIteration(startNode, parentNode);
3899
+ // cache max size otherwise some devices crash (ram to high)
3900
+ var cachedGeos = cache.getChildren(undefined, true);
3901
+ if (cachedGeos.length > 10) {
3902
+ // find unused geos
3903
+ var unusedGeos = cachedGeos.filter(function (g) {
3904
+ return !cachedAssets.find(function (c) {
3905
+ var _c$geo;
3906
+ return ((_c$geo = c.geo) === null || _c$geo === void 0 ? void 0 : _c$geo.geometry.uniqueId) == g.uniqueId;
3907
+ });
3908
+ });
3909
+ var geoCountToDelete = cachedGeos.length - 10;
3910
+ while (geoCountToDelete > 0 && unusedGeos.length > 0) {
3911
+ var nextToDelete = unusedGeos.reduce(function (oIdx, cur, curIdx, ar) {
3912
+ return cur.metadata.lastUsed < ar[oIdx].metadata.lastUsed ? curIdx : oIdx;
3913
+ }, 0);
3914
+ unusedGeos[nextToDelete].dispose();
3915
+ unusedGeos.splice(nextToDelete, 1);
3916
+ geoCountToDelete--;
3917
+ }
3918
+ }
3908
3919
  sceneStore.cache = cachedAssets;
3909
3920
  };
3910
3921
 
@@ -3914,34 +3925,55 @@ function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.lengt
3914
3925
  function findMaterials(cache) {
3915
3926
  var sceneStore = useSceneStoreContext();
3916
3927
  var matsOnMeshes = {};
3928
+ var getDepth = function getDepth(child, ancestor) {
3929
+ var depth = 0;
3930
+ var current = child;
3931
+ while (current && current.uniqueId !== ancestor.uniqueId) {
3932
+ depth++;
3933
+ current = current.parent;
3934
+ }
3935
+ return depth;
3936
+ };
3937
+
3917
3938
  //! parent = the parent from which on every child should receive the Material
3918
3939
  //! id = the id which points to the material that should be assigned
3919
- var setMaterials = function setMaterials(onNode, mat) {
3920
- var matStillExists = sceneStore.scene.materials.find(function (_mat) {
3921
- return mat.uniqueId == _mat.uniqueId;
3922
- });
3923
- if (!matStillExists) {
3924
- var sharedName = mat.name + '_recreated';
3925
- var sharedMat = sceneStore.scene.getMaterialByName(sharedName);
3926
- if (!sharedMat) {
3927
- sharedMat = new PBRMetallicRoughnessMaterial$1(sharedName, sceneStore.scene);
3928
- sharedMat.baseTexture = new Texture$1(mat.baseTexture.name, sceneStore.scene);
3929
- sharedMat.metallicRoughnessTexture = new Texture$1(mat.metallicRoughnessTexture.name, sceneStore.scene);
3930
- sharedMat.normalTexture = new Texture$1(mat.normalTexture.name, sceneStore.scene);
3931
- }
3932
- mat = sharedMat;
3933
- }
3940
+ // the level defines how many parents above the material was set the lower the higher the prio
3941
+ var setMaterials = function setMaterials(onNode, mat, parent) {
3934
3942
  if (onNode !== null && onNode !== void 0 && onNode._isMesh) {
3935
- matsOnMeshes[onNode.uniqueId] = {
3936
- mat: mat,
3937
- onNode: onNode
3938
- };
3939
- onNode.material = mat;
3943
+ var matStillExists = sceneStore.scene.materials.find(function (_mat) {
3944
+ return mat.uniqueId == _mat.uniqueId;
3945
+ });
3946
+ if (!matStillExists) {
3947
+ var sharedName = mat.name + '_recreated';
3948
+ var sharedMat = sceneStore.scene.getMaterialByName(sharedName);
3949
+ if (!sharedMat) {
3950
+ sharedMat = new PBRMetallicRoughnessMaterial(sharedName, sceneStore.scene);
3951
+ sharedMat.baseTexture = new Texture(mat.baseTexture.name, sceneStore.scene);
3952
+ sharedMat.metallicRoughnessTexture = new Texture(mat.metallicRoughnessTexture.name, sceneStore.scene);
3953
+ sharedMat.normalTexture = new Texture(mat.normalTexture.name, sceneStore.scene);
3954
+ }
3955
+ mat = sharedMat;
3956
+ }
3957
+ var mesh = onNode;
3958
+ if (mesh) {
3959
+ var _mesh$metadata;
3960
+ var depth = getDepth(mesh, parent);
3961
+ if (mesh.material && ((_mesh$metadata = mesh.metadata) === null || _mesh$metadata === void 0 ? void 0 : _mesh$metadata['matLevel']) < depth) return;
3962
+ matsOnMeshes[onNode.uniqueId] = {
3963
+ mat: mat,
3964
+ onNode: onNode
3965
+ };
3966
+ mesh.material = mat;
3967
+ if (!mesh.metadata) mesh.metadata = {
3968
+ matLevel: depth
3969
+ };else mesh.metadata['matLevel'] = depth;
3970
+ }
3940
3971
  }
3941
3972
  var _iterator = _createForOfIteratorHelper$1(onNode.getChildMeshes()),
3942
3973
  _step;
3943
3974
  try {
3944
3975
  var _loop = function _loop() {
3976
+ var _mesh$metadata2;
3945
3977
  var mesh = _step.value;
3946
3978
  var existing = Object.keys(matsOnMeshes).find(function (key) {
3947
3979
  return key == mesh.uniqueId.toString();
@@ -3952,16 +3984,24 @@ function findMaterials(cache) {
3952
3984
  return node.uniqueId.toString() == existing;
3953
3985
  })) return 0; // continue
3954
3986
  }
3987
+ var depth = getDepth(mesh, parent);
3988
+ if (mesh.material && ((_mesh$metadata2 = mesh.metadata) === null || _mesh$metadata2 === void 0 ? void 0 : _mesh$metadata2['matLevel']) < depth) return {
3989
+ v: void 0
3990
+ };
3955
3991
  matsOnMeshes[mesh.uniqueId] = {
3956
3992
  mat: mat,
3957
3993
  onNode: onNode
3958
3994
  };
3959
3995
  mesh.material = mat;
3996
+ if (!mesh.metadata) mesh.metadata = {
3997
+ matLevel: depth
3998
+ };else mesh.metadata['matLevel'] = depth;
3960
3999
  },
3961
4000
  _ret;
3962
4001
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
3963
4002
  _ret = _loop();
3964
4003
  if (_ret === 0) continue;
4004
+ if (_ret) return _ret.v;
3965
4005
  }
3966
4006
  } catch (err) {
3967
4007
  _iterator.e(err);
@@ -3974,14 +4014,18 @@ function findMaterials(cache) {
3974
4014
  var findOnNode = function findOnNode(mat, parent, onNode) {
3975
4015
  if (!mat.onNodes) return;
3976
4016
  var children = parent.getChildTransformNodes(false);
4017
+ var childMeshes = parent.getChildMeshes(true);
4018
+ if (onNode == '' || onNode == 'ALL') childMeshes.forEach(function (cm) {
4019
+ return setMaterials(cm, mat.mat, parent);
4020
+ });
3977
4021
  var _iterator2 = _createForOfIteratorHelper$1(children),
3978
4022
  _step2;
3979
4023
  try {
3980
4024
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
3981
4025
  var child = _step2.value;
3982
- if (onNode == '' || onNode == 'ALL') setMaterials(child, mat.mat);
4026
+ if (onNode == '' || onNode == 'ALL') setMaterials(child, mat.mat, parent);
3983
4027
  if (child.name.startsWith(onNode) || child.name.startsWith('geo_') && child.name.includes(onNode)) {
3984
- setMaterials(child, mat.mat);
4028
+ setMaterials(child, mat.mat, parent);
3985
4029
  }
3986
4030
  }
3987
4031
  } catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/CustomMaterial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AAK1G,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C;AAGD,QAAA,MAAM,SAAS,cAAqB,cAAc,eAAc,OAAO,KAAU,OAAO,CAAC;IAAE,GAAG,EAAE,4BAA4B,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAkD7I,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/CustomMaterial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AAK1G,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C;AAGD,QAAA,MAAM,SAAS,cAAqB,cAAc,eAAc,OAAO,KAAU,OAAO,CAAC;IAAE,GAAG,EAAE,4BAA4B,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAsD7I,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/buildScene/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAkB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpD,QAAA,MAAM,UAAU,oDAKb;IACD,SAAS,EAAE,QAAQ,CAAC;IACpB,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,KAAK,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B,SAgHA,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/buildScene/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAkB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpD,QAAA,MAAM,UAAU,oDAKb;IACD,SAAS,EAAE,QAAQ,CAAC;IACpB,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,KAAK,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B,SA+HA,CAAC;AAGF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/findAssets/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAW,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKpC,wBAA8B,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE;;;GAmK1E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/findAssets/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAW,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAMpC,wBAA8B,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE;;;GA0J1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/findMaterials/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAY,MAAM,aAAa,CAAC;AAK9C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,wBA2DnD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/findMaterials/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAY,MAAM,aAAa,CAAC;AAM9C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,wBAsFnD"}
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 105.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[105],{56105:(e,t,n)=>{n.r(t),n.d(t,{volumetricLightingBlendVolumePixelShaderWGSL:()=>a});var r=n(17416);const i="volumetricLightingBlendVolumePixelShader",u="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;var depthSampler: texture_2d<f32>;uniform invProjection: mat4x4<f32>;uniform outputTextureSize: vec2f;\n#ifdef USE_EXTINCTION\nuniform extinction: vec3f;\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,input.vUV);\n#ifdef USE_EXTINCTION\nlet depth=textureLoad(depthSampler,vec2u(fragmentInputs.position.xy),0).r;let ndc=vec4f((fragmentInputs.position.xy/uniforms.outputTextureSize)*2.-1.,depth,1.0);var viewPos=uniforms.invProjection*ndc;viewPos=viewPos/viewPos.w;let eyeDist=length(viewPos);fragmentOutputs.color2=vec4f(exp(-uniforms.extinction*eyeDist),1.0);\n#endif\n}\n";r.v.ShadersStoreWGSL[i]||(r.v.ShadersStoreWGSL[i]=u);const a={name:i,shader:u}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:105 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 214.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[214],{37214:(e,i,t)=>{t.r(i),t.d(i,{volumetricLightingRenderVolumePixelShader:()=>l});var r=t(17416);t(33560),t(2889);const n="volumetricLightingRenderVolumePixelShader",o="#include<__decl__sceneFragment>\nuniform mat4 invViewProjection;uniform vec3 lightDir; \nuniform vec2 outputTextureSize;uniform vec4 extinctionPhaseG;uniform vec3 lightPower;uniform vec2 textureRatio;uniform sampler2D depthTexture;varying vec4 vWorldPos;float henyeyGreenstein(float g,float cosTheta) {float denom=1.0+g*g-2.0*g*cosTheta;return 1.0/(4.0*3.14159265)*(1.0-g*g)/(denom*sqrt(max(denom,0.0)));}\nvec3 integrateDirectional(float eyeDist,vec3 viewDir,vec3 lightDir) {float phaseG=extinctionPhaseG.w;\n#ifdef USE_EXTINCTION\nvec3 extinction=extinctionPhaseG.xyz;return henyeyGreenstein(phaseG,dot(viewDir,lightDir))*(vec3(1.0)-exp(-extinction*eyeDist))/extinction;\n#else\nreturn vec3(henyeyGreenstein(phaseG,dot(viewDir,lightDir)))*vec3(eyeDist);\n#endif\n}\nvoid main(void) {float depth=texelFetch(depthTexture,ivec2(gl_FragCoord.xy*textureRatio),0).r;vec4 worldPos=vWorldPos;if (gl_FragCoord.z>depth) {vec4 ndc=vec4((gl_FragCoord.xy/outputTextureSize)*2.0-1.0,depth*2.0-1.0,1.0);worldPos=invViewProjection*ndc;worldPos=worldPos/worldPos.w;}\nvec3 viewDir=worldPos.xyz-vEyePosition.xyz;float eyeDist=length(viewDir);viewDir=viewDir/eyeDist;float fSign=gl_FrontFacing ? 1.0 : -1.0;vec3 integral=integrateDirectional(eyeDist,-viewDir,lightDir);gl_FragColor=vec4(lightPower*integral*fSign,1.0);}\n";r.v.ShadersStore[n]||(r.v.ShadersStore[n]=o);const l={name:n,shader:o}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:214 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 245.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[245],{44245:(e,i,r)=>{r.r(i),r.d(i,{volumetricLightingBlendVolumePixelShader:()=>l});var n=r(17416);const t="volumetricLightingBlendVolumePixelShader",o="varying vec2 vUV;uniform sampler2D textureSampler;uniform sampler2D depthSampler;uniform mat4 invProjection;uniform vec2 outputTextureSize;\n#ifdef USE_EXTINCTION\nuniform vec3 extinction;\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {gl_FragColor=texture2D(textureSampler,vUV);\n#ifdef USE_EXTINCTION\nfloat depth=texelFetch(depthSampler,ivec2(gl_FragCoord.xy),0).r;vec4 ndc=vec4((gl_FragCoord.xy/outputTextureSize)*2.-1.,depth*2.-1.,1.0);vec4 viewPos=invProjection*ndc;viewPos=viewPos/viewPos.w;float eyeDist=length(viewPos);gl_FragColor2=vec4(exp(-extinction*eyeDist),1.0);\n#endif\n}\n";n.v.ShadersStore[t]||(n.v.ShadersStore[t]=o);const l={name:t,shader:o}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:245 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 271.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[271],{28271:(e,n,t)=>{t.r(n),t.d(n,{selectionVertexShaderWGSL:()=>d});var i=t(17416);t(97762),t(31990),t(19120),t(46212),t(80870),t(42724),t(56403),t(39966),t(49413),t(58333),t(28439),t(56601);const r="selectionVertexShader",f="attribute position: vec3f;\n#ifdef INSTANCES\nattribute instanceSelectionId: f32;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#include<clipPlaneVertexDeclaration>\n#include<instancesDeclaration>\nuniform viewProjection: mat4x4f;\n#ifdef STORE_CAMERASPACE_Z\nuniform view: mat4x4f;\n#else\nuniform depthValues: vec2f;\n#endif\n#ifdef INSTANCES\nflat varying vSelectionId: f32;\n#endif\n#ifdef STORE_CAMERASPACE_Z\nvarying vViewPosZ: f32;\n#else\nvarying vDepthMetric: f32;\n#endif\n#ifdef ALPHATEST\nvarying vUV: vec2f;uniform diffuseMatrix: mat4x4f; \n#ifdef UV1\nattribute uv: vec2f;\n#endif\n#ifdef UV2\nattribute uv2: vec2f;\n#endif\n#endif\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 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#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvar worldPos: vec4f=finalWorld*vec4f(positionUpdated,1.0);vertexOutputs.position=uniforms.viewProjection*worldPos;\n#ifdef ALPHATEST\n#ifdef UV1\nvertexOutputs.vUV=(uniforms.diffuseMatrix*vec4f(uvUpdated,1.0,0.0)).xy;\n#endif\n#ifdef UV2\nvertexOutputs.vUV=(uniforms.diffuseMatrix*vec4f(uv2Updated,1.0,0.0)).xy;\n#endif\n#endif\n#ifdef STORE_CAMERASPACE_Z\nvertexOutputs.vViewPosZ=(uniforms.view*worldPos).z;\n#else\n#ifdef USE_REVERSE_DEPTHBUFFER\nvertexOutputs.vDepthMetric=((-vertexOutputs.position.z+uniforms.depthValues.x)/(uniforms.depthValues.y));\n#else\nvertexOutputs.vDepthMetric=((vertexOutputs.position.z+uniforms.depthValues.x)/(uniforms.depthValues.y));\n#endif\n#endif\n#ifdef INSTANCES\nvertexOutputs.vSelectionId=vertexInputs.instanceSelectionId;\n#endif\n#include<clipPlaneVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}\n";i.v.ShadersStoreWGSL[r]||(i.v.ShadersStoreWGSL[r]=f);const d={name:r,shader:f}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:271 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 281.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[281],{62281:(e,n,i)=>{i.r(n),i.d(n,{selectionVertexShader:()=>r});var t=i(17416);i(33827),i(72335),i(58059),i(12230),i(60110),i(34122),i(58107),i(93592),i(39449),i(86096),i(73749),i(43888);const d="selectionVertexShader",a="attribute vec3 position;\n#ifdef INSTANCES\nattribute float instanceSelectionId;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#include<clipPlaneVertexDeclaration>\n#include<instancesDeclaration>\nuniform mat4 viewProjection;\n#ifdef STORE_CAMERASPACE_Z\nuniform mat4 view;\n#else\nuniform vec2 depthValues;\n#endif\n#ifdef INSTANCES\nflat varying float vSelectionId;\n#endif\n#ifdef STORE_CAMERASPACE_Z\nvarying float vViewPosZ;\n#else\nvarying float vDepthMetric;\n#endif\n#ifdef ALPHATEST\nvarying vec2 vUV;uniform mat4 diffuseMatrix;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec3 positionUpdated=position;\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#ifdef UV2\nvec2 uv2Updated=uv2;\n#endif\n#include<morphTargetsVertexGlobal>\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);gl_Position=viewProjection*worldPos;\n#ifdef ALPHATEST\n#ifdef UV1\nvUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0));\n#endif\n#ifdef UV2\nvUV=vec2(diffuseMatrix*vec4(uv2Updated,1.0,0.0));\n#endif\n#endif\n#ifdef STORE_CAMERASPACE_Z\nvViewPosZ=(view*worldPos).z;\n#else\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetric=((-gl_Position.z+depthValues.x)/(depthValues.y));\n#else\nvDepthMetric=((gl_Position.z+depthValues.x)/(depthValues.y));\n#endif\n#endif\n#ifdef INSTANCES\nvSelectionId=instanceSelectionId;\n#endif\n#include<clipPlaneVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}\n";t.v.ShadersStore[d]||(t.v.ShadersStore[d]=a);const r={name:d,shader:a}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:281 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 305.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[305],{55305:(e,r,o)=>{o.r(r),o.d(r,{oitFinalSimpleBlendPixelShader:()=>n});var l=o(17416);const i="oitFinalSimpleBlendPixelShader",a="precision highp float;uniform sampler2D uFrontColor;void main() {ivec2 fragCoord=ivec2(gl_FragCoord.xy);vec4 frontColor=texelFetch(uFrontColor,fragCoord,0);glFragColor=frontColor;}\n";l.v.ShadersStore[i]||(l.v.ShadersStore[i]=a);const n={name:i,shader:a}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:305 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 346.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[346],{61346:(e,t,l)=>{l.r(t),l.d(t,{selectionOutlinePixelShaderWGSL:()=>s});var n=l(17416);const o="selectionOutlinePixelShader",r="var maskSamplerSampler: sampler;var maskSampler: texture_2d<f32>;var depthSamplerSampler: sampler;var depthSampler: texture_2d<f32>;varying vUV: vec2f;uniform screenSize: vec2f;uniform outlineColor: vec3f;uniform outlineThickness: f32;uniform occlusionStrength: f32;uniform occlusionThreshold: f32;\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nlet texelSize: vec2f=1.0/uniforms.screenSize;let sampleOffset: vec2f=texelSize*uniforms.outlineThickness;\n#if defined(OUTLINELAYER_SAMPLING_TRIDIRECTIONAL) || defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nlet maskTopCenter: vec2f=textureSampleLevel(maskSampler,maskSamplerSampler,fragmentInputs.vUV+vec2f(0.0,sampleOffset.y),0.0).rg;let maskTopRight: vec2f=textureSampleLevel(maskSampler,maskSamplerSampler,fragmentInputs.vUV+sampleOffset,0.0).rg;let maskMiddleCenter: vec2f=textureSampleLevel(maskSampler,maskSamplerSampler,fragmentInputs.vUV,0.0).rg;let maskMiddleRight: vec2f=textureSampleLevel(maskSampler,maskSamplerSampler,fragmentInputs.vUV+vec2f(sampleOffset.x,0.0),0.0).rg;\n#endif\n#if defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nlet maskTopLeft: vec2f=textureSampleLevel(maskSampler,maskSamplerSampler,fragmentInputs.vUV+vec2f(-sampleOffset.x,sampleOffset.y),0.0).rg;let maskMiddleLeft: vec2f=textureSampleLevel(maskSampler,maskSamplerSampler,fragmentInputs.vUV+vec2f(-sampleOffset.x,0.0),0.0).rg;let maskBottomRight: vec2f=textureSampleLevel(maskSampler,maskSamplerSampler,fragmentInputs.vUV+vec2f(sampleOffset.x,-sampleOffset.y),0.0).rg;let maskBottomCenter: vec2f=textureSampleLevel(maskSampler,maskSamplerSampler,fragmentInputs.vUV+vec2f(0.0,-sampleOffset.y),0.0).rg;let maskBottomLeft: vec2f=textureSampleLevel(maskSampler,maskSamplerSampler,fragmentInputs.vUV+vec2f(-sampleOffset.x,-sampleOffset.y),0.0).rg;\n#endif\n#ifdef OUTLINELAYER_SAMPLING_TRIDIRECTIONAL\nlet gradient: vec3f=vec3f(\nmaskMiddleCenter.r-maskMiddleRight.r,\nmaskMiddleCenter.r-maskTopCenter.r,\nmaskMiddleCenter.r-maskTopRight.r\n);let edgeStrength: f32=length(gradient);\n#elif defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nlet gradientX: f32 =\n(maskTopLeft.r+2.0*maskMiddleLeft.r+maskBottomLeft.r) -\n(maskTopRight.r+2.0*maskMiddleRight.r+maskBottomRight.r);let gradientY: f32 =\n(maskBottomLeft.r+2.0*maskBottomCenter.r+maskBottomRight.r) -\n(maskTopLeft.r+2.0*maskTopCenter.r+maskTopRight.r);let edgeStrength: f32=length(vec2f(gradientX,gradientY));\n#endif\nlet outlineMask: f32=step(0.5,edgeStrength); \n#if defined(OUTLINELAYER_SAMPLING_TRIDIRECTIONAL) || defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nlet depthTopCenter: f32=textureSampleLevel(depthSampler,depthSamplerSampler,fragmentInputs.vUV+vec2f(0.0,sampleOffset.y),0.0).r;let depthTopRight: f32=textureSampleLevel(depthSampler,depthSamplerSampler,fragmentInputs.vUV+sampleOffset,0.0).r;let depthMiddleCenter: f32=textureSampleLevel(depthSampler,depthSamplerSampler,fragmentInputs.vUV,0.0).r;let depthMiddleRight: f32=textureSampleLevel(depthSampler,depthSamplerSampler,fragmentInputs.vUV+vec2f(sampleOffset.x,0.0),0.0).r;\n#endif\n#if defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nlet depthTopLeft: f32=textureSampleLevel(depthSampler,depthSamplerSampler,fragmentInputs.vUV+vec2f(-sampleOffset.x,sampleOffset.y),0.0).r;let depthMiddleLeft: f32=textureSampleLevel(depthSampler,depthSamplerSampler,fragmentInputs.vUV+vec2f(-sampleOffset.x,0.0),0.0).r;let depthBottomRight: f32=textureSampleLevel(depthSampler,depthSamplerSampler,fragmentInputs.vUV+vec2f(sampleOffset.x,-sampleOffset.y),0.0).r;let depthBottomCenter: f32=textureSampleLevel(depthSampler,depthSamplerSampler,fragmentInputs.vUV+vec2f(0.0,-sampleOffset.y),0.0).r;let depthBottomLeft: f32=textureSampleLevel(depthSampler,depthSamplerSampler,fragmentInputs.vUV+vec2f(-sampleOffset.x,-sampleOffset.y),0.0).r;\n#endif\n#if defined(OUTLINELAYER_SAMPLING_TRIDIRECTIONAL) || defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nlet occlusionTopCenter: f32=step(uniforms.occlusionThreshold,abs(maskTopCenter.g-depthTopCenter));let occlusionTopRight: f32=step(uniforms.occlusionThreshold,abs(maskTopRight.g-depthTopRight));let occlusionMiddleCenter: f32=step(uniforms.occlusionThreshold,abs(maskMiddleCenter.g-depthMiddleCenter));let occlusionMiddleRight: f32=step(uniforms.occlusionThreshold,abs(maskMiddleRight.g-depthMiddleRight));\n#endif\n#if defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nlet occlusionTopLeft: f32=step(uniforms.occlusionThreshold,abs(maskTopLeft.g-depthTopLeft));let occlusionMiddleLeft: f32=step(uniforms.occlusionThreshold,abs(maskMiddleLeft.g-depthMiddleLeft));let occlusionBottomRight: f32=step(uniforms.occlusionThreshold,abs(maskBottomRight.g-depthBottomRight));let occlusionBottomCenter: f32=step(uniforms.occlusionThreshold,abs(maskBottomCenter.g-depthBottomCenter));let occlusionBottomLeft: f32=step(uniforms.occlusionThreshold,abs(maskBottomLeft.g-depthBottomLeft));\n#endif\nvar occlusionFactor: f32=occlusionMiddleCenter;\n#ifdef OUTLINELAYER_SAMPLING_TRIDIRECTIONAL\nocclusionFactor=min(occlusionFactor,occlusionTopCenter);occlusionFactor=min(occlusionFactor,occlusionTopRight);occlusionFactor=min(occlusionFactor,occlusionMiddleRight);\n#elif defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nocclusionFactor=min(occlusionFactor,occlusionTopCenter);occlusionFactor=min(occlusionFactor,occlusionTopRight);occlusionFactor=min(occlusionFactor,occlusionTopLeft);occlusionFactor=min(occlusionFactor,occlusionMiddleRight);occlusionFactor=min(occlusionFactor,occlusionMiddleLeft);occlusionFactor=min(occlusionFactor,occlusionBottomRight);occlusionFactor=min(occlusionFactor,occlusionBottomCenter);occlusionFactor=min(occlusionFactor,occlusionBottomLeft);\n#endif\nlet finalOutlineMask: f32=outlineMask*(1.0-uniforms.occlusionStrength*occlusionFactor);fragmentOutputs.color=vec4f(uniforms.outlineColor,finalOutlineMask);\n#define CUSTOM_FRAGMENT_MAIN_END\n}\n";n.v.ShadersStoreWGSL[o]||(n.v.ShadersStoreWGSL[o]=r);const s={name:o,shader:r}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:346 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 350.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[350],{26350:(e,r,t)=>{t.r(r),t.d(r,{oitFinalSimpleBlendPixelShaderWGSL:()=>i});var n=t(17416);const a="oitFinalSimpleBlendPixelShader",o="var uFrontColor: texture_2d<f32>;@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var fragCoord: vec2i=vec2i(fragmentInputs.position.xy);var frontColor: vec4f=textureLoad(uFrontColor,fragCoord,0);fragmentOutputs.color=frontColor;}\n";n.v.ShadersStoreWGSL[a]||(n.v.ShadersStoreWGSL[a]=o);const i={name:a,shader:o}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:350 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 375.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[375],{71375:(e,t,o)=>{o.r(t),o.d(t,{selectionOutlinePixelShader:()=>l});var n=o(17416);const s="selectionOutlinePixelShader",i="uniform sampler2D maskSampler;uniform sampler2D depthSampler;varying vec2 vUV;uniform vec2 screenSize;uniform vec3 outlineColor;uniform float outlineThickness;uniform float occlusionStrength;uniform float occlusionThreshold;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nvec2 texelSize=1.0/screenSize;vec2 sampleOffset=texelSize*outlineThickness;\n#if defined(OUTLINELAYER_SAMPLING_TRIDIRECTIONAL) || defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nvec2 maskTopCenter=texture2D(maskSampler,vUV+vec2(0.0,sampleOffset.y)).rg;vec2 maskTopRight=texture2D(maskSampler,vUV+sampleOffset).rg;vec2 maskMiddleCenter=texture2D(maskSampler,vUV).rg;vec2 maskMiddleRight=texture2D(maskSampler,vUV+vec2(sampleOffset.x,0.0)).rg;\n#endif\n#if defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nvec2 maskTopLeft=texture2D(maskSampler,vUV+vec2(-sampleOffset.x,sampleOffset.y)).rg;vec2 maskMiddleLeft=texture2D(maskSampler,vUV+vec2(-sampleOffset.x,0.0)).rg;vec2 maskBottomRight=texture2D(maskSampler,vUV+vec2(sampleOffset.x,-sampleOffset.y)).rg;vec2 maskBottomCenter=texture2D(maskSampler,vUV+vec2(0.0,-sampleOffset.y)).rg;vec2 maskBottomLeft=texture2D(maskSampler,vUV+vec2(-sampleOffset.x,-sampleOffset.y)).rg;\n#endif\n#ifdef OUTLINELAYER_SAMPLING_TRIDIRECTIONAL\nvec3 gradient=vec3(\nmaskMiddleCenter.r-maskMiddleRight.r,\nmaskMiddleCenter.r-maskTopCenter.r,\nmaskMiddleCenter.r-maskTopRight.r\n);float edgeStrength=length(gradient);\n#elif defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nfloat gradientX=\n(maskTopLeft.r+2.0*maskMiddleLeft.r+maskBottomLeft.r) -\n(maskTopRight.r+2.0*maskMiddleRight.r+maskBottomRight.r);float gradientY=\n(maskBottomLeft.r+2.0*maskBottomCenter.r+maskBottomRight.r) -\n(maskTopLeft.r+2.0*maskTopCenter.r+maskTopRight.r);float edgeStrength=length(vec2(gradientX,gradientY));\n#endif\nfloat outlineMask=step(0.5,edgeStrength); \n#if defined(OUTLINELAYER_SAMPLING_TRIDIRECTIONAL) || defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nfloat depthTopCenter=texture2D(depthSampler,vUV+vec2(0.0,sampleOffset.y)).r;float depthTopRight=texture2D(depthSampler,vUV+sampleOffset).r;float depthMiddleCenter=texture2D(depthSampler,vUV).r;float depthMiddleRight=texture2D(depthSampler,vUV+vec2(sampleOffset.x,0.0)).r;\n#endif\n#if defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nfloat depthTopLeft=texture2D(depthSampler,vUV+vec2(-sampleOffset.x,sampleOffset.y)).r;float depthMiddleLeft=texture2D(depthSampler,vUV+vec2(-sampleOffset.x,0.0)).r;float depthBottomRight=texture2D(depthSampler,vUV+vec2(sampleOffset.x,-sampleOffset.y)).r;float depthBottomCenter=texture2D(depthSampler,vUV+vec2(0.0,-sampleOffset.y)).r;float depthBottomLeft=texture2D(depthSampler,vUV+vec2(-sampleOffset.x,-sampleOffset.y)).r;\n#endif\n#if defined(OUTLINELAYER_SAMPLING_TRIDIRECTIONAL) || defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nfloat occlusionTopCenter=step(occlusionThreshold,abs(maskTopCenter.g-depthTopCenter));float occlusionTopRight=step(occlusionThreshold,abs(maskTopRight.g-depthTopRight));float occlusionMiddleCenter=step(occlusionThreshold,abs(maskMiddleCenter.g-depthMiddleCenter));float occlusionMiddleRight=step(occlusionThreshold,abs(maskMiddleRight.g-depthMiddleRight));\n#endif\n#if defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nfloat occlusionTopLeft=step(occlusionThreshold,abs(maskTopLeft.g-depthTopLeft));float occlusionMiddleLeft=step(occlusionThreshold,abs(maskMiddleLeft.g-depthMiddleLeft));float occlusionBottomRight=step(occlusionThreshold,abs(maskBottomRight.g-depthBottomRight));float occlusionBottomCenter=step(occlusionThreshold,abs(maskBottomCenter.g-depthBottomCenter));float occlusionBottomLeft=step(occlusionThreshold,abs(maskBottomLeft.g-depthBottomLeft));\n#endif\nfloat occlusionFactor=occlusionMiddleCenter;\n#ifdef OUTLINELAYER_SAMPLING_TRIDIRECTIONAL\nocclusionFactor=min(occlusionFactor,occlusionTopCenter);occlusionFactor=min(occlusionFactor,occlusionTopRight);occlusionFactor=min(occlusionFactor,occlusionMiddleRight);\n#elif defined(OUTLINELAYER_SAMPLING_OCTADIRECTIONAL)\nocclusionFactor=min(occlusionFactor,occlusionTopCenter);occlusionFactor=min(occlusionFactor,occlusionTopRight);occlusionFactor=min(occlusionFactor,occlusionTopLeft);occlusionFactor=min(occlusionFactor,occlusionMiddleRight);occlusionFactor=min(occlusionFactor,occlusionMiddleLeft);occlusionFactor=min(occlusionFactor,occlusionBottomRight);occlusionFactor=min(occlusionFactor,occlusionBottomCenter);occlusionFactor=min(occlusionFactor,occlusionBottomLeft);\n#endif\nfloat finalOutlineMask=outlineMask*(1.0-occlusionStrength*occlusionFactor);gl_FragColor=vec4(outlineColor,finalOutlineMask);\n#define CUSTOM_FRAGMENT_MAIN_END\n}\n";n.v.ShadersStore[s]||(n.v.ShadersStore[s]=i);const l={name:s,shader:i}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:375 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 583.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[583],{2583:(e,r,o)=>{o.r(r),o.d(r,{volumetricLightingRenderVolumeVertexShader:()=>t});var i=o(17416);o(71508),o(2889),o(78109),o(66703);const s="volumetricLightingRenderVolumeVertexShader",n="#include<__decl__sceneVertex>\n#include<__decl__meshVertex>\nattribute vec3 position;varying vec4 vWorldPos;void main(void) {vec4 worldPos=world*vec4(position,1.0);vWorldPos=worldPos;gl_Position=viewProjection*worldPos;}\n";i.v.ShadersStore[s]||(i.v.ShadersStore[s]=n);const t={name:s,shader:n}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:583 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 702.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[702],{83702:(e,n,i)=>{i.r(n),i.d(n,{selectionPixelShaderWGSL:()=>t});var f=i(17416);i(47652),i(63665);const r="selectionPixelShader",a="#ifdef INSTANCES\nflat varying vSelectionId: f32;\n#else\nuniform selectionId: f32;\n#endif\n#ifdef STORE_CAMERASPACE_Z\nvarying vViewPosZ: f32;\n#else\nvarying vDepthMetric: f32;\n#endif\n#ifdef ALPHATEST\nvarying vUV: vec2f;var diffuseSamplerSampler: sampler;var diffuseSampler: texture_2d<f32>;\n#endif\n#include<clipPlaneFragmentDeclaration>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\n#ifdef ALPHATEST\nif (textureSample(diffuseSampler,diffuseSamplerSampler,fragmentInputs.vUV).a<0.4) {discard;}\n#endif\n#ifdef INSTANCES\nvar id: f32=fragmentInputs.vSelectionId;\n#else\nvar id: f32=uniforms.selectionId;\n#endif\n#ifdef STORE_CAMERASPACE_Z\nfragmentOutputs.color=vec4(id,fragmentInputs.vViewPosZ,0.0,1.0);\n#else\nfragmentOutputs.color=vec4(id,fragmentInputs.vDepthMetric,0.0,1.0);\n#endif\n#define CUSTOM_FRAGMENT_MAIN_END\n}\n";f.v.ShadersStoreWGSL[r]||(f.v.ShadersStoreWGSL[r]=a);const t={name:r,shader:a}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:702 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 794.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[794],{22794:(e,n,i)=>{i.r(n),i.d(n,{selectionPixelShader:()=>f});var d=i(17416);i(52397),i(15764);const l="selectionPixelShader",a="#ifdef INSTANCES\nflat varying float vSelectionId;\n#else\nuniform float selectionId;\n#endif\n#ifdef STORE_CAMERASPACE_Z\nvarying float vViewPosZ;\n#else\nvarying float vDepthMetric;\n#endif\n#ifdef ALPHATEST\nvarying vec2 vUV;uniform sampler2D diffuseSampler;\n#endif\n#include<clipPlaneFragmentDeclaration>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\n#ifdef ALPHATEST\nif (texture2D(diffuseSampler,vUV).a<0.4)\ndiscard;\n#endif\n#ifdef INSTANCES\nfloat id=vSelectionId;\n#else\nfloat id=selectionId;\n#endif\n#ifdef STORE_CAMERASPACE_Z\ngl_FragColor=vec4(id,vViewPosZ,0.0,1.0);\n#else\ngl_FragColor=vec4(id,vDepthMetric,0.0,1.0);\n#endif\n#define CUSTOM_FRAGMENT_MAIN_END\n}\n";d.v.ShadersStore[l]||(d.v.ShadersStore[l]=a);const f={name:l,shader:a}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:794 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 799.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[799],{5799:(e,t,i)=>{i.r(t),i.d(t,{volumetricLightingRenderVolumePixelShaderWGSL:()=>s});var n=i(17416);i(77761),i(90002);const r="volumetricLightingRenderVolumePixelShader",o="#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\nuniform invViewProjection: mat4x4<f32>;uniform lightDir: vec3f; \nuniform outputTextureSize: vec2f;uniform extinctionPhaseG: vec4f;uniform lightPower: vec3f;uniform textureRatio: vec2f;var depthTexture: texture_2d<f32>;varying vWorldPos: vec4f;fn henyeyGreenstein(g: f32,cosTheta: f32)->f32 {let denom=1+g*g-2*g*cosTheta;return 1.0/(4.0*3.14159265)*(1.0-g*g)/(denom*sqrt(max(denom,0.0)));}\nfn integrateDirectional(eyeDist: f32,viewDir: vec3f,lightDir: vec3f)->vec3f {let phaseG=uniforms.extinctionPhaseG.w;\n#ifdef USE_EXTINCTION\nlet extinction=uniforms.extinctionPhaseG.xyz;return henyeyGreenstein(phaseG,dot(viewDir,lightDir))*(vec3f(1.0)-exp(-extinction*eyeDist))/extinction;\n#else\nreturn vec3f(henyeyGreenstein(phaseG,dot(viewDir,lightDir)))*vec3f(eyeDist);\n#endif\n}\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {let depth=textureLoad(depthTexture,vec2u(fragmentInputs.position.xy*uniforms.textureRatio),0).r;var worldPos=fragmentInputs.vWorldPos;if (fragmentInputs.position.z>depth) {let ndc=vec4f((fragmentInputs.position.xy/uniforms.outputTextureSize)*2.-1.,depth,1.0);worldPos=uniforms.invViewProjection*ndc;worldPos=worldPos/worldPos.w;}\nvar viewDir=worldPos.xyz-scene.vEyePosition.xyz;let eyeDist=length(viewDir);viewDir=viewDir/eyeDist;let fSign=select(-1.0,1.0,fragmentInputs.frontFacing);let integral=integrateDirectional(eyeDist,-viewDir,uniforms.lightDir);fragmentOutputs.color=vec4f(uniforms.lightPower*integral*fSign,1.0);}\n";n.v.ShadersStoreWGSL[r]||(n.v.ShadersStoreWGSL[r]=o);const s={name:r,shader:o}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:799 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 979.real-time-viewer.umd.min.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[979],{30979:(e,t,r)=>{r.r(t),r.d(t,{volumetricLightingRenderVolumeVertexShaderWGSL:()=>i});var n=r(17416);r(77761),r(90002);const o="volumetricLightingRenderVolumeVertexShader",s="#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\nattribute position : vec3f;varying vWorldPos: vec4f;@vertex\nfn main(input : VertexInputs)->FragmentInputs {let worldPos=mesh.world*vec4f(vertexInputs.position,1.0);vertexOutputs.vWorldPos=worldPos;vertexOutputs.position=scene.viewProjection*worldPos;}\n";n.v.ShadersStoreWGSL[o]||(n.v.ShadersStoreWGSL[o]=s);const i={name:o,shader:s}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:979 */