@loaders.gl/math 4.0.0-alpha.9 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es5/geometry/utils/coordinates.js +10 -0
- package/dist/es5/geometry/utils/coordinates.js.map +1 -0
- package/dist/es5/index.js +7 -0
- package/dist/es5/index.js.map +1 -1
- package/dist/esm/geometry/utils/coordinates.js +4 -0
- package/dist/esm/geometry/utils/coordinates.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/geometry/utils/coordinates.d.ts +6 -0
- package/dist/geometry/utils/coordinates.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/geometry/utils/coordinates.ts +7 -0
- package/src/index.ts +2 -0
- package/dist/geometry/attributes/compute-bounding-box.js +0 -44
- package/dist/geometry/attributes/compute-bounding-sphere.js +0 -30
- package/dist/geometry/attributes/compute-tangents.js +0 -146
- package/dist/geometry/attributes/compute-vertex-normals.js +0 -48
- package/dist/geometry/attributes/convert-to-non-indexed.js +0 -33
- package/dist/geometry/attributes/get-attribute-from-geometry.js +0 -34
- package/dist/geometry/attributes/normalize.js +0 -20
- package/dist/geometry/colors/rgb565.js +0 -31
- package/dist/geometry/compression/attribute-compression.js +0 -352
- package/dist/geometry/constants.js +0 -34
- package/dist/geometry/gl/gl-type.js +0 -112
- package/dist/geometry/is-geometry.js +0 -14
- package/dist/geometry/iterators/attribute-iterator.js +0 -19
- package/dist/geometry/iterators/primitive-iterator.js +0 -88
- package/dist/geometry/primitives/modes.js +0 -71
- package/dist/geometry/typed-arrays/typed-array-utils.js +0 -25
- package/dist/geometry/utils/assert.js +0 -14
- package/dist/index.js +0 -46
- package/dist/utils/assert.js +0 -12
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.concatTypedArrays = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Concats typed arrays
|
|
6
|
-
* @param arrays
|
|
7
|
-
* @returns new Uint8Array
|
|
8
|
-
*/
|
|
9
|
-
function concatTypedArrays(arrays = []) {
|
|
10
|
-
let byteLength = 0;
|
|
11
|
-
for (let i = 0; i < arrays.length; ++i) {
|
|
12
|
-
byteLength += arrays[i].byteLength;
|
|
13
|
-
}
|
|
14
|
-
const buffer = new Uint8Array(byteLength);
|
|
15
|
-
let byteOffset = 0;
|
|
16
|
-
for (let i = 0; i < arrays.length; ++i) {
|
|
17
|
-
const data = new Uint8Array(arrays[i].buffer);
|
|
18
|
-
byteLength = data.length;
|
|
19
|
-
for (let j = 0; j < byteLength; ++j) {
|
|
20
|
-
buffer[byteOffset++] = data[j];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return buffer;
|
|
24
|
-
}
|
|
25
|
-
exports.concatTypedArrays = concatTypedArrays;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assert = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Throws error message
|
|
6
|
-
* @param condition checks if an attribute equal to condition
|
|
7
|
-
* @param message error message
|
|
8
|
-
*/
|
|
9
|
-
function assert(condition, message) {
|
|
10
|
-
if (!condition) {
|
|
11
|
-
throw new Error(`math.gl assertion failed. ${message}`);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.assert = assert;
|
package/dist/index.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.zigZagDeltaDecode = exports.decompressTextureCoordinates = exports.compressTextureCoordinates = exports.octUnpack = exports.octPack = exports.octDecodeFloat = exports.octEncodeFloat = exports.octPackFloat = exports.octDecodeFromVector4 = exports.octDecode = exports.octDecodeInRange = exports.octEncodeToVector4 = exports.octEncode = exports.octEncodeInRange = exports.concatTypedArrays = exports.decodeRGB565 = exports.encodeRGB565 = exports.computeVertexNormals = exports.makePrimitiveIterator = exports.makeAttributeIterator = exports.isGeometry = exports.GLType = exports.GL_TYPE = exports.GL = void 0;
|
|
7
|
-
var constants_1 = require("./geometry/constants");
|
|
8
|
-
Object.defineProperty(exports, "GL", { enumerable: true, get: function () { return constants_1.GL; } });
|
|
9
|
-
// GL support
|
|
10
|
-
var constants_2 = require("./geometry/constants");
|
|
11
|
-
Object.defineProperty(exports, "GL_TYPE", { enumerable: true, get: function () { return constants_2.GL_TYPE; } });
|
|
12
|
-
var gl_type_1 = require("./geometry/gl/gl-type");
|
|
13
|
-
Object.defineProperty(exports, "GLType", { enumerable: true, get: function () { return __importDefault(gl_type_1).default; } });
|
|
14
|
-
// Geometry
|
|
15
|
-
var is_geometry_1 = require("./geometry/is-geometry");
|
|
16
|
-
Object.defineProperty(exports, "isGeometry", { enumerable: true, get: function () { return __importDefault(is_geometry_1).default; } });
|
|
17
|
-
// Iterators
|
|
18
|
-
var attribute_iterator_1 = require("./geometry/iterators/attribute-iterator");
|
|
19
|
-
Object.defineProperty(exports, "makeAttributeIterator", { enumerable: true, get: function () { return attribute_iterator_1.makeAttributeIterator; } });
|
|
20
|
-
var primitive_iterator_1 = require("./geometry/iterators/primitive-iterator");
|
|
21
|
-
Object.defineProperty(exports, "makePrimitiveIterator", { enumerable: true, get: function () { return primitive_iterator_1.makePrimitiveIterator; } });
|
|
22
|
-
// Helper methods
|
|
23
|
-
var compute_vertex_normals_1 = require("./geometry/attributes/compute-vertex-normals");
|
|
24
|
-
Object.defineProperty(exports, "computeVertexNormals", { enumerable: true, get: function () { return compute_vertex_normals_1.computeVertexNormals; } });
|
|
25
|
-
var rgb565_1 = require("./geometry/colors/rgb565");
|
|
26
|
-
Object.defineProperty(exports, "encodeRGB565", { enumerable: true, get: function () { return rgb565_1.encodeRGB565; } });
|
|
27
|
-
Object.defineProperty(exports, "decodeRGB565", { enumerable: true, get: function () { return rgb565_1.decodeRGB565; } });
|
|
28
|
-
// Typed array utils
|
|
29
|
-
var typed_array_utils_1 = require("./geometry/typed-arrays/typed-array-utils");
|
|
30
|
-
Object.defineProperty(exports, "concatTypedArrays", { enumerable: true, get: function () { return typed_array_utils_1.concatTypedArrays; } });
|
|
31
|
-
// Compression
|
|
32
|
-
var attribute_compression_1 = require("./geometry/compression/attribute-compression");
|
|
33
|
-
Object.defineProperty(exports, "octEncodeInRange", { enumerable: true, get: function () { return attribute_compression_1.octEncodeInRange; } });
|
|
34
|
-
Object.defineProperty(exports, "octEncode", { enumerable: true, get: function () { return attribute_compression_1.octEncode; } });
|
|
35
|
-
Object.defineProperty(exports, "octEncodeToVector4", { enumerable: true, get: function () { return attribute_compression_1.octEncodeToVector4; } });
|
|
36
|
-
Object.defineProperty(exports, "octDecodeInRange", { enumerable: true, get: function () { return attribute_compression_1.octDecodeInRange; } });
|
|
37
|
-
Object.defineProperty(exports, "octDecode", { enumerable: true, get: function () { return attribute_compression_1.octDecode; } });
|
|
38
|
-
Object.defineProperty(exports, "octDecodeFromVector4", { enumerable: true, get: function () { return attribute_compression_1.octDecodeFromVector4; } });
|
|
39
|
-
Object.defineProperty(exports, "octPackFloat", { enumerable: true, get: function () { return attribute_compression_1.octPackFloat; } });
|
|
40
|
-
Object.defineProperty(exports, "octEncodeFloat", { enumerable: true, get: function () { return attribute_compression_1.octEncodeFloat; } });
|
|
41
|
-
Object.defineProperty(exports, "octDecodeFloat", { enumerable: true, get: function () { return attribute_compression_1.octDecodeFloat; } });
|
|
42
|
-
Object.defineProperty(exports, "octPack", { enumerable: true, get: function () { return attribute_compression_1.octPack; } });
|
|
43
|
-
Object.defineProperty(exports, "octUnpack", { enumerable: true, get: function () { return attribute_compression_1.octUnpack; } });
|
|
44
|
-
Object.defineProperty(exports, "compressTextureCoordinates", { enumerable: true, get: function () { return attribute_compression_1.compressTextureCoordinates; } });
|
|
45
|
-
Object.defineProperty(exports, "decompressTextureCoordinates", { enumerable: true, get: function () { return attribute_compression_1.decompressTextureCoordinates; } });
|
|
46
|
-
Object.defineProperty(exports, "zigZagDeltaDecode", { enumerable: true, get: function () { return attribute_compression_1.zigZagDeltaDecode; } });
|
package/dist/utils/assert.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.assert = void 0;
|
|
4
|
-
// Replacement for the external assert method to reduce bundle size
|
|
5
|
-
// Note: We don't use the second "message" argument in calling code,
|
|
6
|
-
// so no need to support it here
|
|
7
|
-
function assert(condition, message) {
|
|
8
|
-
if (!condition) {
|
|
9
|
-
throw new Error(message || '3d-tile loader: assertion failed.');
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.assert = assert;
|