vtj-component-model
CommunityStructure 3D components with a singleton pattern.
AuthorhexianWeb
Version1.0.0
Installs0
System Documentation
What problem does it solve?
The vtj-component-model provides a clear, reusable pattern for creating 3D components in Three.js by using a class-based singleton tied to the Experience manager. It reduces boilerplate, enforces standardized lifecycle methods, and ensures proper resource cleanup across components.
Core Features & Use Cases
- Singleton Experience integration: Components access shared resources via a central Experience singleton.
- Standard lifecycle: Implement
_init,update,resize, anddestroyto manage objects and resources in the scene. - Reusable templates: Build new 3D objects, managers, or controllers by extending the base pattern when wiring into
src/js/. - Use Case: Create a new 3D object component that automatically registers with the scene, updates per frame, and properly disposes of its geometry and materials on destroy.
Quick Start
- Create a new component file in src/js/ and extend the provided pattern.
- Import Experience, set up dependencies with
this.experience = new Experience(), and implement lifecycle methods. - Instantiate the component in your scene setup and ensure
destroy()cleans up resources.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: vtj-component-model Download link: https://github.com/hexianWeb/Third-Person-MC/archive/main.zip#vtj-component-model Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.