ImageResource Class
ImageRessource encapsulates an image file. An ImageResource is
represented via a URI pointing to the image file. An Image has a
width and a height, in pixels.
Immediately after object creation, the system will start downloading the
image file onto the device.
var imageres = new AR.ImageResource("http://path.to.my/image/resource.png");
Constructor
Item Index
Properties
Methods
destroy
()
Destroys the object.
getHeight
()
Number
Returns the height of the original image, in pixels. In case the image is not yet loaded (see ImageResource.onLoaded(), -1 will be returned.
Returns:
the height of the image represented through the URI, in pixels.
getUri
()
String
Returns the uri to the ImageResource.
Returns:
the uri to the ImageResource.
Properties
Events
onError
The trigger will fire when the Image file could not be loaded.
The trigger is null by default, and will thus result in no action executed when the trigger fires. A developer can add custom functionality by assigning a custom function to onError.
onLoaded
The trigger will fire when the Image file was loaded.
The trigger is null by default, and will thus result in no action
executed when the trigger fires. A developer can add custom functionality by assigning a custom function to onLoaded.