3 ## ResourceImage (extends Image)
5 A resource image extends the basic {{#crossLink "image"}}Image class{{/crossLink}} with
6 the ability to load an image from a file.
11 // Create a resource image with a given URL
12 var image = new dali.ResourceImage( {url: "my_image.png"} );
14 // Create a material that specifies the visual properties of the renderer.
15 var material = new dali.Material();
17 // Add the image as texture to be used by the material
18 material.addTexture( image, "sTexture" );
24 function imageLoaded( image )
26 log("image loaded " +image.url + "\n");
29 var image = new dali.ResourceImage( {url: "my_image.png"} );
31 image.connect("imageLoadingFinished", finished );
33 // Create a material and add the image as texture to be used by the material.
34 var material = new dali.Material();
35 material.addTexture( image, "sTexture" );