@galacean/engine-xr 0.0.0-experimental-1.3-xr.2 → 0.0.0-experimental-1.3-xr.4
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 +81 -83
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/main.js +81 -83
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +81 -83
- package/dist/module.js +80 -84
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/feature/trackable/XRTrackableFeature.d.ts +0 -1
- package/types/index.d.ts +2 -0
package/dist/browser.js
CHANGED
|
@@ -993,78 +993,6 @@
|
|
|
993
993
|
return XRFeature;
|
|
994
994
|
}();
|
|
995
995
|
|
|
996
|
-
/**
|
|
997
|
-
* Enum for the types of hit test that can be performed.
|
|
998
|
-
* Note: currently only supports plane.
|
|
999
|
-
*/ exports.TrackableType = void 0;
|
|
1000
|
-
(function(TrackableType) {
|
|
1001
|
-
TrackableType[TrackableType[/** Tracked plane. */ "Plane"] = 0x1] = "Plane";
|
|
1002
|
-
TrackableType[TrackableType[/** All tracked objects. */ "All"] = 0x1] = "All";
|
|
1003
|
-
})(exports.TrackableType || (exports.TrackableType = {}));
|
|
1004
|
-
|
|
1005
|
-
/**
|
|
1006
|
-
* XR hit result.
|
|
1007
|
-
* It is the detection result returned by using XR HitTest feature.
|
|
1008
|
-
*/ var XRHitResult = function XRHitResult() {
|
|
1009
|
-
/** The position of the hit point. */ this.point = new engine.Vector3();
|
|
1010
|
-
/** The normal of the hit point. */ this.normal = new engine.Vector3();
|
|
1011
|
-
};
|
|
1012
|
-
|
|
1013
|
-
/******************************************************************************
|
|
1014
|
-
Copyright (c) Microsoft Corporation.
|
|
1015
|
-
|
|
1016
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1017
|
-
purpose with or without fee is hereby granted.
|
|
1018
|
-
|
|
1019
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1020
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1021
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1022
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1023
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1024
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1025
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1026
|
-
***************************************************************************** */
|
|
1027
|
-
|
|
1028
|
-
function __decorate(decorators, target, key, desc) {
|
|
1029
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1030
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1031
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1032
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
function __generator(thisArg, body) {
|
|
1036
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
1037
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
1038
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
1039
|
-
function step(op) {
|
|
1040
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
1041
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
1042
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
1043
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
1044
|
-
switch (op[0]) {
|
|
1045
|
-
case 0: case 1: t = op; break;
|
|
1046
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
1047
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
1048
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
1049
|
-
default:
|
|
1050
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
1051
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
1052
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
1053
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
1054
|
-
if (t[2]) _.ops.pop();
|
|
1055
|
-
_.trys.pop(); continue;
|
|
1056
|
-
}
|
|
1057
|
-
op = body.call(thisArg, _);
|
|
1058
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
1059
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1064
|
-
var e = new Error(message);
|
|
1065
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1066
|
-
};
|
|
1067
|
-
|
|
1068
996
|
exports.XRFeatureType = void 0;
|
|
1069
997
|
(function(XRFeatureType) {
|
|
1070
998
|
XRFeatureType[XRFeatureType["AnchorTracking"] = 0] = "AnchorTracking";
|
|
@@ -1183,10 +1111,6 @@
|
|
|
1183
1111
|
// prettier-ignore
|
|
1184
1112
|
this._requestTrackings.length = this._tracked.length = this._added.length = this._updated.length = this._removed.length = 0;
|
|
1185
1113
|
};
|
|
1186
|
-
_proto._onDestroy = function _onDestroy() {
|
|
1187
|
-
// prettier-ignore
|
|
1188
|
-
this._requestTrackings.length = this._tracked.length = this._added.length = this._updated.length = this._removed.length = 0;
|
|
1189
|
-
};
|
|
1190
1114
|
_proto._addRequestTracking = function _addRequestTracking(requestTracking) {
|
|
1191
1115
|
var _this = this, platformFeature = _this._platformFeature;
|
|
1192
1116
|
if (this._xrManager.sessionManager._platformSession && !platformFeature.canModifyRequestTrackingAfterInit) {
|
|
@@ -1218,6 +1142,85 @@
|
|
|
1218
1142
|
XRTrackableFeature._uuid = 0;
|
|
1219
1143
|
})();
|
|
1220
1144
|
|
|
1145
|
+
/**
|
|
1146
|
+
* The base class of XR tracked object.
|
|
1147
|
+
*/ var XRTracked = function XRTracked() {
|
|
1148
|
+
/** The pose of the trackable in XR space. */ this.pose = new XRPose();
|
|
1149
|
+
/** The tracking state of the trackable. */ this.state = exports.XRTrackingState.NotTracking;
|
|
1150
|
+
};
|
|
1151
|
+
|
|
1152
|
+
/**
|
|
1153
|
+
* Enum for the types of hit test that can be performed.
|
|
1154
|
+
* Note: currently only supports plane.
|
|
1155
|
+
*/ exports.TrackableType = void 0;
|
|
1156
|
+
(function(TrackableType) {
|
|
1157
|
+
TrackableType[TrackableType[/** Tracked plane. */ "Plane"] = 0x1] = "Plane";
|
|
1158
|
+
TrackableType[TrackableType[/** All tracked objects. */ "All"] = 0x1] = "All";
|
|
1159
|
+
})(exports.TrackableType || (exports.TrackableType = {}));
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* XR hit result.
|
|
1163
|
+
* It is the detection result returned by using XR HitTest feature.
|
|
1164
|
+
*/ var XRHitResult = function XRHitResult() {
|
|
1165
|
+
/** The position of the hit point. */ this.point = new engine.Vector3();
|
|
1166
|
+
/** The normal of the hit point. */ this.normal = new engine.Vector3();
|
|
1167
|
+
};
|
|
1168
|
+
|
|
1169
|
+
/******************************************************************************
|
|
1170
|
+
Copyright (c) Microsoft Corporation.
|
|
1171
|
+
|
|
1172
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1173
|
+
purpose with or without fee is hereby granted.
|
|
1174
|
+
|
|
1175
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1176
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1177
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1178
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1179
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1180
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1181
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1182
|
+
***************************************************************************** */
|
|
1183
|
+
|
|
1184
|
+
function __decorate(decorators, target, key, desc) {
|
|
1185
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1186
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1187
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1188
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
function __generator(thisArg, body) {
|
|
1192
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
1193
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
1194
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
1195
|
+
function step(op) {
|
|
1196
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
1197
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
1198
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
1199
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
1200
|
+
switch (op[0]) {
|
|
1201
|
+
case 0: case 1: t = op; break;
|
|
1202
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
1203
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
1204
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
1205
|
+
default:
|
|
1206
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
1207
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
1208
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
1209
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
1210
|
+
if (t[2]) _.ops.pop();
|
|
1211
|
+
_.trys.pop(); continue;
|
|
1212
|
+
}
|
|
1213
|
+
op = body.call(thisArg, _);
|
|
1214
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
1215
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1220
|
+
var e = new Error(message);
|
|
1221
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1221
1224
|
/**
|
|
1222
1225
|
* Enumerates modes of plane in XR.
|
|
1223
1226
|
*/ exports.XRPlaneMode = void 0;
|
|
@@ -1248,13 +1251,6 @@
|
|
|
1248
1251
|
return XRRequestPlane;
|
|
1249
1252
|
}(XRRequestTracking);
|
|
1250
1253
|
|
|
1251
|
-
/**
|
|
1252
|
-
* The base class of XR tracked object.
|
|
1253
|
-
*/ var XRTracked = function XRTracked() {
|
|
1254
|
-
/** The pose of the trackable in XR space. */ this.pose = new XRPose();
|
|
1255
|
-
/** The tracking state of the trackable. */ this.state = exports.XRTrackingState.NotTracking;
|
|
1256
|
-
};
|
|
1257
|
-
|
|
1258
1254
|
/**
|
|
1259
1255
|
* The tracked plane in XR space.
|
|
1260
1256
|
*/ var XRTrackedPlane = /*#__PURE__*/ function(XRTracked1) {
|
|
@@ -1866,6 +1862,8 @@
|
|
|
1866
1862
|
exports.XRPose = XRPose;
|
|
1867
1863
|
exports.XRReferenceImage = XRReferenceImage;
|
|
1868
1864
|
exports.XRSessionManager = XRSessionManager;
|
|
1865
|
+
exports.XRTrackableFeature = XRTrackableFeature;
|
|
1866
|
+
exports.XRTracked = XRTracked;
|
|
1869
1867
|
exports.XRTrackedImage = XRTrackedImage;
|
|
1870
1868
|
exports.XRTrackedPlane = XRTrackedPlane;
|
|
1871
1869
|
|