Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / UiPaint

Type Alias: UiPaint ​

ts
type UiPaint = 
  | {
  kind: "solid";
  color: string;
}
  | {
  kind: "linear";
  angle: number;
  stops: UiColorStop[];
}
  | {
  kind: "radial";
  stops: UiColorStop[];
}
  | {
  kind: "image";
  src: string;
  fit: "cover" | "contain" | "fill";
  tint?: string;
};

Defined in: ui/uiStyle.ts:19

Union Members ​

Type Literal ​

ts
{
  kind: "solid";
  color: string;
}

Type Literal ​

ts
{
  kind: "linear";
  angle: number;
  stops: UiColorStop[];
}

angle is in degrees and reads like CSS: 0 points up, 90 points right.


Type Literal ​

ts
{
  kind: "radial";
  stops: UiColorStop[];
}

Type Literal ​

ts
{
  kind: "image";
  src: string;
  fit: "cover" | "contain" | "fill";
  tint?: string;
}