creditsOffunction
The credits of a view for the last drawn frame: the package's own first, then the sources a caller added, each with the marks or tiles it gave; a source that gave none is left out.
Import it
import { creditsOf } from "@johnmorrisdotca/chikyu-earth/door";
Definition
function creditsOf(own: readonly Credit[], book: SourceBook, used: ReadonlyMap<string, number>): Credit[]
Parameters
| Name | Type | Description |
|---|---|---|
own | readonly Credit[] | The package's own credits ( |
book | SourceBook | The view's sources. |
used | ReadonlyMap<string, number> | How many marks or tiles each source of the book gave, by id. |
Returns
Credit[]
The credits, own first, in a stable order.
Examples
import { createSourceBook, creditsOf, ownCredit } from "@johnmorrisdotca/chikyu-earth/door";
const book = createSourceBook();
console.log(creditsOf([ownCredit("chikyu-pictures", 1)], book, new Map()).length);1What it prints (run when this page was built)