---
Product: Aspose.3D
Platform: typescript
Page Type: kb
Canonical URL: https://kb.aspose.org/3d/typescript/how-to-get-started-3d-typescript
Last Updated: 2026-04-04
---

# How to Get Started with Aspose.3D FOSS for TypeScript

Learn how to install @aspose/3d via npm, load a 3D model, traverse the scene graph, and save to a different format using Scene, Node, and scene.save in TypeScript.

`@aspose/3d` for TypeScript is a free, MIT-licensed package for loading, manipulating, and
saving 3D files in Node.js — no native binaries required, built from source.

## Step-by-Step Guide

### Step 1: Install the Package

Build from source (Node.js 18 or later required):

```bash
git clone https://github.com/aspose-3d-foss/Aspose.3D-FOSS-for-TypeScript.git
cd Aspose.3D-FOSS-for-TypeScript
npm install
npm run build
```

Verify the install loaded correctly:

```typescript
import { Scene } from "@aspose/3d";
console.log("@aspose/3d loaded.");
```

---

### Step 2: Import Required Classes

Import the classes you need from the package:

```typescript
import { Scene, Node } from "@aspose/3d";
```

---

### Step 3: Load a 3D File

Use `scene.open()` to load any supported format. The library detects the format
automatically from the file extension:

```typescript
import { Scene } from "@aspose/3d";

const scene = new Scene();
scene.open("model.obj");
console.log(`Loaded scene. Root node: ${scene.rootNode.name}`);
```

Or use the static factory method:

```typescript
const scene = Scene.fromFile("model.glb");
```

---

### Step 4: Traverse the Scene Graph

A loaded scene is a tree of `Node` objects rooted at `scene.rootNode`:

```typescript
import { Scene, Node } from "@aspose/3d";

function walk(node: Node, depth: number = 0): void {
    const indent = " ".repeat(depth * 2);
    console.log(`${indent}Node: ${node.name}`);
    for (const child of node.childNodes) {
        walk(child, depth + 1);
    }
}

const scene = Scene.fromFile("model.obj");
walk(scene.rootNode);
```

---

### Step 5: Save to a Different Format

Use `scene.save()` to export to any supported output format. The library detects the
output format from the file extension:

```typescript
import { Scene } from "@aspose/3d";

const scene = Scene.fromFile("model.obj");
scene.save("output.glb");
console.log("Saved as GLB.");
```

## Common Issues and Fixes

**`Error: ENOENT` when calling `scene.open()`**
The path you passed does not exist. Use an absolute path or `path.resolve()` to ensure
the file path is correct.

**Unknown format error**
Ensure the file extension matches the actual format. The library detects format by
extension for `open()` and `fromFile()`. Pass an explicit format parameter to override.

**Empty scene after loading**
Some binary formats may require specific load options. Try using the explicit overload
with format-specific options if the default load produces an empty scene.

**TypeScript import errors**
Type definitions are bundled with the package. Ensure `"moduleResolution": "bundler"` or
`"node16"` is set in your `tsconfig.json`.

## Frequently Asked Questions

### Does @aspose/3d require any native binaries?

No. The package is pure JavaScript/TypeScript with no native dependencies. It runs on
any platform supporting Node.js 18 or later.

### Which Node.js versions are supported?

Node.js 18 or later. The package runs on Windows, macOS, and Linux.

### Is the library free for commercial use?

Yes. It is released under the MIT License. You may use, modify, and redistribute it for
any purpose, including commercial applications.

### Which 3D formats can I read and write?

The package supports OBJ, STL, glTF 2.0 / GLB, FBX, COLLADA, and 3MF for both reading
and writing. Use the extension-based `scene.save()` to export to any supported format.

### Can I create a 3D scene from scratch?

Yes. Construct a `Scene` with no arguments, add child nodes to `scene.rootNode`, and
save to the desired format.

## See Also

- [FAQ — Aspose.3D FOSS for TypeScript](https://kb.aspose.org/3d/typescript/faq/)
- [How to Load 3D Models in TypeScript](https://kb.aspose.org/3d/typescript/how-to-load-3d-models-in-typescript/)
- [How to Convert 3D Models in TypeScript](https://kb.aspose.org/3d/typescript/how-to-convert-3d-models-typescript/)
- [Getting Started Docs](https://docs.aspose.org/3d/typescript/getting-started/)
- [API Reference](https://reference.aspose.org/3d/typescript/)
- [Aspose.3D — Enterprise Knowledge Base](https://kb.aspose.com/3d/)