← Zurück zu Ziva
AgentZiva

Skill · Version 1.0.0

Babylon.js-Szenenlebenszyklus

Weist Spielfläche, Render-Schleife und Szenenressourcen klare Besitzer zu. Unterstützt Menü-Rückkehr, Weltwechsel und Fortsetzen, ohne zusätzliche Schleifen oder verspätet geladene alte Szenen.

babylonjs-scene-lifecycle

Entdecke, wie der Skill hilft

Wann ist der Skill hilfreich?

Nutze diesen Skill beim Einbetten von Babylon.js oder bei Weltwechseln ohne zurückbleibende Hintergrundarbeit.

Wobei hilft er dir?

  • Weist Renderloop und Beobachtern jeweils klare Besitzer zu.
  • Verwirft verspätete Rückmeldungen bereits verlassener Szenen.
  • Erhält bewusst geteilte Assets und entfernt szeneneigene Ressourcen.

Das könntest du fragen

Wechsle in unserem Erkundungsspiel zehnmal zwischen Titelbildschirm und drei Inseln. Ändere während des Ladens die Browsergröße und verlasse einen Ladevorgang frühzeitig. Es bleibt eine Render-Schleife, gemeinsame Texturen funktionieren und alte Rückrufe verändern nicht die aktuelle Welt.

Ausführliche Dokumentation

Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.

Details…Weniger anzeigen

Babylon.js — scene lifecycle

Use when creating Babylon scenes, switching worlds or embedding the engine in a web application.

Version and project gate

Inspect package.json and lockfile, Babylon package family and exact version, engine creation, WebGL/WebGPU choice, canvas hosting, loaders, physics plugin version and asset ownership. Keep Babylon Lite and the full engine APIs distinct. Never turn a task into an engine upgrade without the user’s intent. Read the version-matching official reference when an API decision depends on it.

Work

Find the sole owner of Engine, Scene, render loop and canvas. Define mount, suspend, switch and dispose transitions. Track observers and resize listeners with their owner. Gate asynchronous callbacks against a departed scene and preserve intentionally shared resources.

Deliver

A lifecycle map and a scene integration whose render loop and observers stop with its owner. Keep the change in the existing project structure; separate actual observations from the proposed acceptance scenario below.

Failure to prevent

Removing a mesh and disposing it are version/API-specific operations; do not transfer Lite lifetime rules to full-engine code.

Acceptance scenario

Mount and unmount the game repeatedly, switch scenes during loading and check for duplicate loops or orphan observers. Follow the project’s execution and verification permissions. If execution or a target device is unavailable, provide the reproduction steps and name the remaining uncertainty; do not mark it passed.

Scope and sources

This skill belongs to Ziva. Agent selection is restricted by Orqestria’s assigned-agent policy, including forced skill selection; instruction text alone is not an access control. These are original task workflows researched from official documentation, not a copied or endorsed vendor skill.

Enthaltene Dateien 1

  • SKILL.md