Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
frustum-intersects
Advanced tools
Readme
A zero-dependency lib extracted from THREE.js to determine if camera's frustum intersects with given box or sphere.
npm i frustum-intersects --save
import { intersectsBox, intersectsSphere } from 'frustum-intersects';
const ret = intersectsBox([
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1],
[[-1,-1,-1], [1,1,1]]);
const ret2 = intersectsSphere([
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1],
[[0, 0, 0], 1]);
<script src="https://cdn.jsdelivr.net/npm/frustum-intersects/dist/frustum-intersects.js"></script>
<script>
const ret = frustum.intersectsBox(matrix, box);
</script>
matrix
camera's 4x4 projection view matrix array, compatible with gl-matrixbox
the aabb box, [[minx, miny, minz], [maxx, maxy, maxz]]mask
A 6 chars string mask (e.g. "111111"
) of frustum planes, plane with mask of 0
will always return true
matrix
camera's 4x4 projection view matrix array, compatible with gl-matrixsphere
sphere, [[centerx, centery, centerz], radius]mask
A 6 chars string mask (e.g. "111111"
) of frustum planes, plane with mask of 0
will always return true
the planes' order of mask is
{right}{left}{bottom}{top}{z-far}{z-near}
,
FAQs
Determines if camera's frustum intersects with aabb box and sphere
The npm package frustum-intersects receives a total of 884 weekly downloads. As such, frustum-intersects popularity was classified as not popular.
We found that frustum-intersects demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.