Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/draco

Package Overview
Dependencies
Maintainers
9
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/draco

Framework-independent loader and writer for Draco compressed meshes and point clouds

  • 3.4.13
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
234K
increased by0.16%
Maintainers
9
Weekly downloads
 
Created

What is @loaders.gl/draco?

@loaders.gl/draco is a module within the loaders.gl framework that provides support for loading and decoding Draco compressed 3D geometries. Draco is a library for compressing and decompressing 3D geometric meshes and point clouds, which significantly reduces the size of 3D assets.

What are @loaders.gl/draco's main functionalities?

Loading Draco Compressed Data

This feature allows you to load Draco compressed data from a specified URL. The `DracoLoader` is used in conjunction with the `load` function from `@loaders.gl/core` to fetch and decode the compressed 3D geometry.

const { DracoLoader } = require('@loaders.gl/draco');
const { load } = require('@loaders.gl/core');

async function loadDracoData(url) {
  const data = await load(url, DracoLoader);
  console.log(data);
}

loadDracoData('path/to/draco/file.drc');

Decoding Draco Data

This feature allows you to decode Draco compressed data from an ArrayBuffer. The `parse` function from `@loaders.gl/core` is used along with the `DracoLoader` to decode the data into a usable format.

const { DracoLoader } = require('@loaders.gl/draco');
const { parse } = require('@loaders.gl/core');

async function decodeDracoData(arrayBuffer) {
  const data = await parse(arrayBuffer, DracoLoader);
  console.log(data);
}

// Assuming you have an ArrayBuffer of Draco data
const dracoArrayBuffer = new ArrayBuffer();
decodeDracoData(dracoArrayBuffer);

Other packages similar to @loaders.gl/draco

Keywords

FAQs

Package last updated on 29 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc