Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@math.gl/culling

Package Overview
Dependencies
Maintainers
3
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@math.gl/culling - npm Package Compare versions

Comparing version 3.6.3 to 4.0.0-alpha.1

dist/constants.js

2

dist/lib/algorithms/compute-eigen-decomposition.d.ts
import { Matrix3 } from '@math.gl/core';
export declare type EigenDecomposition = {
export type EigenDecomposition = {
unitary: Matrix3;

@@ -4,0 +4,0 @@ diagonal: Matrix3;

@@ -1,2 +0,2 @@

import { Vector3, Matrix3, Matrix4, Quaternion } from '@math.gl/core';
import { Vector3, Matrix3, Matrix4, Quaternion, NumericArray } from '@math.gl/core';
import type { BoundingVolume } from './bounding-volume';

@@ -18,3 +18,3 @@ import BoundingSphere from './bounding-sphere';

*/
constructor(center?: readonly number[], halfAxes?: readonly number[]);
constructor(center?: Readonly<NumericArray>, halfAxes?: Readonly<NumericArray>);
/** Returns an array with three halfSizes for the bounding box */

@@ -21,0 +21,0 @@ get halfSize(): number[];

import { Matrix4, NumericArray, Vector2 } from '@math.gl/core';
import CullingVolume from './culling-volume';
declare type PerspectiveFrustumOptions = {
type PerspectiveFrustumOptions = {
/** The angle of the field of view (FOV), in radians. */

@@ -5,0 +5,0 @@ fov?: number;

import { Vector2, Matrix4, NumericArray } from '@math.gl/core';
import CullingVolume from './culling-volume';
declare type PerspectiveOffCenterFrustumOptions = {
type PerspectiveOffCenterFrustumOptions = {
left?: number;

@@ -5,0 +5,0 @@ right?: number;

@@ -5,6 +5,7 @@ {

"license": "MIT",
"type": "module",
"publishConfig": {
"access": "public"
},
"version": "3.6.3",
"version": "4.0.0-alpha.1",
"keywords": [

@@ -31,4 +32,4 @@ "webgl",

"types": "dist/index.d.ts",
"main": "dist/es5/index.js",
"module": "dist/esm/index.js",
"main": "dist/index.cjs",
"module": "dist/index.js",
"files": [

@@ -40,6 +41,6 @@ "dist",

"@babel/runtime": "^7.12.0",
"@math.gl/core": "3.6.3",
"gl-matrix": "^3.4.0"
"@math.gl/core": "4.0.0-alpha.1",
"gl-matrix": "^3.4.3"
},
"gitHead": "0efab394df9babad7ed93027c1003f30528b2090"
"gitHead": "66f872ea615a3ef81431595727cdf58dcadf3670"
}

@@ -20,3 +20,3 @@ // This file is derived from the Cesium math library under Apache 2 license

const fromPointsNaiveCenterScratch = new Vector3();
const volumeConstant = (4.0 / 3.0) * Math.PI;
// const volumeConstant = (4.0 / 3.0) * Math.PI;

@@ -23,0 +23,0 @@ /**

@@ -5,3 +5,5 @@ // This file is derived from the Cesium math library under Apache 2 license

import {NumericArray, Vector3} from '@math.gl/core';
// @ts-ignore gl-matrix typings...
import * as mat4 from 'gl-matrix/mat4';
import {INTERSECTION} from '../../constants';

@@ -8,0 +10,0 @@ import {BoundingVolume} from './bounding-volume';

@@ -1,2 +0,2 @@

import {INTERSECTION} from '../../constants';
// import {INTERSECTION} from '../../constants';
import Plane from '../plane';

@@ -3,0 +3,0 @@

@@ -44,4 +44,7 @@ // This file is derived from the Cesium math library under Apache 2 license

*/
constructor(center?: readonly number[], halfAxes?: readonly number[]);
constructor(center: Readonly<NumericArray> = [0, 0, 0], halfAxes = [0, 0, 0, 0, 0, 0, 0, 0, 0]) {
constructor(center?: Readonly<NumericArray>, halfAxes?: Readonly<NumericArray>);
constructor(
center: Readonly<NumericArray> = [0, 0, 0],
halfAxes: Readonly<NumericArray> = [0, 0, 0, 0, 0, 0, 0, 0, 0]
) {
this.center = new Vector3().from(center);

@@ -48,0 +51,0 @@ this.halfAxes = new Matrix3(halfAxes);

@@ -16,3 +16,3 @@ // This file is derived from the Cesium math library under Apache 2 license

const scratchPlaneNormal = new Vector3();
const scratchPlane = new Plane(new Vector3(1.0, 0.0, 0.0), 0.0);
// const scratchPlane = new Plane(new Vector3(1.0, 0.0, 0.0), 0.0);

@@ -74,3 +74,3 @@ /** A culling volume defined by planes. */

const plane0Center = scratchPlaneCenter.copy(faceNormal).scale(-radius).add(center);
const plane0Distance = -faceNormal.dot(plane0Center);
// const plane0Distance = -faceNormal.dot(plane0Center);

@@ -83,3 +83,3 @@ plane0.fromPointNormal(plane0Center, faceNormal);

const plane1Distance = -negatedFaceNormal.dot(plane1Center);
// const plane1Distance = -negatedFaceNormal.dot(plane1Center);

@@ -86,0 +86,0 @@ plane1.fromPointNormal(plane1Center, negatedFaceNormal);

@@ -12,3 +12,3 @@ // This file is derived from the Cesium math library under Apache 2 license

const defined = (val) => val !== null && typeof val !== 'undefined';
const defined = (val: unknown) => val !== null && typeof val !== 'undefined';

@@ -15,0 +15,0 @@ type PerspectiveFrustumOptions = {

@@ -77,10 +77,10 @@ // This file is derived from the Cesium math library under Apache 2 license

projectPointOntoPlane(point, result = [0, 0, 0]) {
point = scratchPosition.from(point);
projectPointOntoPlane(point: Readonly<NumericArray>, result = [0, 0, 0]) {
const scratchPoint = scratchPosition.from(point);
// projectedPoint = point - (normal.point + scale) * normal
const pointDistance = this.getPointDistance(point);
const pointDistance = this.getPointDistance(scratchPoint);
const scaledNormal = scratchNormal.copy(this.normal).scale(pointDistance);
return point.subtract(scaledNormal).to(result);
return scratchPoint.subtract(scaledNormal).to(result);
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc