Jump to content

Dictionary of data URIs as images


Recommended Posts

Hey, all! I'm putting together an dictionary of data URIs made to help simplify sprite creation in Phaser and I just wanted to let others know. Here's the repo - you can also run `npm install data-uri-snippets` like it mentions in the readme.

Even though there are already bitmap creation tools in Phaser, I thought this could help simplify the process and cut down on code - I was able to add a key to my sprite dictionary with a couple lines and no extra assets:

import uri from 'data-uri-snippets'

// in my load state's `preload` function:
this.load.image('white', uri.white1x1)

Let me know or submit a PR if there are other general-use and lightweight data-uris you'd like to see!

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...