Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@math.gl/culling
Advanced tools
@math.gl/culling is a JavaScript library that provides various culling algorithms and utilities for 3D graphics applications. It is part of the math.gl suite of libraries, which are designed to handle mathematical computations for graphics and geospatial applications. The culling package specifically focuses on determining the visibility of objects within a scene, which is crucial for optimizing rendering performance.
Frustum Culling
Frustum culling is used to determine whether objects are within the camera's view frustum. This helps in optimizing rendering by not drawing objects that are outside the view.
const { PerspectiveFrustum } = require('@math.gl/culling');
const frustum = new PerspectiveFrustum({
fov: Math.PI / 3,
aspectRatio: 1.0,
near: 1.0,
far: 100.0
});
const boundingVolume = { /* bounding volume data */ };
const isVisible = frustum.intersectsBoundingVolume(boundingVolume);
console.log(isVisible);
Bounding Volume Hierarchy (BVH)
Bounding Volume Hierarchy (BVH) is a tree structure on a set of geometric objects. BVH is used to accelerate the process of ray tracing and collision detection.
const { BoundingVolumeHierarchy } = require('@math.gl/culling');
const bvh = new BoundingVolumeHierarchy({
/* BVH construction data */
});
const ray = { /* ray data */ };
const hit = bvh.intersectRay(ray);
console.log(hit);
Occlusion Culling
Occlusion culling is used to determine if an object is hidden behind other objects. This helps in optimizing rendering by not drawing objects that are not visible to the camera.
const { OcclusionCulling } = require('@math.gl/culling');
const occlusionCulling = new OcclusionCulling();
occlusionCulling.addOccluder({ /* occluder data */ });
const isOccluded = occlusionCulling.isOccluded({ /* bounding volume data */ });
console.log(isOccluded);
Three.js is a popular JavaScript library for creating 3D graphics in the browser. It includes various culling techniques such as frustum culling and occlusion culling, along with a comprehensive set of features for 3D rendering, animations, and more. Compared to @math.gl/culling, three.js is more feature-rich and widely used for complete 3D graphics applications.
Cesium is an open-source JavaScript library for creating 3D globes and maps. It includes advanced culling techniques like frustum culling and occlusion culling to optimize rendering performance. Cesium is specifically designed for geospatial applications, making it a more specialized tool compared to @math.gl/culling.
Babylon.js is a powerful, open-source 3D engine that provides a wide range of features for creating 3D applications, including culling techniques like frustum culling and occlusion culling. It is similar to three.js in terms of functionality but offers different APIs and tools for developers. Compared to @math.gl/culling, Babylon.js is a more comprehensive solution for 3D graphics development.
@math.gl/culling is a suite of math modules for 3D applications.
This module contains classes for vectors and matrices etc.
For documentation please visit the website.
v3.0.0-beta.2 - Jul 24, 2019
FAQs
Culling Functionality for 3D Classes
The npm package @math.gl/culling receives a total of 143,635 weekly downloads. As such, @math.gl/culling popularity was classified as popular.
We found that @math.gl/culling demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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.