@galacean/engine-loader 0.9.0-beta.82 → 0.9.0
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 +235 -201
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +235 -201
- package/dist/module.js +235 -201
- package/dist/module.js.map +1 -1
- package/package.json +5 -5
- package/types/GLTFContentRestorer.d.ts +0 -85
- package/types/Texture2DContentRestorer.d.ts +0 -14
- package/types/TextureCubeContentRestorer.d.ts +0 -14
- package/types/gltf/GLTFPipeline.d.ts +0 -23
- package/types/gltf/GLTFSchema.d.ts +0 -816
- package/types/gltf/extensions/GLTFExtensionParser.d.ts +0 -52
- package/types/gltf/extensions/GLTFExtensionSchema.d.ts +0 -149
- package/types/gltf/extensions/OASIS_animation_event.d.ts +0 -1
- package/types/gltf/extensions/OASIS_materials_remap.d.ts +0 -1
- package/types/gltf/index.d.ts +0 -6
- package/types/gltf/parser/GLTFAnimationParser.d.ts +0 -12
- package/types/gltf/parser/GLTFBufferParser.d.ts +0 -7
- package/types/gltf/parser/GLTFEntityParser.d.ts +0 -9
- package/types/gltf/parser/GLTFMaterialParser.d.ts +0 -15
- package/types/gltf/parser/GLTFMeshParser.d.ts +0 -19
- package/types/gltf/parser/GLTFParser.d.ts +0 -63
- package/types/gltf/parser/GLTFParserContext.d.ts +0 -48
- package/types/gltf/parser/GLTFSceneParser.d.ts +0 -11
- package/types/gltf/parser/GLTFSkinParser.d.ts +0 -6
- package/types/gltf/parser/GLTFTextureParser.d.ts +0 -8
- package/types/gltf/parser/GLTFValidator.d.ts +0 -6
- package/types/gltf/parser/index.d.ts +0 -11
package/dist/miniprogram.js
CHANGED
|
@@ -8,54 +8,37 @@ var miniprogram$1 = require('@galacean/engine-math/dist/miniprogram');
|
|
|
8
8
|
var miniprogram$2 = require('@galacean/engine-draco/dist/miniprogram');
|
|
9
9
|
var miniprogram$3 = require('@galacean/engine-rhi-webgl/dist/miniprogram');
|
|
10
10
|
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
for (var key in source) {
|
|
17
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
18
|
-
target[key] = source[key];
|
|
11
|
+
function _extends() {
|
|
12
|
+
_extends = Object.assign || function assign(target) {
|
|
13
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
14
|
+
var source = arguments[i];
|
|
15
|
+
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
19
16
|
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return extends_.apply(this, arguments);
|
|
27
|
-
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
28
20
|
|
|
29
|
-
|
|
30
|
-
return extends_.apply(this, arguments);
|
|
21
|
+
return _extends.apply(this, arguments);
|
|
31
22
|
}
|
|
32
23
|
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return o;
|
|
37
|
-
};
|
|
24
|
+
function _set_prototype_of(o, p) {
|
|
25
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
26
|
+
o.__proto__ = p;
|
|
38
27
|
|
|
39
|
-
|
|
40
|
-
}
|
|
28
|
+
return o;
|
|
29
|
+
};
|
|
41
30
|
|
|
42
|
-
|
|
43
|
-
return setPrototypeOf(o, p);
|
|
31
|
+
return _set_prototype_of(o, p);
|
|
44
32
|
}
|
|
45
33
|
|
|
46
34
|
function _inherits(subClass, superClass) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
52
|
-
constructor: {
|
|
53
|
-
value: subClass,
|
|
54
|
-
writable: true,
|
|
55
|
-
configurable: true
|
|
35
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
36
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
56
37
|
}
|
|
57
|
-
|
|
58
|
-
|
|
38
|
+
|
|
39
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
40
|
+
|
|
41
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
59
42
|
}
|
|
60
43
|
|
|
61
44
|
/******************************************************************************
|
|
@@ -271,39 +254,34 @@ EnvLoader = __decorate([
|
|
|
271
254
|
], EnvLoader);
|
|
272
255
|
|
|
273
256
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
resolve(value);
|
|
284
|
-
} else {
|
|
285
|
-
Promise.resolve(value).then(_next, _throw);
|
|
286
|
-
}
|
|
257
|
+
try {
|
|
258
|
+
var info = gen[key](arg);
|
|
259
|
+
var value = info.value;
|
|
260
|
+
} catch (error) {
|
|
261
|
+
reject(error);
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (info.done) resolve(value);
|
|
265
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
287
266
|
}
|
|
267
|
+
function _async_to_generator(fn) {
|
|
268
|
+
return function() {
|
|
269
|
+
var self = this, args = arguments;
|
|
288
270
|
|
|
289
|
-
function
|
|
290
|
-
|
|
291
|
-
var self = this,
|
|
292
|
-
args = arguments;
|
|
293
|
-
return new Promise(function (resolve, reject) {
|
|
294
|
-
var gen = fn.apply(self, args);
|
|
271
|
+
return new Promise(function(resolve, reject) {
|
|
272
|
+
var gen = fn.apply(self, args);
|
|
295
273
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
274
|
+
function _next(value) {
|
|
275
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
276
|
+
}
|
|
299
277
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
278
|
+
function _throw(err) {
|
|
279
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
280
|
+
}
|
|
303
281
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
282
|
+
_next(undefined);
|
|
283
|
+
});
|
|
284
|
+
};
|
|
307
285
|
}
|
|
308
286
|
|
|
309
287
|
var FontLoader = /*#__PURE__*/ function(Loader) {
|
|
@@ -336,7 +314,7 @@ var FontLoader = /*#__PURE__*/ function(Loader) {
|
|
|
336
314
|
});
|
|
337
315
|
};
|
|
338
316
|
_proto._registerFont = function _registerFont(fontName, fontUrl) {
|
|
339
|
-
return
|
|
317
|
+
return _async_to_generator(function() {
|
|
340
318
|
var fontFace;
|
|
341
319
|
return __generator(this, function(_state) {
|
|
342
320
|
switch(_state.label){
|
|
@@ -949,36 +927,41 @@ var TextureWrapMode;
|
|
|
949
927
|
return GLTFUtil;
|
|
950
928
|
}();
|
|
951
929
|
|
|
952
|
-
function
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
930
|
+
function _array_like_to_array(arr, len) {
|
|
931
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
932
|
+
|
|
933
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
934
|
+
|
|
935
|
+
return arr2;
|
|
956
936
|
}
|
|
957
937
|
|
|
958
|
-
function
|
|
959
|
-
|
|
938
|
+
function _array_without_holes(arr) {
|
|
939
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
960
940
|
}
|
|
961
941
|
|
|
962
|
-
function
|
|
963
|
-
|
|
942
|
+
function _iterable_to_array(iter) {
|
|
943
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
|
|
944
|
+
return Array.from(iter);
|
|
945
|
+
}
|
|
964
946
|
}
|
|
965
947
|
|
|
966
|
-
function
|
|
967
|
-
|
|
948
|
+
function _non_iterable_spread() {
|
|
949
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
968
950
|
}
|
|
969
951
|
|
|
970
|
-
function
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
952
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
953
|
+
if (!o) return;
|
|
954
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
955
|
+
|
|
956
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
957
|
+
|
|
958
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
959
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
960
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
978
961
|
}
|
|
979
962
|
|
|
980
|
-
function
|
|
981
|
-
|
|
963
|
+
function _to_consumable_array(arr) {
|
|
964
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
982
965
|
}
|
|
983
966
|
|
|
984
967
|
var Parser = /*#__PURE__*/ function() {
|
|
@@ -995,7 +978,7 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
995
978
|
extensionSchema,
|
|
996
979
|
parseResource,
|
|
997
980
|
context
|
|
998
|
-
].concat(
|
|
981
|
+
].concat(_to_consumable_array(extra)));
|
|
999
982
|
}
|
|
1000
983
|
}
|
|
1001
984
|
};
|
|
@@ -1009,7 +992,7 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
1009
992
|
return (_parsers_ = parsers[0]).createEngineResource.apply(_parsers_, [
|
|
1010
993
|
extensionSchema,
|
|
1011
994
|
context
|
|
1012
|
-
].concat(
|
|
995
|
+
].concat(_to_consumable_array(extra)));
|
|
1013
996
|
}
|
|
1014
997
|
};
|
|
1015
998
|
Parser.hasExtensionParser = function hasExtensionParser(extensionName) {
|
|
@@ -1034,7 +1017,9 @@ var Parser = /*#__PURE__*/ function() {
|
|
|
1034
1017
|
};
|
|
1035
1018
|
return Parser;
|
|
1036
1019
|
}();
|
|
1037
|
-
|
|
1020
|
+
(function() {
|
|
1021
|
+
Parser._extensionParsers = {};
|
|
1022
|
+
})();
|
|
1038
1023
|
/**
|
|
1039
1024
|
* Declare ExtensionParser's decorator.
|
|
1040
1025
|
* @param extensionName - Extension name
|
|
@@ -1109,11 +1094,9 @@ KHR_draco_mesh_compression = __decorate([
|
|
|
1109
1094
|
], KHR_draco_mesh_compression);
|
|
1110
1095
|
|
|
1111
1096
|
function _instanceof(left, right) {
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
return left instanceof right;
|
|
1116
|
-
}
|
|
1097
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
1098
|
+
return !!right[Symbol.hasInstance](left);
|
|
1099
|
+
} else return left instanceof right;
|
|
1117
1100
|
}
|
|
1118
1101
|
|
|
1119
1102
|
var KHR_lights_punctual = /*#__PURE__*/ function(ExtensionParser) {
|
|
@@ -1436,23 +1419,24 @@ GalaceanMaterialsRemap = __decorate([
|
|
|
1436
1419
|
registerExtension("OASIS_materials_remap")
|
|
1437
1420
|
], GalaceanMaterialsRemap);
|
|
1438
1421
|
|
|
1439
|
-
function
|
|
1422
|
+
function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
|
|
1440
1423
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
1424
|
+
|
|
1441
1425
|
if (it) return (it = it.call(o)).next.bind(it);
|
|
1442
1426
|
// Fallback for engines without symbol support
|
|
1443
|
-
if (
|
|
1444
|
-
Array.isArray(o) ||
|
|
1445
|
-
(it = _unsupportedIterableToArray(o)) ||
|
|
1446
|
-
(allowArrayLike && o && typeof o.length === "number")
|
|
1447
|
-
) {
|
|
1427
|
+
if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
1448
1428
|
if (it) o = it;
|
|
1429
|
+
|
|
1449
1430
|
var i = 0;
|
|
1450
|
-
|
|
1431
|
+
|
|
1432
|
+
return function() {
|
|
1451
1433
|
if (i >= o.length) return { done: true };
|
|
1434
|
+
|
|
1452
1435
|
return { done: false, value: o[i++] };
|
|
1453
|
-
}
|
|
1436
|
+
};
|
|
1454
1437
|
}
|
|
1455
|
-
|
|
1438
|
+
|
|
1439
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1456
1440
|
}
|
|
1457
1441
|
|
|
1458
1442
|
var AnimationParser = /*#__PURE__*/ function(Parser) {
|
|
@@ -1745,7 +1729,9 @@ var EntityParser = /*#__PURE__*/ function(Parser) {
|
|
|
1745
1729
|
};
|
|
1746
1730
|
return EntityParser;
|
|
1747
1731
|
}(Parser);
|
|
1748
|
-
|
|
1732
|
+
(function() {
|
|
1733
|
+
/** @internal */ EntityParser._defaultName = "_GLTF_ENTITY_";
|
|
1734
|
+
})();
|
|
1749
1735
|
|
|
1750
1736
|
var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
1751
1737
|
_inherits(MeshParser, Parser1);
|
|
@@ -2027,7 +2013,9 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
|
|
|
2027
2013
|
};
|
|
2028
2014
|
return MeshParser;
|
|
2029
2015
|
}(Parser);
|
|
2030
|
-
|
|
2016
|
+
(function() {
|
|
2017
|
+
MeshParser._tempVector3 = new miniprogram$1.Vector3();
|
|
2018
|
+
})();
|
|
2031
2019
|
|
|
2032
2020
|
var SceneParser$1 = /*#__PURE__*/ function(Parser1) {
|
|
2033
2021
|
_inherits(SceneParser, Parser1);
|
|
@@ -2236,7 +2224,7 @@ var SkinParser = /*#__PURE__*/ function(Parser) {
|
|
|
2236
2224
|
};
|
|
2237
2225
|
_proto._findSkeletonRootBone = function _findSkeletonRootBone(joints, entities) {
|
|
2238
2226
|
var paths = {};
|
|
2239
|
-
for(var _iterator =
|
|
2227
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(joints), _step; !(_step = _iterator()).done;){
|
|
2240
2228
|
var index = _step.value;
|
|
2241
2229
|
var path = new Array();
|
|
2242
2230
|
var entity = entities[index];
|
|
@@ -2338,8 +2326,10 @@ var TextureParser = /*#__PURE__*/ function(Parser) {
|
|
|
2338
2326
|
};
|
|
2339
2327
|
return TextureParser;
|
|
2340
2328
|
}(Parser);
|
|
2341
|
-
|
|
2342
|
-
|
|
2329
|
+
(function() {
|
|
2330
|
+
var _obj;
|
|
2331
|
+
TextureParser._wrapMap = (_obj = {}, _obj[TextureWrapMode.CLAMP_TO_EDGE] = miniprogram.TextureWrapMode.Clamp, _obj[TextureWrapMode.MIRRORED_REPEAT] = miniprogram.TextureWrapMode.Mirror, _obj[TextureWrapMode.REPEAT] = miniprogram.TextureWrapMode.Repeat, _obj);
|
|
2332
|
+
})();
|
|
2343
2333
|
|
|
2344
2334
|
var Validator = /*#__PURE__*/ function(Parser1) {
|
|
2345
2335
|
_inherits(Validator, Parser1);
|
|
@@ -2411,17 +2401,19 @@ var GLTFParser = /*#__PURE__*/ function() {
|
|
|
2411
2401
|
};
|
|
2412
2402
|
return GLTFParser;
|
|
2413
2403
|
}();
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2404
|
+
(function() {
|
|
2405
|
+
GLTFParser.defaultPipeline = new GLTFParser([
|
|
2406
|
+
BufferParser,
|
|
2407
|
+
Validator,
|
|
2408
|
+
TextureParser,
|
|
2409
|
+
MaterialParser,
|
|
2410
|
+
MeshParser,
|
|
2411
|
+
EntityParser,
|
|
2412
|
+
SkinParser,
|
|
2413
|
+
AnimationParser,
|
|
2414
|
+
SceneParser$1
|
|
2415
|
+
]);
|
|
2416
|
+
})();
|
|
2425
2417
|
|
|
2426
2418
|
/**
|
|
2427
2419
|
* Product after GLTF parser, usually, `defaultSceneRoot` is only needed to use.
|
|
@@ -2473,7 +2465,7 @@ var GLTFLoader = /*#__PURE__*/ function(Loader) {
|
|
|
2473
2465
|
context.keepMeshData = (_item_params_keepMeshData = (_item_params = item.params) == null ? void 0 : _item_params.keepMeshData) != null ? _item_params_keepMeshData : false;
|
|
2474
2466
|
masterPromiseInfo.onCancel(function() {
|
|
2475
2467
|
var chainPromises = context.chainPromises;
|
|
2476
|
-
for(var _iterator =
|
|
2468
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(chainPromises), _step; !(_step = _iterator()).done;){
|
|
2477
2469
|
var promise = _step.value;
|
|
2478
2470
|
promise.cancel();
|
|
2479
2471
|
}
|
|
@@ -2734,37 +2726,75 @@ var HDRLoader = (_HDRLoader = /*#__PURE__*/ function(Loader) {
|
|
|
2734
2726
|
color.a *= M;
|
|
2735
2727
|
};
|
|
2736
2728
|
return HDRLoader1;
|
|
2737
|
-
}(miniprogram.Loader),
|
|
2738
|
-
_HDRLoader._rightBottomBack,
|
|
2739
|
-
|
|
2740
|
-
_HDRLoader.
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
_HDRLoader.
|
|
2745
|
-
|
|
2746
|
-
_HDRLoader.
|
|
2747
|
-
|
|
2748
|
-
_HDRLoader._leftBottomFront,
|
|
2749
|
-
|
|
2750
|
-
_HDRLoader.
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
_HDRLoader.
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
_HDRLoader.
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2729
|
+
}(miniprogram.Loader), function() {
|
|
2730
|
+
_HDRLoader._rightBottomBack = new miniprogram$1.Vector3(1.0, -1.0, -1.0);
|
|
2731
|
+
}(), function() {
|
|
2732
|
+
_HDRLoader._rightBottomFront = new miniprogram$1.Vector3(1.0, -1.0, 1.0);
|
|
2733
|
+
}(), function() {
|
|
2734
|
+
_HDRLoader._rightUpBack = new miniprogram$1.Vector3(1.0, 1.0, -1.0);
|
|
2735
|
+
}(), function() {
|
|
2736
|
+
_HDRLoader._rightUpFront = new miniprogram$1.Vector3(1.0, 1.0, 1.0);
|
|
2737
|
+
}(), function() {
|
|
2738
|
+
_HDRLoader._leftBottomBack = new miniprogram$1.Vector3(-1.0, -1.0, -1.0);
|
|
2739
|
+
}(), function() {
|
|
2740
|
+
_HDRLoader._leftBottomFront = new miniprogram$1.Vector3(-1.0, -1.0, 1.0);
|
|
2741
|
+
}(), function() {
|
|
2742
|
+
_HDRLoader._leftUpBack = new miniprogram$1.Vector3(-1.0, 1.0, -1.0);
|
|
2743
|
+
}(), function() {
|
|
2744
|
+
_HDRLoader._leftUpFront = new miniprogram$1.Vector3(-1.0, 1.0, 1.0);
|
|
2745
|
+
}(), function() {
|
|
2746
|
+
_HDRLoader._faceRight = [
|
|
2747
|
+
_HDRLoader._rightBottomBack,
|
|
2748
|
+
_HDRLoader._rightBottomFront,
|
|
2749
|
+
_HDRLoader._rightUpBack,
|
|
2750
|
+
_HDRLoader._rightUpFront
|
|
2751
|
+
];
|
|
2752
|
+
}(), function() {
|
|
2753
|
+
_HDRLoader._faceLeft = [
|
|
2754
|
+
_HDRLoader._leftBottomFront,
|
|
2755
|
+
_HDRLoader._leftBottomBack,
|
|
2756
|
+
_HDRLoader._leftUpFront,
|
|
2757
|
+
_HDRLoader._leftUpBack
|
|
2758
|
+
];
|
|
2759
|
+
}(), function() {
|
|
2760
|
+
_HDRLoader._faceUp = [
|
|
2761
|
+
_HDRLoader._leftBottomFront,
|
|
2762
|
+
_HDRLoader._rightBottomFront,
|
|
2763
|
+
_HDRLoader._leftBottomBack,
|
|
2764
|
+
_HDRLoader._rightBottomBack
|
|
2765
|
+
];
|
|
2766
|
+
}(), function() {
|
|
2767
|
+
_HDRLoader._faceBottom = [
|
|
2768
|
+
_HDRLoader._leftUpBack,
|
|
2769
|
+
_HDRLoader._rightUpBack,
|
|
2770
|
+
_HDRLoader._leftUpFront,
|
|
2771
|
+
_HDRLoader._rightUpFront
|
|
2772
|
+
];
|
|
2773
|
+
}(), function() {
|
|
2774
|
+
_HDRLoader._faceFront = [
|
|
2775
|
+
_HDRLoader._leftBottomBack,
|
|
2776
|
+
_HDRLoader._rightBottomBack,
|
|
2777
|
+
_HDRLoader._leftUpBack,
|
|
2778
|
+
_HDRLoader._rightUpBack
|
|
2779
|
+
];
|
|
2780
|
+
}(), function() {
|
|
2781
|
+
_HDRLoader._faceBack = [
|
|
2782
|
+
_HDRLoader._rightBottomFront,
|
|
2783
|
+
_HDRLoader._leftBottomFront,
|
|
2784
|
+
_HDRLoader._rightUpFront,
|
|
2785
|
+
_HDRLoader._leftUpFront
|
|
2786
|
+
];
|
|
2787
|
+
}(), function() {
|
|
2788
|
+
_HDRLoader._tempVector3 = new miniprogram$1.Vector3();
|
|
2789
|
+
}(), function() {
|
|
2790
|
+
_HDRLoader._temp2Vector3 = new miniprogram$1.Vector3();
|
|
2791
|
+
}(), function() {
|
|
2792
|
+
_HDRLoader._temp3Vector3 = new miniprogram$1.Vector3();
|
|
2793
|
+
}(), function() {
|
|
2794
|
+
_HDRLoader._temp4Vector3 = new miniprogram$1.Vector3();
|
|
2795
|
+
}(), function() {
|
|
2796
|
+
_HDRLoader._temp5Vector3 = new miniprogram$1.Vector3();
|
|
2797
|
+
}(), _HDRLoader);
|
|
2768
2798
|
HDRLoader = __decorate([
|
|
2769
2799
|
miniprogram.resourceLoader(miniprogram.AssetType.HDR, [
|
|
2770
2800
|
"hdr"
|
|
@@ -3134,19 +3164,21 @@ MaterialLoader = __decorate([
|
|
|
3134
3164
|
], MaterialLoader);
|
|
3135
3165
|
|
|
3136
3166
|
function _defineProperties(target, props) {
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3167
|
+
for (var i = 0; i < props.length; i++) {
|
|
3168
|
+
var descriptor = props[i];
|
|
3169
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
3170
|
+
descriptor.configurable = true;
|
|
3171
|
+
|
|
3172
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
3173
|
+
|
|
3174
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
3175
|
+
}
|
|
3144
3176
|
}
|
|
3177
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
3178
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
3179
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
3145
3180
|
|
|
3146
|
-
|
|
3147
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
3148
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
3149
|
-
return Constructor;
|
|
3181
|
+
return Constructor;
|
|
3150
3182
|
}
|
|
3151
3183
|
|
|
3152
3184
|
var BufferReader = /*#__PURE__*/ function() {
|
|
@@ -3255,7 +3287,7 @@ var BufferReader = /*#__PURE__*/ function() {
|
|
|
3255
3287
|
if (byteLength < maxByteLength) this._offset++;
|
|
3256
3288
|
return new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + byteOffset, byteLength);
|
|
3257
3289
|
};
|
|
3258
|
-
|
|
3290
|
+
_create_class(BufferReader, [
|
|
3259
3291
|
{
|
|
3260
3292
|
key: "offset",
|
|
3261
3293
|
get: function get() {
|
|
@@ -3265,12 +3297,14 @@ var BufferReader = /*#__PURE__*/ function() {
|
|
|
3265
3297
|
]);
|
|
3266
3298
|
return BufferReader;
|
|
3267
3299
|
}();
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3300
|
+
(function() {
|
|
3301
|
+
BufferReader.imageMapping = {
|
|
3302
|
+
0: "image/png",
|
|
3303
|
+
1: "image/jpg",
|
|
3304
|
+
2: "image/webp",
|
|
3305
|
+
3: "ktx"
|
|
3306
|
+
};
|
|
3307
|
+
})();
|
|
3274
3308
|
|
|
3275
3309
|
var decoderMap = {};
|
|
3276
3310
|
/**
|
|
@@ -3309,7 +3343,7 @@ var FileHeader = /*#__PURE__*/ function() {
|
|
|
3309
3343
|
header.headerLength = nameUint8Array.byteLength + typeUint8Array.byteLength + 9;
|
|
3310
3344
|
return header;
|
|
3311
3345
|
};
|
|
3312
|
-
|
|
3346
|
+
_create_class(FileHeader, [
|
|
3313
3347
|
{
|
|
3314
3348
|
key: "dataLength",
|
|
3315
3349
|
get: function get() {
|
|
@@ -3528,38 +3562,36 @@ exports.Texture2DDecoder = __decorate([
|
|
|
3528
3562
|
decoder("Texture2D")
|
|
3529
3563
|
], exports.Texture2DDecoder);
|
|
3530
3564
|
|
|
3531
|
-
function
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
try {
|
|
3537
|
-
Date.prototype.toString.call(Reflect.construct(Date, [], function () { }));
|
|
3538
|
-
return true;
|
|
3539
|
-
} catch (e) {
|
|
3540
|
-
return false;
|
|
3541
|
-
}
|
|
3542
|
-
}
|
|
3565
|
+
function _is_native_reflect_construct() {
|
|
3566
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
3567
|
+
if (Reflect.construct.sham) return false;
|
|
3568
|
+
if (typeof Proxy === "function") return true;
|
|
3543
3569
|
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
construct = Reflect.construct;
|
|
3547
|
-
} else {
|
|
3548
|
-
construct = function construct(Parent, args, Class) {
|
|
3549
|
-
var a = [null];
|
|
3550
|
-
a.push.apply(a, args);
|
|
3551
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
3552
|
-
var instance = new Constructor();
|
|
3553
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
3554
|
-
return instance;
|
|
3555
|
-
};
|
|
3556
|
-
}
|
|
3570
|
+
try {
|
|
3571
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
3557
3572
|
|
|
3558
|
-
|
|
3573
|
+
return true;
|
|
3574
|
+
} catch (e) {
|
|
3575
|
+
return false;
|
|
3576
|
+
}
|
|
3559
3577
|
}
|
|
3560
3578
|
|
|
3561
3579
|
function _construct(Parent, args, Class) {
|
|
3562
|
-
|
|
3580
|
+
if (_is_native_reflect_construct()) _construct = Reflect.construct;
|
|
3581
|
+
else {
|
|
3582
|
+
_construct = function construct(Parent, args, Class) {
|
|
3583
|
+
var a = [null];
|
|
3584
|
+
a.push.apply(a, args);
|
|
3585
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
3586
|
+
var instance = new Constructor();
|
|
3587
|
+
|
|
3588
|
+
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
3589
|
+
|
|
3590
|
+
return instance;
|
|
3591
|
+
};
|
|
3592
|
+
}
|
|
3593
|
+
|
|
3594
|
+
return _construct.apply(null, arguments);
|
|
3563
3595
|
}
|
|
3564
3596
|
|
|
3565
3597
|
var ReflectionParser = /*#__PURE__*/ function() {
|
|
@@ -3674,7 +3706,9 @@ var ReflectionParser = /*#__PURE__*/ function() {
|
|
|
3674
3706
|
};
|
|
3675
3707
|
return ReflectionParser;
|
|
3676
3708
|
}();
|
|
3677
|
-
|
|
3709
|
+
(function() {
|
|
3710
|
+
ReflectionParser.customParseComponentHandles = new Map();
|
|
3711
|
+
})();
|
|
3678
3712
|
|
|
3679
3713
|
var PrefabParser = /*#__PURE__*/ function() {
|
|
3680
3714
|
function PrefabParser() {}
|
|
@@ -3928,7 +3962,7 @@ var SceneParserContext = /*#__PURE__*/ function() {
|
|
|
3928
3962
|
};
|
|
3929
3963
|
_proto._organizeEntities = function _organizeEntities() {
|
|
3930
3964
|
var _this_context = this.context, entityConfigMap = _this_context.entityConfigMap, entityMap = _this_context.entityMap, scene = _this_context.scene, rootIds = _this_context.rootIds;
|
|
3931
|
-
for(var _iterator =
|
|
3965
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(rootIds), _step; !(_step = _iterator()).done;){
|
|
3932
3966
|
var rootId = _step.value;
|
|
3933
3967
|
PrefabParser.parseChildren(entityConfigMap, entityMap, rootId);
|
|
3934
3968
|
}
|
|
@@ -4092,7 +4126,7 @@ var SourceFontLoader = /*#__PURE__*/ function(Loader) {
|
|
|
4092
4126
|
});
|
|
4093
4127
|
};
|
|
4094
4128
|
_proto._registerFont = function _registerFont(fontName, fontUrl) {
|
|
4095
|
-
return
|
|
4129
|
+
return _async_to_generator(function() {
|
|
4096
4130
|
var fontFace;
|
|
4097
4131
|
return __generator(this, function(_state) {
|
|
4098
4132
|
switch(_state.label){
|
|
@@ -4413,7 +4447,7 @@ SceneLoader = __decorate([
|
|
|
4413
4447
|
"prefab"
|
|
4414
4448
|
], true)
|
|
4415
4449
|
], SceneLoader);
|
|
4416
|
-
ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/
|
|
4450
|
+
ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _async_to_generator(function(instance, item, engine) {
|
|
4417
4451
|
var props;
|
|
4418
4452
|
return __generator(this, function(_state) {
|
|
4419
4453
|
props = item.props;
|