Sprite
From a script
ts
import { SpriteComponent } from "mmpx";
const sprite = this.entity.TryGetComponent(SpriteComponent);Full API: SpriteComponent.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
Sprite FrameassetId | texture asset | — | |
Colortint | colour | #FFFFFF | |
Size ModesizeMode | "raw" | "custom" | "raw" | raw adopts the texture size; custom keeps the UITransform size |
Materialmaterial | material asset | — | A sprite-domain material — a shader drawing this component |
Fill
| Field | Type | Default | Description |
|---|---|---|---|
TypefillType | "none" | "horizontal" | "vertical" | "none" | |
StartfillStart | number (0 … 1) | 0 | Where the shown band starts — from the left (horizontal) or the bottom (vertical) |
RangefillRange | number (0 … 1) | 1 |