---
name: gltf-export
description: "Export portable 3D assets from a browser scene. Use for GLB, glTF, export, assets."
---

# Экспорт GLB и ассетов

Export portable 3D assets from a browser scene.

## Implementation decisions

1. Export the selected object hierarchy rather than cameras, studio environment or unrelated UI geometry.
2. Use GLTFExporter binary mode for a single GLB file and retain original TypeScript builders for editability.
3. Explain that advanced material extensions depend on the target viewer; inspect a round-trip in the actual destination before final delivery.
4. Handle exporter failure and revoke download object URLs after the browser has started saving.

## Working source

Read [components/scene.tsx](../webcraft-shared/source/components/scene.tsx) when implementing this capability. The example belongs to the WEBCRAFT React/Three.js playground except the Python commerce starter, which runs without third-party dependencies. Use [shared catalog](../webcraft-shared/source/lib/catalog.ts) only to resolve related examples. Adapt the source to the target framework and preserve existing project conventions.

The original workshop uses Three.js 0.180 and procedural builders. The external asset viewer separately loads licensed glTF, scanned PBR maps and HDRIs. Preserve the provenance of each corpus. See [objects.ts](../webcraft-shared/source/lib/objects.ts) for material and geometry ownership and [scene.tsx](../webcraft-shared/source/components/scene.tsx) for renderer lifecycle.

## Verify observable behavior

- Exports contain only the intended object.
- Material and texture ownership are documented.
- Loading the GLB in the target engine preserves scale and orientation.

## Scope

Use only the parts relevant to the requested task. This skill does not grant permission to publish, spend money, change account access or expose secrets. The original brief and environment rules remain authoritative.

Live example: https://webcraft-skill-library.undrgrnd.chatgpt.site/demos/3d

Version 2.0.0 · Original WEBCRAFT content · MIT
