@woosh/meep-engine 2.81.1 → 2.81.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/build/meep.cjs CHANGED
@@ -2023,99 +2023,6 @@ function v3_angle_cos_between(
2023
2023
 
2024
2024
  }
2025
2025
 
2026
- /**
2027
- *
2028
- * @param {BinaryBuffer} buffer
2029
- * @param {number[]} result
2030
- * @param {number} result_offset
2031
- */
2032
- function v3_binary_equality_decode(buffer, result, result_offset) {
2033
- const header = buffer.readUint8();
2034
-
2035
- let x = 0;
2036
- let y = 0;
2037
- let z = 0;
2038
-
2039
- if ((header & 7) === 7) {
2040
- //all scale components are the same
2041
- x = buffer.readFloat32();
2042
- y = x;
2043
- z = x;
2044
- } else if ((header & 1) === 1) {
2045
- //X and Y are the same, Z is different
2046
- x = buffer.readFloat32();
2047
- y = x;
2048
- z = buffer.readFloat32();
2049
- } else if ((header & 2) === 2) {
2050
- //Y and Z are the same, X is different
2051
- x = buffer.readFloat32();
2052
- y = buffer.readFloat32();
2053
- z = y;
2054
- } else if ((header & 4) === 4) {
2055
- //X and Z are the same, Y is different
2056
- x = buffer.readFloat32();
2057
- y = buffer.readFloat32();
2058
- z = x;
2059
- } else {
2060
- //scale components are different
2061
- x = buffer.readFloat32();
2062
- y = buffer.readFloat32();
2063
- z = buffer.readFloat32();
2064
- }
2065
-
2066
- result[result_offset] = x;
2067
- result[result_offset + 1] = y;
2068
- result[result_offset + 2] = z;
2069
- }
2070
-
2071
- /**
2072
- *
2073
- * @param {BinaryBuffer} buffer
2074
- * @param {number} x
2075
- * @param {number} y
2076
- * @param {number} z
2077
- */
2078
- function v3_binary_equality_encode(buffer, x, y, z){
2079
-
2080
- let header = 0;
2081
-
2082
- if (x === y) {
2083
- header |= 1;
2084
- }
2085
-
2086
- if (y === z) {
2087
- header |= 2;
2088
- }
2089
-
2090
- if (x === z) {
2091
- header |= 4;
2092
- }
2093
-
2094
- buffer.writeUint8(header);
2095
-
2096
- if ((header & 7) === 7) {
2097
- //all components are the same
2098
- buffer.writeFloat32(x);
2099
- } else if (header === 1) {
2100
- //X and Y are the same, Z is different
2101
- buffer.writeFloat32(x);
2102
- buffer.writeFloat32(z);
2103
- } else if (header === 2) {
2104
- //Y and Z are the same, X is different
2105
- buffer.writeFloat32(x);
2106
- buffer.writeFloat32(y);
2107
- } else if (header === 4) {
2108
- //X and Z are the same, Y is different
2109
- buffer.writeFloat32(x);
2110
- buffer.writeFloat32(y);
2111
- } else {
2112
- //scale components are different
2113
- buffer.writeFloat32(x);
2114
- buffer.writeFloat32(y);
2115
- buffer.writeFloat32(z);
2116
- }
2117
- }
2118
-
2119
2026
  /**
2120
2027
  *
2121
2028
  * @param {number} x
@@ -3037,11 +2944,7 @@ let Vector3$1 = class Vector3 {
3037
2944
  * @deprecated use dedicated method directly instead
3038
2945
  */
3039
2946
  toBinaryBufferFloat32_EqualityEncoded(buffer) {
3040
- const x = this.x;
3041
- const y = this.y;
3042
- const z = this.z;
3043
-
3044
- v3_binary_equality_encode(buffer, x, y, z);
2947
+ throw new Error('deprecated, use v3_binary_equality_encode')
3045
2948
  }
3046
2949
 
3047
2950
  /**
@@ -3050,7 +2953,7 @@ let Vector3$1 = class Vector3 {
3050
2953
  * @deprecated use dedicated method directly instead
3051
2954
  */
3052
2955
  fromBinaryBufferFloat32_EqualityEncoded(buffer) {
3053
- v3_binary_equality_decode(buffer, this, 0);
2956
+ throw new Error('deprecated, use v3_binary_equality_decode')
3054
2957
  }
3055
2958
 
3056
2959
  hash() {