Load and display TGA files with Javascript.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitattributes
.gitignore
LICENSE.md
README.md
test.html
test.tga
tga.js

README.md

jsTGALoader

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 (or not) to have a TGA loader.

How to Use

Loading a remote tga file

var tga = new TGA();
tga.open( "resource.tga", function(){
   document.body.appendChild( tga.getCanvas() );
});

Loading a tga from data

var tga = new TGA();
tga.load(tga_data); // tga_data must be a Uint8Array

Used by