Instance Propertymigueldeicaza.swiftgodot 0.45.0SwiftGodot
offset
The layer’s base offset.
CanvasLayer.swift:59final var offset: Vector2 { get set }
Other members in extension
Type members
Instance members
var customViewport: Node?
The custom
Viewport
node assigned to theCanvasLayer
. Ifnull
, uses the default viewport instead.var followViewportEnabled: Bool
If enabled, the
CanvasLayer
will use the viewport’s transform, so it will move when camera moves instead of being anchored in a fixed position on the screen.var followViewportScale: Double
Scales the layer when using
followViewportEnabled
. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales.var layer: Int32
Layer index for draw order. Lower values are drawn behind higher values.
var rotation: Double
The layer’s rotation in radians.
var scale: Vector2
The layer’s scale.
var transform: Transform2D
The layer’s transform.
var visibilityChanged: SimpleSignal
Emitted when visibility of the layer is changed. See
visible
.var visible: Bool
If
false
, anyCanvasItem
under thisCanvasLayer
will be hidden.func getCanvas(
) -> RID Returns the RID of the canvas used by this layer.
func getFinalTransform(
) -> Transform2D Returns the transform from the
CanvasLayer
s coordinate system to theViewport
s coordinate system.func hide(
) Hides any
CanvasItem
under thisCanvasLayer
. This is equivalent to settingvisible
tofalse
.func show(
) Shows any
CanvasItem
under thisCanvasLayer
. This is equivalent to settingvisible
totrue
.