initialize
Initializes the object and its children, preparing them for rendering. This function should be called before the object is rendered for the first time. It sets the object's state to initialized and recursively initializes all child objects.
Parameters
ctx
The context of the current scene, providing necessary information and services for initialization.