@galacean/engine-xr-webxr 0.0.0-experimental-1.2-xr.0 → 0.0.0-experimental-1.3-xr.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.
@@ -243,6 +243,15 @@ function _create_class(Constructor, protoProps, staticProps) {
243
243
  */ MathUtil.degreeToRadian = function degreeToRadian(d) {
244
244
  return d * MathUtil.degreeToRadFactor;
245
245
  };
246
+ /**
247
+ * Linearly interpolate between two values
248
+ * @param start - Specify the start of the range in which to interpolate
249
+ * @param end - Specify the end of the range in which to interpolate
250
+ * @param t - The blend amount where 0 returns start and 1 end
251
+ * @returns The result of linear blending between start and end
252
+ */ MathUtil.lerp = function lerp(start, end, t) {
253
+ return start + (end - start) * t;
254
+ };
246
255
  return MathUtil;
247
256
  }();
248
257
  (function() {
@@ -5483,14 +5492,12 @@ var WebXRDevice = /*#__PURE__*/ function() {
5483
5492
  switch(type){
5484
5493
  case miniprogram$1.XRFeatureType.HitTest:
5485
5494
  case miniprogram$1.XRFeatureType.PlaneTracking:
5486
- // @ts-ignore
5487
- return !!engineMiniprogramAdapter.window.XRPlane;
5495
+ return typeof XRPlane !== "undefined";
5488
5496
  case miniprogram$1.XRFeatureType.AnchorTracking:
5489
- // @ts-ignore
5490
- return !!engineMiniprogramAdapter.window.XRAnchor;
5497
+ return typeof XRAnchor !== "undefined";
5491
5498
  case miniprogram$1.XRFeatureType.ImageTracking:
5492
5499
  // @ts-ignore
5493
- return !!engineMiniprogramAdapter.window.XRImageTrackingResult;
5500
+ return typeof XRImageTrackingResult !== "undefined";
5494
5501
  }
5495
5502
  };
5496
5503
  _proto.createPlatformFeature = function createPlatformFeature(type) {
package/dist/module.js CHANGED
@@ -229,6 +229,15 @@ function _create_class(Constructor, protoProps, staticProps) {
229
229
  */ MathUtil.degreeToRadian = function degreeToRadian(d) {
230
230
  return d * MathUtil.degreeToRadFactor;
231
231
  };
232
+ /**
233
+ * Linearly interpolate between two values
234
+ * @param start - Specify the start of the range in which to interpolate
235
+ * @param end - Specify the end of the range in which to interpolate
236
+ * @param t - The blend amount where 0 returns start and 1 end
237
+ * @returns The result of linear blending between start and end
238
+ */ MathUtil.lerp = function lerp(start, end, t) {
239
+ return start + (end - start) * t;
240
+ };
232
241
  return MathUtil;
233
242
  }();
234
243
  (function() {
@@ -4609,14 +4618,12 @@ var WebXRDevice = /*#__PURE__*/ function() {
4609
4618
  switch(type){
4610
4619
  case XRFeatureType.HitTest:
4611
4620
  case XRFeatureType.PlaneTracking:
4612
- // @ts-ignore
4613
- return !!window.XRPlane;
4621
+ return typeof XRPlane !== "undefined";
4614
4622
  case XRFeatureType.AnchorTracking:
4615
- // @ts-ignore
4616
- return !!window.XRAnchor;
4623
+ return typeof XRAnchor !== "undefined";
4617
4624
  case XRFeatureType.ImageTracking:
4618
4625
  // @ts-ignore
4619
- return !!window.XRImageTrackingResult;
4626
+ return typeof XRImageTrackingResult !== "undefined";
4620
4627
  }
4621
4628
  };
4622
4629
  _proto.createPlatformFeature = function createPlatformFeature(type) {