softbox 4.6.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4272,7 +4272,7 @@ class cr extends Bo {
4272
4272
  set aspect(e) {
4273
4273
  this.perspectiveCamera.aspect = e;
4274
4274
  }
4275
- static create(e = 75, t = 1, n = 0.1, s = 1e3) {
4275
+ static create(e = 45, t = 1, n = 0.1, s = 1e3) {
4276
4276
  return new cr(
4277
4277
  new w.PerspectiveCamera(e, t, n, s)
4278
4278
  );
@@ -4309,7 +4309,12 @@ class Hl {
4309
4309
  linear: w.LinearToneMapping,
4310
4310
  reinhard: w.ReinhardToneMapping,
4311
4311
  cineon: w.CineonToneMapping,
4312
- aces: w.ACESFilmicToneMapping
4312
+ aces: w.ACESFilmicToneMapping,
4313
+ agx: w.AgXToneMapping,
4314
+ // Khronos PBR Neutral: rolls highlights off filmically while
4315
+ // preserving material hue/saturation (unlike ACES, which desaturates
4316
+ // bright values toward white) — the default for this product viewer.
4317
+ neutral: w.NeutralToneMapping
4313
4318
  };
4314
4319
  this.renderer.toneMapping = t[e.toneMapping.type], this.renderer.toneMappingExposure = e.toneMapping.exposure;
4315
4320
  }
@@ -7990,7 +7995,7 @@ class au {
7990
7995
  this.events = new tr(), this.disposed = !1;
7991
7996
  }
7992
7997
  async initialize(e) {
7993
- const { ThreePathTracingService: t } = await import("./ThreePathTracingService-DlCiqA08.js");
7998
+ const { ThreePathTracingService: t } = await import("./ThreePathTracingService-DbqedkL2.js");
7994
7999
  if (this.disposed)
7995
8000
  return N.ok(void 0);
7996
8001
  const n = new t();
@@ -10196,8 +10201,10 @@ class ku {
10196
10201
  if (e === w.ReinhardToneMapping) return "reinhard";
10197
10202
  if (e === w.CineonToneMapping) return "cineon";
10198
10203
  if (e === w.ACESFilmicToneMapping) return "aces";
10204
+ if (e === w.AgXToneMapping) return "agx";
10205
+ if (e === w.NeutralToneMapping) return "neutral";
10199
10206
  }
10200
- return typeof e == "string" ? e : "aces";
10207
+ return typeof e == "string" ? e : "neutral";
10201
10208
  }
10202
10209
  }
10203
10210
  class Fu {
@@ -10238,7 +10245,7 @@ class Fu {
10238
10245
  return new kc(_);
10239
10246
  }
10240
10247
  static createCamera(e) {
10241
- const n = e.camera || {}, s = n.fov || n.cameraFov || 75, o = n.near || n.cameraNear || 0.1, r = n.far || n.cameraFar || 1e5, a = n.position || n.cameraPosition, c = n.target || n.cameraTarget, u = cr.create(
10248
+ const n = e.camera || {}, s = n.fov || n.cameraFov || 45, o = n.near || n.cameraNear || 0.1, r = n.far || n.cameraFar || 1e5, a = n.position || n.cameraPosition, c = n.target || n.cameraTarget, u = cr.create(
10242
10249
  s,
10243
10250
  1,
10244
10251
  // Aspect ratio will be set by resize
@@ -10329,26 +10336,34 @@ const Wi = {
10329
10336
  // Set `environment.url` to an HDR/EXR/image to use a custom environment map.
10330
10337
  environment: {
10331
10338
  backgroundIntensity: 1,
10332
- // The studio environment (RoomEnvironment) is the primary light source, so
10333
- // keep image-based lighting moderate — at 1.0 it blows out PBR materials.
10334
- environmentIntensity: 0.7
10339
+ // Kept moderate: environmentIntensity drives the IBL REFLECTION strength
10340
+ // as well as the fill, so pushing it high to brighten also makes the paint
10341
+ // read glossy/plasticky. Brightness instead comes from the diffuse
10342
+ // ambient/hemisphere fill below, keeping a bright-but-matte studio look.
10343
+ environmentIntensity: 0.5
10335
10344
  },
10336
- // Lighting: the studio environment does most of the work, so the explicit
10337
- // lights are subtle accents (not a second full light rig). A single directional
10338
- // key light gives form and shadows; ambient/hemisphere just lift the shadows.
10345
+ // Lighting: a near-neutral directional key gives gentle form and the contact
10346
+ // shadow, while a generous ambient/hemisphere fill keeps the shadowed side
10347
+ // and crevices bright and open — a soft high-key studio look. Warmth is left
10348
+ // to the model's own materials rather than a tinted key, so genuinely
10349
+ // white/neutral models are not pushed yellow.
10339
10350
  lighting: {
10340
10351
  ambientLight: {
10341
- color: "#404040",
10342
- intensity: 0.3
10352
+ color: "#4a4a4a",
10353
+ intensity: 0.5
10343
10354
  },
10344
10355
  hemisphereLight: {
10345
- skyColor: "#ffffbb",
10346
- groundColor: "#080820",
10347
- intensity: 0.3
10356
+ skyColor: "#fff6ec",
10357
+ // Warm-neutral bounce (not a cold blue, which cooled the shadowed side).
10358
+ groundColor: "#3c3630",
10359
+ intensity: 0.45
10348
10360
  },
10349
10361
  directionalLight: {
10350
- color: "#ffffff",
10351
- intensity: 2,
10362
+ // Barely-warm, near-white key: enough to avoid a clinical cool cast but
10363
+ // not enough to tint the render orange — the model's albedo carries the
10364
+ // warmth. Restrained intensity so the specular hotspot stays soft.
10365
+ color: "#fff8f2",
10366
+ intensity: 1.9,
10352
10367
  // Steeper than a 45-degree key light so the cast shadow falls mostly
10353
10368
  // directly under the model (a tight contact shadow) instead of
10354
10369
  // streaking off to one side.
@@ -10390,9 +10405,11 @@ const Wi = {
10390
10405
  // enough that a moderate radius already reads soft and clean.
10391
10406
  shadowMapType: 1,
10392
10407
  // PCFShadowMap
10393
- toneMapping: 6,
10394
- // ACESFilmicToneMapping
10395
- toneMappingExposure: 1.1
10408
+ // Khronos PBR Neutral (THREE.NeutralToneMapping = 7): keeps saturated
10409
+ // material colours through the highlight rolloff instead of clipping them
10410
+ // to white the way ACES does — the right operator for a product viewer.
10411
+ toneMapping: 7,
10412
+ toneMappingExposure: 1.15
10396
10413
  },
10397
10414
  // Controls
10398
10415
  controls: {
@@ -10441,28 +10458,28 @@ const Wi = {
10441
10458
  }, sa = {
10442
10459
  studio: {
10443
10460
  backgroundColor: "#f0f0f7",
10444
- renderer: { toneMappingExposure: 1.1 },
10445
- environment: { environmentIntensity: 0.7 }
10461
+ renderer: { toneMappingExposure: 1.15 },
10462
+ environment: { environmentIntensity: 0.5 }
10446
10463
  },
10447
10464
  product: {
10448
10465
  backgroundColor: "#ffffff",
10449
- renderer: { toneMappingExposure: 1.25 },
10450
- environment: { environmentIntensity: 0.85 }
10466
+ renderer: { toneMappingExposure: 1.2 },
10467
+ environment: { environmentIntensity: 0.55 }
10451
10468
  },
10452
10469
  neutral: {
10453
10470
  backgroundColor: "#d9d9de",
10454
- renderer: { toneMappingExposure: 1 },
10455
- environment: { environmentIntensity: 0.6 }
10471
+ renderer: { toneMappingExposure: 1.1 },
10472
+ environment: { environmentIntensity: 0.45 }
10456
10473
  },
10457
10474
  dark: {
10458
10475
  backgroundColor: "#1a1a1f",
10459
- renderer: { toneMappingExposure: 1.15 },
10460
- environment: { environmentIntensity: 0.8 }
10476
+ renderer: { toneMappingExposure: 1.2 },
10477
+ environment: { environmentIntensity: 0.5 }
10461
10478
  },
10462
10479
  outdoor: {
10463
10480
  backgroundColor: "#bcd4e6",
10464
- renderer: { toneMappingExposure: 1.15 },
10465
- environment: { environmentIntensity: 0.85 }
10481
+ renderer: { toneMappingExposure: 1.2 },
10482
+ environment: { environmentIntensity: 0.6 }
10466
10483
  }
10467
10484
  };
10468
10485
  function Gu(i) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BA_1qZxy.cjs");exports.ControlType=e.ControlType;exports.ErrorCode=e.ErrorCode;exports.Hotspot=e.Hotspot;exports.SimpleViewer=e.SimpleViewerWrapper;exports.ThreeViewerError=e.ThreeViewerError;exports.TypedEventEmitter=e.TypedEventEmitter;exports.VIEWER_PRESETS=e.VIEWER_PRESETS;exports.defaultOptions=e.defaultOptions;exports.resolvePreset=e.resolvePreset;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BtN2xOzS.cjs");exports.ControlType=e.ControlType;exports.ErrorCode=e.ErrorCode;exports.Hotspot=e.Hotspot;exports.SimpleViewer=e.SimpleViewerWrapper;exports.ThreeViewerError=e.ThreeViewerError;exports.TypedEventEmitter=e.TypedEventEmitter;exports.VIEWER_PRESETS=e.VIEWER_PRESETS;exports.defaultOptions=e.defaultOptions;exports.resolvePreset=e.resolvePreset;
@@ -1,4 +1,4 @@
1
- import { f as s, E as o, H as a, h as t, e as E, T as i, V as p, i as T, r as l } from "./index-DoB8YjQ9.js";
1
+ import { f as s, E as o, H as a, h as t, e as E, T as i, V as p, i as T, r as l } from "./index-DXbG9xpu.js";
2
2
  export {
3
3
  s as ControlType,
4
4
  o as ErrorCode,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "softbox",
3
3
  "private": false,
4
- "version": "4.6.0",
4
+ "version": "4.7.0",
5
5
  "homepage": "https://leming.github.io/softbox/",
6
6
  "type": "module",
7
7
  "description": "Batteries-included React 3D viewer — any GLB looks studio-shot in one line",