softbox 4.16.1 → 4.18.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.
Files changed (49) hide show
  1. package/README.md +7 -6
  2. package/dist/{BrightnessContrastShader-BN6FBcLV.cjs → BrightnessContrastShader-C1jbh-NA.cjs} +2 -2
  3. package/dist/BrightnessContrastShader-CoM5EjqG.js +13 -0
  4. package/dist/ContactShadowBaker-MzqtJ-0h.js +2052 -0
  5. package/dist/ContactShadowBaker-lWQW97Cr.cjs +2 -0
  6. package/dist/CopyShader-C2Oc7n1P.js +12 -0
  7. package/dist/{CopyShader-DPSZNOxL.cjs → CopyShader-CM1OGKAp.cjs} +2 -2
  8. package/dist/EffectComposer-CMs4vldH.js +88 -0
  9. package/dist/EffectComposer-CdAQB6p0.cjs +1 -0
  10. package/dist/HueSaturationShader-BeHSjNY8.js +13 -0
  11. package/dist/{HueSaturationShader-BEp7jjxf.cjs → HueSaturationShader-bN5IWhh8.cjs} +2 -2
  12. package/dist/OutputPass-DicIJHut.cjs +72 -0
  13. package/dist/OutputPass-oQu4Xmeb.js +29 -0
  14. package/dist/Pass-CSHIrJrV.js +51 -0
  15. package/dist/Pass-D0vYi-gB.cjs +1 -0
  16. package/dist/RenderPass-DS8SYAhJ.js +16 -0
  17. package/dist/RenderPass-DlRq51Kq.cjs +1 -0
  18. package/dist/ShaderPass-DghZ7TAj.cjs +1 -0
  19. package/dist/ShaderPass-h4P0lBmc.js +22 -0
  20. package/dist/{ThreePathTracingService-VOgJGtMH.cjs → ThreePathTracingService-B1WEEKgQ.cjs} +96 -96
  21. package/dist/ThreePathTracingService-qV8I_V9u.js +2546 -0
  22. package/dist/UnrealBloomPass-BTHiW_Y8.js +123 -0
  23. package/dist/UnrealBloomPass-CQHHa-s_.cjs +115 -0
  24. package/dist/VignetteShader-CPF_iEkO.js +13 -0
  25. package/dist/{VignetteShader-Drpo9YxI.cjs → VignetteShader-CQmGrpns.cjs} +2 -2
  26. package/dist/index.d.cts +7 -0
  27. package/dist/index.d.ts +7 -0
  28. package/dist/simple-viewer.cjs +23 -1
  29. package/dist/simple-viewer.es.js +8473 -11
  30. package/package.json +26 -18
  31. package/dist/BrightnessContrastShader-B9tNAd_c.js +0 -49
  32. package/dist/CopyShader-DVL8Bcar.js +0 -41
  33. package/dist/EffectComposer-BdHnHszK.js +0 -188
  34. package/dist/EffectComposer-D2IQ0sek.cjs +0 -1
  35. package/dist/HueSaturationShader-B6tnz2ga.js +0 -60
  36. package/dist/OutputPass-Dy4KNHYF.cjs +0 -72
  37. package/dist/OutputPass-Tt8WbC_B.js +0 -125
  38. package/dist/Pass-C1mreNp8.cjs +0 -1
  39. package/dist/Pass-DOcH4lwV.js +0 -88
  40. package/dist/RenderPass-B57TYmjs.js +0 -37
  41. package/dist/RenderPass-BVzyKWsC.cjs +0 -1
  42. package/dist/ShaderPass-BQRqK8zp.cjs +0 -1
  43. package/dist/ShaderPass-C2HX8lsT.js +0 -45
  44. package/dist/ThreePathTracingService-CK3zD4Qj.js +0 -6383
  45. package/dist/UnrealBloomPass-Kx7djcld.cjs +0 -115
  46. package/dist/UnrealBloomPass-rjyQu37v.js +0 -281
  47. package/dist/VignetteShader-BG_QwoTp.js +0 -45
  48. package/dist/index-BWjJNKzq.js +0 -13030
  49. package/dist/index-BqbKpEQh.cjs +0 -29
package/README.md CHANGED
@@ -1,16 +1,17 @@
1
1
  # softbox
2
2
 
3
3
  <!-- The size badges are static (bundlephobia/bundlejs both mismeasure this
4
- dual-chunk package: they bundle `three`, our peer dep, or read the tiny
4
+ multi-chunk package: they bundle `three`, our peer dep, or read the tiny
5
5
  re-export entry). Refresh the numbers from our own build after a release
6
6
  that changes the bundle:
7
- npm run build && for f in dist/index-*.js dist/ThreePathTracingService-*.js; do
7
+ npm run build && for f in dist/simple-viewer.es.js dist/ContactShadowBaker-*.js dist/ThreePathTracingService-*.js; do
8
8
  b=$(gzip -c "$f" | wc -c); awk -v b="$b" -v n="$f" 'BEGIN{printf "%s %.1f kB gzip\n", n, b/1000}'; done
9
- index-* = core (badge rounds down to match the README's ~117 kB),
9
+ core = simple-viewer.es.js + ContactShadowBaker-* (the entry statically
10
+ imports that shared chunk, so both load eagerly);
10
11
  ThreePathTracingService-* = the lazy path-tracer chunk. -->
11
12
  [![npm version](https://img.shields.io/npm/v/softbox)](https://www.npmjs.com/package/softbox)
12
- [![core size](https://img.shields.io/badge/core-117%20kB%20gzip-blue)](https://bundlephobia.com/package/softbox)
13
- [![path tracer chunk](https://img.shields.io/badge/%2B%20path%20tracer-51%20kB%20gzip-lightgrey)](https://bundlephobia.com/package/softbox)
13
+ [![core size](https://img.shields.io/badge/core-102%20kB%20gzip-blue)](https://bundlephobia.com/package/softbox)
14
+ [![path tracer chunk](https://img.shields.io/badge/%2B%20path%20tracer-49%20kB%20gzip-lightgrey)](https://bundlephobia.com/package/softbox)
14
15
  [![CI](https://github.com/LEMing/softbox/actions/workflows/ci.yml/badge.svg)](https://github.com/LEMing/softbox/actions/workflows/ci.yml)
15
16
  [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/LEMing/softbox/blob/main/LICENSE)
16
17
 
@@ -22,7 +23,7 @@
22
23
  <SimpleViewer object="/model.glb" />
23
24
  ```
24
25
 
25
- Balanced studio lighting, a real-scale matte concrete floor with a baked soft contact shadow, auto-framing, compressed-asset decoders — all on by default, zero configuration. Lighting needs zero network requests (the studio environment is procedural); the DRACO/KTX2 decoder wasm is fetched only when a model actually uses that compression, from a CDN by default or [self-hosted](#loaders) for offline use. The core is ~117 kB gzip; the path tracer lives in a lazy chunk that loads only when enabled. Every release is gated by 590+ unit tests plus a Playwright suite that asserts **real WebGL pixels** in CI.
26
+ Balanced studio lighting, a baked soft contact shadow that grounds the model, auto-framing, compressed-asset decoders — all on by default, zero configuration (the real-scale concrete paver floor is [one option away](#configuration)). Lighting needs zero network requests (the studio environment is procedural); the DRACO/KTX2 decoder wasm is fetched only when a model actually uses that compression, from a CDN by default or [self-hosted](#loaders) for offline use. The core is ~102 kB gzip; the path tracer lives in a lazy chunk that loads only when enabled. Every release is gated by 790+ unit tests plus a Playwright suite that asserts **real WebGL pixels** in CI.
26
27
 
27
28
  [![softbox playground](https://raw.githubusercontent.com/LEMing/softbox/main/public/og-image.png)](https://leming.github.io/softbox/)
28
29
 
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r={name:"BrightnessContrastShader",uniforms:{tDiffuse:{value:null},brightness:{value:0},contrast:{value:0}},vertexShader:`
1
+ var e={name:`BrightnessContrastShader`,uniforms:{tDiffuse:{value:null},brightness:{value:0},contrast:{value:0}},vertexShader:`
2
2
 
3
3
  varying vec2 vUv;
4
4
 
@@ -28,4 +28,4 @@
28
28
  gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + contrast) + 0.5;
29
29
  }
30
30
 
31
- }`};exports.BrightnessContrastShader=r;
31
+ }`};exports.BrightnessContrastShader=e;
@@ -0,0 +1,13 @@
1
+ //#region node_modules/three/examples/jsm/shaders/BrightnessContrastShader.js
2
+ var e = {
3
+ name: "BrightnessContrastShader",
4
+ uniforms: {
5
+ tDiffuse: { value: null },
6
+ brightness: { value: 0 },
7
+ contrast: { value: 0 }
8
+ },
9
+ vertexShader: "\n\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }",
10
+ fragmentShader: "\n\n uniform sampler2D tDiffuse;\n uniform float brightness;\n uniform float contrast;\n\n varying vec2 vUv;\n\n void main() {\n\n gl_FragColor = texture2D( tDiffuse, vUv );\n\n gl_FragColor.rgb += brightness;\n\n if (contrast > 0.0) {\n gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) / (1.0 - contrast) + 0.5;\n } else {\n gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + contrast) + 0.5;\n }\n\n }"
11
+ };
12
+ //#endregion
13
+ export { e as BrightnessContrastShader };