Repository navigation
API Type UICanvasCommand
github-actions[bot] edited this page Dec 2, 2026
·
1 revision
type UICanvasCommand =
| {
op: "fillStyle" | "strokeStyle" | "font";
value: string;
}
| {
op: "textAlign";
value: UICanvasTextAlign;
}
| {
op: "textBaseline";
value: UICanvasTextBaseline;
}
| {
op: "lineWidth" | "globalAlpha";
value: number;
}
| {
op: "save" | "restore" | "beginPath" | "closePath" | "fill" | "stroke";
}
| {
op: "translate" | "scale" | "moveTo" | "lineTo";
x: number;
y: number;
}
| {
angle: number;
op: "rotate";
}
| {
matrix: UIAffine;
op: "setTransform";
}
| {
height: number;
op: "clearRect" | "fillRect" | "strokeRect" | "rect";
width: number;
x: number;
y: number;
}
| {
counterclockwise: boolean;
endAngle: number;
op: "arc";
radius: number;
startAngle: number;
x: number;
y: number;
}
| {
maxWidth: number | null;
op: "fillText";
text: string;
x: number;
y: number;
}
| {
height: number | null;
image: string;
op: "drawImage";
width: number | null;
x: number;
y: number;
};Defined in: src/engine/ui/draw/contract.ts:569
ADR 0667: one call a <canvas> element's 2D context recorded, replayed in order onto a Canvas2D-like context in the
drawing's own pixels (UIDrawingPaint.width × height, origin top-left). Colours and fonts are CSS text; angles are
radians; drawImage's image is a project texture (asset:images/…), drawn at the picture's size when width is null.
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference