@crystaldesign/real-time-viewer 24.9.0-rc.4 → 24.9.0-rc.6

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.
@@ -34,7 +34,6 @@ import { DracoCompression } from '@babylonjs/core/Meshes/Compression/dracoCompre
34
34
  import { SceneLoader } from '@babylonjs/core/Loading/sceneLoader';
35
35
  import { PBRMetallicRoughnessMaterial } from '@babylonjs/core/Materials/PBR/pbrMetallicRoughnessMaterial';
36
36
  import { DirectionalLight } from '@babylonjs/core/Lights/directionalLight';
37
- import { StandardMaterial } from '@babylonjs/core/Materials/standardMaterial';
38
37
  import '@babylonjs/loaders/glTF/2.0/';
39
38
  import { jsxs, jsx } from 'react/jsx-runtime';
40
39
 
@@ -1688,6 +1687,9 @@ var UIStore = /*#__PURE__*/function () {
1688
1687
  });
1689
1688
  });
1690
1689
  this._guiElements.length = 0;
1690
+ this._scene.transformNodes.forEach(function (tN) {
1691
+ return tN.name.startsWith('guiElem_') && tN.dispose();
1692
+ });
1691
1693
  }
1692
1694
  }, {
1693
1695
  key: "onMove",
@@ -2824,19 +2826,17 @@ function shadow() {
2824
2826
  var _useUtilStoreContext = useUtilStoreContext(),
2825
2827
  degreesToRadians = _useUtilStoreContext.degreesToRadians;
2826
2828
  if (!hasRendered) {
2827
- var getDir = function getDir(rot) {
2828
- var quat = Matrix.RotationYawPitchRoll(rot.y, rot.x, rot.z);
2829
- return Vector3.TransformCoordinates(Vector3.Forward(), quat.getRotationMatrix());
2830
- };
2831
- var light1 = new DirectionalLight('dir1', getDir(new Vector3(77.4 * Math.PI / 180, 272.45 * Math.PI / 180, 0 * Math.PI / 180)), scene);
2832
- var light2 = new DirectionalLight('dir2', getDir(new Vector3(9.941 * Math.PI / 180, 249.46 * Math.PI / 180, -4.187 * Math.PI / 180)), scene);
2833
- var light3 = new DirectionalLight('dir3', getDir(new Vector3(183.758 * Math.PI / 180, -33.9 * Math.PI / 180, -84.116 * Math.PI / 180)), scene);
2834
- light1.position = new Vector3(0.43, 2.29, 0.04);
2835
- light2.position = new Vector3(1.628, 1.818, -0.05);
2836
- light3.position = new Vector3(-0.554, 2, 1.849);
2837
- light1.intensity = 1;
2838
- light2.intensity = 0.5;
2839
- light3.intensity = 0.3;
2829
+ var light = scene.getLightByName('dirb');
2830
+ light = new DirectionalLight('dirl', new Vector3(-0.2, -1, -0.2), scene);
2831
+ var lightf = new DirectionalLight('dirf', new Vector3(0, -0.436, -0.9), scene);
2832
+ var lightr = new DirectionalLight('dirr', new Vector3(0, -1, 0.3), scene);
2833
+ var lightl = new DirectionalLight('dirb', new Vector3(0.2, -1, 0.2), scene);
2834
+ lightf.intensity = 2.5;
2835
+ light.intensity = 2;
2836
+ light.position = new Vector3(-2, 5, 0);
2837
+ lightf.position = new Vector3(2, 5, 0);
2838
+ lightr.position = new Vector3(0, 5, -2);
2839
+ lightl.position = new Vector3(0, 5, -2);
2840
2840
  var ground = MeshBuilder.CreatePlane('ground', {
2841
2841
  width: 100,
2842
2842
  height: 100
@@ -2851,7 +2851,13 @@ function shadow() {
2851
2851
  var std_mat = new PBRMetallicRoughnessMaterial('std_mat', scene);
2852
2852
  std_mat.metallic = 0;
2853
2853
  scene.defaultMaterial = std_mat;
2854
- var mat = new StandardMaterial('ground_mat', scene);
2854
+ var mat = new PBRMetallicRoughnessMaterial('white', scene);
2855
+ mat.metallic = 0.05;
2856
+ mat.roughness = 1;
2857
+ mat._environmentIntensity = 0;
2858
+ mat.clearCoat.isEnabled = true;
2859
+ mat.clearCoat.intensity = 1;
2860
+ mat.subSurface.isTranslucencyEnabled = true;
2855
2861
  ground.material = mat;
2856
2862
  }
2857
2863
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/shadow/index.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,MAAM,SAwC7B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/par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