Interface SpriteRendererOptions

SpriteRenderer component configuration

const spriteRenderer = new SpriteRenderer({
image: this.assetManager.getImage("image.png"),
width: 1920,
height: 1080,
offset: new Vector2(0, 0),
flipHorizontally: false,
flipVertically: false,
rotation: 0,
opacity: 1,
maskColor: "#FF0000",
maskColorMix: 0,
tintColor: "#00FF00",
layer: "Default",
slice: {x: 0, y: 0, width: 1920, height: 1080},
scale: new Vector2(1, 1),
tiled: new Vector2(1, 1),
smooth: false
});
interface SpriteRendererOptions {
    flipHorizontally: boolean;
    flipVertically: boolean;
    height: number;
    image: string | HTMLImageElement;
    layer: string;
    maskColor: string;
    maskColorMix: number;
    offset: Vector2;
    opacity: number;
    rotation: number;
    scale: Vector2;
    slice: Slice;
    smooth: boolean;
    tiled: Vector2;
    tintColor: string;
    width: number;
}

Properties

flipHorizontally: boolean
flipVertically: boolean
height: number
image: string | HTMLImageElement
layer: string
maskColor: string
maskColorMix: number
offset: Vector2
opacity: number
rotation: number
scale: Vector2
slice: Slice
smooth: boolean
tiled: Vector2
tintColor: string
width: number