A renderer's roles: per-layer lighting is part of the look, and roleOf knows only real members

imageryLayer.lit (a layer shaded by the sun) joins the look with surface
shading. roleOf answers undefined for a member its port does not have, and
the port's own role without a member. The test now fails when two roles
claim the same entry.
This commit is contained in:
Sameh Khamis committed 2026-11-11 13:43:28 -08:00
1 parent 21fdc6a332
commit 46ad53aa35
3 files changed
+22 -7

No files matched your search

+5 -2
View File
@@ -40,10 +40,13 @@ export interface ContractRole {
/** What a renderer does, by role: every member of {@link PORTS} in one. */
export declare const ROLES: readonly ContractRole[];
/** The role of `port`'s `member` (dotted), or undefined. */
/**
* The role of `port`'s `member` (dotted), or of the port itself without one;
* undefined for a member the port does not have.
*/
export declare function roleOf(
port: string,
member: string,
member?: string,
): ContractRole['id'] | undefined;
/** Every quality setting a renderer may support. */