MCPcopy Create free account
hub / github.com/melonjs/melonJS / getImage

Function getImage

packages/melonjs/src/loader/loader.js:854–862  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

852 * @category Assets
853 */
854export function getImage(image) {
855 // force as string and extract the base name
856 image = getBasename("" + image);
857 if (image in imgList) {
858 // return the corresponding Image object
859 return imgList[image];
860 }
861 return null;
862}
863
864/**
865 * return the specified JSON Object

Callers 7

constructorMethod · 0.90
imageSizeFunction · 0.90
resolveTextureAtlasFunction · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
_parseTilesMethod · 0.90
_initAtlasMethod · 0.90

Calls 1

getBasenameFunction · 0.90

Tested by

no test coverage detected