@woosh/meep-engine 2.118.11 → 2.118.12
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/build/meep.cjs +17 -0
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +17 -0
- package/package.json +1 -1
- package/src/core/bvh2/bvh3/ebvh_build_for_geometry_morton.js +4 -4
- package/src/core/collection/array/typed/array_buffer_copy.js +2 -2
- package/src/core/collection/array/typed/typed_array_copy.d.ts.map +1 -1
- package/src/core/collection/array/typed/typed_array_copy.js +16 -0
- package/src/core/geom/3d/aabb/aabb3_compute_surface_area.js +1 -3
- package/src/engine/graphics/geometry/optimization/VertexCacheOptimizer.d.ts.map +1 -1
- package/src/engine/graphics/geometry/optimization/VertexCacheOptimizer.js +36 -22
package/build/meep.cjs
CHANGED
|
@@ -52064,6 +52064,8 @@ function array_buffer_copy(
|
|
|
52064
52064
|
target, target_offset,
|
|
52065
52065
|
byte_length
|
|
52066
52066
|
) {
|
|
52067
|
+
// assert.ok(source instanceof ArrayBuffer || source instanceof SharedArrayBuffer,'source is not an ArrayBuffer');
|
|
52068
|
+
// assert.ok(target instanceof ArrayBuffer || target instanceof SharedArrayBuffer,'source is not an ArrayBuffer');
|
|
52067
52069
|
|
|
52068
52070
|
/**
|
|
52069
52071
|
* @type {Uint8Array|Uint16Array|Uint32Array}
|
|
@@ -61393,10 +61395,25 @@ function typed_array_copy(source, destination) {
|
|
|
61393
61395
|
const destination_size = destination.length;
|
|
61394
61396
|
|
|
61395
61397
|
if (destination_size >= source.length) {
|
|
61398
|
+
|
|
61396
61399
|
destination.set(source, 0);
|
|
61400
|
+
|
|
61401
|
+
} else if (source.constructor === destination.constructor) {
|
|
61402
|
+
|
|
61403
|
+
// same type
|
|
61404
|
+
array_buffer_copy(
|
|
61405
|
+
source.buffer,
|
|
61406
|
+
source.byteOffset,
|
|
61407
|
+
destination.buffer,
|
|
61408
|
+
destination.byteOffset,
|
|
61409
|
+
Math.min(source.byteLength, destination.byteLength)
|
|
61410
|
+
);
|
|
61411
|
+
|
|
61397
61412
|
} else {
|
|
61413
|
+
|
|
61398
61414
|
// destination is smaller than source, crop source data
|
|
61399
61415
|
array_copy(source, 0, destination, 0, destination_size);
|
|
61416
|
+
|
|
61400
61417
|
}
|
|
61401
61418
|
}
|
|
61402
61419
|
|