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