schmittl / jsTGALoader

Load and display TGA files with Javascript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Load and display TGA files with Javascript.

License:zlib License


Languages

Language:JavaScript 98.0%Language:HTML 2.0%