rayzee 11.1.1 → 11.2.1

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 (32) hide show
  1. package/README.md +24 -2
  2. package/dist/{ArchiveImporter-CFcggGqi.js → ArchiveImporter-D_x863yu.js} +882 -829
  3. package/dist/{BidirectionalIntegrator-DIPN8lJW.js → BidirectionalIntegrator-DmkxxEOR.js} +226 -226
  4. package/dist/{NeuralRetouch-Doo3a4vY.js → NeuralRetouch-Cr-otSW8.js} +2 -2
  5. package/dist/{NeuralSuperRes-B-rNIU_R.js → NeuralSuperRes-B7E3_M0t.js} +2 -2
  6. package/dist/{PathTracer-D_LmDeLh.js → PathTracer-D6nbknj5.js} +2958 -3000
  7. package/dist/{PhysicalSky-DYffGJ3O.js → PhysicalSky-Dq5VSiCQ.js} +1 -1
  8. package/dist/{RayzeeRenderer-DWx7D714.js → RayzeeRenderer-DbjqO6v-.js} +400 -361
  9. package/dist/SceneMetadata-D2Sh-0e-.js +110 -0
  10. package/dist/addons/archives.es.js +1 -1
  11. package/dist/addons/bidirectional.es.js +1 -1
  12. package/dist/addons/physical-sky.es.js +1 -1
  13. package/dist/addons/storage.es.js +1 -1
  14. package/dist/{identity-DrQsGT2o.js → identity-C1cLD1C0.js} +14 -4
  15. package/dist/{openStorage-DwcBRUj7.js → openStorage-Fe9BoS1_.js} +1 -1
  16. package/dist/rayzee-core.es.js +6 -6
  17. package/dist/rayzee.es.js +827 -827
  18. package/dist/rayzee.umd.js +95 -94
  19. package/dist/{sceneCachePolicy-Bk8sI5PZ.js → sceneCachePolicy-C4-4qwt6.js} +71 -29
  20. package/package.json +1 -1
  21. package/src/Processor/ArchiveImporter.js +130 -96
  22. package/src/Processor/ArchiveReader.js +46 -3
  23. package/src/Processor/AssetLoader.js +26 -1
  24. package/src/Processor/archiveFormats.js +35 -0
  25. package/src/RayzeeRenderer.js +42 -11
  26. package/src/Storage/identity.js +22 -1
  27. package/src/Storage/index.js +1 -1
  28. package/src/TSL/MaterialEvaluation.js +4 -3
  29. package/src/core.js +1 -1
  30. package/src/index.js +2 -2
  31. package/dist/archiveFormats-tnAoUL1j.js +0 -94
  32. /package/dist/{ToneMapGPU-CjU3osDd.js → ToneMapGPU-BOjpul7A.js} +0 -0
@@ -0,0 +1,110 @@
1
+ //#region src/Processor/archiveFormats.js
2
+ var e = Object.freeze({
3
+ zip: {
4
+ type: "archive",
5
+ name: "ZIP Archive"
6
+ },
7
+ gz: {
8
+ type: "archive",
9
+ name: "Gzipped TAR Archive"
10
+ },
11
+ tgz: {
12
+ type: "archive",
13
+ name: "Gzipped TAR Archive"
14
+ },
15
+ tar: {
16
+ type: "archive",
17
+ name: "TAR Archive"
18
+ }
19
+ }), t = (e) => typeof Blob < "u" && e instanceof Blob, n = (e) => !!e && typeof e == "object" && !t(e) && e.files != null, r = (e) => e.startsWith(".") || e === "__MACOSX";
20
+ function i({ name: e = null, files: n }, { isModel: i = () => !1 } = {}) {
21
+ let a = /* @__PURE__ */ new Map();
22
+ for (let e of n) {
23
+ let n = t(e) ? e : e.file, i = t(e) ? e.webkitRelativePath || e.name : e.path, o = String(i ?? "").replace(/\\/g, "/").split("/").filter((e) => e && e !== ".").join("/");
24
+ !o || !n || o.split("/").some(r) || a.set(o, {
25
+ path: o,
26
+ file: n
27
+ });
28
+ }
29
+ let o = [...a.values()].sort((e, t) => e.path < t.path ? -1 : +(e.path > t.path)), s = o[0]?.path.split("/")[0], c = o.length > 0 && o.every((e) => e.path.startsWith(s + "/")) ? s : null;
30
+ return {
31
+ name: e ?? c ?? (o.find((e) => i(e.path)) ?? o[0])?.path.split("/").pop() ?? "Folder",
32
+ files: o,
33
+ flat: c === null && o.every((e) => !e.path.includes("/"))
34
+ };
35
+ }
36
+ //#endregion
37
+ //#region src/Processor/SceneMetadata.js
38
+ var a = [
39
+ "sourceFile",
40
+ "url",
41
+ "file"
42
+ ];
43
+ function o(e) {
44
+ if (typeof e == "string") try {
45
+ let t = JSON.parse(e);
46
+ return t && typeof t == "object" ? t : null;
47
+ } catch {
48
+ return null;
49
+ }
50
+ return e && typeof e == "object" ? e : null;
51
+ }
52
+ function s(e) {
53
+ let t = typeof e == "string" ? parseFloat(e) : e;
54
+ return Number.isFinite(t) ? t : void 0;
55
+ }
56
+ function c(e) {
57
+ let t = o(e);
58
+ if (!t) return null;
59
+ let n = (e) => e && (e.environment !== void 0 || e.render !== void 0), r = o(t.rayzee);
60
+ return n(r) ? r : n(t) ? t : null;
61
+ }
62
+ function l(e) {
63
+ let t = o(e);
64
+ if (!t) return null;
65
+ let n = a.map((e) => t[e]).find((e) => typeof e == "string" && e.trim());
66
+ if (!n) return null;
67
+ let r = s(t.rotation), i = s(t.intensity), c = { sourceFile: n.trim() };
68
+ return r !== void 0 && (c.rotation = r), i !== void 0 && (c.intensity = Math.max(0, i)), c;
69
+ }
70
+ var u = [
71
+ "maxBounces",
72
+ "samples",
73
+ "width",
74
+ "height"
75
+ ];
76
+ function d(e) {
77
+ let t = o(e);
78
+ if (!t) return null;
79
+ let n = {};
80
+ for (let e of u) {
81
+ let r = s(t[e]);
82
+ r !== void 0 && r > 0 && (n[e] = Math.round(r));
83
+ }
84
+ return Object.keys(n).length ? n : null;
85
+ }
86
+ function f(e) {
87
+ let t = c(e);
88
+ if (!t) return null;
89
+ let n = l(t.environment), r = d(t.render);
90
+ return !n && !r ? null : {
91
+ ...n ? { environment: n } : {},
92
+ ...r ? { render: r } : {}
93
+ };
94
+ }
95
+ function p(e) {
96
+ if (!e) return null;
97
+ let t = [
98
+ e.userData,
99
+ e.asset?.extras,
100
+ e.scene?.userData
101
+ ];
102
+ Array.isArray(e.scenes) && t.push(...e.scenes.map((e) => e?.userData));
103
+ for (let e of t) {
104
+ let t = f(e);
105
+ if (t) return t;
106
+ }
107
+ return null;
108
+ }
109
+ //#endregion
110
+ export { i as a, n as i, f as n, e as r, p as t };
@@ -1,3 +1,3 @@
1
1
  import { n as e, t } from "../ZipReader-gDSWr0I5.js";
2
- import { n, t as r } from "../ArchiveImporter-CFcggGqi.js";
2
+ import { n, t as r } from "../ArchiveImporter-D_x863yu.js";
3
3
  export { r as ARCHIVE_ELEMENT_PROMPT_BYTES, n as ArchiveImporter, t as openZip, e as readZipDirectory };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../BidirectionalIntegrator-DIPN8lJW.js";
1
+ import { t as e } from "../BidirectionalIntegrator-DmkxxEOR.js";
2
2
  export { e as BidirectionalIntegrator };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../PhysicalSky-DYffGJ3O.js";
1
+ import { t as e } from "../PhysicalSky-Dq5VSiCQ.js";
2
2
  export { e as PhysicalSky };
@@ -1,3 +1,3 @@
1
1
  import { i as e, r as t } from "../shared-BGBcSxBQ.js";
2
- import { a as n, c as r, i, l as a, n as o, o as s, r as c, s as l, t as u } from "../openStorage-DwcBRUj7.js";
2
+ import { a as n, c as r, i, l as a, n as o, o as s, r as c, s as l, t as u } from "../openStorage-Fe9BoS1_.js";
3
3
  export { t as ENGINE_AREAS, c as EntryWriter, e as STORAGE_KIND, i as StorageArea, n as StorageEntry, s as StorageManager, r as acquireLock, u as acquireSharedStorage, a as heldLockNames, l as openInlineStorage, o as openStorage };
@@ -29,11 +29,21 @@ async function l(e) {
29
29
  sample: await c(e)
30
30
  };
31
31
  }
32
- function u(e) {
33
- return `file:${e.name}|${e.size}|${e.lastModified}|${e.sample}`;
32
+ async function u(e) {
33
+ let t = 0, n = 0, r = e.files.map(({ path: e, file: r }) => (t += r.size, n = Math.max(n, r.lastModified ?? 0), `${e}|${r.size}|${r.lastModified ?? 0}`));
34
+ return {
35
+ name: e.name,
36
+ size: t,
37
+ lastModified: n,
38
+ sample: await o(r.join("\n")),
39
+ files: e.files.length
40
+ };
41
+ }
42
+ function d(e) {
43
+ return `${e.files === void 0 ? "file" : "folder"}:${e.name}|${e.size}|${e.lastModified}|${e.sample}`;
34
44
  }
35
- function d(e, t) {
45
+ function f(e, t) {
36
46
  return !!e && !!t && e.size === t.size && e.sample === t.sample && e.name === t.name;
37
47
  }
38
48
  //#endregion
39
- export { c as a, d as i, l as n, u as r, s as t };
49
+ export { f as a, d as i, l as n, c as o, u as r, s as t };
@@ -1,6 +1,6 @@
1
1
  import { n as e } from "./EngineIssues-CIZnXHsF.js";
2
2
  import { i as t, r as n, t as r } from "./shared-BGBcSxBQ.js";
3
- import { t as i } from "./identity-DrQsGT2o.js";
3
+ import { t as i } from "./identity-C1cLD1C0.js";
4
4
  //#region src/Storage/locks.js
5
5
  var a = /* @__PURE__ */ new Map();
6
6
  function o(e, t) {
@@ -1,12 +1,12 @@
1
1
  import "./SolarLimb-CPaeZVwz.js";
2
- import { a as e, n as t, o as n, r, t as i } from "./RayzeeRenderer-DWx7D714.js";
3
- import { Et as a, It as o, Ot as s, ht as c, mt as l, ut as u } from "./PathTracer-D_LmDeLh.js";
4
- import { n as d, t as f } from "./EngineEvents-Ci8dVWCP.js";
5
- import { r as p } from "./sceneCachePolicy-Bk8sI5PZ.js";
2
+ import { a as e, n as t, o as n, r, t as i } from "./RayzeeRenderer-DbjqO6v-.js";
3
+ import { Mt as a, St as o, ut as s, wt as c } from "./PathTracer-D6nbknj5.js";
4
+ import { n as l, t as u } from "./EngineEvents-Ci8dVWCP.js";
5
+ import { _ as d, r as f, y as p } from "./sceneCachePolicy-C4-4qwt6.js";
6
6
  import { i as m, n as h, r as g, t as _ } from "./Logger-dDDGj9Av.js";
7
7
  import { s as v } from "./BufferLayout-D_IBo2ci.js";
8
8
  import { i as y, n as b, r as x, t as S } from "./EngineIssues-CIZnXHsF.js";
9
9
  import { n as C, t as w } from "./AssetConfig-DSEntE65.js";
10
10
  import { d as T, p as E, t as D, u as O } from "./ViewTransforms-CYN7bq2w.js";
11
- import { t as k } from "./archiveFormats-tnAoUL1j.js";
12
- export { k as ARCHIVE_FORMATS, D as DEFAULT_VIEW, a as ENGINE_DEFAULTS, f as EngineEvents, S as EngineIssueError, b as ISSUE_CODES, x as ISSUE_SEVERITY, y as IssueLog, d as LEGACY_EVENT_NAMES, _ as LOG_LEVELS, r as LightManager, h as Logger, s as MATERIAL_DEFAULTS, o as MAX_RESERVABLE_RENDER_SIZE, i as RayzeeRenderer, e as RenderSettings, n as SETTING_SOURCE, u as SKY_DEFAULTS, v as TRIANGLE_DATA_LAYOUT, p as VERSION, w as configureAssets, l as configurePlatform, g as createLogger, t as describeAdapter, m as fmt, C as getAssetConfig, c as getPlatform, O as getViewTransform, T as listViewTransforms, E as onRegistryChange };
11
+ import { a as k, r as A } from "./SceneMetadata-D2Sh-0e-.js";
12
+ export { A as ARCHIVE_FORMATS, D as DEFAULT_VIEW, o as ENGINE_DEFAULTS, u as EngineEvents, S as EngineIssueError, b as ISSUE_CODES, x as ISSUE_SEVERITY, y as IssueLog, l as LEGACY_EVENT_NAMES, _ as LOG_LEVELS, r as LightManager, h as Logger, c as MATERIAL_DEFAULTS, a as MAX_RESERVABLE_RENDER_SIZE, i as RayzeeRenderer, e as RenderSettings, n as SETTING_SOURCE, s as SKY_DEFAULTS, v as TRIANGLE_DATA_LAYOUT, f as VERSION, w as configureAssets, d as configurePlatform, g as createLogger, t as describeAdapter, m as fmt, C as getAssetConfig, p as getPlatform, O as getViewTransform, T as listViewTransforms, k as localFolder, E as onRegistryChange };