Constructor
new Fallback(owner, options)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
owner |
Object | An instance of MiniMemory |
options |
Object | width, height and number of images to be |
Classes
Members
excludedImages
Holds list of Images those returns 404 to avoid try to load again.
- Source:
Holds list of Images those returns 404 to avoid try to load again.
Methods
init()
initialize loading images from picsum.com
.- Source:
initialize loading images from picsum.com
picsum(w, h) → {string}
Creates picsum image patterm.
- Source:
Creates picsum image patterm.
Parameters:
Name | Type | Description |
---|---|---|
w |
integer | width of requested image. |
h |
integer | height of requested image. |
Returns:
URL
- Type
- string
getFreeId() → {integer}
Returned number should not be in the excludedImages array Save namber in to excludedImages to avoid it to be choosen again.
- Source:
Returned number should not be in the excludedImages array Save namber in to excludedImages to avoid it to be choosen again.
Returns:
random Integer between 0 - 1000.
- Type
- integer