Search this manual

Layer script interface

The ILayer script interface represents a layer on a layout.

Layer APIs


A read-only string of the layer name.


A read-only number with the zero-based index of the layer on its layout. The bottom layer has an index of 0, with the index increasing upwards in Z order.


The ILayout interface representing the layout this layer belongs to.


A boolean indicating if the layer is visible or not. When invisible, the layer skips drawing entirely.


The opacity of the layer, as a floating point number in the range [0, 1], where 0 is fully transparent and 1 is fully opaque. Note that changing the opacity to a value other than 1 will force the layer to render via its own texture.


Return a DOMRect representing the bounds of the viewport on this layer in layout co-ordinates.

Construct 3 Manual 2020-01-10

On this page