Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@deck.gl/mesh-layers
Advanced tools
@deck.gl/mesh-layers is a part of the Deck.gl framework, which is a WebGL-powered framework for visual exploratory data analysis of large datasets. The @deck.gl/mesh-layers package specifically provides layers for rendering 3D meshes, which can be used for visualizing complex 3D geometries, models, and scenes.
Simple Mesh Layer
This code demonstrates how to create a SimpleMeshLayer using the @deck.gl/mesh-layers package. It loads a 3D mesh from an OBJ file and renders it with a specified color.
const {Deck} = require('@deck.gl/core');
const {SimpleMeshLayer} = require('@deck.gl/mesh-layers');
const {OBJLoader} = require('@loaders.gl/obj');
const mesh = new OBJLoader().parse(objFileContent);
const layer = new SimpleMeshLayer({
id: 'simple-mesh-layer',
data: [{position: [0, 0, 0]}],
mesh,
getPosition: d => d.position,
getColor: [255, 0, 0]
});
const deck = new Deck({
initialViewState: {
longitude: -122.45,
latitude: 37.8,
zoom: 14
},
controller: true,
layers: [layer]
});
Scenegraph Layer
This code demonstrates how to create a ScenegraphLayer using the @deck.gl/mesh-layers package. It loads a 3D scenegraph from a GLTF file and renders it with specified position, orientation, and scale.
const {Deck} = require('@deck.gl/core');
const {ScenegraphLayer} = require('@deck.gl/mesh-layers');
const layer = new ScenegraphLayer({
id: 'scenegraph-layer',
data: [{position: [0, 0, 0]}],
scenegraph: 'path/to/scenegraph.gltf',
getPosition: d => d.position,
getOrientation: [0, 0, 90],
getScale: [1, 1, 1]
});
const deck = new Deck({
initialViewState: {
longitude: -122.45,
latitude: 37.8,
zoom: 14
},
controller: true,
layers: [layer]
});
Three.js is a popular JavaScript library for creating 3D graphics in the browser. It provides a comprehensive set of features for rendering 3D models, scenes, and animations. Compared to @deck.gl/mesh-layers, Three.js offers more low-level control and flexibility but requires more boilerplate code to set up and manage scenes.
Babylon.js is another powerful JavaScript framework for building 3D games and visualizations. It offers a rich set of features for rendering 3D content, including support for WebXR, physics, and advanced materials. Babylon.js is more feature-rich and game-oriented compared to @deck.gl/mesh-layers, which is more focused on data visualization.
A-Frame is a web framework for building virtual reality (VR) experiences. It is built on top of Three.js and provides an easy-to-use, declarative HTML-like syntax for creating 3D and VR content. A-Frame is more focused on VR and AR experiences, whereas @deck.gl/mesh-layers is geared towards data visualization and rendering 3D meshes.
deck.gl [9.0.0-alpha.3] - Nov 14 2023
FAQs
deck.gl layers that loads 3D meshes or scene graphs
The npm package @deck.gl/mesh-layers receives a total of 131,114 weekly downloads. As such, @deck.gl/mesh-layers popularity was classified as popular.
We found that @deck.gl/mesh-layers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.