Three.js scene ownership
Defines what belongs to a scene and what survives between scenes. It keeps rendering loops, listeners and pending loads under clear ownership, making world changes and embedding easier to maintain.
threejs-scene-ownership
See how it helpsWhen is it useful?
Use when mounting or navigating creates duplicate animation loops.
What does it help you do?
- Separates persistent gameplay state from disposable presentation nodes.
- Tracks listeners and pending loads under explicit owners.
- Defines suspend, resume and unmount cleanup without destroying shared assets.
Try asking this
Switch our exploration game between a city and an underground map while retaining the player inventory. Unmount the game during a slow model load, then reopen it. Confirm one animation loop remains and old input listeners cannot act on the new scene.
Detailed documentation
Read the skill’s original instructions, examples and checks in their authored language.
Show less
Three.js — scene ownership
Use when embedding Three.js, restructuring scene graphs or switching game worlds.
Version and project gate
Inspect Three.js revision, renderer/backend, addons import style, bundler, color-management conventions, animation loop owner, scene scale, glTF/decoder versions and existing physics wrapper. 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
Identify the owner of renderer, scene, camera, controls and animation loop. Keep gameplay state outside disposable presentation nodes. Track event listeners and pending loads per owner. Define suspend/resume/unmount behavior and release only resources owned by the leaving scene.
Deliver
A scene/resource ownership map and a complete mount-to-unmount integration. Keep the change in the existing project structure; separate actual observations from the proposed acceptance scenario below.
Failure to prevent
Removing an Object3D does not dispose its geometry, materials or textures. Shared assets must outlive individual instances.
Acceptance scenario
Mount twice, switch scenes while loading and confirm that no abandoned loop or event handler continues. 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 Vex. 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.
Included files 1
SKILL.md
