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.
- package/README.md +7 -6
- package/dist/{BrightnessContrastShader-BN6FBcLV.cjs → BrightnessContrastShader-C1jbh-NA.cjs} +2 -2
- package/dist/BrightnessContrastShader-CoM5EjqG.js +13 -0
- package/dist/ContactShadowBaker-MzqtJ-0h.js +2052 -0
- package/dist/ContactShadowBaker-lWQW97Cr.cjs +2 -0
- package/dist/CopyShader-C2Oc7n1P.js +12 -0
- package/dist/{CopyShader-DPSZNOxL.cjs → CopyShader-CM1OGKAp.cjs} +2 -2
- package/dist/EffectComposer-CMs4vldH.js +88 -0
- package/dist/EffectComposer-CdAQB6p0.cjs +1 -0
- package/dist/HueSaturationShader-BeHSjNY8.js +13 -0
- package/dist/{HueSaturationShader-BEp7jjxf.cjs → HueSaturationShader-bN5IWhh8.cjs} +2 -2
- package/dist/OutputPass-DicIJHut.cjs +72 -0
- package/dist/OutputPass-oQu4Xmeb.js +29 -0
- package/dist/Pass-CSHIrJrV.js +51 -0
- package/dist/Pass-D0vYi-gB.cjs +1 -0
- package/dist/RenderPass-DS8SYAhJ.js +16 -0
- package/dist/RenderPass-DlRq51Kq.cjs +1 -0
- package/dist/ShaderPass-DghZ7TAj.cjs +1 -0
- package/dist/ShaderPass-h4P0lBmc.js +22 -0
- package/dist/{ThreePathTracingService-VOgJGtMH.cjs → ThreePathTracingService-B1WEEKgQ.cjs} +96 -96
- package/dist/ThreePathTracingService-qV8I_V9u.js +2546 -0
- package/dist/UnrealBloomPass-BTHiW_Y8.js +123 -0
- package/dist/UnrealBloomPass-CQHHa-s_.cjs +115 -0
- package/dist/VignetteShader-CPF_iEkO.js +13 -0
- package/dist/{VignetteShader-Drpo9YxI.cjs → VignetteShader-CQmGrpns.cjs} +2 -2
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/simple-viewer.cjs +23 -1
- package/dist/simple-viewer.es.js +8473 -11
- package/package.json +26 -18
- package/dist/BrightnessContrastShader-B9tNAd_c.js +0 -49
- package/dist/CopyShader-DVL8Bcar.js +0 -41
- package/dist/EffectComposer-BdHnHszK.js +0 -188
- package/dist/EffectComposer-D2IQ0sek.cjs +0 -1
- package/dist/HueSaturationShader-B6tnz2ga.js +0 -60
- package/dist/OutputPass-Dy4KNHYF.cjs +0 -72
- package/dist/OutputPass-Tt8WbC_B.js +0 -125
- package/dist/Pass-C1mreNp8.cjs +0 -1
- package/dist/Pass-DOcH4lwV.js +0 -88
- package/dist/RenderPass-B57TYmjs.js +0 -37
- package/dist/RenderPass-BVzyKWsC.cjs +0 -1
- package/dist/ShaderPass-BQRqK8zp.cjs +0 -1
- package/dist/ShaderPass-C2HX8lsT.js +0 -45
- package/dist/ThreePathTracingService-CK3zD4Qj.js +0 -6383
- package/dist/UnrealBloomPass-Kx7djcld.cjs +0 -115
- package/dist/UnrealBloomPass-rjyQu37v.js +0 -281
- package/dist/VignetteShader-BG_QwoTp.js +0 -45
- package/dist/index-BWjJNKzq.js +0 -13030
- 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
|
-
|
|
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/
|
|
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
|
-
|
|
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
|
[](https://www.npmjs.com/package/softbox)
|
|
12
|
-
[](https://bundlephobia.com/package/softbox)
|
|
14
|
+
[](https://bundlephobia.com/package/softbox)
|
|
14
15
|
[](https://github.com/LEMing/softbox/actions/workflows/ci.yml)
|
|
15
16
|
[](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
|
|
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
|
[](https://leming.github.io/softbox/)
|
|
28
29
|
|
package/dist/{BrightnessContrastShader-BN6FBcLV.cjs → BrightnessContrastShader-C1jbh-NA.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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=
|
|
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 };
|