원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
Add a Threenix Component
Use the live Threenix library to integrate the requested resource into the target project. Accept a resource slug after $threenix-add-component, or a natural-language description.
Workflow
- Read the target repository's instructions and inspect its package manager, installed dependencies, scene boundary, renderer, camera, controls, postprocessing, and asset handling.
- Call
list_componentson thethreenixMCP server. Match the request against its slugs, summaries, and tags, then callget_component_referencefor the selected slug. Fetch only references needed for the request. Ask for clarification when materially different matches or integration sites remain plausible. If either tool is unavailable or fails, explain the problem and stop; do not reconstruct the reference from memory or bundled sources. - Read the returned
integrationNotesbefore editing and check installed APIs against the reference's dependencies. Do not migrate a WebGL renderer, silently upgrade existing dependencies, remove competing camera controllers, or replace host infrastructure to apply a reference. Reuse a compatible Canvas; add one only when the requested setup needs it. - Choose one destination root near the target scene. Write the returned
files[]beneath it, preserving relative paths: writeutf-8content verbatim and decodebase64content. Check for existing files before overwriting local changes. Fordownloads[], download each URL directly to its returned path without loading binary data into model context. Verify HTTP success and all expected files before integrating; report missing or failed assets. Reject absolute paths or paths escaping the chosen root. - Follow the reference's integration and runtime guidance. Preserve host camera, renderer, controls, scene, loading UI, and postprocessing unless the requested resource explicitly owns that responsibility. Keep host wiring outside copied source; customize reference source only where its notes permit it. Never copy demo-only infrastructure.
- Add only absent dependency names using the project's package manager and returned versions. Install
dependenciesas runtime dependencies anddevDependenciesas development dependencies. Preserve existing ranges and report incompatible APIs instead of silently replacing versions. - Run the narrowest relevant type-check or build and the resource-specific runtime checks. Report unperformed checks and unresolved compatibility or asset errors; a successful build alone does not establish a visual or performance improvement.

