Interface: Asset<T>
Defined in: src/lib/assets/schema.ts:70
An asset (a brush preset, colour palette or profile graph): a header that describes it, and its content.
Example
const palette: Asset<ColourPaletteConfig> = {
"@type": "PaintCanvas/ColourPalette",
id: crypto.randomUUID(),
name: "Sunset",
author: { name: "Ada", handle: "ada.example" },
content: { colours: ["#ff7e07", "#f40f95"] },
};
Type Parameters
T
T
Properties
@type
@type:
string
Defined in: src/lib/assets/schema.ts:72
The kind of asset, e.g. PaintCanvas/BrushPreset
author
author:
AssetAuthor
Defined in: src/lib/assets/schema.ts:78
Who made it
content
content:
T
Defined in: src/lib/assets/schema.ts:89
What the asset holds, e.g. a brush preset's brush settings
group?
optionalgroup?:string
Defined in: src/lib/assets/schema.ts:80
The family it belongs to (assets of the same group are listed together, e.g. "Round")
id
id:
string
Defined in: src/lib/assets/schema.ts:74
A UUID for the user's own assets; a readable ID for built-in ones
name
name:
string
Defined in: src/lib/assets/schema.ts:76
Its name
updatedAt?
optionalupdatedAt?:string
Defined in: src/lib/assets/schema.ts:87
When the user last made or changed it (ISO 8601 date and time). Loading or upgrading it doesn't change it. Assets from before schema 2.1.0 have none.
version?
optionalversion?:string
Defined in: src/lib/assets/schema.ts:82
The asset's own version (not its schema's), e.g. 1.1.0