Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@loaders.gl/draco
Advanced tools
Framework-independent loader and writer for Draco compressed meshes and point clouds
@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.
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);
Three.js is a popular JavaScript library for creating and displaying 3D graphics in the browser. It includes support for loading and decoding Draco compressed geometries through the `THREE.DRACOLoader` class. Compared to @loaders.gl/draco, Three.js offers a more comprehensive suite of tools for 3D rendering and scene management.
Draco3D is the official JavaScript implementation of the Draco compression library. It provides low-level APIs for encoding and decoding 3D geometries. While @loaders.gl/draco focuses on ease of use and integration with the loaders.gl framework, draco3d offers more granular control over the compression and decompression processes.
loaders.gl is a collection of framework-independent 3D and geospatial parsers and encoders.
This module contains loader and writer for Draco compressed meshes and point clouds.
For documentation please visit the website.
v4.3.0-alpha.7
FAQs
Framework-independent loader and writer for Draco compressed meshes and point clouds
The npm package @loaders.gl/draco receives a total of 222,054 weekly downloads. As such, @loaders.gl/draco popularity was classified as popular.
We found that @loaders.gl/draco demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.