rayzee 11.13.0 → 11.14.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 (59) hide show
  1. package/README.md +59 -4
  2. package/dist/{ArchiveImporter-DQU55mit.js → ArchiveImporter-DBMmDG98.js} +97 -92
  3. package/dist/{BidirectionalIntegrator-CLmFjSN3.js → BidirectionalIntegrator-D6rcU7N1.js} +199 -198
  4. package/dist/{ColorManagement-3xw0xXRg.js → ColorManagement-D9eYhssc.js} +1083 -547
  5. package/dist/DepthPass-D4Zh108s.js +68 -0
  6. package/dist/{EngineIssues-CfJiBaNj.js → EngineIssues-B14FGIHX.js} +1 -0
  7. package/dist/{NeuralRetouch-CEkBhI1M.js → NeuralRetouch-Cyh0AwUT.js} +3 -3
  8. package/dist/{NeuralSuperRes-Drjws9nE.js → NeuralSuperRes-BPp05Ipu.js} +3 -3
  9. package/dist/{SolarLimb-ZYl-Pwl0.js → PackedRayBuffer-BtJJxs43.js} +3 -7
  10. package/dist/{PathTracer-7a7L3cGF.js → PathTracer-BLV2bVqi.js} +3372 -4160
  11. package/dist/{PhysicalSky-DUIbTE93.js → PhysicalSky-VonV_lAD.js} +46 -45
  12. package/dist/{RayzeeRenderer-CjjGT2e0.js → RayzeeRenderer-D1NeGoVA.js} +787 -453
  13. package/dist/{SceneMetadata-CoAHTAmo.js → SceneMetadata-BBx6k2EY.js} +1 -1
  14. package/dist/SolarLimb-DSig_M0f.js +8 -0
  15. package/dist/TextureBuckets-CcSAhgVc.js +308 -0
  16. package/dist/TextureSampling-C4Sg4Yw_.js +901 -0
  17. package/dist/{ToneMapGPU-4GPwoG_c.js → ToneMapGPU-l_79riZd.js} +21 -11
  18. package/dist/addons/archives.es.js +2 -2
  19. package/dist/addons/bidirectional.es.js +1 -1
  20. package/dist/addons/color.es.js +3 -3
  21. package/dist/addons/formats.es.js +1 -1
  22. package/dist/addons/physical-sky.es.js +1 -1
  23. package/dist/addons/storage.es.js +2 -2
  24. package/dist/encoders.es.js +942 -0
  25. package/dist/{openStorage-CdyVjmps.js → openStorage-D6DBv9_I.js} +3 -3
  26. package/dist/rayzee-core.es.js +12 -11
  27. package/dist/rayzee.es.js +179 -176
  28. package/dist/rayzee.umd.js +149 -107
  29. package/dist/{sceneCachePolicy-DavHt6Ii.js → sceneCachePolicy-DcEWCTKO.js} +179 -485
  30. package/package.json +4 -1
  31. package/src/Color/BakedViews.js +5 -1
  32. package/src/Color/BasicColor.js +7 -0
  33. package/src/Color/ColorManagement.js +64 -42
  34. package/src/Color/Displays.js +35 -0
  35. package/src/Color/LutBake.js +163 -9
  36. package/src/Color/OcioViews.js +508 -55
  37. package/src/EngineIssues.js +1 -0
  38. package/src/Processor/ImageEncoders.js +1306 -0
  39. package/src/Processor/SceneProcessor.js +1 -1
  40. package/src/Processor/TextureCreator.js +154 -48
  41. package/src/Processor/ToneMapCPU.js +35 -9
  42. package/src/Processor/ToneMapGPU.js +52 -6
  43. package/src/Processor/Workers/TexturesWorker.js +10 -13
  44. package/src/RayzeeRenderer.js +303 -36
  45. package/src/Stages/Compositor.js +112 -18
  46. package/src/Stages/PathTracer.js +22 -0
  47. package/src/Stages/PathTracerStage.js +63 -1
  48. package/src/Storage/SceneGraphCodec.js +17 -2
  49. package/src/TSL/DepthPass.js +146 -0
  50. package/src/managers/VideoRenderManager.js +6 -2
  51. /package/dist/{ActiveColor-YvuQq44O.js → ActiveColor-7CZdmrsz.js} +0 -0
  52. /package/dist/{AssetConfig-DSEntE65.js → AssetConfig-BY4jDfTH.js} +0 -0
  53. /package/dist/{BufferLayout-BROyMqO1.js → BufferLayout-SvkefbAs.js} +0 -0
  54. /package/dist/{FileFormats-sPGJeCRc.js → FileFormats-B_VqIVDq.js} +0 -0
  55. /package/dist/{ViewTransforms-CYN7bq2w.js → ViewTransforms-Crdom11t.js} +0 -0
  56. /package/dist/{WorkingMatrix-C6y233hT.js → WorkingMatrix-DWJV2JM2.js} +0 -0
  57. /package/dist/{ZipReader-gDSWr0I5.js → ZipReader-Bva4oiva.js} +0 -0
  58. /package/dist/{identity-C1cLD1C0.js → identity-CtOwEU7N.js} +0 -0
  59. /package/dist/{shared-BGBcSxBQ.js → shared-ubP8eJlr.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { x as e } from "./sceneCachePolicy-DavHt6Ii.js";
1
+ import { x as e } from "./sceneCachePolicy-DcEWCTKO.js";
2
2
  import { DataTexture as t, LoaderUtils as n, RGBAFormat as r, UnsignedByteType as i } from "three";
3
3
  //#region src/Processor/archiveFormats.js
4
4
  var a = Object.freeze({
@@ -0,0 +1,8 @@
1
+ //#region src/Processor/SolarLimb.js
2
+ var e = [
3
+ 610,
4
+ 550,
5
+ 465
6
+ ].map((e) => -.023 + .292 / (e / 1e3));
7
+ //#endregion
8
+ export { e as t };
@@ -0,0 +1,308 @@
1
+ //#region src/EngineDefaults.js
2
+ var e = r({
3
+ maxBounces: 3,
4
+ transmissiveBounces: 5,
5
+ maxSubsurfaceSteps: 8,
6
+ maxTransparentBounces: 32,
7
+ integrator: "path",
8
+ shadowRays: "two",
9
+ samplingTechnique: 2,
10
+ enableEmissiveTriangleSampling: !1,
11
+ emissiveBoost: 1,
12
+ enableAlphaShadows: !1,
13
+ fireflyThreshold: 3,
14
+ shadowTerminatorOffset: .1,
15
+ globalIlluminationIntensity: 1,
16
+ wavefrontSortMaterials: !0,
17
+ maxSamples: 60,
18
+ renderLimitMode: "frames",
19
+ renderTimeLimit: 30,
20
+ renderMode: 0,
21
+ useAdaptiveSampling: !0,
22
+ noiseThreshold: .1,
23
+ adaptiveMinSamples: 8,
24
+ adaptiveStopFraction: .9,
25
+ usePixelFreeze: !0,
26
+ pixelFreezeThreshold: .02,
27
+ pixelFreezeStability: 8,
28
+ convergenceOverlay: !1,
29
+ interactionModeEnabled: !0,
30
+ exposure: 1,
31
+ saturation: 1,
32
+ transparentBackground: !1,
33
+ backgroundColor: "#000000",
34
+ enableEnvironment: !0,
35
+ environmentIntensity: 1,
36
+ environmentRotation: 0,
37
+ showBackground: !0,
38
+ backgroundIntensity: 1,
39
+ backgroundBlurriness: 0,
40
+ backgroundBlurSamples: 8,
41
+ groundProjectionEnabled: !1,
42
+ groundProjectionRadius: 100,
43
+ groundProjectionHeight: 15,
44
+ groundProjectionLevel: 0,
45
+ enableGroundCatcher: !1,
46
+ groundCatcherHeight: 0,
47
+ cameraProjection: "perspective",
48
+ panoramaLonRange: [-180, 180],
49
+ panoramaLatRange: [-90, 90],
50
+ panoramaLevelHorizon: !0,
51
+ enableDOF: !1,
52
+ dofMode: "look",
53
+ dofBlur: .05,
54
+ focusDistance: .8,
55
+ aperture: 5.6,
56
+ focalLength: 50,
57
+ apertureScale: 1,
58
+ anamorphicRatio: 1,
59
+ unitsPerMetre: 1,
60
+ maxTextureSize: 4096,
61
+ areaLightIntensityScale: .1,
62
+ visMode: 0,
63
+ debugVisScale: 100
64
+ }), t = Object.freeze({
65
+ perspective: 0,
66
+ equirectangular: 1,
67
+ orthographic: 2
68
+ }), n = r({
69
+ color: [
70
+ 1,
71
+ 1,
72
+ 1
73
+ ],
74
+ emissive: [
75
+ 0,
76
+ 0,
77
+ 0
78
+ ],
79
+ emissiveIntensity: 1,
80
+ roughness: 1,
81
+ metalness: 0,
82
+ ior: 1.5,
83
+ opacity: 1,
84
+ transmission: 0,
85
+ thickness: 0,
86
+ attenuationColor: [
87
+ 1,
88
+ 1,
89
+ 1
90
+ ],
91
+ attenuationDistance: Infinity,
92
+ dispersion: 0,
93
+ sheen: 0,
94
+ sheenRoughness: 1,
95
+ sheenColor: [
96
+ 0,
97
+ 0,
98
+ 0
99
+ ],
100
+ specularIntensity: 1,
101
+ specularColor: [
102
+ 1,
103
+ 1,
104
+ 1
105
+ ],
106
+ clearcoat: 0,
107
+ clearcoatRoughness: 0,
108
+ clearcoatNormalScale: [1, 1],
109
+ iridescence: 0,
110
+ iridescenceIOR: 1.3,
111
+ iridescenceThicknessRange: [100, 400],
112
+ normalScale: [1, 1],
113
+ bumpScale: 1,
114
+ displacementScale: 1,
115
+ displacementBias: 0,
116
+ transparent: 0,
117
+ alphaTest: 0,
118
+ alphaMode: 0,
119
+ side: 0,
120
+ depthWrite: 1,
121
+ subsurface: 0,
122
+ subsurfaceColor: [
123
+ 1,
124
+ 1,
125
+ 1
126
+ ],
127
+ subsurfaceRadius: [
128
+ 1,
129
+ .2,
130
+ .1
131
+ ],
132
+ subsurfaceRadiusScale: 1,
133
+ subsurfaceAnisotropy: 0,
134
+ anisotropy: 0,
135
+ anisotropyRotation: 0,
136
+ diffuseTransmission: 0,
137
+ diffuseTransmissionColor: [
138
+ 1,
139
+ 1,
140
+ 1
141
+ ],
142
+ diffuseRoughness: 0
143
+ });
144
+ function r(e) {
145
+ for (let t of Object.values(e)) typeof t == "object" && Object.freeze(t);
146
+ return Object.freeze(e);
147
+ }
148
+ var i = {
149
+ maxSamples: 30,
150
+ bounces: 20,
151
+ transmissiveBounces: 24,
152
+ maxSubsurfaceSteps: 64,
153
+ renderMode: 1,
154
+ enableAlphaShadows: !0,
155
+ enableOIDN: !0,
156
+ oidnQuality: "high",
157
+ interactionModeEnabled: !1,
158
+ useAdaptiveSampling: !0,
159
+ noiseThreshold: .02,
160
+ adaptiveStopFraction: .94,
161
+ usePixelFreeze: !0
162
+ }, a = {
163
+ maxSamples: e.maxSamples,
164
+ bounces: e.maxBounces,
165
+ renderMode: e.renderMode,
166
+ enableAlphaShadows: e.enableAlphaShadows,
167
+ transmissiveBounces: 12,
168
+ maxSubsurfaceSteps: e.maxSubsurfaceSteps,
169
+ enableOIDN: !0,
170
+ oidnQuality: "fast",
171
+ interactionModeEnabled: !0,
172
+ useAdaptiveSampling: !0,
173
+ noiseThreshold: .1,
174
+ usePixelFreeze: !0
175
+ };
176
+ function o(t) {
177
+ return {
178
+ maxSamples: t.maxSamples,
179
+ maxBounces: t.bounces,
180
+ transmissiveBounces: t.transmissiveBounces,
181
+ maxSubsurfaceSteps: t.maxSubsurfaceSteps,
182
+ enableAlphaShadows: t.enableAlphaShadows ?? !1,
183
+ useAdaptiveSampling: t.useAdaptiveSampling ?? !1,
184
+ noiseThreshold: t.noiseThreshold ?? e.noiseThreshold,
185
+ adaptiveStopFraction: t.adaptiveStopFraction ?? e.adaptiveStopFraction,
186
+ adaptiveMinSamples: t.adaptiveMinSamples ?? e.adaptiveMinSamples,
187
+ usePixelFreeze: t.usePixelFreeze ?? !1,
188
+ pixelFreezeThreshold: t.pixelFreezeThreshold ?? e.pixelFreezeThreshold,
189
+ pixelFreezeStability: t.pixelFreezeStability ?? e.pixelFreezeStability,
190
+ interactionModeEnabled: t.interactionModeEnabled ?? e.interactionModeEnabled
191
+ };
192
+ }
193
+ //#endregion
194
+ //#region src/Processor/TextureBuckets.js
195
+ var s = {
196
+ VEC4_PER_BVH_NODE: 4,
197
+ FLOATS_PER_VEC4: 4,
198
+ MIN_TEXTURE_WIDTH: 4,
199
+ MAX_CONCURRENT_WORKERS: Math.min(typeof navigator < "u" && navigator.hardwareConcurrency || 4, 6),
200
+ BUFFER_POOL_SIZE: 20,
201
+ CANVAS_POOL_SIZE: 12,
202
+ CACHE_SIZE_LIMIT: 50,
203
+ MAX_TEXTURE_SIZE: 8192,
204
+ DEFAULT_MAX_TEXTURE_SIZE: 4096,
205
+ MAX_TEXTURES_LIMIT: 4 * 256,
206
+ MATERIAL_BUCKET_COUNT: 4,
207
+ BUCKET_LAYER_STRIDE: 256
208
+ }, c = 64;
209
+ function l(e, t) {
210
+ let n = Math.ceil(Math.max(1, e) / c) * c;
211
+ return Math.min(t, Math.max(s.MIN_TEXTURE_WIDTH, n));
212
+ }
213
+ function u(e) {
214
+ let t = 0, n = 0, r = 0;
215
+ for (let i of e) t = Math.max(t, i.width), n = Math.max(n, i.height), r += i.count;
216
+ return {
217
+ units: e,
218
+ width: t,
219
+ height: n,
220
+ count: r
221
+ };
222
+ }
223
+ function d(e, t) {
224
+ return l(e.width, t) * e.height * e.count * 4;
225
+ }
226
+ function f(e, t) {
227
+ return e.reduce((e, n) => e + d(n, t), 0);
228
+ }
229
+ function p(e, t, n) {
230
+ let r = e.slice();
231
+ for (; r.length > t;) {
232
+ let e = null;
233
+ for (let t = 0; t < r.length; t++) for (let i = t + 1; i < r.length; i++) {
234
+ let a = u(r[t].units.concat(r[i].units)), o = d(a, n) - d(r[t], n) - d(r[i], n);
235
+ (!e || o < e.delta) && (e = {
236
+ i: t,
237
+ j: i,
238
+ delta: o,
239
+ fused: a
240
+ });
241
+ }
242
+ r = r.filter((t, n) => n !== e.i && n !== e.j).concat([e.fused]);
243
+ }
244
+ return r;
245
+ }
246
+ function m(e, t, n) {
247
+ let r = [];
248
+ for (let e = t - 1; e >= 0; e--) r.push(Math.max(s.MIN_TEXTURE_WIDTH, Math.round(n / 2 ** e)));
249
+ let i = r.map(() => []);
250
+ for (let t of e) {
251
+ let e = 2 ** Math.ceil(Math.log2(Math.max(t.width, t.height))), n = r.findIndex((t) => e <= t);
252
+ n < 0 && (n = r.length - 1), i[n].push(t);
253
+ }
254
+ return i.filter((e) => e.length).map(u);
255
+ }
256
+ function h(e, t) {
257
+ let n = e;
258
+ for (let e = 0; e < 8; e++) {
259
+ let e = !1;
260
+ for (let r of n.flatMap((e) => e.units)) {
261
+ let i = n.findIndex((e) => e.units.includes(r));
262
+ if (!(i < 0)) for (let a = 0; a < n.length; a++) {
263
+ if (a === i) continue;
264
+ let o = [];
265
+ for (let e = 0; e < n.length; e++) if (e === i) {
266
+ let t = n[e].units.filter((e) => e !== r);
267
+ t.length && o.push(u(t));
268
+ } else e === a ? o.push(u(n[e].units.concat([r]))) : o.push(n[e]);
269
+ if (f(o, t) < f(n, t)) {
270
+ n = o, e = !0;
271
+ break;
272
+ }
273
+ }
274
+ }
275
+ if (!e) break;
276
+ }
277
+ return n;
278
+ }
279
+ function g(e, t, n = s.MATERIAL_BUCKET_COUNT) {
280
+ let r = /* @__PURE__ */ new Map();
281
+ for (let { width: n, height: i } of e) {
282
+ let e = Math.min(t, Math.max(1, n || 1)), a = Math.min(t, Math.max(1, i || 1)), o = `${e}x${a}`, s = r.get(o);
283
+ s ? s.count++ : r.set(o, {
284
+ width: e,
285
+ height: a,
286
+ count: 1
287
+ });
288
+ }
289
+ let i = [...r.values()], a = i.map((e) => u([e]));
290
+ if (a.length > n) {
291
+ let e = m(i, n, t), r = p(a, n, t);
292
+ a = f(e, t) < f(r, t) ? e : r, a = h(a, t);
293
+ }
294
+ return a.map((e) => ({
295
+ width: l(e.width, t),
296
+ height: e.height
297
+ })).sort((e, t) => e.width * e.height - t.width * t.height);
298
+ }
299
+ function _(e, t, n) {
300
+ let r = Math.max(1, e || 1), i = Math.max(1, t || 1);
301
+ for (let e = 0; e < n.length; e++) if (n[e].width >= r && n[e].height >= i) return e;
302
+ return Math.max(0, n.length - 1);
303
+ }
304
+ function v(e, t) {
305
+ return e * s.BUCKET_LAYER_STRIDE + t;
306
+ }
307
+ //#endregion
308
+ export { g as a, a as c, o as d, v as i, n as l, l as n, t as o, _ as r, e as s, s as t, i as u };