simvx.core.nodes_2d.canvas

Canvas layer nodes: the screen-/world-space CanvasLayer band.

Module Contents

Classes

CanvasLayer

Renders children at a fixed Z-layer with optional transform offset.

Data

log

API

simvx.core.nodes_2d.canvas.log

‘getLogger(…)’

class simvx.core.nodes_2d.canvas.CanvasLayer(**kwargs)[source]

Bases: simvx.core._drawable2d.Drawable2D, simvx.core.node.Node

Renders children at a fixed Z-layer with optional transform offset.

Children of a CanvasLayer are drawn together at the specified layer order. Higher layer values draw on top. The canvas transform (offset, rotation, scale) is applied to all children.

CanvasLayer is a Node (not a Node2D), so it joins the build-once retention contract via the :class:~simvx.core._drawable2d.Drawable2D mixin (a plain hoist onto Node2D would miss it). Its transform Properties (offset/rotation/scale_val/layer) carry on_change hooks that mark the whole layer subtree render-dirty so the item RenderItemCache re-collects under frame-skip. The legacy path ignores the bits.

Initialization

class Band[source]

Bases: enum.IntEnum

Named layer bands for the common HUD/overlay stack.

Ergonomic presets that replace the magic 1000/1500/... ints scattered across ports. layer is still a plain int – authors may pass a raw value – but CanvasLayer(layer=CanvasLayer.Band.UI) reads as intent. z_index orders content within a band; Band orders the bands.

BACKGROUND is negative (drawn behind world content but still over any 3D); WORLD is 0 (the same band ordinary Node2D content occupies); UI and OVERLAY are the HUD / always-on-top bands.

Initialization

Initialize self. See help(type(self)) for accurate signature.

BACKGROUND

None

WORLD

0

UI

1000

OVERLAY

2000

__abs__()
__add__()
__and__()
__bool__()
__ceil__()
__delattr__()
__dir__()
__divmod__()
__eq__()
__float__()
__floor__()
__floordiv__()
__format__()
__ge__()
__getattribute__()
__getnewargs__()
__getstate__()
__gt__()
__hash__()
__index__()
__int__()
__invert__()
__le__()
__lshift__()
__lt__()
__mod__()
__mul__()
__ne__()
__neg__()
__new__()
__or__()
__pos__()
__pow__()
__radd__()
__rand__()
__rdivmod__()
__reduce__()
__reduce_ex__()
__repr__()
__rfloordiv__()
__rlshift__()
__rmod__()
__rmul__()
__ror__()
__round__()
__rpow__()
__rrshift__()
__rshift__()
__rsub__()
__rtruediv__()
__rxor__()
__setattr__()
__sizeof__()
__str__()
__sub__()
__subclasshook__()
__truediv__()
__trunc__()
__xor__()
as_integer_ratio()
bit_count()
bit_length()
conjugate()
class denominator
class imag
is_integer()
class numerator
class real
to_bytes()
__deepcopy__(memo)
__copy__()
name()
value()
layer

‘Property(…)’

offset

‘Property(…)’

rotation

‘Property(…)’

scale_val

‘Property(…)’

follow_viewport

‘Property(…)’

environment

‘Property(…)’

hdr

‘Property(…)’

property transform_render_dirty: bool
strict_errors: ClassVar[bool]

True

script_error_raised

‘Signal(…)’

dynamic: bool

False

classmethod __init_subclass__(**kwargs)
property name: str
property update_mode: simvx.core.descriptors.UpdateMode
property visible: bool
reset_error() None
add_child(node: simvx.core.node.Node) simvx.core.node.Node
remove_child(node: simvx.core.node.Node)
reparent(new_parent: simvx.core.node.Node)
get_node(path: str) simvx.core.node.Node
get_node_or_none(path: str) simvx.core.node.Node | None
find(target, *, direct: bool = False)
find_all(target, *, direct: bool = False)
walk(*, include_self: bool = True) collections.abc.Iterator[simvx.core.node.Node]
property path: str
add_to_group(group: str)
remove_from_group(group: str)
is_in_group(group: str) bool
on_ready() None
on_enter_tree() None
on_exit_tree() None
on_update(dt: float) None
on_fixed_update(dt: float) None
on_draw(renderer) None
on_picked(event: simvx.core.events.InputEvent) None
on_unhandled_input(event: simvx.core.events.TreeInputEvent) None
start_coroutine(gen: simvx.core.descriptors.Coroutine) simvx.core.descriptors.CoroutineHandle
stop_coroutine(gen_or_handle)
queue_redraw() None
property render_dirty: bool
clear_children()
destroy()
call_deferred(method: collections.abc.Callable[..., Any], *args: Any) None
property app
property tree: simvx.core.scene_tree.SceneTree
property physics
property physics_2d
__getitem__(key: str)
classmethod get_properties() dict[str, simvx.core.descriptors.Property]
__repr__()