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

# VertexDeclaration

## Overview

`VertexDeclaration` is a class in Aspose.3D FOSS for Typescript.

VertexDeclaration.constructor creates a new, empty vertex declaration.

This class provides 6 methods for working with VertexDeclaration objects in Typescript programs.
Available methods include: `addField`, `clear`, `compareTo`, `constructor`, `fromGeometry`, `getField`.
All public members are accessible to any Typescript application after installing the Aspose.3D FOSS for Typescript package.
Properties: `count`, `sealed`, `size`.

## Description

`VertexDeclaration` is a class in the Aspose.3D FOSS library for TypeScript that exposes 5 methods and 3 properties for programmatic use.

Core capabilities include: `boolean`; `number`; `number`. These operations enable developers to integrate vertexdeclaration functionality directly into TypeScript applications.

The class also provides the `sealed` property (gets the sealed), the `count` property (gets the count), the `size` property (gets the size).

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

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `sealed` | `boolean` | Read | Gets the sealed. |
| `count` | `number` | Read | Gets the count. |
| `size` | `number` | Read | Gets the size. |

## Methods

| Signature | Description |
|-----------|-------------|
| `constructor()` | Creates a new, empty vertex declaration |
| `clear()` | Removes all fields from the declaration |
| `addField(dataType: VertexFieldDataType, semantic: VertexFieldSemantic, index: number, alias: string)` → `VertexField` | Adds a field with type, semantic, index, and alias, returning the VertexField |
| `fromGeometry(_geometry: any, _useFloat: boolean)` → `VertexDeclaration` | **Not implemented in the FOSS edition — throws at runtime.** Builds a declaration from geometry data, optionally using float precision |
| `compareTo(other: VertexDeclaration)` → `number` | Compares this declaration with another and returns a sorting number |
| `getField(index: number)` → `VertexField` | Returns the field at the specified index |

## See Also

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