Skip to content

Mazas/3DMT

Repository files navigation

Version

3D Model Transformer

Reduces 3D model size to make them more web friendly. Reduces mesh complexity, downscales images and converts them to web friendly formats.

All done in-memory.

Based on gltfjsx

But why tho?

The goal is to reduce the 3D model sizes to improve loading times on the web/ mobile. The intention is to allow reducing the model sizes before serving them from the backend server. Difference from gltfjsx is that this module does the transformation in memory instead of using file system, making it faster. Long term goal is to reduce the dependency on node native packages which would allow this to be useful on edge compute runtimes such as Fastly.

Installing

You can install the package form npm with:

npm i @mazas/3dmt

Usage

import { transform } from '@mazas/3dmt';

const data = await transform('https://example.com/model.glb', {
  format: 'webp',
});

Contributing

Just clone the repo, make a branch and start messing around. Create a PR if you want your changes merged.

About

3D Model Transformer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published