@galacean/engine-xr-webxr 1.4.0-alpha.3 → 1.4.0-beta.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/dist/browser.js CHANGED
@@ -1786,7 +1786,7 @@
1786
1786
  this._x = x;
1787
1787
  this._y = y;
1788
1788
  this._z = z;
1789
- this._onValueChanged && this._onValueChanged();
1789
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
1790
1790
  return this;
1791
1791
  };
1792
1792
  /**
@@ -1797,7 +1797,7 @@
1797
1797
  this._x += right._x;
1798
1798
  this._y += right._y;
1799
1799
  this._z += right._z;
1800
- this._onValueChanged && this._onValueChanged();
1800
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
1801
1801
  return this;
1802
1802
  };
1803
1803
  /**
@@ -1808,7 +1808,7 @@
1808
1808
  this._x -= right._x;
1809
1809
  this._y -= right._y;
1810
1810
  this._z -= right._z;
1811
- this._onValueChanged && this._onValueChanged();
1811
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
1812
1812
  return this;
1813
1813
  };
1814
1814
  /**
@@ -1819,7 +1819,7 @@
1819
1819
  this._x *= right._x;
1820
1820
  this._y *= right._y;
1821
1821
  this._z *= right._z;
1822
- this._onValueChanged && this._onValueChanged();
1822
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
1823
1823
  return this;
1824
1824
  };
1825
1825
  /**
@@ -1830,7 +1830,7 @@
1830
1830
  this._x /= right._x;
1831
1831
  this._y /= right._y;
1832
1832
  this._z /= right._z;
1833
- this._onValueChanged && this._onValueChanged();
1833
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
1834
1834
  return this;
1835
1835
  };
1836
1836
  /**
@@ -1854,7 +1854,7 @@
1854
1854
  this._x = -this._x;
1855
1855
  this._y = -this._y;
1856
1856
  this._z = -this._z;
1857
- this._onValueChanged && this._onValueChanged();
1857
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
1858
1858
  return this;
1859
1859
  };
1860
1860
  /**
@@ -1872,7 +1872,7 @@
1872
1872
  this._x *= s;
1873
1873
  this._y *= s;
1874
1874
  this._z *= s;
1875
- this._onValueChanged && this._onValueChanged();
1875
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
1876
1876
  return this;
1877
1877
  };
1878
1878
  /**
@@ -1933,7 +1933,7 @@
1933
1933
  this._x = source.x;
1934
1934
  this._y = source.y;
1935
1935
  this._z = source.z;
1936
- this._onValueChanged && this._onValueChanged();
1936
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
1937
1937
  return this;
1938
1938
  };
1939
1939
  /**
@@ -1956,7 +1956,7 @@
1956
1956
  this._x = array[offset];
1957
1957
  this._y = array[offset + 1];
1958
1958
  this._z = array[offset + 2];
1959
- this._onValueChanged && this._onValueChanged();
1959
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
1960
1960
  return this;
1961
1961
  };
1962
1962
  /**
@@ -1988,7 +1988,7 @@
1988
1988
  out._x = left._x + right._x;
1989
1989
  out._y = left._y + right._y;
1990
1990
  out._z = left._z + right._z;
1991
- out._onValueChanged && out._onValueChanged();
1991
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
1992
1992
  };
1993
1993
  /**
1994
1994
  * Determines the difference between two vectors.
@@ -1999,7 +1999,7 @@
1999
1999
  out._x = left._x - right._x;
2000
2000
  out._y = left._y - right._y;
2001
2001
  out._z = left._z - right._z;
2002
- out._onValueChanged && out._onValueChanged();
2002
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2003
2003
  };
2004
2004
  /**
2005
2005
  * Determines the product of two vectors.
@@ -2010,7 +2010,7 @@
2010
2010
  out._x = left._x * right._x;
2011
2011
  out._y = left._y * right._y;
2012
2012
  out._z = left._z * right._z;
2013
- out._onValueChanged && out._onValueChanged();
2013
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2014
2014
  };
2015
2015
  /**
2016
2016
  * Determines the divisor of two vectors.
@@ -2021,7 +2021,7 @@
2021
2021
  out._x = left._x / right._x;
2022
2022
  out._y = left._y / right._y;
2023
2023
  out._z = left._z / right._z;
2024
- out._onValueChanged && out._onValueChanged();
2024
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2025
2025
  };
2026
2026
  /**
2027
2027
  * Determines the dot product of two vectors.
@@ -2086,7 +2086,7 @@
2086
2086
  out._x = _x + (end._x - _x) * t;
2087
2087
  out._y = _y + (end._y - _y) * t;
2088
2088
  out._z = _z + (end._z - _z) * t;
2089
- out._onValueChanged && out._onValueChanged();
2089
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2090
2090
  };
2091
2091
  /**
2092
2092
  * Calculate a vector containing the largest components of the specified vectors.
@@ -2097,7 +2097,7 @@
2097
2097
  out._x = Math.max(left._x, right._x);
2098
2098
  out._y = Math.max(left._y, right._y);
2099
2099
  out._z = Math.max(left._z, right._z);
2100
- out._onValueChanged && out._onValueChanged();
2100
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2101
2101
  };
2102
2102
  /**
2103
2103
  * Calculate a vector containing the smallest components of the specified vectors.
@@ -2108,7 +2108,7 @@
2108
2108
  out._x = Math.min(left._x, right._x);
2109
2109
  out._y = Math.min(left._y, right._y);
2110
2110
  out._z = Math.min(left._z, right._z);
2111
- out._onValueChanged && out._onValueChanged();
2111
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2112
2112
  };
2113
2113
  /**
2114
2114
  * Reverses the direction of a given vector.
@@ -2118,7 +2118,7 @@
2118
2118
  out._x = -a._x;
2119
2119
  out._y = -a._y;
2120
2120
  out._z = -a._z;
2121
- out._onValueChanged && out._onValueChanged();
2121
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2122
2122
  };
2123
2123
  /**
2124
2124
  * Converts the vector into a unit vector.
@@ -2141,7 +2141,7 @@
2141
2141
  out._x = a._x * s;
2142
2142
  out._y = a._y * s;
2143
2143
  out._z = a._z * s;
2144
- out._onValueChanged && out._onValueChanged();
2144
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2145
2145
  };
2146
2146
  /**
2147
2147
  * Performs a normal transformation using the given 4x4 matrix.
@@ -2160,7 +2160,7 @@
2160
2160
  out._x = _x * e[0] + _y * e[4] + _z * e[8];
2161
2161
  out._y = _x * e[1] + _y * e[5] + _z * e[9];
2162
2162
  out._z = _x * e[2] + _y * e[6] + _z * e[10];
2163
- out._onValueChanged && out._onValueChanged();
2163
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2164
2164
  };
2165
2165
  /**
2166
2166
  * Performs a transformation using the given 4x4 matrix.
@@ -2173,7 +2173,7 @@
2173
2173
  out._x = _x * e[0] + _y * e[4] + _z * e[8] + e[12];
2174
2174
  out._y = _x * e[1] + _y * e[5] + _z * e[9] + e[13];
2175
2175
  out._z = _x * e[2] + _y * e[6] + _z * e[10] + e[14];
2176
- out._onValueChanged && out._onValueChanged();
2176
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2177
2177
  };
2178
2178
  /**
2179
2179
  * Performs a transformation from vector3 to vector4 using the given 4x4 matrix.
@@ -2187,7 +2187,7 @@
2187
2187
  out._y = _x * e[1] + _y * e[5] + _z * e[9] + e[13];
2188
2188
  out._z = _x * e[2] + _y * e[6] + _z * e[10] + e[14];
2189
2189
  out._w = _x * e[3] + _y * e[7] + _z * e[11] + e[15];
2190
- out._onValueChanged && out._onValueChanged();
2190
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2191
2191
  };
2192
2192
  /**
2193
2193
  * Performs a coordinate transformation using the given 4x4 matrix.
@@ -2209,7 +2209,7 @@
2209
2209
  out._x = (_x * e[0] + _y * e[4] + _z * e[8] + e[12]) * w;
2210
2210
  out._y = (_x * e[1] + _y * e[5] + _z * e[9] + e[13]) * w;
2211
2211
  out._z = (_x * e[2] + _y * e[6] + _z * e[10] + e[14]) * w;
2212
- out._onValueChanged && out._onValueChanged();
2212
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2213
2213
  };
2214
2214
  /**
2215
2215
  * Performs a transformation using the given quaternion.
@@ -2228,7 +2228,7 @@
2228
2228
  out._x = ix * qw - iw * qx - iy * qz + iz * qy;
2229
2229
  out._y = iy * qw - iw * qy - iz * qx + ix * qz;
2230
2230
  out._z = iz * qw - iw * qz - ix * qy + iy * qx;
2231
- out._onValueChanged && out._onValueChanged();
2231
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2232
2232
  };
2233
2233
  _create_class(Vector3, [
2234
2234
  {
@@ -2240,7 +2240,7 @@
2240
2240
  },
2241
2241
  set: function set(value) {
2242
2242
  this._x = value;
2243
- this._onValueChanged && this._onValueChanged();
2243
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2244
2244
  }
2245
2245
  },
2246
2246
  {
@@ -2252,7 +2252,7 @@
2252
2252
  },
2253
2253
  set: function set(value) {
2254
2254
  this._y = value;
2255
- this._onValueChanged && this._onValueChanged();
2255
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2256
2256
  }
2257
2257
  },
2258
2258
  {
@@ -2264,7 +2264,7 @@
2264
2264
  },
2265
2265
  set: function set(value) {
2266
2266
  this._z = value;
2267
- this._onValueChanged && this._onValueChanged();
2267
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2268
2268
  }
2269
2269
  }
2270
2270
  ]);
@@ -2847,7 +2847,7 @@
2847
2847
  this._y = y;
2848
2848
  this._z = z;
2849
2849
  this._w = w;
2850
- this._onValueChanged && this._onValueChanged();
2850
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2851
2851
  return this;
2852
2852
  };
2853
2853
  /**
@@ -2857,7 +2857,7 @@
2857
2857
  this._x *= -1;
2858
2858
  this._y *= -1;
2859
2859
  this._z *= -1;
2860
- this._onValueChanged && this._onValueChanged();
2860
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2861
2861
  return this;
2862
2862
  };
2863
2863
  /**
@@ -2888,7 +2888,7 @@
2888
2888
  this._y = 0;
2889
2889
  this._z = 0;
2890
2890
  this._w = 1;
2891
- this._onValueChanged && this._onValueChanged();
2891
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
2892
2892
  return this;
2893
2893
  };
2894
2894
  /**
@@ -2921,7 +2921,7 @@
2921
2921
  var t = out._x;
2922
2922
  out._x = out._y;
2923
2923
  out._y = t;
2924
- out._onValueChanged && out._onValueChanged();
2924
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2925
2925
  return out;
2926
2926
  };
2927
2927
  /**
@@ -2930,7 +2930,7 @@
2930
2930
  * @returns Euler x->yaw y->pitch z->roll
2931
2931
  */ _proto.toYawPitchRoll = function toYawPitchRoll(out) {
2932
2932
  this._toYawPitchRoll(out);
2933
- out._onValueChanged && out._onValueChanged();
2933
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
2934
2934
  return out;
2935
2935
  };
2936
2936
  /**
@@ -3022,7 +3022,7 @@
3022
3022
  this._y = source.y;
3023
3023
  this._z = source.z;
3024
3024
  this._w = source.w;
3025
- this._onValueChanged && this._onValueChanged();
3025
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3026
3026
  return this;
3027
3027
  };
3028
3028
  /**
@@ -3047,7 +3047,7 @@
3047
3047
  this._y = array[offset + 1];
3048
3048
  this._z = array[offset + 2];
3049
3049
  this._w = array[offset + 3];
3050
- this._onValueChanged && this._onValueChanged();
3050
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3051
3051
  return this;
3052
3052
  };
3053
3053
  /**
@@ -3105,7 +3105,7 @@
3105
3105
  out._y = left._y + right._y;
3106
3106
  out._z = left._z + right._z;
3107
3107
  out._w = left._w + right._w;
3108
- out._onValueChanged && out._onValueChanged();
3108
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3109
3109
  };
3110
3110
  /**
3111
3111
  * Determines the product of two quaternions.
@@ -3119,7 +3119,7 @@
3119
3119
  out._y = ay * bw + aw * by + az * bx - ax * bz;
3120
3120
  out._z = az * bw + aw * bz + ax * by - ay * bx;
3121
3121
  out._w = aw * bw - ax * bx - ay * by - az * bz;
3122
- out._onValueChanged && out._onValueChanged();
3122
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3123
3123
  };
3124
3124
  /**
3125
3125
  * Calculate quaternion that contains conjugated version of the specified quaternion.
@@ -3130,7 +3130,7 @@
3130
3130
  out._y = -a._y;
3131
3131
  out._z = -a._z;
3132
3132
  out._w = a._w;
3133
- out._onValueChanged && out._onValueChanged();
3133
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3134
3134
  };
3135
3135
  /**
3136
3136
  * Determines the dot product of two quaternions.
@@ -3162,7 +3162,7 @@
3162
3162
  out._y = normalAxis._y * s;
3163
3163
  out._z = normalAxis._z * s;
3164
3164
  out._w = Math.cos(rad);
3165
- out._onValueChanged && out._onValueChanged();
3165
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3166
3166
  };
3167
3167
  /**
3168
3168
  * Calculate a quaternion rotates around x, y, z axis (pitch/yaw/roll).
@@ -3195,7 +3195,7 @@
3195
3195
  out._y = sinYaw * cosPitch * cosRoll - cosYaw * sinPitch * sinRoll;
3196
3196
  out._z = cosYawPitch * sinRoll - sinYawPitch * cosRoll;
3197
3197
  out._w = cosYawPitch * cosRoll + sinYawPitch * sinRoll;
3198
- out._onValueChanged && out._onValueChanged();
3198
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3199
3199
  };
3200
3200
  /**
3201
3201
  * Calculate a quaternion from the specified 3x3 matrix.
@@ -3237,7 +3237,7 @@
3237
3237
  out._z = 0.5 * sqrt;
3238
3238
  out._w = (m12 - m21) * half;
3239
3239
  }
3240
- out._onValueChanged && out._onValueChanged();
3240
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3241
3241
  };
3242
3242
  /**
3243
3243
  * Calculate the inverse of the specified quaternion.
@@ -3252,7 +3252,7 @@
3252
3252
  out._y = -y * invDot;
3253
3253
  out._z = -z * invDot;
3254
3254
  out._w = w * invDot;
3255
- out._onValueChanged && out._onValueChanged();
3255
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3256
3256
  }
3257
3257
  };
3258
3258
  /**
@@ -3299,7 +3299,7 @@
3299
3299
  out.y = inverse * start.y + opposite * end.y;
3300
3300
  out.z = inverse * start.z + opposite * end.z;
3301
3301
  out.w = inverse * start.w + opposite * end.w;
3302
- out._onValueChanged && out._onValueChanged();
3302
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3303
3303
  };
3304
3304
  /**
3305
3305
  * Scales the specified quaternion magnitude to unit length.
@@ -3314,7 +3314,7 @@
3314
3314
  out._y = _y * len;
3315
3315
  out._z = _z * len;
3316
3316
  out._w = _w * len;
3317
- out._onValueChanged && out._onValueChanged();
3317
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3318
3318
  }
3319
3319
  };
3320
3320
  /**
@@ -3329,7 +3329,7 @@
3329
3329
  out._y = 0;
3330
3330
  out._z = 0;
3331
3331
  out._w = c;
3332
- out._onValueChanged && out._onValueChanged();
3332
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3333
3333
  };
3334
3334
  /**
3335
3335
  * Calculate a quaternion rotate around Y axis.
@@ -3343,7 +3343,7 @@
3343
3343
  out._y = s;
3344
3344
  out._z = 0;
3345
3345
  out._w = c;
3346
- out._onValueChanged && out._onValueChanged();
3346
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3347
3347
  };
3348
3348
  /**
3349
3349
  * Calculate a quaternion rotate around Z axis.
@@ -3357,7 +3357,7 @@
3357
3357
  out._y = 0;
3358
3358
  out._z = s;
3359
3359
  out._w = c;
3360
- out._onValueChanged && out._onValueChanged();
3360
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3361
3361
  };
3362
3362
  /**
3363
3363
  * Calculate a quaternion that the specified quaternion rotate around X axis.
@@ -3373,7 +3373,7 @@
3373
3373
  out._y = _y * bw + _z * bx;
3374
3374
  out._z = _z * bw - _y * bx;
3375
3375
  out._w = _w * bw - _x * bx;
3376
- out._onValueChanged && out._onValueChanged();
3376
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3377
3377
  };
3378
3378
  /**
3379
3379
  * Calculate a quaternion that the specified quaternion rotate around Y axis.
@@ -3389,7 +3389,7 @@
3389
3389
  out._y = _y * bw + _w * by;
3390
3390
  out._z = _z * bw + _x * by;
3391
3391
  out._w = _w * bw - _y * by;
3392
- out._onValueChanged && out._onValueChanged();
3392
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3393
3393
  };
3394
3394
  /**
3395
3395
  * Calculate a quaternion that the specified quaternion rotate around Z axis.
@@ -3405,7 +3405,7 @@
3405
3405
  out._y = _y * bw - _x * bz;
3406
3406
  out._z = _z * bw + _w * bz;
3407
3407
  out._w = _w * bw - _z * bz;
3408
- out._onValueChanged && out._onValueChanged();
3408
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3409
3409
  };
3410
3410
  /**
3411
3411
  * Scale a quaternion by a given number.
@@ -3417,7 +3417,7 @@
3417
3417
  out._y = a._y * s;
3418
3418
  out._z = a._z * s;
3419
3419
  out._w = a._w * s;
3420
- out._onValueChanged && out._onValueChanged();
3420
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3421
3421
  };
3422
3422
  _create_class(Quaternion, [
3423
3423
  {
@@ -3429,7 +3429,7 @@
3429
3429
  },
3430
3430
  set: function set(value) {
3431
3431
  this._x = value;
3432
- this._onValueChanged && this._onValueChanged();
3432
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3433
3433
  }
3434
3434
  },
3435
3435
  {
@@ -3441,7 +3441,7 @@
3441
3441
  },
3442
3442
  set: function set(value) {
3443
3443
  this._y = value;
3444
- this._onValueChanged && this._onValueChanged();
3444
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3445
3445
  }
3446
3446
  },
3447
3447
  {
@@ -3453,7 +3453,7 @@
3453
3453
  },
3454
3454
  set: function set(value) {
3455
3455
  this._z = value;
3456
- this._onValueChanged && this._onValueChanged();
3456
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3457
3457
  }
3458
3458
  },
3459
3459
  {
@@ -3473,7 +3473,7 @@
3473
3473
  },
3474
3474
  set: function set(value) {
3475
3475
  this._w = value;
3476
- this._onValueChanged && this._onValueChanged();
3476
+ this._onValueChanged == null ? void 0 : this._onValueChanged.call(this);
3477
3477
  }
3478
3478
  }
3479
3479
  ]);
@@ -3678,7 +3678,7 @@
3678
3678
  out._y = (e[6] + e[9]) / s3;
3679
3679
  out._z = 0.25 * s3;
3680
3680
  }
3681
- out._onValueChanged && out._onValueChanged();
3681
+ out._onValueChanged == null ? void 0 : out._onValueChanged.call(out);
3682
3682
  return out;
3683
3683
  };
3684
3684
  /**