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.
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
- 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.
- Start asynchronously loading a texture for this image. This should only be used if
- 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
You are here:
Search this manual:
This manual entry was last updated on 16 Nov, 2020 at 16:57