# pmndrs/gltfjsx

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/pmndrs-gltfjsx).**

5,728 stars · 373 forks · JavaScript · mit

## Links

- GitHub: https://github.com/pmndrs/gltfjsx
- Homepage: https://gltf.pmnd.rs
- awesome-repositories: https://awesome-repositories.com/repository/pmndrs-gltfjsx.md

## Description

gltfjsx is a toolkit that converts GLTF 3D model files into reusable React components for use with React-three-fiber and three.js scenes. It transforms the scene hierarchy of a GLTF file into a declarative component tree, generating type-safe TypeScript definitions for all nodes and materials to enable type-checked usage in React applications.

The tool extracts animation clips from GLTF files and exposes them as playable actions through a generated React hook, allowing developers to control animations imperatively. It also detects identical geometry and materials within a model and replaces them with instanced meshes, reducing draw calls for improved rendering performance. Additionally, gltfjsx provides a structure inspector that loads a model's scene hierarchy and material properties without binary data, useful for unit testing and debugging.

Beyond conversion, gltfjsx functions as a web optimization pipeline for 3D assets, compressing textures, deduplicating geometry, and pruning unused textures, animations, and nodes from GLB binaries to reduce file size for web delivery. The tool supports both command-line usage and a programmatic JavaScript API that accepts GLTF objects or scenes and returns JSX strings without CLI dependency.

## Tags

### User Interface & Experience

- [3D Model Converters](https://awesome-repositories.com/f/user-interface-experience/component-utilities/ui-frameworks/component-libraries/react-components/3d-model-converters.md) — Converts GLTF 3D models into reusable React-three-fiber components with type-safe TypeScript definitions.
- [GLTF Animation Hooks](https://awesome-repositories.com/f/user-interface-experience/animation-and-motion-systems/animation-lifecycle-hooks/react-animation-hooks/gltf-animation-hooks.md) — Parses GLTF animation tracks and exposes them as imperative play/stop actions via a generated useAnimations hook.

### Artificial Intelligence & ML

- [Declarative Three.js Component Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/augmented-reality-frameworks/a-frame-and-three-js-renderers/declarative-three-js-component-generators.md) — Maps GLTF nodes and materials directly to React-three-fiber JSX elements, preserving the scene hierarchy as a component tree.
- [Web Model Optimizers](https://awesome-repositories.com/f/artificial-intelligence-ml/model-optimization/inference-deployment/web-model-optimizers.md) — Compresses textures, deduplicates geometry, and prunes assets to reduce file size for web delivery. ([source](https://cdn.jsdelivr.net/gh/pmndrs/gltfjsx@master/README.md))

### Development Tools & Productivity

- [3D Model Type Definitions](https://awesome-repositories.com/f/development-tools-productivity/type-safe-binding-generators/type-safe-mapper-generators/3d-model-type-definitions.md) — Generating TypeScript definitions for 3D model nodes and materials to enable type-checked usage in React applications. ([source](https://cdn.jsdelivr.net/gh/pmndrs/gltfjsx@master/README.md))

### Graphics & Multimedia

- [Web Optimizers](https://awesome-repositories.com/f/graphics-multimedia/3d-asset-pipelines/web-optimizers.md) — Optimizes 3D models for web delivery by compressing textures, deduplicating geometry, and pruning unused assets.
- [GLTF Animation Extractions](https://awesome-repositories.com/f/graphics-multimedia/animation-clip-slicing/gltf-animation-extractions.md) — Extracts animation clips from GLTF files and exposes them as playable actions through a generated React hook. ([source](https://cdn.jsdelivr.net/gh/pmndrs/gltfjsx@master/README.md))
- [Geometry Instancing](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/systems/3d-graphics-pipelines/geometry-instancing.md) — Detects identical geometry and materials in 3D models and replaces them with instanced meshes to reduce draw calls. ([source](https://cdn.jsdelivr.net/gh/pmndrs/gltfjsx@master/README.md))
- [GLTF Structure Inspectors](https://awesome-repositories.com/f/graphics-multimedia/gltf-renderers/gltf-structure-inspectors.md) — Loads a GLTF file's scene hierarchy and material properties without binary data for unit testing and debugging.
- [Automatic Detectors](https://awesome-repositories.com/f/graphics-multimedia/mesh-instancing/automatic-detectors.md) — Automatically detects identical geometry and materials in 3D models and replaces them with instanced meshes.

### Web Development

- [3D Scene Transpilations](https://awesome-repositories.com/f/web-development/jsx-compilers/3d-scene-transpilations.md) — Transforms GLTF scene graphs into React JSX components during a build step, eliminating runtime parsing overhead.
- [GLTF-to-JSX Transformers](https://awesome-repositories.com/f/web-development/jsx-transformers/gltf-to-jsx-transformers.md) — Exposes a JavaScript function that accepts a GLTF object or scene and returns JSX strings without CLI dependency.
- [GLTF Asset Optimizers](https://awesome-repositories.com/f/web-development/web-infrastructure-deployment/asset-management-build-tools/asset-loading-resolution/binary-asset-loading/gltf-asset-optimizers.md) — Strips unused textures, animations, and nodes from the GLB binary while recompressing remaining assets for web delivery.

### Data & Databases

- [GLTF Structure Inspectors](https://awesome-repositories.com/f/data-databases/query-translators/multi-format-exports/3d-scene-exporters/gltf-exporters/gltf-structure-inspectors.md) — Loads a GLTF file's scene hierarchy and material properties without binary data for unit testing and debugging. ([source](https://cdn.jsdelivr.net/gh/pmndrs/gltfjsx@master/README.md))
- [GLTF-to-JSX Parsers](https://awesome-repositories.com/f/data-databases/query-translators/multi-format-exports/3d-scene-exporters/gltf-exporters/gltf-to-jsx-parsers.md) — Parses GLTF objects or scenes into JSX programmatically without using command-line tools. ([source](https://cdn.jsdelivr.net/gh/pmndrs/gltfjsx@master/README.md))

### Software Engineering & Architecture

- [GLTF Schema Type Inferences](https://awesome-repositories.com/f/software-engineering-architecture/typescript-type-definitions/schema-driven-type-inference/schema-type-inference/gltf-schema-type-inferences.md) — Generates TypeScript interfaces for node names, material types, and geometry shapes by introspecting the GLTF JSON structure.
