softbox 4.4.2 → 4.6.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 +12 -3
- package/dist/{ThreePathTracingService-BroJh4xX.cjs → ThreePathTracingService-DdrIay3N.cjs} +68 -68
- package/dist/{ThreePathTracingService-CxJy-I2s.js → ThreePathTracingService-DlCiqA08.js} +329 -327
- package/dist/index-BA_1qZxy.cjs +11 -0
- package/dist/{index-C3wD-bda.js → index-DoB8YjQ9.js} +1556 -1459
- package/dist/index.d.cts +15 -3
- package/dist/index.d.ts +15 -3
- package/dist/simple-viewer.cjs +1 -1
- package/dist/simple-viewer.es.js +1 -1
- package/package.json +1 -1
- package/dist/index-B_YjoRyg.cjs +0 -11
package/README.md
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
# softbox
|
|
2
2
|
|
|
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
|
|
5
|
+
re-export entry). Refresh the numbers from our own build after a release
|
|
6
|
+
that changes the bundle:
|
|
7
|
+
npm run build && for f in dist/index-*.js dist/ThreePathTracingService-*.js; do
|
|
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),
|
|
10
|
+
ThreePathTracingService-* = the lazy path-tracer chunk. -->
|
|
3
11
|
[](https://www.npmjs.com/package/softbox)
|
|
4
|
-
[](https://bundlephobia.com/package/softbox)
|
|
13
|
+
[](https://bundlephobia.com/package/softbox)
|
|
5
14
|
[](https://github.com/LEMing/softbox/actions/workflows/ci.yml)
|
|
6
15
|
[](https://github.com/LEMing/softbox/blob/main/LICENSE)
|
|
7
16
|
|
|
@@ -109,7 +118,7 @@ Turntable and animations compose — a spinning, walking robot is two words.
|
|
|
109
118
|
<SimpleViewer object={url} pathTraced />
|
|
110
119
|
```
|
|
111
120
|
|
|
112
|
-
`pathTraced` turns on progressive path tracing
|
|
121
|
+
`pathTraced` turns on interactive progressive path tracing: the frame converges whenever the camera rests, and orbiting shows plain raster frames until the camera settles again — then a fresh accumulation starts from the new viewpoint. It works with every preset, including the default procedural studio. Capture a PNG programmatically — in raster mode at any resolution, in path-traced mode once the accumulation completes:
|
|
113
122
|
|
|
114
123
|
```tsx
|
|
115
124
|
const handle = viewerRef.current;
|
|
@@ -264,7 +273,7 @@ Interactive orientation cube: click to snap the camera to axis views, synchroniz
|
|
|
264
273
|
|
|
265
274
|
### Path tracing options
|
|
266
275
|
|
|
267
|
-
`pathTracing`: `enabled`, `maxSamples` (completion cap), `bounces`, `transmissiveBounces`, `renderScale`, `lowResScale`, `dynamicLowRes`.
|
|
276
|
+
`pathTracing`: `enabled`, `maxSamples` (completion cap), `bounces`, `transmissiveBounces`, `renderScale`, `lowResScale`, `dynamicLowRes`. The converged frame stays on the live canvas and re-accumulates on camera moves; `replaceWithScreenshotOnComplete: true` (off by default) restores the legacy behavior of swapping in a DOM snapshot instead.
|
|
268
277
|
|
|
269
278
|
## Next.js / SSR
|
|
270
279
|
|