Download Download
Pipeline and Runtime Lifecycle
GLB import, pointer capture, and feature registration

Engine node responsibilities

  • Pointer capture: when a FoldedPaperEngine node enters the tree, it remembers the prior mouse mode and captures the pointer if Capture Pointer is true. On exit it restores the original mode.
  • Load and unload: _enter_tree defers _setup, which calls global_load_level with the configured path. _exit_tree defers _teardown to unload the active GLB and detach any listeners.
  • Global registries: the engine stores a global FeatureUtils instance, the current stage node, and the active WorldEnvironment so sub-scenes and events share the same context.

Load flow

  1. Input setup: device change listeners are connected on first load so controllers can be remapped at runtime.
  2. Scene creation: the GLB/GLTF is instantiated under the engine node. Feature utils parse user data for scene settings, objects, triggers, animations, and inventory.
  3. Frame events: a FrameEventRunner is attached and populated with animation-specific frame triggers so events can fire at precise timestamps.