Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@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 [v9.1.0-beta.3] - Jan 15 2025
FAQs
deck.gl layers that loads 3D meshes or scene graphs
The npm package @deck.gl/mesh-layers receives a total of 151,314 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.