@woosh/meep-engine 2.98.0 → 2.98.1
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 +33 -10
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +33 -10
- package/package.json +1 -1
- package/src/core/collection/set/compute_set_difference.d.ts.map +1 -1
- package/src/core/collection/set/compute_set_difference.js +8 -0
- package/src/core/collection/set/compute_set_difference.spec.d.ts +2 -0
- package/src/core/collection/set/compute_set_difference.spec.d.ts.map +1 -0
- package/src/core/collection/set/compute_set_difference.spec.js +45 -0
- package/src/core/collection/set/compute_set_intersection.d.ts +1 -0
- package/src/core/collection/set/compute_set_intersection.d.ts.map +1 -1
- package/src/core/collection/set/compute_set_intersection.js +9 -0
- package/src/core/collection/set/compute_set_intersection.spec.d.ts +2 -0
- package/src/core/collection/set/compute_set_intersection.spec.d.ts.map +1 -0
- package/src/core/collection/set/compute_set_intersection.spec.js +45 -0
- package/src/core/collection/set/set_remove.d.ts +2 -0
- package/src/core/collection/set/set_remove.d.ts.map +1 -1
- package/src/core/collection/set/set_remove.js +2 -0
- package/src/core/color/oklab/XYZ.spec.d.ts +2 -0
- package/src/core/color/oklab/XYZ.spec.d.ts.map +1 -0
- package/src/core/color/oklab/XYZ.spec.js +17 -0
- package/src/core/color/oklab/oklab_to_xyz.d.ts +9 -0
- package/src/core/color/oklab/oklab_to_xyz.d.ts.map +1 -0
- package/src/core/color/oklab/oklab_to_xyz.js +32 -0
- package/src/core/color/oklab/oklab_to_xyz.spec.d.ts +2 -0
- package/src/core/color/oklab/oklab_to_xyz.spec.d.ts.map +1 -0
- package/src/core/color/oklab/oklab_to_xyz.spec.js +31 -0
- package/src/core/color/oklab/xyz_to_oklab.d.ts +8 -0
- package/src/core/color/oklab/xyz_to_oklab.d.ts.map +1 -0
- package/src/core/color/oklab/xyz_to_oklab.js +29 -0
- package/src/core/color/oklab/xyz_to_oklab.spec.d.ts +2 -0
- package/src/core/color/oklab/xyz_to_oklab.spec.d.ts.map +1 -0
- package/src/core/color/oklab/xyz_to_oklab.spec.js +31 -0
- package/src/core/color/sRGB/linear_to_sRGB.d.ts.map +1 -1
- package/src/core/color/sRGB/linear_to_sRGB.js +16 -5
- package/src/core/color/sRGB/sRGB_to_linear.d.ts.map +1 -1
- package/src/core/color/sRGB/sRGB_to_linear.js +17 -5
- package/src/core/color/xyz/rgb_to_xyz.d.ts +1 -0
- package/src/core/color/xyz/rgb_to_xyz.d.ts.map +1 -1
- package/src/core/color/xyz/rgb_to_xyz.js +4 -3
- package/src/core/color/xyz/xyz_to_rgb.d.ts +1 -1
- package/src/core/color/xyz/xyz_to_rgb.js +4 -4
- package/src/core/color/hsluv/HSLuv.d.ts +0 -13
- package/src/core/color/hsluv/HSLuv.d.ts.map +0 -1
- package/src/core/color/hsluv/HSLuv.js +0 -187
package/build/meep.cjs
CHANGED
|
@@ -53633,7 +53633,11 @@ function rgb2uint24(r, g, b) {
|
|
|
53633
53633
|
}
|
|
53634
53634
|
|
|
53635
53635
|
function convert(c) {
|
|
53636
|
-
|
|
53636
|
+
if (c < 0.0031308) {
|
|
53637
|
+
return c * 12.92;
|
|
53638
|
+
} else {
|
|
53639
|
+
return 1.055 * (Math.pow(c, 0.4166666666666667)) - 0.055;
|
|
53640
|
+
}
|
|
53637
53641
|
}
|
|
53638
53642
|
|
|
53639
53643
|
/**
|
|
@@ -53643,10 +53647,17 @@ function convert(c) {
|
|
|
53643
53647
|
* @param {number[]|ArrayLike<number>} input
|
|
53644
53648
|
* @param {number} input_offset
|
|
53645
53649
|
*/
|
|
53646
|
-
function linear_to_sRGB(
|
|
53647
|
-
output
|
|
53648
|
-
|
|
53649
|
-
|
|
53650
|
+
function linear_to_sRGB(
|
|
53651
|
+
output, output_offset,
|
|
53652
|
+
input, input_offset
|
|
53653
|
+
) {
|
|
53654
|
+
const r = input[input_offset];
|
|
53655
|
+
const g = input[input_offset + 1];
|
|
53656
|
+
const b = input[input_offset + 2];
|
|
53657
|
+
|
|
53658
|
+
output[output_offset] = convert(r);
|
|
53659
|
+
output[output_offset + 1] = convert(g);
|
|
53660
|
+
output[output_offset + 2] = convert(b);
|
|
53650
53661
|
}
|
|
53651
53662
|
|
|
53652
53663
|
/**
|
|
@@ -53655,7 +53666,11 @@ function linear_to_sRGB(output, output_offset, input, input_offset) {
|
|
|
53655
53666
|
* @return {number|number}
|
|
53656
53667
|
*/
|
|
53657
53668
|
function convert_channel_sRGB_to_linear(c) {
|
|
53658
|
-
|
|
53669
|
+
if (c < 0.04045) {
|
|
53670
|
+
return c * 0.0773993808;
|
|
53671
|
+
} else {
|
|
53672
|
+
return Math.pow(c * 0.9478672986 + 0.0521327014, 2.4);
|
|
53673
|
+
}
|
|
53659
53674
|
}
|
|
53660
53675
|
|
|
53661
53676
|
/**
|
|
@@ -53665,10 +53680,18 @@ function convert_channel_sRGB_to_linear(c) {
|
|
|
53665
53680
|
* @param {number[]} input
|
|
53666
53681
|
* @param {number} input_offset
|
|
53667
53682
|
*/
|
|
53668
|
-
function sRGB_to_linear(
|
|
53669
|
-
output
|
|
53670
|
-
|
|
53671
|
-
|
|
53683
|
+
function sRGB_to_linear(
|
|
53684
|
+
output, output_offset,
|
|
53685
|
+
input, input_offset
|
|
53686
|
+
) {
|
|
53687
|
+
|
|
53688
|
+
const sR = input[input_offset];
|
|
53689
|
+
const sG = input[input_offset + 1];
|
|
53690
|
+
const sB = input[input_offset + 2];
|
|
53691
|
+
|
|
53692
|
+
output[output_offset] = convert_channel_sRGB_to_linear(sR);
|
|
53693
|
+
output[output_offset + 1] = convert_channel_sRGB_to_linear(sG);
|
|
53694
|
+
output[output_offset + 2] = convert_channel_sRGB_to_linear(sB);
|
|
53672
53695
|
}
|
|
53673
53696
|
|
|
53674
53697
|
/**
|