Skip to content

robotopia-x/assets-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

assets-loader

simple assets loader for images

npm install @robotopia/assets-loader

Usage

Initially load all your images

const assets = require('@robotopia/assets-loader')

assets.load({
  HERO: 'path/to/hero.png',
  WATER_TILE: 'path/to/water-tile.png',
})
.then(() => { 
  // start application 
})
.catch(() => console.log('error loading assets'))

After all images have been loaded they can be accessed by their name

assets.store.HERO // reference to hero.png

About

🚚 simple assets loader for images

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published