oda-engine 0.0.0-stage → 0.1.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 (204) hide show
  1. package/README.md +151 -2
  2. package/bin/nowhere.mjs +352 -0
  3. package/lib/account.mjs +57 -0
  4. package/lib/agentModules.mjs +57 -0
  5. package/lib/devServer.mjs +351 -0
  6. package/lib/headless.mjs +231 -0
  7. package/lib/headlessPreview.mjs +212 -0
  8. package/lib/keys.mjs +517 -0
  9. package/lib/make.mjs +855 -0
  10. package/lib/mcp.mjs +537 -0
  11. package/lib/open.mjs +22 -0
  12. package/lib/preview.mjs +87 -0
  13. package/lib/previewRpc.mjs +134 -0
  14. package/lib/project.mjs +359 -0
  15. package/lib/publishFlow.mjs +131 -0
  16. package/lib/resources.mjs +50 -0
  17. package/lib/rules.mjs +60 -0
  18. package/lib/scaffold.mjs +42 -0
  19. package/lib/setup.mjs +59 -0
  20. package/lib/tools.mjs +668 -0
  21. package/package.json +51 -4
  22. package/template/game.config.json +9 -0
  23. package/template/scene.json +4 -0
  24. package/template/src/main.ts +11 -0
  25. package/vendor/DOCS.md +447 -0
  26. package/vendor/agent/appRun.mjs +520 -0
  27. package/vendor/agent/assets/brief.mjs +242 -0
  28. package/vendor/agent/assets/collider.mjs +531 -0
  29. package/vendor/agent/assets/environments/index.mjs +12 -0
  30. package/vendor/agent/assets/environments/worldlabs.mjs +161 -0
  31. package/vendor/agent/assets/fetch.mjs +168 -0
  32. package/vendor/agent/assets/footprint.mjs +13 -0
  33. package/vendor/agent/assets/gltf.mjs +547 -0
  34. package/vendor/agent/assets/hdr.mjs +269 -0
  35. package/vendor/agent/assets/imageOps.mjs +171 -0
  36. package/vendor/agent/assets/images/codex.mjs +307 -0
  37. package/vendor/agent/assets/images/fal.mjs +75 -0
  38. package/vendor/agent/assets/images/gemini.mjs +84 -0
  39. package/vendor/agent/assets/images/index.mjs +25 -0
  40. package/vendor/agent/assets/images/openai.mjs +75 -0
  41. package/vendor/agent/assets/images/stability.mjs +71 -0
  42. package/vendor/agent/assets/images/views.mjs +31 -0
  43. package/vendor/agent/assets/import.mjs +1352 -0
  44. package/vendor/agent/assets/inspect.mjs +465 -0
  45. package/vendor/agent/assets/jobs.mjs +196 -0
  46. package/vendor/agent/assets/ktx2.mjs +290 -0
  47. package/vendor/agent/assets/ledger.mjs +466 -0
  48. package/vendor/agent/assets/net.mjs +254 -0
  49. package/vendor/agent/assets/prices.json +39 -0
  50. package/vendor/agent/assets/providers/fal.mjs +115 -0
  51. package/vendor/agent/assets/providers/index.mjs +22 -0
  52. package/vendor/agent/assets/providers/meshy.mjs +119 -0
  53. package/vendor/agent/assets/providers/tripo.mjs +188 -0
  54. package/vendor/agent/assets/sources/ambientcg.mjs +129 -0
  55. package/vendor/agent/assets/sources/index.mjs +23 -0
  56. package/vendor/agent/assets/sources/polyhaven.mjs +237 -0
  57. package/vendor/agent/assets/sources/polypizza.mjs +121 -0
  58. package/vendor/agent/assets/splat.mjs +631 -0
  59. package/vendor/agent/assets/targets.mjs +122 -0
  60. package/vendor/agent/assets/tile.mjs +261 -0
  61. package/vendor/agent/assets/unzip.mjs +180 -0
  62. package/vendor/agent/blender/cleanup.py +360 -0
  63. package/vendor/agent/blender/convert.py +167 -0
  64. package/vendor/agent/blender/find.mjs +192 -0
  65. package/vendor/agent/blender/nw_export.py +104 -0
  66. package/vendor/agent/blender/nw_rubric.py +426 -0
  67. package/vendor/agent/blender/run.mjs +193 -0
  68. package/vendor/agent/blender/runner.py +252 -0
  69. package/vendor/agent/blender/sheet.py +743 -0
  70. package/vendor/agent/depth.mjs +134 -0
  71. package/vendor/agent/director/board.mjs +451 -0
  72. package/vendor/agent/director/contracts.mjs +663 -0
  73. package/vendor/agent/director/director.mjs +2365 -0
  74. package/vendor/agent/director/estimate.mjs +200 -0
  75. package/vendor/agent/director/gate.mjs +802 -0
  76. package/vendor/agent/director/limits.json +16 -0
  77. package/vendor/agent/director/methods.mjs +457 -0
  78. package/vendor/agent/director/policy.json +33 -0
  79. package/vendor/agent/director/prompts.mjs +244 -0
  80. package/vendor/agent/director/reading.mjs +341 -0
  81. package/vendor/agent/director/router.mjs +184 -0
  82. package/vendor/agent/director/seams.mjs +243 -0
  83. package/vendor/agent/director/session.mjs +643 -0
  84. package/vendor/agent/director/store.mjs +119 -0
  85. package/vendor/agent/director/taskGate.mjs +110 -0
  86. package/vendor/agent/director/teamLedger.mjs +118 -0
  87. package/vendor/agent/director/triage.mjs +63 -0
  88. package/vendor/agent/downloads.cjs +363 -0
  89. package/vendor/agent/flow.mjs +78 -0
  90. package/vendor/agent/guard.mjs +613 -0
  91. package/vendor/agent/host.mjs +1736 -0
  92. package/vendor/agent/language.mjs +58 -0
  93. package/vendor/agent/ledger.mjs +360 -0
  94. package/vendor/agent/locale.cjs +186 -0
  95. package/vendor/agent/loop/capacity.mjs +74 -0
  96. package/vendor/agent/loop/compose.mjs +127 -0
  97. package/vendor/agent/loop/gate.mjs +205 -0
  98. package/vendor/agent/loop/judge.mjs +189 -0
  99. package/vendor/agent/loop/levels.mjs +273 -0
  100. package/vendor/agent/loop/state.mjs +358 -0
  101. package/vendor/agent/notes.cjs +278 -0
  102. package/vendor/agent/pace.mjs +258 -0
  103. package/vendor/agent/panels.mjs +431 -0
  104. package/vendor/agent/prompt.mjs +342 -0
  105. package/vendor/agent/reference/board.mjs +410 -0
  106. package/vendor/agent/reference/compose.mjs +364 -0
  107. package/vendor/agent/reference/decode.mjs +56 -0
  108. package/vendor/agent/reference/facts.mjs +1874 -0
  109. package/vendor/agent/reference/png.mjs +107 -0
  110. package/vendor/agent/reference/records.mjs +63 -0
  111. package/vendor/agent/reference/web.mjs +252 -0
  112. package/vendor/agent/roles/artist.mjs +69 -0
  113. package/vendor/agent/roles/builder.mjs +79 -0
  114. package/vendor/agent/roles/checks.mjs +223 -0
  115. package/vendor/agent/roles/common.mjs +188 -0
  116. package/vendor/agent/roles/critic.mjs +171 -0
  117. package/vendor/agent/roles/index.mjs +39 -0
  118. package/vendor/agent/roles/modeller.mjs +142 -0
  119. package/vendor/agent/roles/qa.mjs +58 -0
  120. package/vendor/agent/roles/rubrics.mjs +79 -0
  121. package/vendor/agent/roles/sound.mjs +69 -0
  122. package/vendor/agent/rounds.cjs +333 -0
  123. package/vendor/agent/shared.mjs +284 -0
  124. package/vendor/agent/stopGate.mjs +574 -0
  125. package/vendor/agent/subagents.mjs +129 -0
  126. package/vendor/agent/tools/assets.mjs +499 -0
  127. package/vendor/agent/tools/blender.mjs +754 -0
  128. package/vendor/agent/tools/cards.mjs +479 -0
  129. package/vendor/agent/tools/choices.mjs +479 -0
  130. package/vendor/agent/tools/compose.mjs +74 -0
  131. package/vendor/agent/tools/environment.mjs +488 -0
  132. package/vendor/agent/tools/eyes.mjs +733 -0
  133. package/vendor/agent/tools/generate.mjs +338 -0
  134. package/vendor/agent/tools/guide.mjs +46 -0
  135. package/vendor/agent/tools/harness.mjs +193 -0
  136. package/vendor/agent/tools/image.mjs +643 -0
  137. package/vendor/agent/tools/index.mjs +162 -0
  138. package/vendor/agent/tools/look.mjs +578 -0
  139. package/vendor/agent/tools/loop.mjs +858 -0
  140. package/vendor/agent/tools/others.mjs +123 -0
  141. package/vendor/agent/tools/pictures.mjs +535 -0
  142. package/vendor/agent/tools/reference.mjs +366 -0
  143. package/vendor/agent/transcripts.mjs +118 -0
  144. package/vendor/agent-loop.mjs +602 -0
  145. package/vendor/agent-plugin/.claude-plugin/plugin.json +5 -0
  146. package/vendor/agent-plugin/skills/art-direction/SKILL.md +82 -0
  147. package/vendor/agent-plugin/skills/asset-legality/SKILL.md +101 -0
  148. package/vendor/agent-plugin/skills/asset-sources/SKILL.md +111 -0
  149. package/vendor/agent-plugin/skills/blender-modeling/SKILL.md +97 -0
  150. package/vendor/agent-plugin/skills/look-dev/SKILL.md +104 -0
  151. package/vendor/agent-plugin/skills/playtesting/SKILL.md +74 -0
  152. package/vendor/agent-plugin/skills/reference-loop/SKILL.md +102 -0
  153. package/vendor/agent-plugin/skills/sound-design/SKILL.md +60 -0
  154. package/vendor/agent-plugin/skills/style/SKILL.md +35 -0
  155. package/vendor/agent-plugin/skills/tsl-r185/SKILL.md +107 -0
  156. package/vendor/auth.cjs +570 -0
  157. package/vendor/build.cjs +953 -0
  158. package/vendor/catalog.json +455 -0
  159. package/vendor/connectors.cjs +688 -0
  160. package/vendor/eyes.mjs +733 -0
  161. package/vendor/gameExports.json +1390 -0
  162. package/vendor/git.cjs +222 -0
  163. package/vendor/models.json +57 -0
  164. package/vendor/publish.cjs +1018 -0
  165. package/vendor/refBoard.cjs +301 -0
  166. package/vendor/schema/dist/assets.d.ts +335 -0
  167. package/vendor/schema/dist/assets.js +439 -0
  168. package/vendor/schema/dist/brief.d.ts +357 -0
  169. package/vendor/schema/dist/brief.js +302 -0
  170. package/vendor/schema/dist/common.d.ts +9 -0
  171. package/vendor/schema/dist/common.js +13 -0
  172. package/vendor/schema/dist/config.d.ts +406 -0
  173. package/vendor/schema/dist/config.js +355 -0
  174. package/vendor/schema/dist/contract.d.ts +599 -0
  175. package/vendor/schema/dist/contract.js +1146 -0
  176. package/vendor/schema/dist/index.d.ts +14 -0
  177. package/vendor/schema/dist/index.js +21 -0
  178. package/vendor/schema/dist/look.d.ts +463 -0
  179. package/vendor/schema/dist/look.js +681 -0
  180. package/vendor/schema/dist/lookStats.d.ts +230 -0
  181. package/vendor/schema/dist/lookStats.js +768 -0
  182. package/vendor/schema/dist/pilot.d.ts +32 -0
  183. package/vendor/schema/dist/pilot.js +44 -0
  184. package/vendor/schema/dist/publish.d.ts +214 -0
  185. package/vendor/schema/dist/publish.js +291 -0
  186. package/vendor/schema/dist/scene.d.ts +75 -0
  187. package/vendor/schema/dist/scene.js +120 -0
  188. package/vendor/schema/dist/skyLight.d.ts +141 -0
  189. package/vendor/schema/dist/skyLight.js +436 -0
  190. package/vendor/schema/dist/style.d.ts +131 -0
  191. package/vendor/schema/dist/style.js +155 -0
  192. package/vendor/schema/package.json +1 -0
  193. package/vendor/selectionPrompt.mjs +51 -0
  194. package/vendor/useTools.mjs +195 -0
  195. package/vendor/userMessage.mjs +26 -0
  196. package/web-dist/assets/GaussianSplatUtils-CptQkDVX.js +1 -0
  197. package/web-dist/assets/KTX2Loader-C53LJqss.js +2 -0
  198. package/web-dist/assets/SPZLoader-BQ3tjaTv.js +1 -0
  199. package/web-dist/assets/gaussianSplat-_9tcWegB.js +1 -0
  200. package/web-dist/assets/index-Baka-ZO7.js +693 -0
  201. package/web-dist/assets/index-CcjyyQco.css +1 -0
  202. package/web-dist/assets/meshopt_decoder.module-BvwdjiD3.js +1 -0
  203. package/web-dist/assets/zstddec.module-CfFeQW7d.js +1 -0
  204. package/web-dist/index.html +34 -0
@@ -0,0 +1,120 @@
1
+ import { z } from 'zod';
2
+ // Objects the creator placed by hand: models dropped into the studio, moved
3
+ // with the gizmo, and written straight back here. This is the one document the
4
+ // viewport edits directly, so it stays flat and boring on purpose: the agent
5
+ // reads and writes the same file, and neither side needs the other's help.
6
+ const Vec3 = z.tuple([z.number(), z.number(), z.number()]);
7
+ /** Caps the schema enforces, exported so the studio can stay inside them
8
+ * rather than writing documents its own validator would reject. */
9
+ export const MAX_ID_LENGTH = 80;
10
+ export const MAX_OBJECTS = 2000;
11
+ /** What the studio does to a model's size on import (normalizeImport in the
12
+ * studio's loadModel.ts, which cannot import this package and keeps its own
13
+ * copy of the rule): a model whose largest side is over `max` or under `min`
14
+ * units is scaled to `target`, unless its placement says normalize: false.
15
+ * Written down here so the docs, the agent's tools and the checks name the
16
+ * same numbers. */
17
+ export const AUTO_SIZE = { target: 3, max: 12, min: 0.375 };
18
+ /** The group a placement falls into when scene.json names none: the id with
19
+ * the "-2", "-3" a collision suffix adds taken off, so oak, oak-2 and oak-3
20
+ * are one "oak" to the game's rules. An id that is nothing but a suffix keeps
21
+ * itself, since a kind cannot be empty. */
22
+ export function placementKind(id) {
23
+ return id.replace(/-\d+$/, '') || id;
24
+ }
25
+ export const Placement = z.object({
26
+ /** Unique in the scene, and the name the Objects panel shows. */
27
+ id: z.string().min(1).max(MAX_ID_LENGTH),
28
+ /** Project-relative path to the model, e.g. "assets/tree.glb". */
29
+ asset: z.string().min(1).max(400),
30
+ kind: z
31
+ .string()
32
+ .min(1)
33
+ .max(MAX_ID_LENGTH)
34
+ .optional()
35
+ .describe('What this object is to the game: world.placed("door") and onTouch("door") reach every placement whose kind is "door". Defaults to the id with a trailing -<number> removed (oak-2 becomes oak).'),
36
+ solid: z
37
+ .boolean()
38
+ .default(true)
39
+ .describe('Solid objects block the player and can be stood on; a non-solid one is walked through.'),
40
+ position: Vec3.default([0, 0, 0]),
41
+ /** Euler angles in radians, XYZ order. */
42
+ rotation: Vec3.default([0, 0, 0]),
43
+ scale: Vec3.default([1, 1, 1]),
44
+ normalize: z
45
+ .boolean()
46
+ .optional()
47
+ .describe('false keeps the model at its real size (one unit is one metre). Left out, the studio auto-sizes a model whose largest side is over 12 or under 0.375 units to 3 units. Either way it stands on y = 0, centred on its footprint.'),
48
+ });
49
+ export const SceneDoc = z.object({
50
+ schema: z.literal('nowhere/scene@1'),
51
+ objects: z.array(Placement).max(MAX_OBJECTS).default([]),
52
+ });
53
+ export const EMPTY_SCENE = { schema: 'nowhere/scene@1', objects: [] };
54
+ /** Validates a scene document, with findings that point into it. A project with
55
+ * no scene.json has an empty scene, which is not an error. */
56
+ export function validateScene(raw) {
57
+ if (raw === null || raw === undefined)
58
+ return { ok: true, scene: EMPTY_SCENE, findings: [] };
59
+ const parsed = SceneDoc.safeParse(raw);
60
+ if (parsed.success) {
61
+ // Duplicate ids would make selection and agent edits ambiguous.
62
+ const seen = new Set();
63
+ for (const o of parsed.data.objects) {
64
+ if (seen.has(o.id)) {
65
+ return {
66
+ ok: false,
67
+ scene: null,
68
+ findings: [{ path: `objects.${o.id}`, code: 'duplicate', message: `Two objects share the id "${o.id}".` }],
69
+ };
70
+ }
71
+ seen.add(o.id);
72
+ }
73
+ // One key order, whatever order the file had: the studio tells its own
74
+ // saves apart from other people's edits by comparing the document it wrote
75
+ // with the one the watcher reads back, string for string, and a legacy
76
+ // file that gains its kind here must come back the same way it went out.
77
+ const objects = parsed.data.objects.map((o) => ({
78
+ id: o.id,
79
+ asset: o.asset,
80
+ kind: o.kind ?? placementKind(o.id),
81
+ solid: o.solid,
82
+ position: o.position,
83
+ rotation: o.rotation,
84
+ scale: o.scale,
85
+ // Only false is kept: it is the one value that changes anything, and a
86
+ // document that never had the key must come back without it.
87
+ ...(o.normalize === false ? { normalize: false } : {}),
88
+ }));
89
+ return { ok: true, scene: { ...parsed.data, objects }, findings: [] };
90
+ }
91
+ return {
92
+ ok: false,
93
+ scene: null,
94
+ findings: parsed.error.issues.map((i) => ({
95
+ path: i.path.join('.') || 'scene.json',
96
+ code: i.code,
97
+ message: i.message,
98
+ })),
99
+ };
100
+ }
101
+ /** A free id derived from a file name: "Oak Tree.glb" -> "oak-tree", then
102
+ * "oak-tree-2" and so on. */
103
+ export function nextPlacementId(objects, base) {
104
+ const clean = base
105
+ .replace(/\.[a-z0-9]+$/i, '')
106
+ .toLowerCase()
107
+ .replace(/[^a-z0-9-_]+/g, '-')
108
+ .replace(/^-+|-+$/g, '')
109
+ // Leave room for the "-99" a collision adds: an id the schema rejects
110
+ // would be written to a file that then fails to load.
111
+ .slice(0, MAX_ID_LENGTH - 4) || 'object';
112
+ const taken = new Set(objects.map((o) => o.id));
113
+ if (!taken.has(clean))
114
+ return clean;
115
+ for (let n = 2;; n++) {
116
+ const candidate = `${clean}-${n}`;
117
+ if (!taken.has(candidate))
118
+ return candidate;
119
+ }
120
+ }
@@ -0,0 +1,141 @@
1
+ type V3 = [number, number, number];
2
+ /** A sky picture's floats: RGB or RGBA per pixel, row by row. half: the
3
+ * values are IEEE half floats as 16-bit integers (three's HalfFloatType).
4
+ * topRowFirst: row 0 is the top of the sky (a .hdr file, three's flipY). */
5
+ export interface SkyPixels {
6
+ width: number;
7
+ height: number;
8
+ data: ArrayLike<number>;
9
+ channels: 3 | 4;
10
+ half?: boolean;
11
+ topRowFirst: boolean;
12
+ }
13
+ export interface SkySun {
14
+ /** The way the sun's light travels, as lighting.sun.direction is written,
15
+ * in the picture's own frame (sky.rotation 0). */
16
+ direction: V3;
17
+ /** Degrees above the horizon. */
18
+ elevation: number;
19
+ /** Its irradiance on a surface facing it, in the picture's units: the
20
+ * lighting.sun.intensity that matches it when the sky lights at 1. */
21
+ intensity: number;
22
+ /** Its colour, brightest channel 1, as sRGB hex. */
23
+ color: string;
24
+ /** The luminance above which a pixel near the peak counts as sun. */
25
+ threshold: number;
26
+ /** Of the light the picture puts on level ground, the sun's share (0 to 1). */
27
+ share: number;
28
+ }
29
+ /** An IEEE half float (as its 16 bits) as a number. */
30
+ export declare function halfToFloat(bits: number): number;
31
+ /** The unit direction of a pixel's centre, in the picture's frame. */
32
+ export declare function skyPixelDirection(px: Pick<SkyPixels, 'width' | 'height' | 'topRowFirst'>, i: number, j: number): V3;
33
+ /** A direction in the picture's frame as the world sees it under sky.rotation
34
+ * (radians about +Y, as three's scene.environmentRotation turns it). */
35
+ export declare function skyToWorld(d: readonly number[], rotation?: number): V3;
36
+ /**
37
+ * The sun in a sky picture, or null when it has none: the pixels within
38
+ * SUN_RADIUS degrees of the brightest one that stand SUN_THRESHOLD times
39
+ * over the sky's median, their light above that line summed by the solid
40
+ * angle each pixel covers. That excess is what `clampSkySun` takes out of
41
+ * the picture, so the two agree to the pixel.
42
+ */
43
+ export declare function measureSkySun(px: SkyPixels): SkySun | null;
44
+ /**
45
+ * Takes the sun out of a sky picture's light, in place: every pixel within
46
+ * SUN_RADIUS degrees of it that stands over its threshold is brought down to
47
+ * it, keeping its hue. What is left is the sky's own light; the config's sun
48
+ * gives the rest, with its shadow. Returns how many pixels it changed.
49
+ */
50
+ export declare function clampSkySun(px: SkyPixels, sun: SkySun, write: (k: number, value: number) => void): number;
51
+ /**
52
+ * A Radiance .hdr file's pixels as linear RGB floats, top row first, or null
53
+ * when the bytes are not one: the header, then flat or run-length scanlines
54
+ * (the "new" encoding every current writer uses).
55
+ */
56
+ export declare function decodeRadiance(bytes: Uint8Array): {
57
+ width: number;
58
+ height: number;
59
+ data: Float32Array;
60
+ } | null;
61
+ /**
62
+ * How the config's sun stands against the sun measured in its HDRI, as
63
+ * sentences for nw_check: the direction (and the sky.rotation that would
64
+ * bring the picture's sun over the config's), the strength at the sky's
65
+ * light, and a sky with no sun under a config that has one. Empty when they
66
+ * agree.
67
+ */
68
+ export declare function skySunAdvice(config: {
69
+ sky?: {
70
+ kind?: string;
71
+ rotation?: number;
72
+ };
73
+ lighting?: {
74
+ sun?: {
75
+ direction?: number[];
76
+ intensity?: number;
77
+ } | null;
78
+ };
79
+ look?: {
80
+ environment?: {
81
+ intensity?: number;
82
+ };
83
+ };
84
+ }, sun: SkySun | null, environmentIntensity: number): string[];
85
+ /** The model's numbers, as sky kind 'physical' carries them, filled. */
86
+ export interface PhysicalSkyParams {
87
+ turbidity: number;
88
+ rayleigh: number;
89
+ mieCoefficient: number;
90
+ mieDirectionalG: number;
91
+ }
92
+ /** mieCoefficient and mieDirectionalG when a sky leaves them out: the
93
+ * model's own (SkyMesh's), a clear day's aerosol. */
94
+ export declare const PHYSICAL_SKY_MIE: {
95
+ readonly coefficient: 0.005;
96
+ readonly directionalG: 0.8;
97
+ };
98
+ /** The model's radiance for a view direction under a sun (both unit vectors,
99
+ * `toSun` pointing at it), without the sun's disc and without clouds, in the
100
+ * model's own units (SkyMesh's colour before any scale). Line for line the
101
+ * colour SkyMesh computes, so the light and the picture are one sky. */
102
+ export declare function physicalSkyRadiance(p: PhysicalSkyParams, toSun: readonly number[], dir: readonly number[]): V3;
103
+ /** The model's sun as it arrives, on a surface facing it, in its own units:
104
+ * the light the model's sky stands beside. Not its drawn disc, whose
105
+ * brightness is chosen only to read as white: CALIBRATION ties the two so
106
+ * a clear day's sky gives level ground about 0.16 of what the sun gives it
107
+ * there (turbidity 3, the sun 45 degrees up), as clear-sky models of the
108
+ * real atmosphere have it (diffuse about 100 W/m2 under a direct 620). */
109
+ export declare function physicalSkySun(p: PhysicalSkyParams, toSun: readonly number[]): number;
110
+ /** See physicalSkySun: measured once with skyIrradianceOf below, at
111
+ * turbidity 3, rayleigh 1, the model's Mie, and the sun 45 degrees up. */
112
+ export declare const PHYSICAL_SKY_CALIBRATION = 0.0924;
113
+ /** Light the model's sky (no sun) puts on level ground, in its units. */
114
+ export declare function skyIrradianceOf(p: PhysicalSkyParams, toSun: readonly number[], steps?: number): number;
115
+ /** The factor that scales the model's sky to the config's sun: its sun as it
116
+ * arrives (physicalSkySun) becomes lighting.sun.intensity. 1 for a sky with
117
+ * no sun (night: the model's own faint glow). */
118
+ export declare function physicalSkyScale(p: PhysicalSkyParams, toSun: readonly number[] | null, sunIntensity: number): number;
119
+ /** A sky's model numbers, its own or the model's for what it leaves out. */
120
+ export declare function physicalSkyParams(sky: {
121
+ turbidity?: number;
122
+ rayleigh?: number;
123
+ mieCoefficient?: number;
124
+ mieDirectionalG?: number;
125
+ }): PhysicalSkyParams;
126
+ /** A physical sky's two colours for what reads a sky by them (the figure's
127
+ * glow, the universe's globe, the splat): straight up and at the horizon
128
+ * opposite the sun, scaled to the config's sun and clipped to display. */
129
+ export declare function physicalSkyColors(sky: {
130
+ turbidity?: number;
131
+ rayleigh?: number;
132
+ mieCoefficient?: number;
133
+ mieDirectionalG?: number;
134
+ }, sun: {
135
+ direction?: readonly number[];
136
+ intensity?: number;
137
+ } | null): {
138
+ top: string;
139
+ bottom: string;
140
+ };
141
+ export {};