1. Products
  2.   Aspose.3D
  3.   Aspose.3D FOSS for TypeScript

Aspose.3D FOSS for TypeScript

Load, construct, transform, and export 3D scenes from Node.js — fully typed, open-source, and production-ready with a single npm install.

Open-Source TypeScript Library for 3D File Processing

Aspose.3D FOSS for TypeScript is a MIT-licensed library for working with 3D file formats in Node.js applications. Install it with a single npm install @aspose/3d command and start reading, constructing, and writing 3D scenes in TypeScript immediately, with no native addons to compile, no external SDKs to install, and no renderer required.

The library exposes a fully typed scene-graph API built around Scene, Node, Entity, Mesh, Camera, Light, and Transform, the same conceptual model used by professional 3D tools. Format support includes OBJ (Wavefront, with .mtl material loading), glTF 2.0 and GLB binary (PBR materials), STL (binary and ASCII, full roundtrip), COLLADA (DAE), 3MF, and FBX. Per-format option classes such as ObjLoadOptions and GltfSaveOptions give you precise control over coordinate-system orientation, scale, normal normalization, binary vs. JSON output, and material loading.

Aspose.3D FOSS targets Node.js 16, 18, 20, and 22+ with TypeScript 5.0+ and compiles to CommonJS. The library ships with strict TypeScript compiler settings (noImplicitAny, strictNullChecks) so your IDE provides full autocomplete and compile-time safety. Its single runtime dependency, xmldom, is installed automatically.

3D Format Support and Typed Scene-Graph API

  • OBJ / MTL: Load Wavefront OBJ files with accompanying material definitions.
  • glTF 2.0 / GLB: PBR material loading and binary GLB output via GltfSaveOptions.
  • STL: Read and write both binary and ASCII STL with full roundtrip verification.
  • COLLADA, 3MF, FBX: Additional format support with per-format option classes.
  • Full TypeScript types: Every class, method, and option is strongly typed with noImplicitAny and strictNullChecks.

Where Aspose.3D FOSS Can Be Used

  • Node.js asset pipelines: Validate, re-orient, and re-export OBJ/GLB assets in CI.
  • Game tooling: Batch-process 3D meshes without a native engine or renderer.
  • 3D printing workflows: Read, validate, and re-export STL and 3MF files.
  • Serverless backends: Run 3D conversion endpoints in Lambda or Cloud Functions.
  • Content migration: Convert between format families at scale from a single script.

Per-Format Options and Coordinate Control

  • Coordinate-system orientation: Flip axes and adjust scale per format with option classes.
  • Normal normalization: Automatically normalize vertex normals on load or save.
  • Binary vs. JSON output: Select compact GLB or readable glTF via GltfSaveOptions.
  • Material loading control: Enable or disable MTL/texture loading for faster parsing.
  • Round-trip fidelity: Unknown scene-graph nodes are preserved verbatim on re-save.

Developer Experience

Aspose.3D FOSS for TypeScript installs with a single npm install @aspose/3d command. There are no native addons to compile. The library is pure TypeScript/JavaScript with one auto-installed dependency (xmldom).

The strongly typed API provides full IDE autocomplete for every scene-graph class and format option. The library targets Node.js 16–22+ and TypeScript 5.0+, runs identically on Linux CI runners and developer workstations, and is MIT-licensed with an open issue tracker on GitHub.

Load an OBJ Scene and Export as glTF

Install with npm, then use the async scene.open() method with ObjLoadOptions to load the mesh together with its MTL material file. Calling scene.save() with a .gltf extension writes standard glTF 2.0 JSON; the format is inferred automatically from the file extension.

npm install @aspose/3d
import { Scene } from "@aspose/3d";
import { ObjLoadOptions } from "@aspose/3d/formats";

const scene = new Scene();
await scene.open("model.obj", new ObjLoadOptions());

// Export as glTF 2.0 JSON
await scene.save("model.gltf");

Convert STL to Binary GLB

To produce a compact binary GLB instead of the default JSON glTF, pass GltfSaveOptions with useBinary = true. Both open() and save() are async, so await each call or chain them in a Promise pipeline.

import { Scene } from "@aspose/3d";
import { GltfSaveOptions } from "@aspose/3d/formats";

const scene = new Scene();
await scene.open("mesh.stl");

// Save as compact binary GLB
const opts = new GltfSaveOptions();
opts.useBinary = true;
await scene.save("mesh.glb", opts);

Frequently Asked Questions

What is Aspose.3D FOSS for TypeScript?

It is a free, MIT-licensed TypeScript/Node.js library for loading, manipulating, and saving 3D scenes without installing any native addon or external SDK.

Which 3D formats are supported?

OBJ (with .mtl), glTF 2.0 and GLB, STL (binary and ASCII), COLLADA (DAE), 3MF, and FBX. Each format has a dedicated typed options class.

Does it require native Node.js addons?

No. Aspose.3D FOSS for TypeScript is pure JavaScript/TypeScript. It requires no compilation step and has a single runtime dependency (xmldom) installed automatically by npm.

How do I install it?

Run npm install @aspose/3d. No additional system packages or native addons are required.

Which Node.js and TypeScript versions are supported?

Node.js 16, 18, 20, and 22+. TypeScript 5.0+. The library compiles to CommonJS and works with strict TypeScript settings.

Does it ship with TypeScript type definitions?

Yes. All classes, methods, enums, and option types are fully typed with noImplicitAny and strictNullChecks enabled.

Can I control coordinate-system orientation?

Yes. Per-format option classes such as ObjLoadOptions and GltfSaveOptions let you flip axes, adjust scale, and normalize normals without custom parsing code.

Where can I find the source code?

The library is MIT-licensed and hosted on GitHub. Bug reports and pull requests are welcome.

  

Support and Learning Resources