# draco3d

> Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.

Latest version **1.5.7** (published 2024-01-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install draco3d
pnpm add draco3d
yarn add draco3d
bun add draco3d
```

## Health

**Score 38/100 (D)** — status: abandoned.

Positive: has types package; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.5.7 |
| Published | 2024-01-17 |
| First published | 2017-07-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | separate (@types/draco3d) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 852.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7480 |
| Author | Google Draco Team |
| Maintainers | zhafang, frankgalligan, ondys, tomfinegan, vytyaz |
| Keywords | geometry, compression, mesh, point cloud |

## Links

- npm: https://www.npmjs.com/package/draco3d
- Repository: https://github.com/google/draco
- Homepage: https://github.com/google/draco#readme
- Issues: https://github.com/google/draco/issues
- npm.io page: https://npm.io/package/draco3d

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.5.7 (latest) — 2024-01-17
- 1.5.6 — 2023-02-07
- 1.5.5 — 2022-10-29
- 1.5.4 — 2022-10-27
- 1.5.3 — 2022-07-07
- 1.5.2 — 2022-02-17
- 1.5.1 — 2022-02-15
- 1.5.0 — 2021-12-08
- 1.4.3 — 2021-10-11
- 1.4.1 — 2020-12-08
- 1.4.0 — 2020-12-01
- 1.3.6 — 2020-03-03
- 1.3.4 — 2018-08-23
- 1.3.3 — 2018-06-15
- 1.3.2 — 2018-06-05
- … 12 more at https://npm.io/package/draco3d/versions

## README

<p align="center">
<img src="https://github.com/google/draco/raw/master/docs/DracoLogo.jpeg" />
</p>

News
=======

Check out the [README](https://github.com/google/draco/blob/1.5.7/README.md)
file for news about this release.

Description
===========

[Draco] is a library for compressing and decompressing 3D geometric [meshes] and
[point clouds]. It is intended to improve the storage and transmission of 3D
graphics.

Draco was designed and built for compression efficiency and speed. The code
supports compressing points, connectivity information, texture coordinates,
color information, normals, and any other generic attributes associated with
geometry. With Draco, applications using 3D graphics can be significantly
smaller without compromising visual fidelity. For users, this means apps can
now be downloaded faster, 3D graphics in the browser can load quicker, and VR
and AR scenes can now be transmitted with a fraction of the bandwidth and
rendered quickly.

[Draco] is released as C++/Javascript source code that can be used to compress 3D
graphics as well as decoders for the encoded data.

NPM Package
===========

The code shows a simple example of using Draco encoder and decoder with Node.js.
`draco_encoder_node.js` and `draco_decoder_node.js` are modified Javascript
encoding/decoding files that are compatible with Node.js.

How to run the code:

(1) Install draco3d package :

~~~~~ bash
$ npm install draco3d
~~~~~

### Working example
`draco_nodejs_example.js` has the example code for usage.

(2) Run example code to test:

~~~~~ bash
$ cp node_modules/draco3d/draco_nodejs_example.js .
$ cp node_modules/draco3d/bunny.drc .
$ node draco_nodejs_example.js
~~~~~

The code loads the [Bunny] model, it will first decode to a mesh
and then encode it with different settings.


### Minimal examples
These examples only show how to load the encoder and decoder modules. `draco_minimal_encoder_decoder_example.js`, `draco_minimal_encoder_example.js`, and `draco_minimal_decoder_example.js` has the example code for usage.

(2) Run the code to test:

~~~~~ bash
$ node draco_minimal_encoder_decoder_example.js
~~~~~

~~~~~ bash
$ node draco_minimal_encoder_example.js
~~~~~

~~~~~ bash
$ node draco_minimal_decoder_example.js
~~~~~

References
==========
[Draco]: https://github.com/google/draco
[meshes]: https://en.wikipedia.org/wiki/Polygon_mesh
[point clouds]: https://en.wikipedia.org/wiki/Point_cloud
[Bunny]: https://graphics.stanford.edu/data/3Dscanrep/

Bunny model from Stanford's graphic department <https://graphics.stanford.edu/data/3Dscanrep/>

---
_Source: https://npm.io/package/draco3d · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
