New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@math.gl/culling

Package Overview
Dependencies
Maintainers
3
Versions
70
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 4.0.0-alpha.1 to 4.0.0-alpha.2

18

dist/index.d.ts
export { INTERSECTION } from './constants';
export { default as AxisAlignedBoundingBox } from './lib/bounding-volumes/axis-aligned-bounding-box';
export { default as BoundingSphere } from './lib/bounding-volumes/bounding-sphere';
export { default as OrientedBoundingBox } from './lib/bounding-volumes/oriented-bounding-box';
export { default as CullingVolume } from './lib/culling-volume';
export { default as Plane } from './lib/plane';
export { default as _PerspectiveOffCenterFrustum } from './lib/perspective-off-center-frustum';
export { default as _PerspectiveFrustum } from './lib/perspective-frustum';
export { default as makeBoundingSphereFromPoints } from './lib/algorithms/bounding-sphere-from-points';
export { AxisAlignedBoundingBox } from './lib/bounding-volumes/axis-aligned-bounding-box';
export { BoundingSphere } from './lib/bounding-volumes/bounding-sphere';
export { OrientedBoundingBox } from './lib/bounding-volumes/oriented-bounding-box';
export { CullingVolume } from './lib/culling-volume';
export { Plane } from './lib/plane';
export { PerspectiveOffCenterFrustum as _PerspectiveOffCenterFrustum } from './lib/perspective-off-center-frustum';
export { PerspectiveFrustum as _PerspectiveFrustum } from './lib/perspective-frustum';
export { makeBoundingSphereFromPoints } from './lib/algorithms/bounding-sphere-from-points';
export { makeAxisAlignedBoundingBoxFromPoints, makeOrientedBoundingBoxFromPoints } from './lib/algorithms/bounding-box-from-points';
export { default as computeEigenDecomposition } from './lib/algorithms/compute-eigen-decomposition';
export { computeEigenDecomposition } from './lib/algorithms/compute-eigen-decomposition';
//# sourceMappingURL=index.d.ts.map
export { INTERSECTION } from "./constants.js";
export { default as AxisAlignedBoundingBox } from "./lib/bounding-volumes/axis-aligned-bounding-box.js";
export { default as BoundingSphere } from "./lib/bounding-volumes/bounding-sphere.js";
export { default as OrientedBoundingBox } from "./lib/bounding-volumes/oriented-bounding-box.js";
export { default as CullingVolume } from "./lib/culling-volume.js";
export { default as Plane } from "./lib/plane.js";
export { default as _PerspectiveOffCenterFrustum } from "./lib/perspective-off-center-frustum.js";
export { default as _PerspectiveFrustum } from "./lib/perspective-frustum.js";
export { default as makeBoundingSphereFromPoints } from "./lib/algorithms/bounding-sphere-from-points.js";
export { AxisAlignedBoundingBox } from "./lib/bounding-volumes/axis-aligned-bounding-box.js";
export { BoundingSphere } from "./lib/bounding-volumes/bounding-sphere.js";
export { OrientedBoundingBox } from "./lib/bounding-volumes/oriented-bounding-box.js";
export { CullingVolume } from "./lib/culling-volume.js";
export { Plane } from "./lib/plane.js";
export { PerspectiveOffCenterFrustum as _PerspectiveOffCenterFrustum } from "./lib/perspective-off-center-frustum.js";
export { PerspectiveFrustum as _PerspectiveFrustum } from "./lib/perspective-frustum.js";
export { makeBoundingSphereFromPoints } from "./lib/algorithms/bounding-sphere-from-points.js";
export { makeAxisAlignedBoundingBoxFromPoints, makeOrientedBoundingBoxFromPoints } from "./lib/algorithms/bounding-box-from-points.js";
export { default as computeEigenDecomposition } from "./lib/algorithms/compute-eigen-decomposition.js";
export { computeEigenDecomposition } from "./lib/algorithms/compute-eigen-decomposition.js";
//# sourceMappingURL=index.js.map

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

import OrientedBoundingBox from '../bounding-volumes/oriented-bounding-box';
import AxisAlignedBoundingBox from '../bounding-volumes/axis-aligned-bounding-box';
import { OrientedBoundingBox } from '../bounding-volumes/oriented-bounding-box';
import { AxisAlignedBoundingBox } from '../bounding-volumes/axis-aligned-bounding-box';
/**

@@ -4,0 +4,0 @@ * Computes an instance of an OrientedBoundingBox of the given positions.

import { Vector3, Matrix3 } from '@math.gl/core';
import computeEigenDecomposition from "./compute-eigen-decomposition.js";
import OrientedBoundingBox from "../bounding-volumes/oriented-bounding-box.js";
import AxisAlignedBoundingBox from "../bounding-volumes/axis-aligned-bounding-box.js";
import { computeEigenDecomposition } from "./compute-eigen-decomposition.js";
import { OrientedBoundingBox } from "../bounding-volumes/oriented-bounding-box.js";
import { AxisAlignedBoundingBox } from "../bounding-volumes/axis-aligned-bounding-box.js";
const scratchVector2 = new Vector3();

@@ -6,0 +6,0 @@ const scratchVector3 = new Vector3();

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

import BoundingSphere from '../bounding-volumes/bounding-sphere';
import { BoundingSphere } from '../bounding-volumes/bounding-sphere';
/**

@@ -13,3 +13,3 @@ * Computes a tight-fitting bounding sphere enclosing a list of 3D Cartesian points.

*/
export default function makeBoundingSphereFromPoints(positions: number[][], result?: BoundingSphere): BoundingSphere;
export declare function makeBoundingSphereFromPoints(positions: number[][], result?: BoundingSphere): BoundingSphere;
//# sourceMappingURL=bounding-sphere-from-points.d.ts.map
import { Vector3 } from '@math.gl/core';
import BoundingSphere from "../bounding-volumes/bounding-sphere.js";
import { BoundingSphere } from "../bounding-volumes/bounding-sphere.js";
const fromPointsXMin = new Vector3();

@@ -15,3 +15,3 @@ const fromPointsYMin = new Vector3();

const fromPointsNaiveCenterScratch = new Vector3();
export default function makeBoundingSphereFromPoints(positions, result = new BoundingSphere()) {
export function makeBoundingSphereFromPoints(positions, result = new BoundingSphere()) {
if (!positions || positions.length === 0) {

@@ -18,0 +18,0 @@ return result.fromCenterRadius([0, 0, 0], 0);

import { Matrix3 } from '@math.gl/core';
export type EigenDecomposition = {
export declare type EigenDecomposition = {
unitary: Matrix3;

@@ -36,3 +36,3 @@ diagonal: Matrix3;

*/
export default function computeEigenDecomposition(matrix: number[], result?: EigenDecomposition): EigenDecomposition;
export declare function computeEigenDecomposition(matrix: number[], result?: EigenDecomposition): EigenDecomposition;
//# sourceMappingURL=compute-eigen-decomposition.d.ts.map

@@ -7,3 +7,3 @@ import { Matrix3, _MathUtils } from '@math.gl/core';

const jMatrixTranspose = new Matrix3();
export default function computeEigenDecomposition(matrix, result = {}) {
export function computeEigenDecomposition(matrix, result = {}) {
const EIGEN_TOLERANCE = _MathUtils.EPSILON20;

@@ -10,0 +10,0 @@ const EIGEN_MAX_SWEEPS = 10;

import { BoundingVolume } from './bounding-volume';
import { Vector3 } from '@math.gl/core';
import Plane from '../plane';
import { Plane } from '../plane';
/**

@@ -10,3 +10,3 @@ * An axis aligned bounding box - aligned with coordinate axes

*/
export default class AxisAlignedBoundingBox implements BoundingVolume {
export declare class AxisAlignedBoundingBox implements BoundingVolume {
/** The center point of the bounding box. */

@@ -13,0 +13,0 @@ readonly center: Vector3;

@@ -6,3 +6,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

const scratchNormal = new Vector3();
export default class AxisAlignedBoundingBox {
export class AxisAlignedBoundingBox {
constructor(minimum = [0, 0, 0], maximum = [0, 0, 0], center) {

@@ -9,0 +9,0 @@ _defineProperty(this, "center", void 0);

import { NumericArray, Vector3 } from '@math.gl/core';
import { BoundingVolume } from './bounding-volume';
import Plane from '../plane';
import { Plane } from '../plane';
/** A BoundingSphere */
export default class BoundingSphere implements BoundingVolume {
export declare class BoundingSphere implements BoundingVolume {
center: Vector3;

@@ -7,0 +7,0 @@ radius: number;

@@ -7,3 +7,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

const scratchVector2 = new Vector3();
export default class BoundingSphere {
export class BoundingSphere {
constructor(center = [0, 0, 0], radius = 0.0) {

@@ -10,0 +10,0 @@ _defineProperty(this, "center", void 0);

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

import Plane from '../plane';
import { Plane } from '../plane';
/**

@@ -3,0 +3,0 @@ * Common interface for BoundingVolumes

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

@@ -10,3 +10,3 @@ * An OrientedBoundingBox of some object is a closed and convex cuboid.

*/
export default class OrientedBoundingBox implements BoundingVolume {
export declare class OrientedBoundingBox implements BoundingVolume {
center: Vector3;

@@ -13,0 +13,0 @@ halfAxes: Matrix3;

import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { Vector3, Matrix3, Quaternion } from '@math.gl/core';
import BoundingSphere from "./bounding-sphere.js";
import { BoundingSphere } from "./bounding-sphere.js";
import { INTERSECTION } from "../../constants.js";

@@ -23,3 +23,3 @@ const scratchVector3 = new Vector3();

};
export default class OrientedBoundingBox {
export class OrientedBoundingBox {
constructor(center = [0, 0, 0], halfAxes = [0, 0, 0, 0, 0, 0, 0, 0, 0]) {

@@ -26,0 +26,0 @@ _defineProperty(this, "center", void 0);

@@ -1,6 +0,6 @@

import Plane from './plane';
import { Plane } from './plane';
import type { BoundingVolume } from './bounding-volumes/bounding-volume';
import type BoundingSphere from './bounding-volumes/bounding-sphere';
import type { BoundingSphere } from './bounding-volumes/bounding-sphere';
/** A culling volume defined by planes. */
export default class CullingVolume {
export declare class CullingVolume {
/**

@@ -7,0 +7,0 @@ * For plane masks (as used in {@link CullingVolume#computeVisibilityWithPlaneMask}), this special value

import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { Vector3, assert } from '@math.gl/core';
import { INTERSECTION } from "../constants.js";
import Plane from "./plane.js";
import { Plane } from "./plane.js";
const faces = [new Vector3([1, 0, 0]), new Vector3([0, 1, 0]), new Vector3([0, 0, 1])];
const scratchPlaneCenter = new Vector3();
const scratchPlaneNormal = new Vector3();
export default class CullingVolume {
export class CullingVolume {
constructor(planes = []) {

@@ -10,0 +10,0 @@ _defineProperty(this, "planes", void 0);

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

@@ -35,3 +35,3 @@ fov?: number;

*/
export default class PerspectiveFrustum {
export declare class PerspectiveFrustum {
private _offCenterFrustum;

@@ -38,0 +38,0 @@ /**

import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { assert, Vector2 } from '@math.gl/core';
import PerspectiveOffCenterFrustum from "./perspective-off-center-frustum.js";
import { PerspectiveOffCenterFrustum } from "./perspective-off-center-frustum.js";
const defined = val => val !== null && typeof val !== 'undefined';
export default class PerspectiveFrustum {
export class PerspectiveFrustum {
constructor(options = {}) {

@@ -9,0 +9,0 @@ _defineProperty(this, "_offCenterFrustum", new PerspectiveOffCenterFrustum());

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

@@ -11,3 +11,3 @@ right?: number;

};
export default class PerspectiveOffCenterFrustum {
export declare class PerspectiveOffCenterFrustum {
/**

@@ -14,0 +14,0 @@ * Defines the left clipping plane.

import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { Vector3, Matrix4, assert } from '@math.gl/core';
import CullingVolume from "./culling-volume.js";
import Plane from "./plane.js";
import { CullingVolume } from "./culling-volume.js";
import { Plane } from "./plane.js";
const scratchPlaneUpVector = new Vector3();

@@ -10,3 +10,3 @@ const scratchPlaneRightVector = new Vector3();

const scratchPlaneNormal = new Vector3();
export default class PerspectiveOffCenterFrustum {
export class PerspectiveOffCenterFrustum {
constructor(options = {}) {

@@ -13,0 +13,0 @@ _defineProperty(this, "left", void 0);

import { Vector3, NumericArray } from '@math.gl/core';
export default class Plane {
export declare class Plane {
readonly normal: Vector3;

@@ -4,0 +4,0 @@ distance: number;

@@ -5,3 +5,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

const scratchNormal = new Vector3();
export default class Plane {
export class Plane {
constructor(normal = [0, 0, 1], distance = 0) {

@@ -8,0 +8,0 @@ _defineProperty(this, "normal", void 0);

@@ -9,3 +9,3 @@ {

},
"version": "4.0.0-alpha.1",
"version": "4.0.0-alpha.2",
"keywords": [

@@ -40,6 +40,6 @@ "webgl",

"@babel/runtime": "^7.12.0",
"@math.gl/core": "4.0.0-alpha.1",
"@math.gl/core": "4.0.0-alpha.2",
"gl-matrix": "^3.4.3"
},
"gitHead": "66f872ea615a3ef81431595727cdf58dcadf3670"
"gitHead": "2e693639e3cf898fee8e323c93efdd07be7c2ca7"
}

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

export {default as AxisAlignedBoundingBox} from './lib/bounding-volumes/axis-aligned-bounding-box';
export {default as BoundingSphere} from './lib/bounding-volumes/bounding-sphere';
export {default as OrientedBoundingBox} from './lib/bounding-volumes/oriented-bounding-box';
export {default as CullingVolume} from './lib/culling-volume';
export {default as Plane} from './lib/plane';
export {AxisAlignedBoundingBox} from './lib/bounding-volumes/axis-aligned-bounding-box';
export {BoundingSphere} from './lib/bounding-volumes/bounding-sphere';
export {OrientedBoundingBox} from './lib/bounding-volumes/oriented-bounding-box';
export {CullingVolume} from './lib/culling-volume';
export {Plane} from './lib/plane';
export {default as _PerspectiveOffCenterFrustum} from './lib/perspective-off-center-frustum';
export {default as _PerspectiveFrustum} from './lib/perspective-frustum';
export {PerspectiveOffCenterFrustum as _PerspectiveOffCenterFrustum} from './lib/perspective-off-center-frustum';
export {PerspectiveFrustum as _PerspectiveFrustum} from './lib/perspective-frustum';
export {default as makeBoundingSphereFromPoints} from './lib/algorithms/bounding-sphere-from-points';
export {makeBoundingSphereFromPoints} from './lib/algorithms/bounding-sphere-from-points';
export {

@@ -21,2 +21,2 @@ makeAxisAlignedBoundingBoxFromPoints,

} from './lib/algorithms/bounding-box-from-points';
export {default as computeEigenDecomposition} from './lib/algorithms/compute-eigen-decomposition';
export {computeEigenDecomposition} from './lib/algorithms/compute-eigen-decomposition';

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

import {Vector3, Matrix3} from '@math.gl/core';
import computeEigenDecomposition from './compute-eigen-decomposition';
import OrientedBoundingBox from '../bounding-volumes/oriented-bounding-box';
import AxisAlignedBoundingBox from '../bounding-volumes/axis-aligned-bounding-box';
import {computeEigenDecomposition} from './compute-eigen-decomposition';
import {OrientedBoundingBox} from '../bounding-volumes/oriented-bounding-box';
import {AxisAlignedBoundingBox} from '../bounding-volumes/axis-aligned-bounding-box';

@@ -10,0 +10,0 @@ const scratchVector2 = new Vector3();

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

import {Vector3} from '@math.gl/core';
import BoundingSphere from '../bounding-volumes/bounding-sphere';
import {BoundingSphere} from '../bounding-volumes/bounding-sphere';

@@ -34,3 +34,3 @@ /* eslint-disable */

*/
export default function makeBoundingSphereFromPoints(
export function makeBoundingSphereFromPoints(
positions: number[][],

@@ -37,0 +37,0 @@ result: BoundingSphere = new BoundingSphere()

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

*/
export default function computeEigenDecomposition(
export function computeEigenDecomposition(
matrix: number[],

@@ -51,0 +51,0 @@ // @ts-expect-error accept empty object type

import {BoundingVolume} from './bounding-volume';
import {Vector3} from '@math.gl/core';
import Plane from '../plane';
import {Plane} from '../plane';
import {INTERSECTION} from '../../constants';

@@ -15,3 +15,3 @@

*/
export default class AxisAlignedBoundingBox implements BoundingVolume {
export class AxisAlignedBoundingBox implements BoundingVolume {
/** The center point of the bounding box. */

@@ -18,0 +18,0 @@ readonly center: Vector3;

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

import {BoundingVolume} from './bounding-volume';
import Plane from '../plane';
import {Plane} from '../plane';

@@ -17,3 +17,3 @@ const scratchVector = new Vector3();

/** A BoundingSphere */
export default class BoundingSphere implements BoundingVolume {
export class BoundingSphere implements BoundingVolume {
center: Vector3;

@@ -20,0 +20,0 @@ radius: number;

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

@@ -4,0 +4,0 @@ /**

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

import type {BoundingVolume} from './bounding-volume';
import BoundingSphere from './bounding-sphere';
import type Plane from '../plane';
import {BoundingSphere} from './bounding-sphere';
import type {Plane} from '../plane';
import {INTERSECTION} from '../../constants';

@@ -36,3 +36,3 @@

*/
export default class OrientedBoundingBox implements BoundingVolume {
export class OrientedBoundingBox implements BoundingVolume {
center: Vector3;

@@ -39,0 +39,0 @@ halfAxes: Matrix3;

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

import {INTERSECTION} from '../constants';
import Plane from './plane';
import {Plane} from './plane';
import type {BoundingVolume} from './bounding-volumes/bounding-volume';
import type BoundingSphere from './bounding-volumes/bounding-sphere';
import type {BoundingSphere} from './bounding-volumes/bounding-sphere';

@@ -20,3 +20,3 @@ // X, Y, Z Unit vectors

/** A culling volume defined by planes. */
export default class CullingVolume {
export class CullingVolume {
/**

@@ -23,0 +23,0 @@ * For plane masks (as used in {@link CullingVolume#computeVisibilityWithPlaneMask}), this special value

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

import {assert, Matrix4, NumericArray, Vector2} from '@math.gl/core';
import PerspectiveOffCenterFrustum from './perspective-off-center-frustum';
import CullingVolume from './culling-volume';
import {PerspectiveOffCenterFrustum} from './perspective-off-center-frustum';
import {CullingVolume} from './culling-volume';

@@ -48,3 +48,3 @@ const defined = (val: unknown) => val !== null && typeof val !== 'undefined';

*/
export default class PerspectiveFrustum {
export class PerspectiveFrustum {
private _offCenterFrustum = new PerspectiveOffCenterFrustum();

@@ -51,0 +51,0 @@ /**

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

import {Vector3, Vector2, Matrix4, assert, NumericArray} from '@math.gl/core';
import CullingVolume from './culling-volume';
import Plane from './plane';
import {CullingVolume} from './culling-volume';
import {Plane} from './plane';

@@ -28,3 +28,3 @@ const scratchPlaneUpVector = new Vector3();

export default class PerspectiveOffCenterFrustum {
export class PerspectiveOffCenterFrustum {
/**

@@ -31,0 +31,0 @@ * Defines the left clipping plane.

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

// A plane in Hessian Normal Form
export default class Plane {
export class Plane {
readonly normal: Vector3;

@@ -14,0 +14,0 @@ distance: number;

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

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

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

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

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