
R3JS.Sprites = function(shape, viewport){
    
    // Get shape data
    if(shape == "ball"){
        base64data = "[encoded data, 5312 characters]";
    }
    
    // Create image
    var img = document.createElement("img");
    img.src = "data:image/png;base64, "+base64data;
    
    // Create texture
    var texture = new THREE.Texture(img);
    texture.needsUpdate = true;
    texture.onUpdate = function(){
        viewport.render();
    }

    return(texture);

}

