IWorldInstance interface

The IWorldInstance interface represents an instance of a "world" type plugin in Construct. It derives from IObjectInstance.

Methods

GetLayer()
Return the ILayer this instance belongs to.
GetLayout()
Return the ILayout this instance belongs to.
GetBoundingBox()
Returns an SDK.Rect representing the bounding box of the instance in the layout.
GetQuad()
Returns an SDK.Quad representing the bounding quad of the instance in the layout.
GetColor()
Returns an SDK.Color representing the premultiplied color of the instance. This combines the instance's color tint with its opacity in the alpha channel.
SetOpacity(o)
GetOpacity()
Set or get the alpha component of the instance's color, representing its opacity, in the 0-1 range.
SetX(x)
SetY(y)
SetXY(x, y)
GetX()
GetY()
GetXY()
Set and get the X and Y co-ordinates of this instance.
SetZ(z)
GetZ()
Set and get the Z position of this instance. Note this is relative to the Z elevation of the layer the instance is on.
SetXYZ(x, y, z)
GetXYZ()
Set and get the X, Y and Z co-ordinates of this instance.
GetTotalZ()
Get the total Z elevation of this instance, which is its own Z position added to the Z elevation of the layer it is on.
SetAngle(a)
GetAngle()
Set and get the angle of the instance, in radians.
SetWidth(w)
SetHeight(h)
SetSize(w, h)
GetWidth()
GetHeight()
Set and get the size of the instance, in pixels.
SetDepth(d)
GetDepth()
Set and get the depth (size on the Z axis) of the instance, in pixels. Note this is only applicable for 3D objects (2D objects have a depth of zero).
SetOriginX(x)
SetOriginY(y)
SetOrigin(x, y)
GetOriginX()
GetOriginY()
Set and get the current origin of the instance in the layout. Note this is normalized to a [0, 1] range, e.g. 0.5 is the middle.
ApplyBlendMode(iRenderer)
Sets the current blend mode of the given IWebGLRenderer according to the Blend mode property of the instance in Construct. This is only relevant if the plugin specifies that it supports effects. Use this in the Draw() method to set the correct blend mode.
SetSampling(sampling)
GetSampling()
Set or get a string of the instance's sampling mode, which is one of "auto", "nearest", "bilinear" or "trilinear".
GetActiveSampling()
Get a string of the instance's active sampling mode. This is only different to GetSampling() when the sampling mode is "auto": in this case the active sampling mode is inherited from the project, layout, layer, or hierarchy. This is the sampling mode with which this instance will be rendered.
SetMustMitigateZFighting()
Specify that the instance must use Z-fighting mitigations, even when it is not rendered coplanar with another object. This can be necessary if an object renders coplanar content itself, such as a SpriteFont with overlapping characters. This method is intended for use with the addon SDK with the addon's own instances.
Addon SDK Manual 2026-05-28

On this page