oda-engine 0.0.0-stage → 0.1.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 +151 -2
- package/bin/nowhere.mjs +352 -0
- package/lib/account.mjs +57 -0
- package/lib/agentModules.mjs +57 -0
- package/lib/devServer.mjs +351 -0
- package/lib/headless.mjs +231 -0
- package/lib/headlessPreview.mjs +212 -0
- package/lib/keys.mjs +517 -0
- package/lib/make.mjs +855 -0
- package/lib/mcp.mjs +537 -0
- package/lib/open.mjs +22 -0
- package/lib/preview.mjs +87 -0
- package/lib/previewRpc.mjs +134 -0
- package/lib/project.mjs +359 -0
- package/lib/publishFlow.mjs +90 -0
- package/lib/resources.mjs +50 -0
- package/lib/rules.mjs +60 -0
- package/lib/scaffold.mjs +42 -0
- package/lib/setup.mjs +59 -0
- package/lib/tools.mjs +668 -0
- package/package.json +51 -4
- package/template/game.config.json +9 -0
- package/template/scene.json +4 -0
- package/template/src/main.ts +11 -0
- package/vendor/DOCS.md +447 -0
- package/vendor/agent/appRun.mjs +520 -0
- package/vendor/agent/assets/brief.mjs +242 -0
- package/vendor/agent/assets/collider.mjs +531 -0
- package/vendor/agent/assets/environments/index.mjs +12 -0
- package/vendor/agent/assets/environments/worldlabs.mjs +161 -0
- package/vendor/agent/assets/fetch.mjs +168 -0
- package/vendor/agent/assets/footprint.mjs +13 -0
- package/vendor/agent/assets/gltf.mjs +547 -0
- package/vendor/agent/assets/hdr.mjs +269 -0
- package/vendor/agent/assets/imageOps.mjs +171 -0
- package/vendor/agent/assets/images/codex.mjs +307 -0
- package/vendor/agent/assets/images/fal.mjs +75 -0
- package/vendor/agent/assets/images/gemini.mjs +84 -0
- package/vendor/agent/assets/images/index.mjs +25 -0
- package/vendor/agent/assets/images/openai.mjs +75 -0
- package/vendor/agent/assets/images/stability.mjs +71 -0
- package/vendor/agent/assets/images/views.mjs +31 -0
- package/vendor/agent/assets/import.mjs +1352 -0
- package/vendor/agent/assets/inspect.mjs +465 -0
- package/vendor/agent/assets/jobs.mjs +196 -0
- package/vendor/agent/assets/ktx2.mjs +290 -0
- package/vendor/agent/assets/ledger.mjs +466 -0
- package/vendor/agent/assets/net.mjs +254 -0
- package/vendor/agent/assets/prices.json +39 -0
- package/vendor/agent/assets/providers/fal.mjs +115 -0
- package/vendor/agent/assets/providers/index.mjs +22 -0
- package/vendor/agent/assets/providers/meshy.mjs +119 -0
- package/vendor/agent/assets/providers/tripo.mjs +188 -0
- package/vendor/agent/assets/sources/ambientcg.mjs +129 -0
- package/vendor/agent/assets/sources/index.mjs +23 -0
- package/vendor/agent/assets/sources/polyhaven.mjs +237 -0
- package/vendor/agent/assets/sources/polypizza.mjs +121 -0
- package/vendor/agent/assets/splat.mjs +631 -0
- package/vendor/agent/assets/targets.mjs +122 -0
- package/vendor/agent/assets/tile.mjs +261 -0
- package/vendor/agent/assets/unzip.mjs +180 -0
- package/vendor/agent/blender/cleanup.py +360 -0
- package/vendor/agent/blender/convert.py +167 -0
- package/vendor/agent/blender/find.mjs +192 -0
- package/vendor/agent/blender/nw_export.py +104 -0
- package/vendor/agent/blender/nw_rubric.py +426 -0
- package/vendor/agent/blender/run.mjs +193 -0
- package/vendor/agent/blender/runner.py +252 -0
- package/vendor/agent/blender/sheet.py +743 -0
- package/vendor/agent/depth.mjs +134 -0
- package/vendor/agent/director/board.mjs +451 -0
- package/vendor/agent/director/contracts.mjs +663 -0
- package/vendor/agent/director/director.mjs +2365 -0
- package/vendor/agent/director/estimate.mjs +200 -0
- package/vendor/agent/director/gate.mjs +802 -0
- package/vendor/agent/director/limits.json +16 -0
- package/vendor/agent/director/methods.mjs +457 -0
- package/vendor/agent/director/policy.json +33 -0
- package/vendor/agent/director/prompts.mjs +244 -0
- package/vendor/agent/director/reading.mjs +341 -0
- package/vendor/agent/director/router.mjs +184 -0
- package/vendor/agent/director/seams.mjs +243 -0
- package/vendor/agent/director/session.mjs +643 -0
- package/vendor/agent/director/store.mjs +119 -0
- package/vendor/agent/director/taskGate.mjs +110 -0
- package/vendor/agent/director/teamLedger.mjs +118 -0
- package/vendor/agent/director/triage.mjs +63 -0
- package/vendor/agent/downloads.cjs +363 -0
- package/vendor/agent/flow.mjs +78 -0
- package/vendor/agent/guard.mjs +613 -0
- package/vendor/agent/host.mjs +1736 -0
- package/vendor/agent/language.mjs +58 -0
- package/vendor/agent/ledger.mjs +360 -0
- package/vendor/agent/locale.cjs +186 -0
- package/vendor/agent/loop/capacity.mjs +74 -0
- package/vendor/agent/loop/compose.mjs +127 -0
- package/vendor/agent/loop/gate.mjs +205 -0
- package/vendor/agent/loop/judge.mjs +189 -0
- package/vendor/agent/loop/levels.mjs +273 -0
- package/vendor/agent/loop/state.mjs +358 -0
- package/vendor/agent/notes.cjs +278 -0
- package/vendor/agent/pace.mjs +258 -0
- package/vendor/agent/panels.mjs +431 -0
- package/vendor/agent/prompt.mjs +342 -0
- package/vendor/agent/reference/board.mjs +410 -0
- package/vendor/agent/reference/compose.mjs +364 -0
- package/vendor/agent/reference/decode.mjs +56 -0
- package/vendor/agent/reference/facts.mjs +1874 -0
- package/vendor/agent/reference/png.mjs +107 -0
- package/vendor/agent/reference/records.mjs +63 -0
- package/vendor/agent/reference/web.mjs +252 -0
- package/vendor/agent/roles/artist.mjs +69 -0
- package/vendor/agent/roles/builder.mjs +79 -0
- package/vendor/agent/roles/checks.mjs +223 -0
- package/vendor/agent/roles/common.mjs +188 -0
- package/vendor/agent/roles/critic.mjs +171 -0
- package/vendor/agent/roles/index.mjs +39 -0
- package/vendor/agent/roles/modeller.mjs +142 -0
- package/vendor/agent/roles/qa.mjs +58 -0
- package/vendor/agent/roles/rubrics.mjs +79 -0
- package/vendor/agent/roles/sound.mjs +69 -0
- package/vendor/agent/rounds.cjs +333 -0
- package/vendor/agent/shared.mjs +284 -0
- package/vendor/agent/stopGate.mjs +574 -0
- package/vendor/agent/subagents.mjs +129 -0
- package/vendor/agent/tools/assets.mjs +499 -0
- package/vendor/agent/tools/blender.mjs +754 -0
- package/vendor/agent/tools/cards.mjs +479 -0
- package/vendor/agent/tools/choices.mjs +479 -0
- package/vendor/agent/tools/compose.mjs +74 -0
- package/vendor/agent/tools/environment.mjs +488 -0
- package/vendor/agent/tools/eyes.mjs +733 -0
- package/vendor/agent/tools/generate.mjs +338 -0
- package/vendor/agent/tools/guide.mjs +46 -0
- package/vendor/agent/tools/harness.mjs +193 -0
- package/vendor/agent/tools/image.mjs +643 -0
- package/vendor/agent/tools/index.mjs +162 -0
- package/vendor/agent/tools/look.mjs +578 -0
- package/vendor/agent/tools/loop.mjs +858 -0
- package/vendor/agent/tools/others.mjs +123 -0
- package/vendor/agent/tools/pictures.mjs +535 -0
- package/vendor/agent/tools/reference.mjs +366 -0
- package/vendor/agent/transcripts.mjs +118 -0
- package/vendor/agent-loop.mjs +602 -0
- package/vendor/agent-plugin/.claude-plugin/plugin.json +5 -0
- package/vendor/agent-plugin/skills/art-direction/SKILL.md +82 -0
- package/vendor/agent-plugin/skills/asset-legality/SKILL.md +101 -0
- package/vendor/agent-plugin/skills/asset-sources/SKILL.md +111 -0
- package/vendor/agent-plugin/skills/blender-modeling/SKILL.md +97 -0
- package/vendor/agent-plugin/skills/look-dev/SKILL.md +104 -0
- package/vendor/agent-plugin/skills/playtesting/SKILL.md +74 -0
- package/vendor/agent-plugin/skills/reference-loop/SKILL.md +102 -0
- package/vendor/agent-plugin/skills/sound-design/SKILL.md +60 -0
- package/vendor/agent-plugin/skills/style/SKILL.md +35 -0
- package/vendor/agent-plugin/skills/tsl-r185/SKILL.md +107 -0
- package/vendor/auth.cjs +570 -0
- package/vendor/build.cjs +953 -0
- package/vendor/catalog.json +455 -0
- package/vendor/connectors.cjs +688 -0
- package/vendor/eyes.mjs +733 -0
- package/vendor/gameExports.json +1390 -0
- package/vendor/git.cjs +222 -0
- package/vendor/models.json +57 -0
- package/vendor/publish.cjs +1018 -0
- package/vendor/refBoard.cjs +301 -0
- package/vendor/schema/dist/assets.d.ts +335 -0
- package/vendor/schema/dist/assets.js +439 -0
- package/vendor/schema/dist/brief.d.ts +357 -0
- package/vendor/schema/dist/brief.js +302 -0
- package/vendor/schema/dist/common.d.ts +9 -0
- package/vendor/schema/dist/common.js +13 -0
- package/vendor/schema/dist/config.d.ts +406 -0
- package/vendor/schema/dist/config.js +355 -0
- package/vendor/schema/dist/contract.d.ts +599 -0
- package/vendor/schema/dist/contract.js +1146 -0
- package/vendor/schema/dist/index.d.ts +14 -0
- package/vendor/schema/dist/index.js +21 -0
- package/vendor/schema/dist/look.d.ts +463 -0
- package/vendor/schema/dist/look.js +681 -0
- package/vendor/schema/dist/lookStats.d.ts +230 -0
- package/vendor/schema/dist/lookStats.js +768 -0
- package/vendor/schema/dist/pilot.d.ts +32 -0
- package/vendor/schema/dist/pilot.js +44 -0
- package/vendor/schema/dist/publish.d.ts +214 -0
- package/vendor/schema/dist/publish.js +291 -0
- package/vendor/schema/dist/scene.d.ts +75 -0
- package/vendor/schema/dist/scene.js +120 -0
- package/vendor/schema/dist/skyLight.d.ts +141 -0
- package/vendor/schema/dist/skyLight.js +436 -0
- package/vendor/schema/dist/style.d.ts +131 -0
- package/vendor/schema/dist/style.js +155 -0
- package/vendor/schema/package.json +1 -0
- package/vendor/selectionPrompt.mjs +51 -0
- package/vendor/useTools.mjs +195 -0
- package/vendor/userMessage.mjs +26 -0
- package/web-dist/assets/GaussianSplatUtils-CB77cP9U.js +1 -0
- package/web-dist/assets/KTX2Loader-6OIWUF7s.js +2 -0
- package/web-dist/assets/SPZLoader-zYj0Alfv.js +1 -0
- package/web-dist/assets/gaussianSplat-CJTI1sEh.js +1 -0
- package/web-dist/assets/index-CcjyyQco.css +1 -0
- package/web-dist/assets/index-DMyJcoZJ.js +693 -0
- package/web-dist/assets/meshopt_decoder.module-BvwdjiD3.js +1 -0
- package/web-dist/assets/zstddec.module-CfFeQW7d.js +1 -0
- package/web-dist/index.html +34 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import type { ResolvedLook } from './look.js';
|
|
2
|
+
export type Lab = [number, number, number];
|
|
3
|
+
export interface LookStats {
|
|
4
|
+
/** Of the analysed picture: the long edge is at most 256 pixels. */
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
/** CIE L*, 0 to 100. */
|
|
8
|
+
meanL: number;
|
|
9
|
+
stdL: number;
|
|
10
|
+
p5: number;
|
|
11
|
+
p50: number;
|
|
12
|
+
p95: number;
|
|
13
|
+
/** Share of pixels with every channel at 250 or more, and at 5 or less. */
|
|
14
|
+
clipHigh: number;
|
|
15
|
+
clipLow: number;
|
|
16
|
+
/** Mean C*ab. */
|
|
17
|
+
meanChroma: number;
|
|
18
|
+
/** Mean b* (yellow is positive) and mean a* (magenta is positive). */
|
|
19
|
+
warmth: number;
|
|
20
|
+
tint: number;
|
|
21
|
+
/** Mean L* of the top, middle and bottom thirds. */
|
|
22
|
+
thirds: [number, number, number];
|
|
23
|
+
/** Mean L* of the outer 15% border over the centre's: below 1 is a vignette. */
|
|
24
|
+
edge: number;
|
|
25
|
+
/** k-means (k = 6) in Lab, largest share first. */
|
|
26
|
+
palette: {
|
|
27
|
+
hex: string;
|
|
28
|
+
share: number;
|
|
29
|
+
lab: Lab;
|
|
30
|
+
}[];
|
|
31
|
+
/** 16 bins of L*, as shares of the picture. */
|
|
32
|
+
histogram: number[];
|
|
33
|
+
/** The sky band (the top SKY_BAND of the rows) and the subject (the rest),
|
|
34
|
+
* each measured on its own. Absent from stats an older page measured. */
|
|
35
|
+
regions?: {
|
|
36
|
+
sky: RegionStats;
|
|
37
|
+
subject: RegionStats;
|
|
38
|
+
};
|
|
39
|
+
/** Mean Lab of the darkest SHADE_SHARE of the pixels (the shade) and of
|
|
40
|
+
* the brightest (the lit). */
|
|
41
|
+
shade?: Lab;
|
|
42
|
+
lit?: Lab;
|
|
43
|
+
/** Mean Sobel magnitude of L*, on an EDGE_GRID x EDGE_GRID grid of cells,
|
|
44
|
+
* row by row: where the picture's edges and silhouettes sit. */
|
|
45
|
+
edges?: number[];
|
|
46
|
+
/** Mean |L* - its 3 x 3 blur| (fine) and |7 x 7 blur - 19 x 19 blur| (coarse). */
|
|
47
|
+
detail?: {
|
|
48
|
+
fine: number;
|
|
49
|
+
coarse: number;
|
|
50
|
+
};
|
|
51
|
+
/** The uniform border cut off before measuring (uniformBorder), as shares
|
|
52
|
+
* of the analysed picture's sides; all 0 when it had none. width and
|
|
53
|
+
* height above are what was left. */
|
|
54
|
+
border?: {
|
|
55
|
+
top: number;
|
|
56
|
+
bottom: number;
|
|
57
|
+
left: number;
|
|
58
|
+
right: number;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/** One region of a picture: its brightness, spread, colourfulness and palette. */
|
|
62
|
+
export interface RegionStats {
|
|
63
|
+
meanL: number;
|
|
64
|
+
stdL: number;
|
|
65
|
+
meanChroma: number;
|
|
66
|
+
palette: {
|
|
67
|
+
hex: string;
|
|
68
|
+
share: number;
|
|
69
|
+
lab: Lab;
|
|
70
|
+
}[];
|
|
71
|
+
}
|
|
72
|
+
export type Verdict = 'matches' | 'close' | 'far';
|
|
73
|
+
/** One region against the reference's same region. */
|
|
74
|
+
export interface RegionComparison {
|
|
75
|
+
paletteDeltaE: number;
|
|
76
|
+
deltaMeanL: number;
|
|
77
|
+
verdict: Verdict;
|
|
78
|
+
}
|
|
79
|
+
export interface LookComparison {
|
|
80
|
+
/** Share-weighted mean, over the reference's palette, of each colour's nearest shot colour (deltaE2000). */
|
|
81
|
+
paletteDeltaE: number;
|
|
82
|
+
/** Shot minus reference. */
|
|
83
|
+
deltaMeanL: number;
|
|
84
|
+
/** Shot over reference: spread of L*, and mean chroma. */
|
|
85
|
+
contrastRatio: number;
|
|
86
|
+
chromaRatio: number;
|
|
87
|
+
/** Shot minus reference, in b* and a*. */
|
|
88
|
+
warmthDelta: number;
|
|
89
|
+
tintDelta: number;
|
|
90
|
+
clip: {
|
|
91
|
+
high: [number, number];
|
|
92
|
+
low: [number, number];
|
|
93
|
+
};
|
|
94
|
+
thirds: {
|
|
95
|
+
shot: [number, number, number];
|
|
96
|
+
ref: [number, number, number];
|
|
97
|
+
};
|
|
98
|
+
/** The worst of the judged statistics' own verdicts (verdicts). */
|
|
99
|
+
verdict: Verdict;
|
|
100
|
+
/** What each judged statistic says on its own: tone is the whole picture's
|
|
101
|
+
* palette, mean L* and contrast; shade is the shade's colour. */
|
|
102
|
+
verdicts: {
|
|
103
|
+
tone: Verdict;
|
|
104
|
+
shade?: Verdict;
|
|
105
|
+
};
|
|
106
|
+
/** The sky band and the subject against the reference's. Not judged. */
|
|
107
|
+
regions?: {
|
|
108
|
+
sky: RegionComparison;
|
|
109
|
+
subject: RegionComparison;
|
|
110
|
+
};
|
|
111
|
+
/** deltaE2000 between the shot's shade and the reference's. Judged. */
|
|
112
|
+
shade?: {
|
|
113
|
+
deltaE: number;
|
|
114
|
+
shot: Lab;
|
|
115
|
+
ref: Lab;
|
|
116
|
+
};
|
|
117
|
+
/** The same for the lit. Not judged. */
|
|
118
|
+
lit?: {
|
|
119
|
+
deltaE: number;
|
|
120
|
+
shot: Lab;
|
|
121
|
+
ref: Lab;
|
|
122
|
+
};
|
|
123
|
+
/** How far apart the two pictures' turns from lit to shade are: the
|
|
124
|
+
* distance, in a* and b*, between (shade - lit) in the shot and in the
|
|
125
|
+
* reference. Large when one picture's shadows go blue and the other's go
|
|
126
|
+
* grey. Not judged. */
|
|
127
|
+
shadeTurn?: number;
|
|
128
|
+
/** Correlation of the two edge grids: 1 when edges and silhouettes sit in
|
|
129
|
+
* the same places, 0 or below when they do not. Not judged. */
|
|
130
|
+
layout?: number;
|
|
131
|
+
/** The shot's fine-to-coarse detail over the reference's. Not judged. */
|
|
132
|
+
detailRatio?: number;
|
|
133
|
+
}
|
|
134
|
+
/** The analysed picture's long edge. */
|
|
135
|
+
export declare const STATS_LONG_EDGE = 256;
|
|
136
|
+
/** The sky band's share of the rows, from the top. A picture of a painting
|
|
137
|
+
* has no depth to find its sky by, so the top band stands in for it. */
|
|
138
|
+
export declare const SKY_BAND = 0.3;
|
|
139
|
+
/** The shade and the lit: this share of the pixels, darkest and brightest. */
|
|
140
|
+
export declare const SHADE_SHARE = 0.2;
|
|
141
|
+
/** The edge grid's cells on each side. */
|
|
142
|
+
export declare const EDGE_GRID = 8;
|
|
143
|
+
/**
|
|
144
|
+
* The statistics the verdict is made of. tone is the whole picture's
|
|
145
|
+
* palette, mean L* and contrast, the verdict there was; shade is the
|
|
146
|
+
* shade's colour, added because on the saved evidence
|
|
147
|
+
* (.fixtures-local/look-gate, rerun by scripts/look-gate-check.mts) its own
|
|
148
|
+
* verdict reproduced every expected one: the Red Arch against its request
|
|
149
|
+
* image far (where the tone says close), Laputa v1 against the film still
|
|
150
|
+
* far, laputa-v2 against it close or better, at 256 and 512 pixels and with
|
|
151
|
+
* the shade drawn anywhere from the darkest tenth to three tenths. The rest
|
|
152
|
+
* did not, and is only said: the sky band misses the arch at every cut, the
|
|
153
|
+
* subject at the higher sky line, the turn from lit to shade calls v2 far at
|
|
154
|
+
* a tenth, the edge layout parts the frames by 0.017 of correlation, too
|
|
155
|
+
* thin to hold, and the fine-to-coarse detail puts v2 further from the
|
|
156
|
+
* still than v1.
|
|
157
|
+
*/
|
|
158
|
+
export declare const JUDGED: readonly ["tone", "shade"];
|
|
159
|
+
/** Linear sRGB (0 to 1) to Lab. */
|
|
160
|
+
export declare function linearToLab(r: number, g: number, b: number): Lab;
|
|
161
|
+
/** sRGB bytes to Lab. */
|
|
162
|
+
export declare function srgbToLab(r: number, g: number, b: number): Lab;
|
|
163
|
+
/** Lab to '#rrggbb', clamped into sRGB. */
|
|
164
|
+
export declare function labToHex(lab: Lab): string;
|
|
165
|
+
/** '#rrggbb' to Lab. */
|
|
166
|
+
export declare function hexToLab(hex: string): Lab;
|
|
167
|
+
/** CIEDE2000 (Sharma, Wu and Dalal 2005): the difference a person sees
|
|
168
|
+
* between two colours; about 1 is just noticeable, 10 is plainly another colour. */
|
|
169
|
+
export declare function deltaE2000(a: Lab, b: Lab): number;
|
|
170
|
+
/**
|
|
171
|
+
* A uniform border around a picture's art (a letterbox, a pillarbox, a mat),
|
|
172
|
+
* in rows and columns of `L` (L*, w x h, top row first). The rule
|
|
173
|
+
* nw_reference reads a reference's frame by (reference/facts.mjs frameOf):
|
|
174
|
+
* a border is lines of one value (spread under 2 L*, each within 3 of the
|
|
175
|
+
* first), at least 2 and at most 15% of the side (a flat sky or wall beyond
|
|
176
|
+
* that is content), and it ends in a step: the three lines after it differ
|
|
177
|
+
* from it by 8 L* or more, where a smooth sky would only drift. A crop that
|
|
178
|
+
* would leave less than 40% of either side is no crop.
|
|
179
|
+
*/
|
|
180
|
+
export declare function uniformBorder(L: ArrayLike<number>, w: number, h: number): {
|
|
181
|
+
top: number;
|
|
182
|
+
bottom: number;
|
|
183
|
+
left: number;
|
|
184
|
+
right: number;
|
|
185
|
+
};
|
|
186
|
+
/** What a picture's look is, in numbers. `rgba` is width x height RGBA bytes,
|
|
187
|
+
* top row first; alpha is ignored (a shot is an opaque JPEG). A uniform
|
|
188
|
+
* border is cut off first (uniformBorder; `cuts.border` false keeps it).
|
|
189
|
+
* `cuts` also moves the sky band's and the shade's lines from SKY_BAND and
|
|
190
|
+
* SHADE_SHARE, for a check that asks how much a verdict depends on where
|
|
191
|
+
* they are drawn. */
|
|
192
|
+
export declare function lookStats(rgba: Uint8Array | Uint8ClampedArray, width: number, height: number, cuts?: {
|
|
193
|
+
sky?: number;
|
|
194
|
+
shade?: number;
|
|
195
|
+
border?: boolean;
|
|
196
|
+
}): LookStats;
|
|
197
|
+
/** Share-weighted mean, over the reference's colours, of the nearest shot colour's deltaE2000. */
|
|
198
|
+
export declare function paletteDistance(shot: LookStats['palette'], ref: LookStats['palette']): number;
|
|
199
|
+
/** The worse of verdicts. */
|
|
200
|
+
export declare const worstVerdict: (list: Verdict[]) => Verdict;
|
|
201
|
+
/** How a shot's look differs from a reference's. The verdict is the worst
|
|
202
|
+
* of the judged statistics (JUDGED): the tone (toneVerdict) and, when both
|
|
203
|
+
* pictures were measured by region, the shade's colour (colourVerdict).
|
|
204
|
+
* The rest is said and not judged. */
|
|
205
|
+
export declare function compareLook(shot: LookStats, ref: LookStats): LookComparison;
|
|
206
|
+
/**
|
|
207
|
+
* Which knobs would bring the shot toward the reference, as look_apply set
|
|
208
|
+
* values with the reason, largest first in the order exposure, contrast,
|
|
209
|
+
* saturation, white balance. Each step is a measured guess: the tone curve
|
|
210
|
+
* and the grade interact, so look again after applying it.
|
|
211
|
+
*/
|
|
212
|
+
export declare function suggestLook(cmp: LookComparison, current: ResolvedLook): {
|
|
213
|
+
path: string;
|
|
214
|
+
from: number;
|
|
215
|
+
to: number;
|
|
216
|
+
why: string;
|
|
217
|
+
}[];
|
|
218
|
+
/** The white balance gain the look pipeline multiplies by (GPU and CPU alike):
|
|
219
|
+
* temperature trades red against blue, tint green against magenta, and the
|
|
220
|
+
* gain is divided by its own luminance, so grey keeps its brightness. */
|
|
221
|
+
export declare function whiteBalanceGain(temperature: number, tint: number): [number, number, number];
|
|
222
|
+
/**
|
|
223
|
+
* The look's grade on one colour, as the pipeline does it on the GPU, for what
|
|
224
|
+
* is coloured without it (the splat the universe shows from space): exposure,
|
|
225
|
+
* white balance, CDL, contrast, saturation, the tone curve and posterize, in
|
|
226
|
+
* that order. Linear light in, linear display light out (the sRGB transfer is
|
|
227
|
+
* the caller's). The LUT, vignette and grain are left out: a LUT is a file
|
|
228
|
+
* this cannot read, and the other two belong to the screen, not the colour.
|
|
229
|
+
*/
|
|
230
|
+
export declare function gradeCpu(rgbLinear: [number, number, number], look: ResolvedLook): [number, number, number];
|