Threejs part export

From XuShuwenn/RedAct · View interactive version

Threejs part export is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Parse a Three.js scene to identify part-level groups and export both per-part (links) OBJs and per-mesh OBJs with world transforms applied.

How to use this skill

Skill file

Three.js Part-Level Mesh Export

Export part-level groups and individual meshes from a Three.js scene as OBJ files. This workflow identifies parts as named THREE.Group containers (and assigns ungrouped meshes to a fallback part) and writes:

Results have world transforms baked into geometry to preserve placement.

When to Use

Use this skill when you need to:

Core Workflow

1) Inspect the scene module

2) Verify environment and module setup

3) Define part identification rules

4) Traverse, bake transforms, and export

5) Organize outputs

Verification

Perform these checks after export:

Common Pitfalls

Optional Script Usage

A generic Node.js ESM script is provided to load a scene module, identify parts, and export OBJs.

Example usage:

--input ./path/to/scene_module.mjs \

--func createScene \

--linksOut ./output/links \

--meshesOut ./output/part_meshes \

--includeRoot false

Arguments:

Success criteria: After running, the links directory contains one OBJ per part; the part_meshes directory contains a subfolder per part with OBJ files for each mesh; files are non-empty and reflect world-space placement.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.