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

@loaders.gl/math

Package Overview
Dependencies
Maintainers
12
Versions
315
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/math - npm Package Compare versions

Comparing version 2.2.0-beta.1 to 2.2.0

2

dist/es5/geometry/attributes/compute-bounding-sphere.js

@@ -8,3 +8,3 @@ "use strict";

var _math = require("math.gl");
var _core = require("@math.gl/core");

@@ -11,0 +11,0 @@ var _getAttributeFromGeometry = require("./get-attribute-from-geometry");

@@ -10,3 +10,3 @@ "use strict";

var _math = require("math.gl");
var _core = require("@math.gl/core");

@@ -43,7 +43,7 @@ var _constants = require("../constants");

var normals = new Float32Array(positions.length);
var vectorA = new _math.Vector3();
var vectorB = new _math.Vector3();
var vectorC = new _math.Vector3();
var vectorCB = new _math.Vector3();
var vectorAB = new _math.Vector3();
var vectorA = new _core.Vector3();
var vectorB = new _core.Vector3();
var vectorC = new _core.Vector3();
var vectorCB = new _core.Vector3();
var vectorAB = new _core.Vector3();

@@ -50,0 +50,0 @@ var _iterator = _createForOfIteratorHelper((0, _primitiveIterator["default"])({

@@ -23,3 +23,3 @@ "use strict";

var _math = require("math.gl");
var _core = require("@math.gl/core");

@@ -30,6 +30,6 @@ var _assert = _interopRequireDefault(require("../utils/assert"));

var LEFT_SHIFT = 256.0;
var scratchVector2 = new _math.Vector2();
var scratchVector3 = new _math.Vector3();
var scratchEncodeVector2 = new _math.Vector2();
var octEncodeScratch = new _math.Vector2();
var scratchVector2 = new _core.Vector2();
var scratchVector3 = new _core.Vector3();
var scratchEncodeVector2 = new _core.Vector2();
var octEncodeScratch = new _core.Vector2();
var uint8ForceArray = new Uint8Array(1);

@@ -44,3 +44,3 @@

var rangeMaximum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 255;
return (0, _math.clamp)(value, 0.0, rangeMaximum) / rangeMaximum * 2.0 - 1.0;
return (0, _core.clamp)(value, 0.0, rangeMaximum) / rangeMaximum * 2.0 - 1.0;
}

@@ -50,3 +50,3 @@

var rangeMaximum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 255;
return Math.round(((0, _math.clamp)(value, -1.0, 1.0) * 0.5 + 0.5) * rangeMaximum);
return Math.round(((0, _core.clamp)(value, -1.0, 1.0) * 0.5 + 0.5) * rangeMaximum);
}

@@ -62,3 +62,3 @@

var vector3 = scratchVector3.from(vector);
(0, _assert["default"])(Math.abs(vector3.magnitudeSquared() - 1.0) <= _math._MathUtils.EPSILON6);
(0, _assert["default"])(Math.abs(vector3.magnitudeSquared() - 1.0) <= _core._MathUtils.EPSILON6);
result.x = vector.x / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));

@@ -65,0 +65,0 @@ result.y = vector.y / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));

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

import { Vector3 } from 'math.gl';
import { Vector3 } from '@math.gl/core';
import { getPositions } from './get-attribute-from-geometry';

@@ -3,0 +3,0 @@ export function computeBoundingSphere(geometry, boundingBox) {

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

import { Vector3 } from 'math.gl';
import { Vector3 } from '@math.gl/core';
import { GL } from '../constants';

@@ -3,0 +3,0 @@ import assert from '../utils/assert';

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

import { Vector2, Vector3, clamp, _MathUtils } from 'math.gl';
import { Vector2, Vector3, clamp, _MathUtils } from '@math.gl/core';
import assert from '../utils/assert';

@@ -3,0 +3,0 @@ const RIGHT_SHIFT = 1.0 / 256.0;

@@ -7,3 +7,3 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }

import { Vector3 } from 'math.gl';
import { Vector3 } from '@math.gl/core';
import { getPositions } from './get-attribute-from-geometry';

@@ -10,0 +10,0 @@ export function computeBoundingSphere(geometry, boundingBox) {

@@ -7,3 +7,3 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }

import { Vector3 } from 'math.gl';
import { Vector3 } from '@math.gl/core';
import { GL } from '../constants';

@@ -10,0 +10,0 @@ import assert from '../utils/assert';

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

import { Vector2, Vector3, clamp, _MathUtils } from 'math.gl';
import { Vector2, Vector3, clamp, _MathUtils } from '@math.gl/core';
import assert from '../utils/assert';

@@ -3,0 +3,0 @@ var RIGHT_SHIFT = 1.0 / 256.0;

{
"name": "@loaders.gl/math",
"version": "2.2.0-beta.1",
"version": "2.2.0",
"description": "Experimental math classes for loaders.gl",

@@ -36,5 +36,5 @@ "license": "MIT",

"@loaders.gl/loader-utils": "^2.1.3",
"math.gl": "^3.1.3"
"@math.gl/core": "^3.2.0"
},
"gitHead": "a7d54a19c9825399723df9138dd1ce3cf6d412b9"
"gitHead": "256e1b7fa59aca36a11d64ec8b9651cb718b7477"
}
/* eslint-disable */
import {Vector3} from 'math.gl';
import {Vector3} from '@math.gl/core';
import {getPositions} from './get-attribute-from-geometry';

@@ -5,0 +5,0 @@

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

import {Vector3} from 'math.gl';
import {Vector3} from '@math.gl/core';
import {GL} from '../constants';

@@ -3,0 +3,0 @@ import assert from '../utils/assert';

@@ -6,3 +6,3 @@ // Attribute compression and decompression functions.

import {Vector2, Vector3, clamp, _MathUtils} from 'math.gl';
import {Vector2, Vector3, clamp, _MathUtils} from '@math.gl/core';
import assert from '../utils/assert';

@@ -9,0 +9,0 @@

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