@galacean/engine-xr-webxr 0.0.0-experimental-1.2-xr.0 → 0.0.0-experimental-1.3-xr.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/main.js CHANGED
@@ -233,6 +233,15 @@ function _create_class(Constructor, protoProps, staticProps) {
233
233
  */ MathUtil.degreeToRadian = function degreeToRadian(d) {
234
234
  return d * MathUtil.degreeToRadFactor;
235
235
  };
236
+ /**
237
+ * Linearly interpolate between two values
238
+ * @param start - Specify the start of the range in which to interpolate
239
+ * @param end - Specify the end of the range in which to interpolate
240
+ * @param t - The blend amount where 0 returns start and 1 end
241
+ * @returns The result of linear blending between start and end
242
+ */ MathUtil.lerp = function lerp(start, end, t) {
243
+ return start + (end - start) * t;
244
+ };
236
245
  return MathUtil;
237
246
  }();
238
247
  (function() {
@@ -4613,14 +4622,12 @@ var WebXRDevice = /*#__PURE__*/ function() {
4613
4622
  switch(type){
4614
4623
  case engineXr.XRFeatureType.HitTest:
4615
4624
  case engineXr.XRFeatureType.PlaneTracking:
4616
- // @ts-ignore
4617
- return !!window.XRPlane;
4625
+ return typeof XRPlane !== "undefined";
4618
4626
  case engineXr.XRFeatureType.AnchorTracking:
4619
- // @ts-ignore
4620
- return !!window.XRAnchor;
4627
+ return typeof XRAnchor !== "undefined";
4621
4628
  case engineXr.XRFeatureType.ImageTracking:
4622
4629
  // @ts-ignore
4623
- return !!window.XRImageTrackingResult;
4630
+ return typeof XRImageTrackingResult !== "undefined";
4624
4631
  }
4625
4632
  };
4626
4633
  _proto.createPlatformFeature = function createPlatformFeature(type) {