Skip to content

Canvas ​

RenderingScripts: CanvasComponent

From a script ​

ts
import { CanvasComponent } from "mmpx";

const canvas = this.entity.TryGetComponent(CanvasComponent);

Full API: CanvasComponent.

Fields ​

FieldTypeDefaultDescription
Reference Width
referenceWidth
number (1 … ∞)1080
Reference Height
referenceHeight
number (1 … ∞)1920
Fit
scaleMode
"fit" | "fill" | "fit-width" | "fit-height" | "stretch""fit"fit = whole design visible · fill = no borders (crops) · fit-width / fit-height = that axis exact

© 2026 PlayAdGentic