tga-js
tga-js is a tga file loader written in JavaScript, working in the browser environment. It provides a simple and really fast solution for loading TGA file format.
Lot of games are using TGA files to store textures. So, since browsers try to bring games in the web it can be a good idea to have a TGA loader (actually a better idea to use another smaller file format).
🔗 Used by :
🚀 Installation
Install with yarn:
$ yarn add tga-js
Or install using npm:
$ npm i tga-js
📖 Usage
Loading a remote tga file.
; const tga = ;tga;
Loading a tga from buffer.
; const tga = ; // Your own function returning a buffer from cache/memory/..const buffer = ; tga;documentbody;
Get data-uri as output
tga;