Interface: BrowserImage
Image that can be rendered by a browser from a URL or from a HTML svg tag in string form. Provide either url or svgString, not both.
Properties
dataUrl?
Internal
optional
dataUrl:string
Image asset as a Data URL. For m2c2kit library use only
Source
height
height:
number
Height to scale image to
Source
imageName
imageName:
string
Name that will be used to refer to the image. Must be unique among all images within a game
Source
lazy?
optional
lazy:boolean
If true, the image will not be fully loaded until it is needed. Default is false. Lazy loading is useful for large "banks" of images. These should be lazy loaded because they may not be needed.
Source
localize?
optional
localize:boolean
If true, try to use a localized version of the image. Localized images are loaded on demand and are not preloaded. Only an image whose asset is provided as a URL can be localized. Default is false.
Source
svgString?
optional
svgString:string
The HTML SVG tag, in string form, that will be rendered and loaded. Must begin with <svg> and end with </svg>
Source
url?
optional
url:string
URL of image asset (svg, png, jpg) to render and load
Source
width
width:
number
Width to scale image to