@preference-sl/pref-viewer 2.9.0-beta.2 → 2.9.0-beta.3

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +15 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preference-sl/pref-viewer",
3
- "version": "2.9.0-beta.2",
3
+ "version": "2.9.0-beta.3",
4
4
  "description": "Web Component to preview GLTF models with Babylon.js",
5
5
  "author": "Alex Moreno Palacio <amoreno@preference.es>",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -169,29 +169,29 @@ class PrefViewer extends HTMLElement {
169
169
  );
170
170
  this.hemiLight.intensity = 0.5;
171
171
 
172
- // 2) Soft directional “sun” for form
172
+ // 2) Directional light from the front-right, angled slightly down
173
173
  this.dirLight = new DirectionalLight(
174
174
  "dirLight",
175
- new Vector3(-1, -0.3, -0.5), // more horizontal light
175
+ new Vector3(-1, -0.5, -0.5), // direction TOWARD the model
176
176
  this.scene
177
177
  );
178
- this.dirLight.position = new Vector3(5, 3, 5); // coming from above + front/right
178
+ this.dirLight.position = new Vector3(5, 4, 5); // light is IN FRONT + ABOVE + to the RIGHT
179
179
  this.dirLight.intensity = 0.4;
180
180
 
181
- // 3) Soft blurred shadows
182
- this.shadowGen = new ShadowGenerator(1024, this.dirLight);
183
- this.shadowGen.useBlurExponentialShadowMap = true;
184
- this.shadowGen.blurKernel = 16;
185
- this.shadowGen.darkness = 0.5;
181
+ // 3) Soft shadows
182
+ this.shadowGen = new ShadowGenerator(1024, this.dirLight);
183
+ this.shadowGen.useBlurExponentialShadowMap = true;
184
+ this.shadowGen.blurKernel = 16;
185
+ this.shadowGen.darkness = 0.4;
186
186
 
187
187
  // 4) Camera‐attached headlight
188
- this.cameraLight = new PointLight(
189
- "cameraLight",
190
- this.camera.position,
191
- this.scene
192
- );
193
- this.cameraLight.parent = this.camera;
194
- this.cameraLight.intensity = 0.5;
188
+ // this.cameraLight = new PointLight(
189
+ // "cameraLight",
190
+ // this.camera.position,
191
+ // this.scene
192
+ // );
193
+ // this.cameraLight.parent = this.camera;
194
+ // this.cameraLight.intensity = 0.5;
195
195
  }
196
196
 
197
197
  _setupInteraction() {