IAnimationFrame interface

The IAnimationFrame interface represents an image for an object type. Despite the name, this interface is also used if the plugin uses a single image, like Tiled Background does.

Note IAnimationFrame cannot be directly rendered. You must first create a texture from it.


Return the associated IObjectType interface.
Return the size of the image, in pixels.
Return an IWebGLTexture interface if the texture is already loaded, else null.
Return an SDK.Rect representing the texture co-ordinates of this image on the loaded texture. This can only be called if GetCachedWebGLTexture() returned a texture.
async LoadWebGLTexture()
Start asynchronously loading a texture for this image. This should only be used if GetCachedWebGLTexture() returned null. Returns a promise that resolves with a IWebGLTexture representing the loaded texture.
Replace the image content of the animation frame with the given blob. The blob will be decoded as an image and the previous content of the animation frame overwritten with the image content of the blob. This may also change the size of the frame. Returns a promise that resolves when the image content has been updated.
Set and get the individual frame duration. This is a multiplier, e.g. 1 for normal speed, 2 for twice as long, etc.
Set and get the origin for this image. The origin is specified in texture co-ordinates, i.e. from 0 to 1. The default is 0.5, indicating the middle of the image.
Return an array of IImagePoint representing the image points added to the image.
AddImagePoint(name, x, y)
Add a new image point to the image with the specified name and position. As with the origin, image point positions are specified in texture co-ordinates, i.e. from 0 to 1. Returns an IImagePoint representing the added image point.
Return the ICollisionPoly representing the image's collision polygon.
Immediately deletes this frame from its animation without any confirmation prompt. This cannot be undone.
Addon SDK Manual 2024-02-15

On this page