---
Product: Aspose.3D
Platform: typescript
Page Type: reference
Canonical URL: https://reference.aspose.org/3d/typescript/GltfFormatDetector
---

# GltfFormatDetector

## Overview

`GltfFormatDetector` identifies glTF (.gltf/.glb) content by inspecting the opening bytes or file extension of an input stream. It is used internally by `Scene.open()` to select the correct importer automatically when no explicit format is specified by the caller. The detector examines glTF (.gltf/.glb)-specific file signatures and returns the `GltfFormat` descriptor on a confirmed match, or yields to other detectors when the content does not conform to the expected glTF (.gltf/.glb) structure.

## Description

`GltfFormatDetector` is a class in the Aspose.3D FOSS library for TypeScript that exposes 1 method and 0 properties for programmatic use. It extends `FormatDetector`, inheriting shared functionality from its parent type.

Core capabilities include: Creates a new instance of gltfformatdetector. These operations enable developers to integrate gltfformatdetector functionality directly into TypeScript applications.

Instances are created through a single constructor that initializes the object with default values.

## Methods

| Signature | Description |
|-----------|-------------|
| `constructor()` | Creates a new instance of GltfFormatDetector |
| `detect(stream: any, fileName: string)` → `FileFormat \| null` | Returns the detected FileFormat for the given stream and file name, or null if detection fails |

## See Also

- [Aspose.3D — Enterprise API Reference](https://reference.aspose.com/3d/)