NarraLeaf

IImageUserConfig

interface IImageUserConfig<
    Tag extends TagGroupDefinition | null = TagGroupDefinition | null,
    Layers extends LayerGroupDefinition = LayerGroupDefinition,
>
    extends CommonDisplayableConfig {
    /**
     * The name of the image, only for debugging purposes
     */
    name: string;
    /**
     * If set to false, the image won't be initialized unless you call `init` method
     * @default true
     */
    autoInit: boolean;
    /**
     * Image Src, see [Image](../elements/image) for more information
     */
    src: ImageSrcType<Tag> | LayeredDefinition<Layers>;
    /**
     * Auto resize image's width to fit the screen
     * @default false
     */
    autoFit: boolean;
    /**
     * layer of the image
     */
    layer?: Layer;
    /**
     * Darkness of the image, between 0 and 1
     * @default 0
     */
    darkness?: number;
}

For CommonDisplayableConfig, see CommonDisplayableConfig