@galacean/engine-core 0.9.21 → 0.9.22

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.
@@ -3,23 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var engineMiniprogramAdapter = require('@galacean/engine-miniprogram-adapter');
6
- var _assert_this_initialized = require('@swc/helpers/src/_assert_this_initialized.mjs');
7
- var _create_class = require('@swc/helpers/src/_create_class.mjs');
8
- var _inherits = require('@swc/helpers/src/_inherits.mjs');
9
- var _ts_decorate = require('@swc/helpers/src/_ts_decorate.mjs');
10
- var _instanceof = require('@swc/helpers/src/_instanceof.mjs');
11
6
  var miniprogram = require('@galacean/engine-math/dist/miniprogram');
12
- var _extends = require('@swc/helpers/src/_extends.mjs');
13
-
14
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
-
16
- var _assert_this_initialized__default = /*#__PURE__*/_interopDefaultLegacy(_assert_this_initialized);
17
- var _create_class__default = /*#__PURE__*/_interopDefaultLegacy(_create_class);
18
- var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
19
- var _ts_decorate__default = /*#__PURE__*/_interopDefaultLegacy(_ts_decorate);
20
- var _instanceof__default = /*#__PURE__*/_interopDefaultLegacy(_instanceof);
21
- var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
22
7
 
8
+ /**
9
+ * The platform (including operating system and hardware) is running on.
10
+ */ exports.Platform = void 0;
23
11
  (function(Platform) {
24
12
  Platform[Platform[/** Android platform. */ "Android"] = 0] = "Android";
25
13
  Platform[Platform[/** IPhone platform. */ "IPhone"] = 1] = "IPhone";
@@ -28,6 +16,50 @@ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
28
16
  Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
29
17
  })(exports.Platform || (exports.Platform = {}));
30
18
 
19
+ function _assert_this_initialized(self) {
20
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
21
+
22
+ return self;
23
+ }
24
+
25
+ function _defineProperties(target, props) {
26
+ for (var i = 0; i < props.length; i++) {
27
+ var descriptor = props[i];
28
+ descriptor.enumerable = descriptor.enumerable || false;
29
+ descriptor.configurable = true;
30
+
31
+ if ("value" in descriptor) descriptor.writable = true;
32
+
33
+ Object.defineProperty(target, descriptor.key, descriptor);
34
+ }
35
+ }
36
+ function _create_class(Constructor, protoProps, staticProps) {
37
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
38
+ if (staticProps) _defineProperties(Constructor, staticProps);
39
+
40
+ return Constructor;
41
+ }
42
+
43
+ function _set_prototype_of(o, p) {
44
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
45
+ o.__proto__ = p;
46
+
47
+ return o;
48
+ };
49
+
50
+ return _set_prototype_of(o, p);
51
+ }
52
+
53
+ function _inherits(subClass, superClass) {
54
+ if (typeof superClass !== "function" && superClass !== null) {
55
+ throw new TypeError("Super expression must either be null or a function");
56
+ }
57
+
58
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
59
+
60
+ if (superClass) _set_prototype_of(subClass, superClass);
61
+ }
62
+
31
63
  /**
32
64
  * Common utility methods for math operations.
33
65
  */ var MathUtil = /*#__PURE__*/ function() {
@@ -73,9 +105,15 @@ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
73
105
  };
74
106
  return MathUtil;
75
107
  }();
76
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
77
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
78
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
108
+ (function() {
109
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
110
+ })();
111
+ (function() {
112
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
113
+ })();
114
+ (function() {
115
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
116
+ })();
79
117
 
80
118
  /**
81
119
  * Describes a color in the from of RGBA (in order: R, G, B, A).
@@ -285,7 +323,7 @@ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
285
323
  out._onValueChanged && out._onValueChanged();
286
324
  return out;
287
325
  };
288
- _create_class__default['default'](Color, [
326
+ _create_class(Color, [
289
327
  {
290
328
  key: "r",
291
329
  get: /**
@@ -338,6 +376,34 @@ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
338
376
  return Color;
339
377
  }();
340
378
 
379
+ /******************************************************************************
380
+ Copyright (c) Microsoft Corporation.
381
+
382
+ Permission to use, copy, modify, and/or distribute this software for any
383
+ purpose with or without fee is hereby granted.
384
+
385
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
386
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
387
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
388
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
389
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
390
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
391
+ PERFORMANCE OF THIS SOFTWARE.
392
+ ***************************************************************************** */
393
+
394
+ function __decorate(decorators, target, key, desc) {
395
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
396
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
397
+ 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;
398
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
399
+ }
400
+
401
+ function _instanceof(left, right) {
402
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
403
+ return !!right[Symbol.hasInstance](left);
404
+ } else return left instanceof right;
405
+ }
406
+
341
407
  /**
342
408
  * Clone mode.
343
409
  */ var CloneMode;
@@ -460,7 +526,7 @@ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
460
526
  };
461
527
  CloneManager._deepCloneObjectItem = function _deepCloneObjectItem(source, target, k) {
462
528
  var sourceItem = source[k];
463
- if (_instanceof__default['default'](sourceItem, Object)) {
529
+ if (_instanceof(sourceItem, Object)) {
464
530
  var itemType = sourceItem.constructor;
465
531
  switch(itemType){
466
532
  case Uint8Array:
@@ -516,16 +582,22 @@ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
516
582
  };
517
583
  return CloneManager;
518
584
  }();
519
- /** @internal */ CloneManager._subCloneModeMap = new Map();
520
- /** @internal */ CloneManager._cloneModeMap = new Map();
521
- CloneManager._objectType = Object.getPrototypeOf(Object);
585
+ (function() {
586
+ /** @internal */ CloneManager._subCloneModeMap = new Map();
587
+ })();
588
+ (function() {
589
+ /** @internal */ CloneManager._cloneModeMap = new Map();
590
+ })();
591
+ (function() {
592
+ CloneManager._objectType = Object.getPrototypeOf(Object);
593
+ })();
522
594
 
523
595
  /**
524
596
  * EngineObject.
525
597
  */ var EngineObject = /*#__PURE__*/ function() {
526
598
  function EngineObject(engine) {
527
- this._destroyed = false;
528
599
  /** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
600
+ this._destroyed = false;
529
601
  this._engine = engine;
530
602
  }
531
603
  var _proto = EngineObject.prototype;
@@ -537,7 +609,7 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
537
609
  (_this__engine_resourceManager = this._engine.resourceManager) == null ? void 0 : _this__engine_resourceManager._deleteAsset(this);
538
610
  this._destroyed = true;
539
611
  };
540
- _create_class__default['default'](EngineObject, [
612
+ _create_class(EngineObject, [
541
613
  {
542
614
  key: "engine",
543
615
  get: /**
@@ -557,24 +629,26 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
557
629
  ]);
558
630
  return EngineObject;
559
631
  }();
560
- EngineObject._instanceIdCounter = 0;
561
- _ts_decorate__default['default']([
632
+ (function() {
633
+ EngineObject._instanceIdCounter = 0;
634
+ })();
635
+ __decorate([
562
636
  ignoreClone
563
637
  ], EngineObject.prototype, "instanceId", void 0);
564
- _ts_decorate__default['default']([
638
+ __decorate([
565
639
  ignoreClone
566
640
  ], EngineObject.prototype, "_engine", void 0);
567
641
 
568
642
  /**
569
643
  * The base class of assets, with reference counting capability.
570
644
  */ var RefObject = /*#__PURE__*/ function(EngineObject) {
571
- _inherits__default['default'](RefObject, EngineObject);
645
+ _inherits(RefObject, EngineObject);
572
646
  function RefObject(engine) {
573
647
  var _this;
574
648
  _this = EngineObject.call(this, engine) || this;
575
649
  /** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */ _this.isGCIgnored = false;
576
650
  _this._refCount = 0;
577
- engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized__default['default'](_this));
651
+ engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized(_this));
578
652
  return _this;
579
653
  }
580
654
  var _proto = RefObject.prototype;
@@ -616,7 +690,7 @@ _ts_decorate__default['default']([
616
690
  */ _proto._addToResourceManager = function _addToResourceManager(path) {
617
691
  this._engine.resourceManager._addAsset(path, this);
618
692
  };
619
- _create_class__default['default'](RefObject, [
693
+ _create_class(RefObject, [
620
694
  {
621
695
  key: "refCount",
622
696
  get: /**
@@ -629,6 +703,9 @@ _ts_decorate__default['default']([
629
703
  return RefObject;
630
704
  }(EngineObject);
631
705
 
706
+ /**
707
+ * Render buffer depth format enumeration.
708
+ */ exports.RenderBufferDepthFormat = void 0;
632
709
  (function(RenderBufferDepthFormat) {
633
710
  RenderBufferDepthFormat[RenderBufferDepthFormat[/** Render to depth buffer,engine will automatically select the supported precision. */ "Depth"] = 0] = "Depth";
634
711
  RenderBufferDepthFormat[RenderBufferDepthFormat[/** Render to depth stencil buffer, engine will automatically select the supported precision. */ "DepthStencil"] = 1] = "DepthStencil";
@@ -640,6 +717,9 @@ _ts_decorate__default['default']([
640
717
  RenderBufferDepthFormat[RenderBufferDepthFormat[/** Force 32-bit depth + 8-bit stencil buffer. */ "Depth32Stencil8"] = 7] = "Depth32Stencil8";
641
718
  })(exports.RenderBufferDepthFormat || (exports.RenderBufferDepthFormat = {}));
642
719
 
720
+ /**
721
+ * Define the face of the cube texture.
722
+ */ exports.TextureCubeFace = void 0;
643
723
  (function(TextureCubeFace) {
644
724
  TextureCubeFace[TextureCubeFace[/** Positive X face for a cube-mapped texture. */ "PositiveX"] = 0] = "PositiveX";
645
725
  TextureCubeFace[TextureCubeFace[/** Negative X face for a cube-mapped texture. */ "NegativeX"] = 1] = "NegativeX";
@@ -649,6 +729,9 @@ _ts_decorate__default['default']([
649
729
  TextureCubeFace[TextureCubeFace[/** Negative Z face for a cube-mapped texture. */ "NegativeZ"] = 5] = "NegativeZ";
650
730
  })(exports.TextureCubeFace || (exports.TextureCubeFace = {}));
651
731
 
732
+ /**
733
+ * Define the compare mode of depth texture.
734
+ */ exports.TextureDepthCompareFunction = void 0;
652
735
  (function(TextureDepthCompareFunction) {
653
736
  TextureDepthCompareFunction[TextureDepthCompareFunction[/** never pass. */ "Never"] = 0] = "Never";
654
737
  TextureDepthCompareFunction[TextureDepthCompareFunction[/** pass if the compare value is less than the sample value. */ "Less"] = 1] = "Less";
@@ -660,12 +743,18 @@ _ts_decorate__default['default']([
660
743
  TextureDepthCompareFunction[TextureDepthCompareFunction[/** always pass. */ "Always"] = 7] = "Always";
661
744
  })(exports.TextureDepthCompareFunction || (exports.TextureDepthCompareFunction = {}));
662
745
 
746
+ /**
747
+ * The filter mode of the texture.
748
+ */ exports.TextureFilterMode = void 0;
663
749
  (function(TextureFilterMode) {
664
750
  TextureFilterMode[TextureFilterMode[/** Point filtering. */ "Point"] = 0] = "Point";
665
751
  TextureFilterMode[TextureFilterMode[/** Bilinear filtering. */ "Bilinear"] = 1] = "Bilinear";
666
752
  TextureFilterMode[TextureFilterMode[/** Trilinear filtering. */ "Trilinear"] = 2] = "Trilinear";
667
753
  })(exports.TextureFilterMode || (exports.TextureFilterMode = {}));
668
754
 
755
+ /**
756
+ * Texture format enumeration.
757
+ */ exports.TextureFormat = void 0;
669
758
  (function(TextureFormat) {
670
759
  TextureFormat[TextureFormat[/** RGB format,8 bits per channel. */ "R8G8B8"] = 0] = "R8G8B8";
671
760
  TextureFormat[TextureFormat[/** RGBA format,8 bits per channel. */ "R8G8B8A8"] = 1] = "R8G8B8A8";
@@ -701,6 +790,9 @@ _ts_decorate__default['default']([
701
790
  TextureFormat[TextureFormat[/** 32-bit depth + 8-bit stencil format. */ "Depth32Stencil8"] = 31] = "Depth32Stencil8";
702
791
  })(exports.TextureFormat || (exports.TextureFormat = {}));
703
792
 
793
+ /**
794
+ * Wrapping mode of the texture.
795
+ */ exports.TextureWrapMode = void 0;
704
796
  (function(TextureWrapMode) {
705
797
  TextureWrapMode[TextureWrapMode[/** Clamping mode. use the color of edge pixels beyond the texture boundary. */ "Clamp"] = 0] = "Clamp";
706
798
  TextureWrapMode[TextureWrapMode[/** Repeating mode. tiling will be repeated if it exceeds the texture boundary. */ "Repeat"] = 1] = "Repeat";
@@ -724,7 +816,7 @@ _ts_decorate__default['default']([
724
816
  _proto.stopPropagation = function stopPropagation() {
725
817
  this._propagationStopped = true;
726
818
  };
727
- _create_class__default['default'](Event, [
819
+ _create_class(Event, [
728
820
  {
729
821
  key: "propagationStopped",
730
822
  get: function get() {
@@ -1000,7 +1092,7 @@ var Time = /*#__PURE__*/ function() {
1000
1092
  this._lastTickTime = now;
1001
1093
  this._frameCount++;
1002
1094
  };
1003
- _create_class__default['default'](Time, [
1095
+ _create_class(Time, [
1004
1096
  {
1005
1097
  key: "frameCount",
1006
1098
  get: /*
@@ -1123,6 +1215,9 @@ function ObjectValues(obj) {
1123
1215
  });
1124
1216
  }
1125
1217
 
1218
+ /**
1219
+ * Data type enumeration
1220
+ */ exports.DataType = void 0;
1126
1221
  (function(DataType) {
1127
1222
  DataType[DataType[/** Float */ "FLOAT"] = 5126] = "FLOAT";
1128
1223
  DataType[DataType[/** Floating-point two-dimensional vector */ "FLOAT_VEC2"] = 35664] = "FLOAT_VEC2";
@@ -1161,6 +1256,7 @@ function ObjectValues(obj) {
1161
1256
  DataType[DataType[/** Unsigned int */ "UNSIGNED_INT"] = 5125 // gl.UNSIGNED_INT
1162
1257
  ] = "UNSIGNED_INT";
1163
1258
  })(exports.DataType || (exports.DataType = {}));
1259
+ exports.GLCapabilityType = void 0;
1164
1260
  (function(GLCapabilityType) {
1165
1261
  GLCapabilityType["shaderVertexID"] = "shaderVertexID";
1166
1262
  GLCapabilityType["standardDerivatives"] = "OES_standard_derivatives";
@@ -1195,7 +1291,7 @@ function ObjectValues(obj) {
1195
1291
  /**
1196
1292
  * The base class of texture, contains some common functions of texture-related classes.
1197
1293
  */ var Texture = /*#__PURE__*/ function(RefObject) {
1198
- _inherits__default['default'](Texture, RefObject);
1294
+ _inherits(Texture, RefObject);
1199
1295
  function Texture() {
1200
1296
  var _this;
1201
1297
  _this = RefObject.apply(this, arguments) || this;
@@ -1234,7 +1330,7 @@ function ObjectValues(obj) {
1234
1330
  _proto._getMipmapCount = function _getMipmapCount() {
1235
1331
  return this._mipmap ? Math.floor(Math.log2(Math.max(this._width, this._height))) + 1 : 1;
1236
1332
  };
1237
- _create_class__default['default'](Texture, [
1333
+ _create_class(Texture, [
1238
1334
  {
1239
1335
  key: "format",
1240
1336
  get: /**
@@ -1354,7 +1450,7 @@ function ObjectValues(obj) {
1354
1450
  /**
1355
1451
  * The render target used for off-screen rendering.
1356
1452
  */ var RenderTarget = /*#__PURE__*/ function(EngineObject) {
1357
- _inherits__default['default'](RenderTarget, EngineObject);
1453
+ _inherits(RenderTarget, EngineObject);
1358
1454
  function RenderTarget(engine, width, height, renderTexture, depth, antiAliasing) {
1359
1455
  if (depth === void 0) depth = exports.RenderBufferDepthFormat.Depth;
1360
1456
  if (antiAliasing === void 0) antiAliasing = 1;
@@ -1366,7 +1462,7 @@ function ObjectValues(obj) {
1366
1462
  _this._antiAliasing = antiAliasing;
1367
1463
  _this._depth = depth;
1368
1464
  if (renderTexture) {
1369
- var colorTextures = _instanceof__default['default'](renderTexture, Array) ? renderTexture.slice() : [
1465
+ var colorTextures = _instanceof(renderTexture, Array) ? renderTexture.slice() : [
1370
1466
  renderTexture
1371
1467
  ];
1372
1468
  for(var i = 0, n = colorTextures.length; i < n; i++){
@@ -1380,14 +1476,14 @@ function ObjectValues(obj) {
1380
1476
  } else {
1381
1477
  _this._colorTextures = [];
1382
1478
  }
1383
- if (_instanceof__default['default'](depth, Texture)) {
1479
+ if (_instanceof(depth, Texture)) {
1384
1480
  if (!depth._isDepthTexture) {
1385
1481
  throw "Depth texture must use depth format.";
1386
1482
  }
1387
1483
  _this._depthTexture = depth;
1388
1484
  _this._depthTexture._addRefCount(1);
1389
1485
  }
1390
- _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized__default['default'](_this));
1486
+ _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized(_this));
1391
1487
  return _this;
1392
1488
  }
1393
1489
  var _proto = RenderTarget.prototype;
@@ -1435,7 +1531,7 @@ function ObjectValues(obj) {
1435
1531
  */ _proto._blitRenderTarget = function _blitRenderTarget() {
1436
1532
  this._platformRenderTarget.blitRenderTarget();
1437
1533
  };
1438
- _create_class__default['default'](RenderTarget, [
1534
+ _create_class(RenderTarget, [
1439
1535
  {
1440
1536
  key: "autoGenerateMipmaps",
1441
1537
  get: /**
@@ -1495,7 +1591,7 @@ function ObjectValues(obj) {
1495
1591
  /**
1496
1592
  * Two-dimensional texture.
1497
1593
  */ var Texture2D = /*#__PURE__*/ function(Texture) {
1498
- _inherits__default['default'](Texture2D, Texture);
1594
+ _inherits(Texture2D, Texture);
1499
1595
  function Texture2D(engine, width, height, format, mipmap) {
1500
1596
  if (format === void 0) format = exports.TextureFormat.R8G8B8A8;
1501
1597
  if (mipmap === void 0) mipmap = true;
@@ -1507,7 +1603,7 @@ function ObjectValues(obj) {
1507
1603
  _this._format = format;
1508
1604
  _this._mipmapCount = _this._getMipmapCount();
1509
1605
  _this._isDepthTexture = format == exports.TextureFormat.Depth || format == exports.TextureFormat.DepthStencil || format == exports.TextureFormat.Depth16 || format == exports.TextureFormat.Depth24 || format == exports.TextureFormat.Depth32 || format == exports.TextureFormat.Depth24Stencil8 || format == exports.TextureFormat.Depth32Stencil8;
1510
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized__default['default'](_this));
1606
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized(_this));
1511
1607
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1512
1608
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1513
1609
  return _this;
@@ -1562,7 +1658,7 @@ function ObjectValues(obj) {
1562
1658
  /**
1563
1659
  * Two-dimensional texture array.
1564
1660
  */ var Texture2DArray = /*#__PURE__*/ function(Texture) {
1565
- _inherits__default['default'](Texture2DArray, Texture);
1661
+ _inherits(Texture2DArray, Texture);
1566
1662
  function Texture2DArray(engine, width, height, length, format, mipmap) {
1567
1663
  if (format === void 0) format = exports.TextureFormat.R8G8B8A8;
1568
1664
  if (mipmap === void 0) mipmap = true;
@@ -1574,7 +1670,7 @@ function ObjectValues(obj) {
1574
1670
  _this._length = length;
1575
1671
  _this._format = format;
1576
1672
  _this._mipmapCount = _this._getMipmapCount();
1577
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized__default['default'](_this));
1673
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized(_this));
1578
1674
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1579
1675
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1580
1676
  return _this;
@@ -1626,7 +1722,7 @@ function ObjectValues(obj) {
1626
1722
  this._platformTexture.getPixelBuffer(elementIndex, xOrMipLevelOrOut, yOrMipLevel, width, height, mipLevelOrOut, out);
1627
1723
  }
1628
1724
  };
1629
- _create_class__default['default'](Texture2DArray, [
1725
+ _create_class(Texture2DArray, [
1630
1726
  {
1631
1727
  key: "length",
1632
1728
  get: /**
@@ -1642,7 +1738,7 @@ function ObjectValues(obj) {
1642
1738
  /**
1643
1739
  * Cube texture.
1644
1740
  */ var TextureCube = /*#__PURE__*/ function(Texture) {
1645
- _inherits__default['default'](TextureCube, Texture);
1741
+ _inherits(TextureCube, Texture);
1646
1742
  function TextureCube(engine, size, format, mipmap) {
1647
1743
  if (format === void 0) format = exports.TextureFormat.R8G8B8A8;
1648
1744
  if (mipmap === void 0) mipmap = true;
@@ -1653,7 +1749,7 @@ function ObjectValues(obj) {
1653
1749
  _this._height = size;
1654
1750
  _this._format = format;
1655
1751
  _this._mipmapCount = _this._getMipmapCount();
1656
- _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized__default['default'](_this));
1752
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized(_this));
1657
1753
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1658
1754
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Clamp;
1659
1755
  return _this;
@@ -1711,7 +1807,7 @@ function ObjectValues(obj) {
1711
1807
  * @internal
1712
1808
  * Font Atlas.
1713
1809
  */ var FontAtlas = /*#__PURE__*/ function(RefObject) {
1714
- _inherits__default['default'](FontAtlas, RefObject);
1810
+ _inherits(FontAtlas, RefObject);
1715
1811
  function FontAtlas(engine) {
1716
1812
  var _this;
1717
1813
  _this = RefObject.call(this, engine) || this;
@@ -1780,7 +1876,7 @@ function ObjectValues(obj) {
1780
1876
  _proto.getCharInfo = function getCharInfo(char) {
1781
1877
  return this._charInfoMap[char.charCodeAt(0)];
1782
1878
  };
1783
- _create_class__default['default'](FontAtlas, [
1879
+ _create_class(FontAtlas, [
1784
1880
  {
1785
1881
  key: "texture",
1786
1882
  get: function get() {
@@ -1877,7 +1973,7 @@ function ObjectValues(obj) {
1877
1973
  /**
1878
1974
  * Font.
1879
1975
  */ var Font = /*#__PURE__*/ function(RefObject) {
1880
- _inherits__default['default'](Font, RefObject);
1976
+ _inherits(Font, RefObject);
1881
1977
  function Font(engine, name) {
1882
1978
  if (name === void 0) name = "";
1883
1979
  var _this;
@@ -1929,7 +2025,7 @@ function ObjectValues(obj) {
1929
2025
  }
1930
2026
  return null;
1931
2027
  };
1932
- _create_class__default['default'](Font, [
2028
+ _create_class(Font, [
1933
2029
  {
1934
2030
  key: "name",
1935
2031
  get: /**
@@ -1941,9 +2037,10 @@ function ObjectValues(obj) {
1941
2037
  ]);
1942
2038
  return Font;
1943
2039
  }(RefObject);
1944
- Font._fontMap = {};
2040
+ (function() {
2041
+ Font._fontMap = {};
2042
+ })();
1945
2043
 
1946
- var _Symbol_toStringTag = Symbol.toStringTag;
1947
2044
  var AssetPromise = /*#__PURE__*/ function() {
1948
2045
  function AssetPromise(executor) {
1949
2046
  var _this = this;
@@ -2041,7 +2138,7 @@ var AssetPromise = /*#__PURE__*/ function() {
2041
2138
  }
2042
2139
  };
2043
2140
  var onProgress = function onProgress(promise, index) {
2044
- if (_instanceof__default['default'](promise, Promise) || _instanceof__default['default'](promise, AssetPromise)) {
2141
+ if (_instanceof(promise, Promise) || _instanceof(promise, AssetPromise)) {
2045
2142
  promise.then(function(value) {
2046
2143
  onComplete(index, value);
2047
2144
  }, reject);
@@ -2062,9 +2159,9 @@ var AssetPromise = /*#__PURE__*/ function() {
2062
2159
  }
2063
2160
  });
2064
2161
  };
2065
- _create_class__default['default'](AssetPromise, [
2162
+ _create_class(AssetPromise, [
2066
2163
  {
2067
- key: _Symbol_toStringTag,
2164
+ key: Symbol.toStringTag,
2068
2165
  get: /** compatible with Promise */ function get() {
2069
2166
  return "AssetPromise";
2070
2167
  }
@@ -2263,7 +2360,7 @@ var /** @internal */ PromiseState;
2263
2360
  // Load asset
2264
2361
  item.url = assetBaseURL;
2265
2362
  var promise = loader.load(item, this);
2266
- if (_instanceof__default['default'](promise, AssetPromise)) {
2363
+ if (_instanceof(promise, AssetPromise)) {
2267
2364
  loadingPromises[assetBaseURL] = promise;
2268
2365
  promise.then(function(resource) {
2269
2366
  if (loader.useCache) {
@@ -2335,13 +2432,13 @@ var /** @internal */ PromiseState;
2335
2432
  };
2336
2433
  _proto._parseQueryPath = function _parseQueryPath(string) {
2337
2434
  var result = [];
2338
- if (string.charCodeAt(0) === charCodeOfDot) {
2435
+ if (string.charCodeAt(0) === charCodeOfDot$1) {
2339
2436
  result.push("");
2340
2437
  }
2341
- string.replace(rePropName, function(match, expression, quote, subString) {
2438
+ string.replace(rePropName$1, function(match, expression, quote, subString) {
2342
2439
  var key = match;
2343
2440
  if (quote) {
2344
- key = subString.replace(reEscapeChar, "$1");
2441
+ key = subString.replace(reEscapeChar$1, "$1");
2345
2442
  } else if (expression) {
2346
2443
  key = expression.trim();
2347
2444
  }
@@ -2399,8 +2496,12 @@ var /** @internal */ PromiseState;
2399
2496
  };
2400
2497
  return ResourceManager;
2401
2498
  }();
2402
- /** Loader collection. */ ResourceManager._loaders = {};
2403
- ResourceManager._extTypeMapping = {};
2499
+ (function() {
2500
+ /** Loader collection. */ ResourceManager._loaders = {};
2501
+ })();
2502
+ (function() {
2503
+ ResourceManager._extTypeMapping = {};
2504
+ })();
2404
2505
  /**
2405
2506
  * Declare ResourceLoader's decorator.
2406
2507
  * @param assetType - Type of asset
@@ -2412,9 +2513,9 @@ ResourceManager._extTypeMapping = {};
2412
2513
  ResourceManager._addLoader(assetType, loader, extnames);
2413
2514
  };
2414
2515
  }
2415
- var charCodeOfDot = ".".charCodeAt(0);
2416
- var reEscapeChar = /\\(\\)?/g;
2417
- var rePropName = RegExp(// Match anything that isn't a dot or bracket.
2516
+ var charCodeOfDot$1 = ".".charCodeAt(0);
2517
+ var reEscapeChar$1 = /\\(\\)?/g;
2518
+ var rePropName$1 = RegExp(// Match anything that isn't a dot or bracket.
2418
2519
  "[^.[\\]]+" + "|" + // Or match property names within brackets.
2419
2520
  "\\[(?:" + // Match a non-string expression.
2420
2521
  "([^\"'][^[]*)" + "|" + // Or match strings (supports escaping characters).
@@ -2681,7 +2782,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
2681
2782
  break;
2682
2783
  case CloneMode.Shallow:
2683
2784
  var sourcePropS = source[k];
2684
- if (_instanceof__default['default'](sourcePropS, Object)) {
2785
+ if (_instanceof(sourcePropS, Object)) {
2685
2786
  var tarProp = target[k];
2686
2787
  tarProp == null && (tarProp = target[k] = sourcePropS.constructor());
2687
2788
  Object.assign(tarProp, sourcePropS);
@@ -2692,7 +2793,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
2692
2793
  break;
2693
2794
  case CloneMode.Deep:
2694
2795
  var sourcePropD = source[k];
2695
- if (_instanceof__default['default'](sourcePropD, Object)) {
2796
+ if (_instanceof(sourcePropD, Object)) {
2696
2797
  var tarProp1 = target[k];
2697
2798
  tarProp1 == null && (tarProp1 = target[k] = sourcePropD.constructor());
2698
2799
  CloneManager.deepCloneObject(sourcePropD, tarProp1);
@@ -2758,10 +2859,14 @@ var ComponentCloner = /*#__PURE__*/ function() {
2758
2859
  };
2759
2860
  return ComponentsDependencies;
2760
2861
  }();
2761
- /**
2862
+ (function() {
2863
+ /**
2762
2864
  * @internal
2763
2865
  */ ComponentsDependencies._dependenciesMap = new Map();
2764
- ComponentsDependencies._invDependenciesMap = new Map();
2866
+ })();
2867
+ (function() {
2868
+ ComponentsDependencies._invDependenciesMap = new Map();
2869
+ })();
2765
2870
  /**
2766
2871
  * Dependent components, automatically added if they do not exist.
2767
2872
  * @param components - Dependent components
@@ -2776,6 +2881,9 @@ ComponentsDependencies._invDependenciesMap = new Map();
2776
2881
  };
2777
2882
  }
2778
2883
 
2884
+ /**
2885
+ * Layer, used for bit operations.
2886
+ */ exports.Layer = void 0;
2779
2887
  (function(Layer) {
2780
2888
  Layer[Layer[/** Layer 0. */ "Layer0"] = 0x1] = "Layer0";
2781
2889
  Layer[Layer[/** Layer 1. */ "Layer1"] = 0x2] = "Layer1";
@@ -2844,7 +2952,7 @@ ComponentsDependencies._invDependenciesMap = new Map();
2844
2952
  /**
2845
2953
  * Bool update flag.
2846
2954
  */ var BoolUpdateFlag = /*#__PURE__*/ function(UpdateFlag) {
2847
- _inherits__default['default'](BoolUpdateFlag, UpdateFlag);
2955
+ _inherits(BoolUpdateFlag, UpdateFlag);
2848
2956
  function BoolUpdateFlag() {
2849
2957
  var _this;
2850
2958
  _this = UpdateFlag.apply(this, arguments) || this;
@@ -2863,7 +2971,7 @@ ComponentsDependencies._invDependenciesMap = new Map();
2863
2971
  /**
2864
2972
  * The base class of the components.
2865
2973
  */ var Component = /*#__PURE__*/ function(EngineObject) {
2866
- _inherits__default['default'](Component, EngineObject);
2974
+ _inherits(Component, EngineObject);
2867
2975
  function Component(entity) {
2868
2976
  var _this;
2869
2977
  _this = EngineObject.call(this, entity.engine) || this;
@@ -2924,7 +3032,7 @@ ComponentsDependencies._invDependenciesMap = new Map();
2924
3032
  }
2925
3033
  }
2926
3034
  };
2927
- _create_class__default['default'](Component, [
3035
+ _create_class(Component, [
2928
3036
  {
2929
3037
  key: "enabled",
2930
3038
  get: /**
@@ -2974,19 +3082,19 @@ ComponentsDependencies._invDependenciesMap = new Map();
2974
3082
  ]);
2975
3083
  return Component;
2976
3084
  }(EngineObject);
2977
- _ts_decorate__default['default']([
3085
+ __decorate([
2978
3086
  ignoreClone
2979
3087
  ], Component.prototype, "_entity", void 0);
2980
- _ts_decorate__default['default']([
3088
+ __decorate([
2981
3089
  ignoreClone
2982
3090
  ], Component.prototype, "_awoken", void 0);
2983
- _ts_decorate__default['default']([
3091
+ __decorate([
2984
3092
  ignoreClone
2985
3093
  ], Component.prototype, "_destroyed", void 0);
2986
- _ts_decorate__default['default']([
3094
+ __decorate([
2987
3095
  ignoreClone
2988
3096
  ], Component.prototype, "_phasedActive", void 0);
2989
- _ts_decorate__default['default']([
3097
+ __decorate([
2990
3098
  assignmentClone
2991
3099
  ], Component.prototype, "_enabled", void 0);
2992
3100
 
@@ -3054,11 +3162,10 @@ _ts_decorate__default['default']([
3054
3162
  /**
3055
3163
  * Used to implement transformation related functions.
3056
3164
  */ var Transform = /*#__PURE__*/ function(Component) {
3057
- _inherits__default['default'](Transform, Component);
3165
+ _inherits(Transform, Component);
3058
3166
  function Transform(entity) {
3059
3167
  var _this;
3060
3168
  _this = Component.call(this, entity) || this;
3061
- _this._dirtyFlag = 0xbc;
3062
3169
  _this._position = new miniprogram.Vector3();
3063
3170
  _this._rotation = new miniprogram.Vector3();
3064
3171
  _this._rotationQuaternion = new miniprogram.Quaternion();
@@ -3071,14 +3178,15 @@ _ts_decorate__default['default']([
3071
3178
  _this._worldMatrix = new miniprogram.Matrix();
3072
3179
  _this._isParentDirty = true;
3073
3180
  _this._parentTransformCache = null;
3181
+ _this._dirtyFlag = 0xbc;
3074
3182
  /** @internal */ _this._updateFlagManager = new UpdateFlagManager();
3075
- _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized__default['default'](_this));
3076
- _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized__default['default'](_this));
3077
- _this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized__default['default'](_this));
3078
- _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized__default['default'](_this));
3079
- _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized__default['default'](_this));
3080
- _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized__default['default'](_this));
3081
- _this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized__default['default'](_this));
3183
+ _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized(_this));
3184
+ _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized(_this));
3185
+ _this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized(_this));
3186
+ _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized(_this));
3187
+ _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3188
+ _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3189
+ _this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized(_this));
3082
3190
  //@ts-ignore
3083
3191
  _this._position._onValueChanged = _this._onPositionChanged;
3084
3192
  //@ts-ignore
@@ -3470,7 +3578,7 @@ _ts_decorate__default['default']([
3470
3578
  this._setDirtyFlagTrue(0x40);
3471
3579
  this._updateWorldScaleFlag();
3472
3580
  };
3473
- _create_class__default['default'](Transform, [
3581
+ _create_class(Transform, [
3474
3582
  {
3475
3583
  key: "position",
3476
3584
  get: /**
@@ -3716,73 +3824,91 @@ _ts_decorate__default['default']([
3716
3824
  ]);
3717
3825
  return Transform;
3718
3826
  }(Component);
3719
- Transform._tempQuat0 = new miniprogram.Quaternion();
3720
- Transform._tempVec30 = new miniprogram.Vector3();
3721
- Transform._tempVec31 = new miniprogram.Vector3();
3722
- Transform._tempVec32 = new miniprogram.Vector3();
3723
- Transform._tempMat30 = new miniprogram.Matrix3x3();
3724
- Transform._tempMat31 = new miniprogram.Matrix3x3();
3725
- Transform._tempMat32 = new miniprogram.Matrix3x3();
3726
- Transform._tempMat41 = new miniprogram.Matrix();
3727
- Transform._tempMat42 = new miniprogram.Matrix();
3728
- _ts_decorate__default['default']([
3827
+ (function() {
3828
+ Transform._tempQuat0 = new miniprogram.Quaternion();
3829
+ })();
3830
+ (function() {
3831
+ Transform._tempVec30 = new miniprogram.Vector3();
3832
+ })();
3833
+ (function() {
3834
+ Transform._tempVec31 = new miniprogram.Vector3();
3835
+ })();
3836
+ (function() {
3837
+ Transform._tempVec32 = new miniprogram.Vector3();
3838
+ })();
3839
+ (function() {
3840
+ Transform._tempMat30 = new miniprogram.Matrix3x3();
3841
+ })();
3842
+ (function() {
3843
+ Transform._tempMat31 = new miniprogram.Matrix3x3();
3844
+ })();
3845
+ (function() {
3846
+ Transform._tempMat32 = new miniprogram.Matrix3x3();
3847
+ })();
3848
+ (function() {
3849
+ Transform._tempMat41 = new miniprogram.Matrix();
3850
+ })();
3851
+ (function() {
3852
+ Transform._tempMat42 = new miniprogram.Matrix();
3853
+ })();
3854
+ __decorate([
3729
3855
  deepClone
3730
3856
  ], Transform.prototype, "_position", void 0);
3731
- _ts_decorate__default['default']([
3857
+ __decorate([
3732
3858
  deepClone
3733
3859
  ], Transform.prototype, "_rotation", void 0);
3734
- _ts_decorate__default['default']([
3860
+ __decorate([
3735
3861
  deepClone
3736
3862
  ], Transform.prototype, "_rotationQuaternion", void 0);
3737
- _ts_decorate__default['default']([
3863
+ __decorate([
3738
3864
  deepClone
3739
3865
  ], Transform.prototype, "_scale", void 0);
3740
- _ts_decorate__default['default']([
3866
+ __decorate([
3741
3867
  deepClone
3742
3868
  ], Transform.prototype, "_worldPosition", void 0);
3743
- _ts_decorate__default['default']([
3869
+ __decorate([
3744
3870
  deepClone
3745
3871
  ], Transform.prototype, "_worldRotation", void 0);
3746
- _ts_decorate__default['default']([
3872
+ __decorate([
3747
3873
  deepClone
3748
3874
  ], Transform.prototype, "_worldRotationQuaternion", void 0);
3749
- _ts_decorate__default['default']([
3875
+ __decorate([
3750
3876
  deepClone
3751
3877
  ], Transform.prototype, "_lossyWorldScale", void 0);
3752
- _ts_decorate__default['default']([
3878
+ __decorate([
3753
3879
  deepClone
3754
3880
  ], Transform.prototype, "_localMatrix", void 0);
3755
- _ts_decorate__default['default']([
3881
+ __decorate([
3756
3882
  deepClone
3757
3883
  ], Transform.prototype, "_worldMatrix", void 0);
3758
- _ts_decorate__default['default']([
3884
+ __decorate([
3759
3885
  ignoreClone
3760
3886
  ], Transform.prototype, "_isParentDirty", void 0);
3761
- _ts_decorate__default['default']([
3887
+ __decorate([
3762
3888
  ignoreClone
3763
3889
  ], Transform.prototype, "_parentTransformCache", void 0);
3764
- _ts_decorate__default['default']([
3890
+ __decorate([
3765
3891
  ignoreClone
3766
3892
  ], Transform.prototype, "_updateFlagManager", void 0);
3767
- _ts_decorate__default['default']([
3893
+ __decorate([
3768
3894
  ignoreClone
3769
3895
  ], Transform.prototype, "_onPositionChanged", null);
3770
- _ts_decorate__default['default']([
3896
+ __decorate([
3771
3897
  ignoreClone
3772
3898
  ], Transform.prototype, "_onWorldPositionChanged", null);
3773
- _ts_decorate__default['default']([
3899
+ __decorate([
3774
3900
  ignoreClone
3775
3901
  ], Transform.prototype, "_onRotationChanged", null);
3776
- _ts_decorate__default['default']([
3902
+ __decorate([
3777
3903
  ignoreClone
3778
3904
  ], Transform.prototype, "_onWorldRotationChanged", null);
3779
- _ts_decorate__default['default']([
3905
+ __decorate([
3780
3906
  ignoreClone
3781
3907
  ], Transform.prototype, "_onRotationQuaternionChanged", null);
3782
- _ts_decorate__default['default']([
3908
+ __decorate([
3783
3909
  ignoreClone
3784
3910
  ], Transform.prototype, "_onWorldRotationQuaternionChanged", null);
3785
- _ts_decorate__default['default']([
3911
+ __decorate([
3786
3912
  ignoreClone
3787
3913
  ], Transform.prototype, "_onScaleChanged", null);
3788
3914
  var TransformModifyFlags;
@@ -3806,7 +3932,7 @@ var TransformModifyFlags;
3806
3932
  /**
3807
3933
  * Entity, be used as components container.
3808
3934
  */ var Entity = /*#__PURE__*/ function(EngineObject) {
3809
- _inherits__default['default'](Entity, EngineObject);
3935
+ _inherits(Entity, EngineObject);
3810
3936
  function Entity(engine, name) {
3811
3937
  var _this;
3812
3938
  _this = EngineObject.call(this, engine) || this;
@@ -3847,7 +3973,7 @@ var TransformModifyFlags;
3847
3973
  // @todo: should inverse traversal
3848
3974
  for(var i = components.length - 1; i >= 0; i--){
3849
3975
  var component = components[i];
3850
- if (_instanceof__default['default'](component, type)) {
3976
+ if (_instanceof(component, type)) {
3851
3977
  return component;
3852
3978
  }
3853
3979
  }
@@ -3862,7 +3988,7 @@ var TransformModifyFlags;
3862
3988
  var components = this._components;
3863
3989
  for(var i = 0, n = components.length; i < n; i++){
3864
3990
  var component = components[i];
3865
- if (_instanceof__default['default'](component, type)) {
3991
+ if (_instanceof(component, type)) {
3866
3992
  results.push(component);
3867
3993
  }
3868
3994
  }
@@ -3996,7 +4122,7 @@ var TransformModifyFlags;
3996
4122
  var components = this._components;
3997
4123
  for(var i1 = 0, n = components.length; i1 < n; i1++){
3998
4124
  var sourceComp = components[i1];
3999
- if (!_instanceof__default['default'](sourceComp, Transform)) {
4125
+ if (!_instanceof(sourceComp, Transform)) {
4000
4126
  var targetComp = cloneEntity.addComponent(sourceComp.constructor);
4001
4127
  ComponentCloner.cloneComponent(sourceComp, targetComp);
4002
4128
  }
@@ -4130,7 +4256,7 @@ var TransformModifyFlags;
4130
4256
  _proto._getComponentsInChildren = function _getComponentsInChildren(type, results) {
4131
4257
  for(var i = this._components.length - 1; i >= 0; i--){
4132
4258
  var component = this._components[i];
4133
- if (_instanceof__default['default'](component, type)) {
4259
+ if (_instanceof(component, type)) {
4134
4260
  results.push(component);
4135
4261
  }
4136
4262
  }
@@ -4233,7 +4359,7 @@ var TransformModifyFlags;
4233
4359
  this._traverseSetOwnerScene(children[i], scene);
4234
4360
  }
4235
4361
  };
4236
- _create_class__default['default'](Entity, [
4362
+ _create_class(Entity, [
4237
4363
  {
4238
4364
  key: "isActive",
4239
4365
  get: /**
@@ -4319,11 +4445,17 @@ var TransformModifyFlags;
4319
4445
  return Entity;
4320
4446
  }(EngineObject);
4321
4447
 
4448
+ /**
4449
+ * Color Space.
4450
+ */ exports.ColorSpace = void 0;
4322
4451
  (function(ColorSpace) {
4323
4452
  ColorSpace[ColorSpace[/** Linear color space. */ "Linear"] = 0] = "Linear";
4324
4453
  ColorSpace[ColorSpace[/** Gamma color space. */ "Gamma"] = 1] = "Gamma";
4325
4454
  })(exports.ColorSpace || (exports.ColorSpace = {}));
4326
4455
 
4456
+ /**
4457
+ * The current phase of the pointer.
4458
+ */ exports.PointerPhase = void 0;
4327
4459
  (function(PointerPhase) {
4328
4460
  PointerPhase[PointerPhase[/** A Pointer pressed on the screen. */ "Down"] = 0] = "Down";
4329
4461
  PointerPhase[PointerPhase[/** A pointer moved on the screen. */ "Move"] = 1] = "Move";
@@ -4445,7 +4577,7 @@ var TransformModifyFlags;
4445
4577
  }
4446
4578
  }
4447
4579
  };
4448
- _create_class__default['default'](SystemInfo, null, [
4580
+ _create_class(SystemInfo, null, [
4449
4581
  {
4450
4582
  key: "devicePixelRatio",
4451
4583
  get: /**
@@ -4457,10 +4589,18 @@ var TransformModifyFlags;
4457
4589
  ]);
4458
4590
  return SystemInfo;
4459
4591
  }();
4460
- /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4461
- /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4592
+ (function() {
4593
+ /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4594
+ })();
4595
+ (function() {
4596
+ /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4597
+ })();
4462
4598
  SystemInfo._initialize();
4463
4599
 
4600
+ /**
4601
+ * The keys of the keyboard.
4602
+ * Keep up with W3C standards.(https://www.w3.org/TR/2017/CR-uievents-code-20170601/)
4603
+ */ exports.Keys = void 0;
4464
4604
  (function(Keys) {
4465
4605
  Keys[Keys[/** `~ on a US keyboard. This is the 半角/全角/漢字 (hankaku/zenkaku/kanji) key on Japanese keyboards. */ "Backquote"] = 0] = "Backquote";
4466
4606
  Keys[Keys[/** Used for both the US \| (on the 101-key layout) and also for the key located between the " and Enter keys on row C of the 102-, 104- and 106-key layouts. Labelled #~ on a UK (102) keyboard. */ "Backslash"] = 1] = "Backslash";
@@ -4794,6 +4934,9 @@ SystemInfo._initialize();
4794
4934
  return KeyboardManager;
4795
4935
  }();
4796
4936
 
4937
+ /**
4938
+ * Camera clear flags enumeration.
4939
+ */ exports.CameraClearFlags = void 0;
4797
4940
  (function(CameraClearFlags) {
4798
4941
  CameraClearFlags[CameraClearFlags[/* Do nothing. */ "None"] = 0x0] = "None";
4799
4942
  CameraClearFlags[CameraClearFlags[/* Clear color with scene background. */ "Color"] = 0x1] = "Color";
@@ -5068,7 +5211,7 @@ SystemInfo._initialize();
5068
5211
  _proto._setGravity = function _setGravity() {
5069
5212
  this._nativePhysicsManager.setGravity(this._gravity);
5070
5213
  };
5071
- _create_class__default['default'](PhysicsManager, [
5214
+ _create_class(PhysicsManager, [
5072
5215
  {
5073
5216
  key: "gravity",
5074
5217
  get: /**
@@ -5099,6 +5242,9 @@ SystemInfo._initialize();
5099
5242
  return PhysicsManager;
5100
5243
  }();
5101
5244
 
5245
+ /**
5246
+ * Describes how physics materials of the colliding objects are combined.
5247
+ */ exports.PhysicsMaterialCombineMode = void 0;
5102
5248
  (function(PhysicsMaterialCombineMode) {
5103
5249
  PhysicsMaterialCombineMode[PhysicsMaterialCombineMode[/** Averages the friction/bounce of the two colliding materials. */ "Average"] = 0] = "Average";
5104
5250
  PhysicsMaterialCombineMode[PhysicsMaterialCombineMode[/** Uses the smaller friction/bounce of the two colliding materials. */ "Minimum"] = 1] = "Minimum";
@@ -5123,7 +5269,7 @@ SystemInfo._initialize();
5123
5269
  */ _proto._destroy = function _destroy() {
5124
5270
  this._nativeMaterial.destroy();
5125
5271
  };
5126
- _create_class__default['default'](PhysicsMaterial, [
5272
+ _create_class(PhysicsMaterial, [
5127
5273
  {
5128
5274
  key: "bounciness",
5129
5275
  get: /**
@@ -5199,12 +5345,12 @@ SystemInfo._initialize();
5199
5345
  }();
5200
5346
 
5201
5347
  exports.Collider = /*#__PURE__*/ function(Component) {
5202
- _inherits__default['default'](Collider, Component);
5348
+ _inherits(Collider, Component);
5203
5349
  function Collider(entity) {
5204
5350
  var _this;
5205
5351
  _this = Component.call(this, entity) || this;
5206
- _this._shapes = [];
5207
5352
  /** @internal */ _this._index = -1;
5353
+ _this._shapes = [];
5208
5354
  _this._updateFlag = _this.entity.transform.registerWorldChangeFlag();
5209
5355
  return _this;
5210
5356
  }
@@ -5283,7 +5429,7 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5283
5429
  this.clearShapes();
5284
5430
  this._nativeCollider.destroy();
5285
5431
  };
5286
- _create_class__default['default'](Collider, [
5432
+ _create_class(Collider, [
5287
5433
  {
5288
5434
  key: "shapes",
5289
5435
  get: /**
@@ -5295,13 +5441,16 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5295
5441
  ]);
5296
5442
  return Collider;
5297
5443
  }(Component);
5298
- _ts_decorate__default['default']([
5444
+ __decorate([
5299
5445
  ignoreClone
5300
5446
  ], exports.Collider.prototype, "_index", void 0);
5301
- exports.Collider = _ts_decorate__default['default']([
5447
+ exports.Collider = __decorate([
5302
5448
  dependentComponents(Transform)
5303
5449
  ], exports.Collider);
5304
5450
 
5451
+ /**
5452
+ * The up axis of the collider shape.
5453
+ */ exports.ControllerNonWalkableMode = void 0;
5305
5454
  (function(ControllerNonWalkableMode) {
5306
5455
  ControllerNonWalkableMode[ControllerNonWalkableMode[/** Stops character from climbing up non-walkable slopes, but doesn't move it otherwise. */ "PreventClimbing"] = 0] = "PreventClimbing";
5307
5456
  ControllerNonWalkableMode[ControllerNonWalkableMode[/** Stops character from climbing up non-walkable slopes, and forces it to slide down those slopes. */ "PreventClimbingAndForceSliding"] = 1] = "PreventClimbingAndForceSliding";
@@ -5310,7 +5459,7 @@ exports.Collider = _ts_decorate__default['default']([
5310
5459
  /**
5311
5460
  * The character controllers.
5312
5461
  */ var CharacterController = /*#__PURE__*/ function(Collider) {
5313
- _inherits__default['default'](CharacterController, Collider);
5462
+ _inherits(CharacterController, Collider);
5314
5463
  function CharacterController(entity) {
5315
5464
  var _this;
5316
5465
  _this = Collider.call(this, entity) || this;
@@ -5320,7 +5469,7 @@ exports.Collider = _ts_decorate__default['default']([
5320
5469
  _this._upDirection = new miniprogram.Vector3(0, 1, 0);
5321
5470
  _this._slopeLimit = 0.707;
5322
5471
  _this._nativeCollider = PhysicsManager._nativePhysics.createCharacterController();
5323
- _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized__default['default'](_this));
5472
+ _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
5324
5473
  //@ts-ignore
5325
5474
  _this._upDirection._onValueChanged = _this._setUpDirection;
5326
5475
  return _this;
@@ -5393,7 +5542,7 @@ exports.Collider = _ts_decorate__default['default']([
5393
5542
  _proto._setUpDirection = function _setUpDirection() {
5394
5543
  this._nativeCollider.setUpDirection(this._upDirection);
5395
5544
  };
5396
- _create_class__default['default'](CharacterController, [
5545
+ _create_class(CharacterController, [
5397
5546
  {
5398
5547
  key: "stepOffset",
5399
5548
  get: /**
@@ -5488,7 +5637,7 @@ exports.Collider = _ts_decorate__default['default']([
5488
5637
  _proto._setRotation = function _setRotation() {
5489
5638
  this._nativeShape.setRotation(this._rotation);
5490
5639
  };
5491
- _create_class__default['default'](ColliderShape, [
5640
+ _create_class(ColliderShape, [
5492
5641
  {
5493
5642
  key: "collider",
5494
5643
  get: /**
@@ -5576,18 +5725,20 @@ exports.Collider = _ts_decorate__default['default']([
5576
5725
  ]);
5577
5726
  return ColliderShape;
5578
5727
  }();
5579
- ColliderShape._idGenerator = 0;
5728
+ (function() {
5729
+ ColliderShape._idGenerator = 0;
5730
+ })();
5580
5731
 
5581
5732
  /**
5582
5733
  * Physical collider shape for box.
5583
5734
  */ var BoxColliderShape = /*#__PURE__*/ function(ColliderShape) {
5584
- _inherits__default['default'](BoxColliderShape, ColliderShape);
5735
+ _inherits(BoxColliderShape, ColliderShape);
5585
5736
  function BoxColliderShape() {
5586
5737
  var _this;
5587
5738
  _this = ColliderShape.call(this) || this;
5588
5739
  _this._size = new miniprogram.Vector3(1, 1, 1);
5589
5740
  _this._nativeShape = PhysicsManager._nativePhysics.createBoxColliderShape(_this._id, _this._size, _this._material._nativeMaterial);
5590
- _this._setSize = _this._setSize.bind(_assert_this_initialized__default['default'](_this));
5741
+ _this._setSize = _this._setSize.bind(_assert_this_initialized(_this));
5591
5742
  //@ts-ignore
5592
5743
  _this._size._onValueChanged = _this._setSize;
5593
5744
  return _this;
@@ -5596,7 +5747,7 @@ ColliderShape._idGenerator = 0;
5596
5747
  _proto._setSize = function _setSize() {
5597
5748
  this._nativeShape.setSize(this._size);
5598
5749
  };
5599
- _create_class__default['default'](BoxColliderShape, [
5750
+ _create_class(BoxColliderShape, [
5600
5751
  {
5601
5752
  key: "size",
5602
5753
  get: /**
@@ -5617,7 +5768,7 @@ ColliderShape._idGenerator = 0;
5617
5768
  /**
5618
5769
  * Physical collider shape for sphere.
5619
5770
  */ var SphereColliderShape = /*#__PURE__*/ function(ColliderShape) {
5620
- _inherits__default['default'](SphereColliderShape, ColliderShape);
5771
+ _inherits(SphereColliderShape, ColliderShape);
5621
5772
  function SphereColliderShape() {
5622
5773
  var _this;
5623
5774
  _this = ColliderShape.call(this) || this;
@@ -5625,7 +5776,7 @@ ColliderShape._idGenerator = 0;
5625
5776
  _this._nativeShape = PhysicsManager._nativePhysics.createSphereColliderShape(_this._id, _this._radius, _this._material._nativeMaterial);
5626
5777
  return _this;
5627
5778
  }
5628
- _create_class__default['default'](SphereColliderShape, [
5779
+ _create_class(SphereColliderShape, [
5629
5780
  {
5630
5781
  key: "radius",
5631
5782
  get: /**
@@ -5647,7 +5798,7 @@ ColliderShape._idGenerator = 0;
5647
5798
  /**
5648
5799
  * Physical collider shape plane.
5649
5800
  */ var PlaneColliderShape = /*#__PURE__*/ function(ColliderShape) {
5650
- _inherits__default['default'](PlaneColliderShape, ColliderShape);
5801
+ _inherits(PlaneColliderShape, ColliderShape);
5651
5802
  function PlaneColliderShape() {
5652
5803
  var _this;
5653
5804
  _this = ColliderShape.call(this) || this;
@@ -5657,6 +5808,9 @@ ColliderShape._idGenerator = 0;
5657
5808
  return PlaneColliderShape;
5658
5809
  }(ColliderShape);
5659
5810
 
5811
+ /**
5812
+ * The up axis of the collider shape.
5813
+ */ exports.ColliderShapeUpAxis = void 0;
5660
5814
  (function(ColliderShapeUpAxis) {
5661
5815
  ColliderShapeUpAxis[ColliderShapeUpAxis[/** Up axis is X. */ "X"] = 0] = "X";
5662
5816
  ColliderShapeUpAxis[ColliderShapeUpAxis[/** Up axis is Y. */ "Y"] = 1] = "Y";
@@ -5666,7 +5820,7 @@ ColliderShape._idGenerator = 0;
5666
5820
  /**
5667
5821
  * Physical collider shape for capsule.
5668
5822
  */ var CapsuleColliderShape = /*#__PURE__*/ function(ColliderShape) {
5669
- _inherits__default['default'](CapsuleColliderShape, ColliderShape);
5823
+ _inherits(CapsuleColliderShape, ColliderShape);
5670
5824
  function CapsuleColliderShape() {
5671
5825
  var _this;
5672
5826
  _this = ColliderShape.call(this) || this;
@@ -5676,7 +5830,7 @@ ColliderShape._idGenerator = 0;
5676
5830
  _this._nativeShape = PhysicsManager._nativePhysics.createCapsuleColliderShape(_this._id, _this._radius, _this._height, _this._material._nativeMaterial);
5677
5831
  return _this;
5678
5832
  }
5679
- _create_class__default['default'](CapsuleColliderShape, [
5833
+ _create_class(CapsuleColliderShape, [
5680
5834
  {
5681
5835
  key: "radius",
5682
5836
  get: /**
@@ -5724,7 +5878,7 @@ ColliderShape._idGenerator = 0;
5724
5878
  }(ColliderShape);
5725
5879
 
5726
5880
  exports.Joint = /*#__PURE__*/ function(Component) {
5727
- _inherits__default['default'](Joint, Component);
5881
+ _inherits(Joint, Component);
5728
5882
  function Joint(entity) {
5729
5883
  var _this;
5730
5884
  _this = Component.call(this, entity) || this;
@@ -5735,7 +5889,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
5735
5889
  _this._connectedCollider.localPosition = new miniprogram.Vector3();
5736
5890
  return _this;
5737
5891
  }
5738
- _create_class__default['default'](Joint, [
5892
+ _create_class(Joint, [
5739
5893
  {
5740
5894
  key: "connectedCollider",
5741
5895
  get: /**
@@ -5853,7 +6007,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
5853
6007
  ]);
5854
6008
  return Joint;
5855
6009
  }(Component);
5856
- exports.Joint = _ts_decorate__default['default']([
6010
+ exports.Joint = __decorate([
5857
6011
  dependentComponents(exports.Collider)
5858
6012
  ], exports.Joint);
5859
6013
  /**
@@ -5867,7 +6021,7 @@ exports.Joint = _ts_decorate__default['default']([
5867
6021
  /*
5868
6022
  * A fixed joint permits no relative movement between two colliders. ie the colliders are glued together.
5869
6023
  */ var FixedJoint = /*#__PURE__*/ function(Joint) {
5870
- _inherits__default['default'](FixedJoint, Joint);
6024
+ _inherits(FixedJoint, Joint);
5871
6025
  function FixedJoint() {
5872
6026
  return Joint.apply(this, arguments);
5873
6027
  }
@@ -5896,7 +6050,7 @@ exports.Joint = _ts_decorate__default['default']([
5896
6050
  /**
5897
6051
  * A joint which behaves in a similar way to a hinge or axle.
5898
6052
  */ var HingeJoint = /*#__PURE__*/ function(Joint) {
5899
- _inherits__default['default'](HingeJoint, Joint);
6053
+ _inherits(HingeJoint, Joint);
5900
6054
  function HingeJoint() {
5901
6055
  var _this;
5902
6056
  _this = Joint.apply(this, arguments) || this;
@@ -5915,7 +6069,7 @@ exports.Joint = _ts_decorate__default['default']([
5915
6069
  collider.collider = this.entity.getComponent(exports.Collider);
5916
6070
  this._nativeJoint = PhysicsManager._nativePhysics.createHingeJoint(collider.collider._nativeCollider);
5917
6071
  };
5918
- _create_class__default['default'](HingeJoint, [
6072
+ _create_class(HingeJoint, [
5919
6073
  {
5920
6074
  key: "axis",
5921
6075
  get: /**
@@ -6046,7 +6200,7 @@ exports.Joint = _ts_decorate__default['default']([
6046
6200
  /**
6047
6201
  * A joint that maintains an upper or lower bound (or both) on the distance between two points on different objects.
6048
6202
  */ var SpringJoint = /*#__PURE__*/ function(Joint) {
6049
- _inherits__default['default'](SpringJoint, Joint);
6203
+ _inherits(SpringJoint, Joint);
6050
6204
  function SpringJoint() {
6051
6205
  var _this;
6052
6206
  _this = Joint.apply(this, arguments) || this;
@@ -6067,7 +6221,7 @@ exports.Joint = _ts_decorate__default['default']([
6067
6221
  collider.collider = this.entity.getComponent(exports.Collider);
6068
6222
  this._nativeJoint = PhysicsManager._nativePhysics.createSpringJoint(collider.collider._nativeCollider);
6069
6223
  };
6070
- _create_class__default['default'](SpringJoint, [
6224
+ _create_class(SpringJoint, [
6071
6225
  {
6072
6226
  key: "swingOffset",
6073
6227
  get: /**
@@ -6176,6 +6330,9 @@ exports.Joint = _ts_decorate__default['default']([
6176
6330
  /** If freeSpin is enabled the motor will only accelerate but never slow down. */ this.freeSpin = false;
6177
6331
  };
6178
6332
 
6333
+ /**
6334
+ * The up axis of the collider shape.
6335
+ */ exports.ControllerCollisionFlag = void 0;
6179
6336
  (function(ControllerCollisionFlag) {
6180
6337
  ControllerCollisionFlag[ControllerCollisionFlag[/** Character is colliding to the sides. */ "Sides"] = 1] = "Sides";
6181
6338
  ControllerCollisionFlag[ControllerCollisionFlag[/** Character has collision above. */ "Up"] = 2] = "Up";
@@ -6186,7 +6343,7 @@ exports.Joint = _ts_decorate__default['default']([
6186
6343
  * A static collider component that will not move.
6187
6344
  * @remarks Mostly used for object which always stays at the same place and never moves around.
6188
6345
  */ var StaticCollider = /*#__PURE__*/ function(Collider) {
6189
- _inherits__default['default'](StaticCollider, Collider);
6346
+ _inherits(StaticCollider, Collider);
6190
6347
  function StaticCollider(entity) {
6191
6348
  var _this;
6192
6349
  _this = Collider.call(this, entity) || this;
@@ -6200,7 +6357,7 @@ exports.Joint = _ts_decorate__default['default']([
6200
6357
  /**
6201
6358
  * A dynamic collider can act with self-defined movement or physical force.
6202
6359
  */ var DynamicCollider = /*#__PURE__*/ function(Collider) {
6203
- _inherits__default['default'](DynamicCollider, Collider);
6360
+ _inherits(DynamicCollider, Collider);
6204
6361
  function DynamicCollider(entity) {
6205
6362
  var _this;
6206
6363
  _this = Collider.call(this, entity) || this;
@@ -6220,10 +6377,10 @@ exports.Joint = _ts_decorate__default['default']([
6220
6377
  _this._sleepThreshold = 5e-3;
6221
6378
  var transform = _this.entity.transform;
6222
6379
  _this._nativeCollider = PhysicsManager._nativePhysics.createDynamicCollider(transform.worldPosition, transform.worldRotationQuaternion);
6223
- _this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized__default['default'](_this));
6224
- _this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized__default['default'](_this));
6225
- _this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized__default['default'](_this));
6226
- _this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized__default['default'](_this));
6380
+ _this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized(_this));
6381
+ _this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized(_this));
6382
+ _this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized(_this));
6383
+ _this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized(_this));
6227
6384
  //@ts-ignore
6228
6385
  _this._linearVelocity._onValueChanged = _this._setLinearVelocity;
6229
6386
  //@ts-ignore
@@ -6281,7 +6438,7 @@ exports.Joint = _ts_decorate__default['default']([
6281
6438
  _proto._setInertiaTensor = function _setInertiaTensor() {
6282
6439
  this._nativeCollider.setInertiaTensor(this._inertiaTensor);
6283
6440
  };
6284
- _create_class__default['default'](DynamicCollider, [
6441
+ _create_class(DynamicCollider, [
6285
6442
  {
6286
6443
  key: "linearDamping",
6287
6444
  get: /**
@@ -6477,12 +6634,14 @@ exports.Joint = _ts_decorate__default['default']([
6477
6634
  ]);
6478
6635
  return DynamicCollider;
6479
6636
  }(exports.Collider);
6637
+ exports.CollisionDetectionMode = void 0;
6480
6638
  (function(CollisionDetectionMode) {
6481
6639
  CollisionDetectionMode[CollisionDetectionMode["Discrete"] = 0] = "Discrete";
6482
6640
  CollisionDetectionMode[CollisionDetectionMode[/** Continuous collision detection is on for colliding with static mesh geometry. */ "Continuous"] = 1] = "Continuous";
6483
6641
  CollisionDetectionMode[CollisionDetectionMode[/** Continuous collision detection is on for colliding with static and dynamic geometry. */ "ContinuousDynamic"] = 2] = "ContinuousDynamic";
6484
6642
  CollisionDetectionMode[CollisionDetectionMode[/** Speculative continuous collision detection is on for static and dynamic geometries */ "ContinuousSpeculative"] = 3] = "ContinuousSpeculative";
6485
6643
  })(exports.CollisionDetectionMode || (exports.CollisionDetectionMode = {}));
6644
+ exports.DynamicColliderConstraints = void 0;
6486
6645
  (function(DynamicColliderConstraints) {
6487
6646
  DynamicColliderConstraints[DynamicColliderConstraints[/** Not Freeze. */ "None"] = 0] = "None";
6488
6647
  DynamicColliderConstraints[DynamicColliderConstraints[/** Freeze motion along the X-axis. */ "FreezePositionX"] = 1] = "FreezePositionX";
@@ -6493,6 +6652,13 @@ exports.Joint = _ts_decorate__default['default']([
6493
6652
  DynamicColliderConstraints[DynamicColliderConstraints[/** Freeze rotation along the Z-axis. */ "FreezeRotationZ"] = 32] = "FreezeRotationZ";
6494
6653
  })(exports.DynamicColliderConstraints || (exports.DynamicColliderConstraints = {}));
6495
6654
 
6655
+ /**
6656
+ * Defines values that specify the buttons on a pointer device.
6657
+ * Refer to the W3C standards:
6658
+ * (https://www.w3.org/TR/uievents/#dom-mouseevent-button)
6659
+ * (https://www.w3.org/TR/uievents/#dom-mouseevent-buttons)
6660
+ * Refer to Microsoft's documentation.(https://docs.microsoft.com/en-us/dotnet/api/system.windows.input.mousebutton?view=windowsdesktop-6.0)
6661
+ */ exports.PointerButton = void 0;
6496
6662
  (function(PointerButton) {
6497
6663
  PointerButton[PointerButton[/** No button. */ "None"] = 0x0] = "None";
6498
6664
  PointerButton[PointerButton[/** Indicate the primary pointer of the device (in general, the left button or the only button on single-button devices, used to activate a user interface control or select text) or the un-initialized value. */ "Primary"] = 0x1] = "Primary";
@@ -6816,9 +6982,15 @@ exports.Joint = _ts_decorate__default['default']([
6816
6982
  };
6817
6983
  return PointerManager;
6818
6984
  }();
6819
- PointerManager._tempRay = new miniprogram.Ray();
6820
- PointerManager._tempPoint = new miniprogram.Vector2();
6821
- PointerManager._tempHitResult = new HitResult();
6985
+ (function() {
6986
+ PointerManager._tempRay = new miniprogram.Ray();
6987
+ })();
6988
+ (function() {
6989
+ PointerManager._tempPoint = new miniprogram.Vector2();
6990
+ })();
6991
+ (function() {
6992
+ PointerManager._tempHitResult = new HitResult();
6993
+ })();
6822
6994
 
6823
6995
  /**
6824
6996
  * Wheel Manager.
@@ -6891,7 +7063,7 @@ PointerManager._tempHitResult = new HitResult();
6891
7063
  this._curFrameCount = 0;
6892
7064
  // @ts-ignore
6893
7065
  var canvas = engine._canvas._webCanvas;
6894
- if (typeof engineMiniprogramAdapter.OffscreenCanvas === "undefined" || !_instanceof__default['default'](canvas, engineMiniprogramAdapter.OffscreenCanvas)) {
7066
+ if (typeof engineMiniprogramAdapter.OffscreenCanvas === "undefined" || !_instanceof(canvas, engineMiniprogramAdapter.OffscreenCanvas)) {
6895
7067
  this._wheelManager = new WheelManager(canvas);
6896
7068
  this._pointerManager = new PointerManager(engine, canvas);
6897
7069
  this._keyboardManager = new KeyboardManager(canvas);
@@ -7024,7 +7196,7 @@ PointerManager._tempHitResult = new HitResult();
7024
7196
  this._pointerManager._onFocus();
7025
7197
  this._keyboardManager._onFocus();
7026
7198
  };
7027
- _create_class__default['default'](InputManager, [
7199
+ _create_class(InputManager, [
7028
7200
  {
7029
7201
  key: "pointers",
7030
7202
  get: /**
@@ -7057,12 +7229,18 @@ PointerManager._tempHitResult = new HitResult();
7057
7229
  return InputManager;
7058
7230
  }();
7059
7231
 
7232
+ /**
7233
+ * Number of cascades to use for directional light shadows.
7234
+ */ exports.ShadowCascadesMode = void 0;
7060
7235
  (function(ShadowCascadesMode) {
7061
7236
  ShadowCascadesMode[ShadowCascadesMode[/** No cascades */ "NoCascades"] = 1] = "NoCascades";
7062
7237
  ShadowCascadesMode[ShadowCascadesMode[/** Two cascades */ "TwoCascades"] = 2] = "TwoCascades";
7063
7238
  ShadowCascadesMode[ShadowCascadesMode[/** Four cascades */ "FourCascades"] = 4] = "FourCascades";
7064
7239
  })(exports.ShadowCascadesMode || (exports.ShadowCascadesMode = {}));
7065
7240
 
7241
+ /**
7242
+ * Default shadow resolution.
7243
+ */ exports.ShadowResolution = void 0;
7066
7244
  (function(ShadowResolution) {
7067
7245
  ShadowResolution[ShadowResolution[/** Low shadow map resolution. */ "Low"] = 0] = "Low";
7068
7246
  ShadowResolution[ShadowResolution[/** Medium shadow map resolution. */ "Medium"] = 1] = "Medium";
@@ -7070,6 +7248,9 @@ PointerManager._tempHitResult = new HitResult();
7070
7248
  ShadowResolution[ShadowResolution[/** Very high shadow map resolution. */ "VeryHigh"] = 3] = "VeryHigh";
7071
7249
  })(exports.ShadowResolution || (exports.ShadowResolution = {}));
7072
7250
 
7251
+ /**
7252
+ * Determines which type of shadows should be used.
7253
+ */ exports.ShadowType = void 0;
7073
7254
  (function(ShadowType) {
7074
7255
  ShadowType[ShadowType[/** Disable Shadows. */ "None"] = 0] = "None";
7075
7256
  ShadowType[ShadowType[/** Hard Shadows Only. */ "Hard"] = 1] = "Hard";
@@ -7077,12 +7258,19 @@ PointerManager._tempHitResult = new HitResult();
7077
7258
  ShadowType[ShadowType[/** Cast "soft" shadows with large range. */ "SoftHigh"] = 3] = "SoftHigh";
7078
7259
  })(exports.ShadowType || (exports.ShadowType = {}));
7079
7260
 
7261
+ /**
7262
+ * Render queue type.
7263
+ */ exports.RenderQueueType = void 0;
7080
7264
  (function(RenderQueueType) {
7081
7265
  RenderQueueType[RenderQueueType[/** Opaque queue. */ "Opaque"] = 0] = "Opaque";
7082
7266
  RenderQueueType[RenderQueueType[/** Opaque queue, alpha cutoff. */ "AlphaTest"] = 1] = "AlphaTest";
7083
7267
  RenderQueueType[RenderQueueType[/** Transparent queue, rendering from back to front to ensure correct rendering of transparent objects. */ "Transparent"] = 2] = "Transparent";
7084
7268
  })(exports.RenderQueueType || (exports.RenderQueueType = {}));
7085
7269
 
7270
+ /**
7271
+ * Blend factor.
7272
+ * @remarks defines which function is used for blending pixel arithmetic
7273
+ */ exports.BlendFactor = void 0;
7086
7274
  (function(BlendFactor) {
7087
7275
  BlendFactor[BlendFactor[/** (0, 0, 0, 0)*/ "Zero"] = 0] = "Zero";
7088
7276
  BlendFactor[BlendFactor[/** (1, 1, 1, 1)*/ "One"] = 1] = "One";
@@ -7099,6 +7287,10 @@ PointerManager._tempHitResult = new HitResult();
7099
7287
  BlendFactor[BlendFactor[/** (1 - Rc, 1 - Gc, 1 - Bc, 1 - Ac)*/ "OneMinusBlendColor"] = 12] = "OneMinusBlendColor";
7100
7288
  })(exports.BlendFactor || (exports.BlendFactor = {}));
7101
7289
 
7290
+ /**
7291
+ * Blend operation function.
7292
+ * @remarks defines how a new pixel is combined with a pixel.
7293
+ */ exports.BlendOperation = void 0;
7102
7294
  (function(BlendOperation) {
7103
7295
  BlendOperation[BlendOperation[/** src + dst. */ "Add"] = 0] = "Add";
7104
7296
  BlendOperation[BlendOperation[/** src - dst. */ "Subtract"] = 1] = "Subtract";
@@ -7107,6 +7299,10 @@ PointerManager._tempHitResult = new HitResult();
7107
7299
  BlendOperation[BlendOperation[/** Maximum of source and destination. */ "Max"] = 4] = "Max";
7108
7300
  })(exports.BlendOperation || (exports.BlendOperation = {}));
7109
7301
 
7302
+ /**
7303
+ * Set which color channels can be rendered to frame buffer.
7304
+ * @remarks enumeration can be combined using bit operations.
7305
+ */ exports.ColorWriteMask = void 0;
7110
7306
  (function(ColorWriteMask) {
7111
7307
  ColorWriteMask[ColorWriteMask[/** Do not write to any channel. */ "None"] = 0] = "None";
7112
7308
  ColorWriteMask[ColorWriteMask[/** Write to the red channel. */ "Red"] = 0x1] = "Red";
@@ -7116,6 +7312,10 @@ PointerManager._tempHitResult = new HitResult();
7116
7312
  ColorWriteMask[ColorWriteMask[/** Write to all channel. */ "All"] = 0xf] = "All";
7117
7313
  })(exports.ColorWriteMask || (exports.ColorWriteMask = {}));
7118
7314
 
7315
+ /**
7316
+ * Depth/Stencil comparison function.
7317
+ * @remarks Specifies a function that compares incoming pixel depth/stencil to the current depth/stencil buffer value.
7318
+ */ exports.CompareFunction = void 0;
7119
7319
  (function(CompareFunction) {
7120
7320
  CompareFunction[CompareFunction[/** never pass. */ "Never"] = 0] = "Never";
7121
7321
  CompareFunction[CompareFunction[/** pass if the incoming value is less than the depth/stencil buffer value. */ "Less"] = 1] = "Less";
@@ -7127,12 +7327,19 @@ PointerManager._tempHitResult = new HitResult();
7127
7327
  CompareFunction[CompareFunction[/** always pass. */ "Always"] = 7] = "Always";
7128
7328
  })(exports.CompareFunction || (exports.CompareFunction = {}));
7129
7329
 
7330
+ /**
7331
+ * Culling mode.
7332
+ * @remarks specifies whether or not front- and/or back-facing polygons can be culled.
7333
+ */ exports.CullMode = void 0;
7130
7334
  (function(CullMode) {
7131
7335
  CullMode[CullMode[/** Disable culling. */ "Off"] = 0] = "Off";
7132
7336
  CullMode[CullMode[/** cut the front-face of the polygons. */ "Front"] = 1] = "Front";
7133
7337
  CullMode[CullMode[/** cut the back-face of the polygons. */ "Back"] = 2] = "Back";
7134
7338
  })(exports.CullMode || (exports.CullMode = {}));
7135
7339
 
7340
+ /**
7341
+ * Shader Property type.
7342
+ */ exports.ShaderPropertyType = void 0;
7136
7343
  (function(ShaderPropertyType) {
7137
7344
  ShaderPropertyType[ShaderPropertyType[/** Float type. */ "Float"] = 0] = "Float";
7138
7345
  ShaderPropertyType[ShaderPropertyType[/** Int type. */ "Int"] = 1] = "Int";
@@ -7147,6 +7354,10 @@ PointerManager._tempHitResult = new HitResult();
7147
7354
  ShaderPropertyType[ShaderPropertyType[/** Texture array type. */ "TextureArray"] = 10] = "TextureArray";
7148
7355
  })(exports.ShaderPropertyType || (exports.ShaderPropertyType = {}));
7149
7356
 
7357
+ /**
7358
+ * Stencil operation mode.
7359
+ * @remarks sets the front and/or back-facing stencil test actions.
7360
+ */ exports.StencilOperation = void 0;
7150
7361
  (function(StencilOperation) {
7151
7362
  StencilOperation[StencilOperation[/** Keeps the current value. */ "Keep"] = 0] = "Keep";
7152
7363
  StencilOperation[StencilOperation[/** Sets the stencil buffer value to 0. */ "Zero"] = 1] = "Zero";
@@ -7172,8 +7383,12 @@ PointerManager._tempHitResult = new HitResult();
7172
7383
  }
7173
7384
  this._nameId = nameID;
7174
7385
  };
7175
- /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7176
- ShaderMacro._macroNameCounter = 0;
7386
+ (function() {
7387
+ /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7388
+ })();
7389
+ (function() {
7390
+ ShaderMacro._macroNameCounter = 0;
7391
+ })();
7177
7392
 
7178
7393
  /**
7179
7394
  * Shader macro collection.
@@ -7325,6 +7540,19 @@ ShaderMacro._macroNameCounter = 0;
7325
7540
  return ShaderMacroCollection;
7326
7541
  }();
7327
7542
 
7543
+ function _extends() {
7544
+ _extends = Object.assign || function assign(target) {
7545
+ for (var i = 1; i < arguments.length; i++) {
7546
+ var source = arguments[i];
7547
+ for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
7548
+ }
7549
+
7550
+ return target;
7551
+ };
7552
+
7553
+ return _extends.apply(this, arguments);
7554
+ }
7555
+
7328
7556
  var camera_declare = "#define GLSLIFY 1\nuniform vec3 u_cameraPos;"; // eslint-disable-line
7329
7557
 
7330
7558
  var common = "#define GLSLIFY 1\n#define PI 3.14159265359\n#define RECIPROCAL_PI 0.31830988618\n#define EPSILON 1e-6\n#define LOG2 1.442695\n#define saturate( a ) clamp( a, 0.0, 1.0 )\nfloat pow2(float x){return x*x;}vec4 RGBMToLinear(vec4 value,float maxRange){return vec4(value.rgb*value.a*maxRange,1.0);}vec4 gammaToLinear(vec4 srgbIn){return vec4(pow(srgbIn.rgb,vec3(2.2)),srgbIn.a);}vec4 linearToGamma(vec4 linearIn){return vec4(pow(linearIn.rgb,vec3(1.0/2.2)),linearIn.a);}\n#ifdef GRAPHICS_API_WEBGL2\n#define INVERSE_MAT(mat) inverse(mat)\n#else\nmat2 inverseMat(mat2 m){return mat2(m[1][1],-m[0][1],-m[1][0],m[0][0])/(m[0][0]*m[1][1]-m[0][1]*m[1][0]);}mat3 inverseMat(mat3 m){float a00=m[0][0],a01=m[0][1],a02=m[0][2];float a10=m[1][0],a11=m[1][1],a12=m[1][2];float a20=m[2][0],a21=m[2][1],a22=m[2][2];float b01=a22*a11-a12*a21;float b11=-a22*a10+a12*a20;float b21=a21*a10-a11*a20;float det=a00*b01+a01*b11+a02*b21;return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11),b11,(a22*a00-a02*a20),(-a12*a00+a02*a10),b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det;}mat4 inverseMat(mat4 m){float a00=m[0][0],a01=m[0][1],a02=m[0][2],a03=m[0][3],a10=m[1][0],a11=m[1][1],a12=m[1][2],a13=m[1][3],a20=m[2][0],a21=m[2][1],a22=m[2][2],a23=m[2][3],a30=m[3][0],a31=m[3][1],a32=m[3][2],a33=m[3][3],b00=a00*a11-a01*a10,b01=a00*a12-a02*a10,b02=a00*a13-a03*a10,b03=a01*a12-a02*a11,b04=a01*a13-a03*a11,b05=a02*a13-a03*a12,b06=a20*a31-a21*a30,b07=a20*a32-a22*a30,b08=a20*a33-a23*a30,b09=a21*a32-a22*a31,b10=a21*a33-a23*a31,b11=a22*a33-a23*a32,det=b00*b11-b01*b10+b02*b09+b03*b08-b04*b07+b05*b06;return mat4(a11*b11-a12*b10+a13*b09,a02*b10-a01*b11-a03*b09,a31*b05-a32*b04+a33*b03,a22*b04-a21*b05-a23*b03,a12*b08-a10*b11-a13*b07,a00*b11-a02*b08+a03*b07,a32*b02-a30*b05-a33*b01,a20*b05-a22*b02+a23*b01,a10*b10-a11*b08+a13*b06,a01*b08-a00*b10-a03*b06,a30*b04-a31*b02+a33*b00,a21*b02-a20*b04-a23*b00,a11*b07-a10*b09-a12*b06,a00*b09-a01*b07+a02*b06,a31*b01-a30*b03-a32*b00,a20*b03-a21*b01+a22*b00)/det;}\n#define INVERSE_MAT(mat) inverseMat(mat)\n#endif\n"; // eslint-disable-line
@@ -7434,7 +7662,7 @@ var PBRShaderLib = {
7434
7662
 
7435
7663
  var ShadowCoord = "#define GLSLIFY 1\nuniform mat4 u_shadowMatrices[CASCADED_COUNT+1];uniform vec4 u_shadowSplitSpheres[4];mediump int computeCascadeIndex(vec3 positionWS){vec3 fromCenter0=positionWS-u_shadowSplitSpheres[0].xyz;vec3 fromCenter1=positionWS-u_shadowSplitSpheres[1].xyz;vec3 fromCenter2=positionWS-u_shadowSplitSpheres[2].xyz;vec3 fromCenter3=positionWS-u_shadowSplitSpheres[3].xyz;mediump vec4 comparison=vec4(dot(fromCenter0,fromCenter0)<u_shadowSplitSpheres[0].w,dot(fromCenter1,fromCenter1)<u_shadowSplitSpheres[1].w,dot(fromCenter2,fromCenter2)<u_shadowSplitSpheres[2].w,dot(fromCenter3,fromCenter3)<u_shadowSplitSpheres[3].w);comparison.yzw=clamp(comparison.yzw-comparison.xyz,0.0,1.0);mediump vec4 indexCoefficient=vec4(4.0,3.0,2.0,1.0);mediump int index=4-int(dot(comparison,indexCoefficient));return index;}vec3 getShadowCoord(){\n#if CASCADED_COUNT == 1\nmediump int cascadeIndex=0;\n#else\nmediump int cascadeIndex=computeCascadeIndex(v_pos);\n#endif\n#ifdef GRAPHICS_API_WEBGL2\nmat4 shadowMatrix=u_shadowMatrices[cascadeIndex];\n#else\nmat4 shadowMatrix;\n#if CASCADED_COUNT == 4\nif(cascadeIndex==0){shadowMatrix=u_shadowMatrices[0];}else if(cascadeIndex==1){shadowMatrix=u_shadowMatrices[1];}else if(cascadeIndex==2){shadowMatrix=u_shadowMatrices[2];}else if(cascadeIndex==3){shadowMatrix=u_shadowMatrices[3];}else{shadowMatrix=u_shadowMatrices[4];}\n#endif\n#if CASCADED_COUNT == 2\nif(cascadeIndex==0){shadowMatrix=u_shadowMatrices[0];}else if(cascadeIndex==1){shadowMatrix=u_shadowMatrices[1];}else{shadowMatrix=u_shadowMatrices[2];}\n#endif\n#if CASCADED_COUNT == 1\nif(cascadeIndex==0){shadowMatrix=u_shadowMatrices[0];}else{shadowMatrix=u_shadowMatrices[1];}\n#endif\n#endif\nvec4 shadowCoord=shadowMatrix*vec4(v_pos,1.0);return shadowCoord.xyz;}"; // eslint-disable-line
7436
7664
 
7437
- var ShadowFragmentDeclaration = "#define GLSLIFY 1\n#if defined(SHADOW_TYPE) && defined(OASIS_RECEIVE_SHADOWS)\n#define OASIS_CALCULATE_SHADOWS\n#endif\n#ifdef OASIS_CALCULATE_SHADOWS\n#if CASCADED_COUNT == 1\nvarying vec3 v_shadowCoord;\n#else\n#include <ShadowCoord>\n#endif\nuniform vec3 u_shadowInfo;uniform vec4 u_shadowMapSize;\n#ifdef GRAPHICS_API_WEBGL2\nuniform mediump sampler2DShadow u_shadowMap;\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) textureLod(textureName, coord3 , 0.0)\n#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2DShadow shadowMap\n#else\nuniform sampler2D u_shadowMap;\n#ifdef OASIS_NO_DEPTH_TEXTURE\nconst vec4 bitShift=vec4(1.0,1.0/256.0,1.0/(256.0*256.0),1.0/(256.0*256.0*256.0));/***Unpack depth value.*/float unpack(const in vec4 rgbaDepth){return dot(rgbaDepth,bitShift);}\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) (unpack(texture2D(textureName, coord3.xy)) < coord3.z ? 0.0 : 1.0)\n#else\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) (texture2D(textureName, coord3.xy).r < coord3.z ? 0.0 : 1.0)\n#endif\n#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2D shadowMap\n#endif\n#if SHADOW_TYPE == 2\nfloat sampleShadowMapFiltered4(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowMapSize){float attenuation;vec4 attenuation4;vec2 offset=shadowMapSize.xy/2.0;vec3 shadowCoord0=shadowCoord+vec3(-offset,0.0);vec3 shadowCoord1=shadowCoord+vec3(offset.x,-offset.y,0.0);vec3 shadowCoord2=shadowCoord+vec3(-offset.x,offset.y,0.0);vec3 shadowCoord3=shadowCoord+vec3(offset,0.0);attenuation4.x=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord0);attenuation4.y=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord1);attenuation4.z=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord2);attenuation4.w=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord3);attenuation=dot(attenuation4,vec4(0.25));return attenuation;}\n#endif\n#if SHADOW_TYPE == 3\n#include <shadow_sample_tent>\nfloat sampleShadowMapFiltered9(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowmapSize){float attenuation;float fetchesWeights[9];vec2 fetchesUV[9];sampleShadowComputeSamplesTent5x5(shadowmapSize,shadowCoord.xy,fetchesWeights,fetchesUV);attenuation=fetchesWeights[0]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[0].xy,shadowCoord.z));attenuation+=fetchesWeights[1]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[1].xy,shadowCoord.z));attenuation+=fetchesWeights[2]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[2].xy,shadowCoord.z));attenuation+=fetchesWeights[3]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[3].xy,shadowCoord.z));attenuation+=fetchesWeights[4]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[4].xy,shadowCoord.z));attenuation+=fetchesWeights[5]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[5].xy,shadowCoord.z));attenuation+=fetchesWeights[6]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[6].xy,shadowCoord.z));attenuation+=fetchesWeights[7]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[7].xy,shadowCoord.z));attenuation+=fetchesWeights[8]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[8].xy,shadowCoord.z));return attenuation;}\n#endif\nfloat sampleShadowMap(){\n#if CASCADED_COUNT == 1\nvec3 shadowCoord=v_shadowCoord;\n#else\nvec3 shadowCoord=getShadowCoord();\n#endif\nfloat attenuation=1.0;if(shadowCoord.z>0.0&&shadowCoord.z<1.0){\n#if SHADOW_TYPE == 1\nattenuation=SAMPLE_TEXTURE2D_SHADOW(u_shadowMap,shadowCoord);\n#endif\n#if SHADOW_TYPE == 2\nattenuation=sampleShadowMapFiltered4(u_shadowMap,shadowCoord,u_shadowMapSize);\n#endif\n#if SHADOW_TYPE == 3\nattenuation=sampleShadowMapFiltered9(u_shadowMap,shadowCoord,u_shadowMapSize);\n#endif\nattenuation=mix(1.0,attenuation,u_shadowInfo.x);}return attenuation;}\n#endif\n"; // eslint-disable-line
7665
+ var ShadowFragmentDeclaration = "#define GLSLIFY 1\n#if defined(SHADOW_TYPE) && defined(OASIS_RECEIVE_SHADOWS)\n#define OASIS_CALCULATE_SHADOWS\n#endif\n#ifdef OASIS_CALCULATE_SHADOWS\n#if CASCADED_COUNT == 1\nvarying vec3 v_shadowCoord;\n#else\n#include <ShadowCoord>\n#endif\nuniform vec3 u_shadowInfo;uniform vec4 u_shadowMapSize;\n#ifdef GRAPHICS_API_WEBGL2\nuniform mediump sampler2DShadow u_shadowMap;\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) textureLod(textureName, coord3 , 0.0)\n#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2DShadow shadowMap\n#else\nuniform sampler2D u_shadowMap;\n#ifdef OASIS_NO_DEPTH_TEXTURE\nconst vec4 bitShift=vec4(1.0,1.0/256.0,1.0/(256.0*256.0),1.0/(256.0*256.0*256.0));float unpack(const in vec4 rgbaDepth){return dot(rgbaDepth,bitShift);}\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) (unpack(texture2D(textureName, coord3.xy)) < coord3.z ? 0.0 : 1.0)\n#else\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) (texture2D(textureName, coord3.xy).r < coord3.z ? 0.0 : 1.0)\n#endif\n#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2D shadowMap\n#endif\n#if SHADOW_TYPE == 2\nfloat sampleShadowMapFiltered4(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowMapSize){float attenuation;vec4 attenuation4;vec2 offset=shadowMapSize.xy/2.0;vec3 shadowCoord0=shadowCoord+vec3(-offset,0.0);vec3 shadowCoord1=shadowCoord+vec3(offset.x,-offset.y,0.0);vec3 shadowCoord2=shadowCoord+vec3(-offset.x,offset.y,0.0);vec3 shadowCoord3=shadowCoord+vec3(offset,0.0);attenuation4.x=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord0);attenuation4.y=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord1);attenuation4.z=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord2);attenuation4.w=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord3);attenuation=dot(attenuation4,vec4(0.25));return attenuation;}\n#endif\n#if SHADOW_TYPE == 3\n#include <shadow_sample_tent>\nfloat sampleShadowMapFiltered9(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowmapSize){float attenuation;float fetchesWeights[9];vec2 fetchesUV[9];sampleShadowComputeSamplesTent5x5(shadowmapSize,shadowCoord.xy,fetchesWeights,fetchesUV);attenuation=fetchesWeights[0]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[0].xy,shadowCoord.z));attenuation+=fetchesWeights[1]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[1].xy,shadowCoord.z));attenuation+=fetchesWeights[2]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[2].xy,shadowCoord.z));attenuation+=fetchesWeights[3]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[3].xy,shadowCoord.z));attenuation+=fetchesWeights[4]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[4].xy,shadowCoord.z));attenuation+=fetchesWeights[5]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[5].xy,shadowCoord.z));attenuation+=fetchesWeights[6]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[6].xy,shadowCoord.z));attenuation+=fetchesWeights[7]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[7].xy,shadowCoord.z));attenuation+=fetchesWeights[8]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[8].xy,shadowCoord.z));return attenuation;}\n#endif\nfloat sampleShadowMap(){\n#if CASCADED_COUNT == 1\nvec3 shadowCoord=v_shadowCoord;\n#else\nvec3 shadowCoord=getShadowCoord();\n#endif\nfloat attenuation=1.0;if(shadowCoord.z>0.0&&shadowCoord.z<1.0){\n#if SHADOW_TYPE == 1\nattenuation=SAMPLE_TEXTURE2D_SHADOW(u_shadowMap,shadowCoord);\n#endif\n#if SHADOW_TYPE == 2\nattenuation=sampleShadowMapFiltered4(u_shadowMap,shadowCoord,u_shadowMapSize);\n#endif\n#if SHADOW_TYPE == 3\nattenuation=sampleShadowMapFiltered9(u_shadowMap,shadowCoord,u_shadowMapSize);\n#endif\nattenuation=mix(1.0,attenuation,u_shadowInfo.x);}return attenuation;}\n#endif\n"; // eslint-disable-line
7438
7666
 
7439
7667
  var shadow_sample_tent = "#define GLSLIFY 1\nfloat sampleShadowGetIRTriangleTexelArea(float triangleHeight){return triangleHeight-0.5;}void sampleShadowGetTexelAreasTent3x3(float offset,out vec4 computedArea,out vec4 computedAreaUncut){float a=offset+0.5;float offsetSquaredHalved=a*a*0.5;computedAreaUncut.x=computedArea.x=offsetSquaredHalved-offset;computedAreaUncut.w=computedArea.w=offsetSquaredHalved;computedAreaUncut.y=sampleShadowGetIRTriangleTexelArea(1.5-offset);float clampedOffsetLeft=min(offset,0.0);float areaOfSmallLeftTriangle=clampedOffsetLeft*clampedOffsetLeft;computedArea.y=computedAreaUncut.y-areaOfSmallLeftTriangle;computedAreaUncut.z=sampleShadowGetIRTriangleTexelArea(1.5+offset);float clampedOffsetRight=max(offset,0.0);float areaOfSmallRightTriangle=clampedOffsetRight*clampedOffsetRight;computedArea.z=computedAreaUncut.z-areaOfSmallRightTriangle;}void sampleShadowGetTexelWeightsTent5x5(float offset,out vec3 texelsWeightsA,out vec3 texelsWeightsB){vec4 areaFrom3texelTriangle;vec4 areaUncutFrom3texelTriangle;sampleShadowGetTexelAreasTent3x3(offset,areaFrom3texelTriangle,areaUncutFrom3texelTriangle);texelsWeightsA.x=0.16*(areaFrom3texelTriangle.x);texelsWeightsA.y=0.16*(areaUncutFrom3texelTriangle.y);texelsWeightsA.z=0.16*(areaFrom3texelTriangle.y+1.0);texelsWeightsB.x=0.16*(areaFrom3texelTriangle.z+1.0);texelsWeightsB.y=0.16*(areaUncutFrom3texelTriangle.z);texelsWeightsB.z=0.16*(areaFrom3texelTriangle.w);}void sampleShadowComputeSamplesTent5x5(vec4 shadowMapTextureTexelSize,vec2 coord,out float fetchesWeights[9],out vec2 fetchesUV[9]){vec2 tentCenterInTexelSpace=coord.xy*shadowMapTextureTexelSize.zw;vec2 centerOfFetchesInTexelSpace=floor(tentCenterInTexelSpace+0.5);vec2 offsetFromTentCenterToCenterOfFetches=tentCenterInTexelSpace-centerOfFetchesInTexelSpace;vec3 texelsWeightsUA,texelsWeightsUB;vec3 texelsWeightsVA,texelsWeightsVB;sampleShadowGetTexelWeightsTent5x5(offsetFromTentCenterToCenterOfFetches.x,texelsWeightsUA,texelsWeightsUB);sampleShadowGetTexelWeightsTent5x5(offsetFromTentCenterToCenterOfFetches.y,texelsWeightsVA,texelsWeightsVB);vec3 fetchesWeightsU=vec3(texelsWeightsUA.xz,texelsWeightsUB.y)+vec3(texelsWeightsUA.y,texelsWeightsUB.xz);vec3 fetchesWeightsV=vec3(texelsWeightsVA.xz,texelsWeightsVB.y)+vec3(texelsWeightsVA.y,texelsWeightsVB.xz);vec3 fetchesOffsetsU=vec3(texelsWeightsUA.y,texelsWeightsUB.xz)/fetchesWeightsU.xyz+vec3(-2.5,-0.5,1.5);vec3 fetchesOffsetsV=vec3(texelsWeightsVA.y,texelsWeightsVB.xz)/fetchesWeightsV.xyz+vec3(-2.5,-0.5,1.5);fetchesOffsetsU*=shadowMapTextureTexelSize.xxx;fetchesOffsetsV*=shadowMapTextureTexelSize.yyy;vec2 bilinearFetchOrigin=centerOfFetchesInTexelSpace*shadowMapTextureTexelSize.xy;fetchesUV[0]=bilinearFetchOrigin+vec2(fetchesOffsetsU.x,fetchesOffsetsV.x);fetchesUV[1]=bilinearFetchOrigin+vec2(fetchesOffsetsU.y,fetchesOffsetsV.x);fetchesUV[2]=bilinearFetchOrigin+vec2(fetchesOffsetsU.z,fetchesOffsetsV.x);fetchesUV[3]=bilinearFetchOrigin+vec2(fetchesOffsetsU.x,fetchesOffsetsV.y);fetchesUV[4]=bilinearFetchOrigin+vec2(fetchesOffsetsU.y,fetchesOffsetsV.y);fetchesUV[5]=bilinearFetchOrigin+vec2(fetchesOffsetsU.z,fetchesOffsetsV.y);fetchesUV[6]=bilinearFetchOrigin+vec2(fetchesOffsetsU.x,fetchesOffsetsV.z);fetchesUV[7]=bilinearFetchOrigin+vec2(fetchesOffsetsU.y,fetchesOffsetsV.z);fetchesUV[8]=bilinearFetchOrigin+vec2(fetchesOffsetsU.z,fetchesOffsetsV.z);fetchesWeights[0]=fetchesWeightsU.x*fetchesWeightsV.x;fetchesWeights[1]=fetchesWeightsU.y*fetchesWeightsV.x;fetchesWeights[2]=fetchesWeightsU.z*fetchesWeightsV.x;fetchesWeights[3]=fetchesWeightsU.x*fetchesWeightsV.y;fetchesWeights[4]=fetchesWeightsU.y*fetchesWeightsV.y;fetchesWeights[5]=fetchesWeightsU.z*fetchesWeightsV.y;fetchesWeights[6]=fetchesWeightsU.x*fetchesWeightsV.z;fetchesWeights[7]=fetchesWeightsU.y*fetchesWeightsV.z;fetchesWeights[8]=fetchesWeightsU.z*fetchesWeightsV.z;}"; // eslint-disable-line
7440
7668
 
@@ -7452,7 +7680,7 @@ var ShadowLib = {
7452
7680
 
7453
7681
  var normal_get = "#define GLSLIFY 1\nvec3 getNormal(bool isFrontFacing){\n#ifdef O3_HAS_NORMAL\nvec3 normal=normalize(v_normal);\n#elif defined(HAS_DERIVATIVES)\nvec3 pos_dx=dFdx(v_pos);vec3 pos_dy=dFdy(v_pos);vec3 normal=normalize(cross(pos_dx,pos_dy));\n#else\nvec3 normal=vec3(0,0,1);\n#endif\nnormal*=float(isFrontFacing)*2.0-1.0;return normal;}vec3 getNormalByNormalTexture(mat3 tbn,sampler2D normalTexture,float normalIntensity,vec2 uv,bool isFrontFacing){vec3 normal=texture2D(normalTexture,uv).rgb;normal=normalize(tbn*((2.0*normal-1.0)*vec3(normalIntensity,normalIntensity,1.0)));normal*=float(isFrontFacing)*2.0-1.0;return normal;}mat3 getTBN(bool isFrontFacing){\n#if defined(O3_HAS_NORMAL) && defined(O3_HAS_TANGENT) && ( defined(NORMALTEXTURE) || defined(HAS_CLEARCOATNORMALTEXTURE) )\nmat3 tbn=v_TBN;\n#else\nvec3 normal=getNormal(isFrontFacing);vec3 position=v_pos;vec2 uv=isFrontFacing? v_uv:-v_uv;\n#ifdef HAS_DERIVATIVES\nvec3 dp1=dFdx(position);vec3 dp2=dFdy(position);vec2 duv1=dFdx(uv);vec2 duv2=dFdy(uv);vec3 dp2perp=cross(dp2,normal);vec3 dp1perp=cross(normal,dp1);vec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;vec3 binormal=dp2perp*duv1.y+dp1perp*duv2.y;float invmax=inversesqrt(max(dot(tangent,tangent),dot(binormal,binormal)));mat3 tbn=mat3(tangent*invmax,binormal*invmax,normal);\n#else\nmat3 tbn=mat3(vec3(0.0),vec3(0.0),normal);\n#endif\n#endif\nreturn tbn;}"; // eslint-disable-line
7454
7682
 
7455
- var ShaderLib = _extends__default['default']({
7683
+ var ShaderLib = _extends({
7456
7684
  common: common,
7457
7685
  common_vert: common_vert,
7458
7686
  transform_declare: transform_declare,
@@ -8164,7 +8392,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8164
8392
  return prefix + line;
8165
8393
  }).join("\n");
8166
8394
  };
8167
- _create_class__default['default'](ShaderProgram, [
8395
+ _create_class(ShaderProgram, [
8168
8396
  {
8169
8397
  key: "isValid",
8170
8398
  get: /**
@@ -8176,7 +8404,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
8176
8404
  ]);
8177
8405
  return ShaderProgram;
8178
8406
  }();
8179
- ShaderProgram._counter = 0;
8407
+ (function() {
8408
+ ShaderProgram._counter = 0;
8409
+ })();
8180
8410
 
8181
8411
  /**
8182
8412
  * Shader pass containing vertex and fragment source.
@@ -8221,7 +8451,9 @@ ShaderProgram._counter = 0;
8221
8451
  };
8222
8452
  return ShaderPass;
8223
8453
  }();
8224
- ShaderPass._shaderPassCounter = 0;
8454
+ (function() {
8455
+ ShaderPass._shaderPassCounter = 0;
8456
+ })();
8225
8457
 
8226
8458
  /**
8227
8459
  * Shader property.
@@ -8230,7 +8462,7 @@ ShaderPass._shaderPassCounter = 0;
8230
8462
  this.name = name;
8231
8463
  this._uniqueId = ShaderProperty._propertyNameCounter++;
8232
8464
  }
8233
- _create_class__default['default'](ShaderProperty, [
8465
+ _create_class(ShaderProperty, [
8234
8466
  {
8235
8467
  key: "type",
8236
8468
  get: /**
@@ -8242,7 +8474,9 @@ ShaderPass._shaderPassCounter = 0;
8242
8474
  ]);
8243
8475
  return ShaderProperty;
8244
8476
  }();
8245
- ShaderProperty._propertyNameCounter = 0;
8477
+ (function() {
8478
+ ShaderProperty._propertyNameCounter = 0;
8479
+ })();
8246
8480
 
8247
8481
  /**
8248
8482
  * Shader for rendering.
@@ -8355,7 +8589,7 @@ ShaderProperty._propertyNameCounter = 0;
8355
8589
  }
8356
8590
  }
8357
8591
  };
8358
- _create_class__default['default'](Shader, [
8592
+ _create_class(Shader, [
8359
8593
  {
8360
8594
  key: "passes",
8361
8595
  get: /**
@@ -8367,18 +8601,34 @@ ShaderProperty._propertyNameCounter = 0;
8367
8601
  ]);
8368
8602
  return Shader;
8369
8603
  }();
8370
- /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8371
- /** @internal */ Shader._shaderExtension = [
8372
- "GL_EXT_shader_texture_lod",
8373
- "GL_OES_standard_derivatives",
8374
- "GL_EXT_draw_buffers"
8375
- ];
8376
- /** @internal */ Shader._propertyIdMap = Object.create(null);
8377
- Shader._shaderMap = Object.create(null);
8378
- Shader._propertyNameMap = Object.create(null);
8379
- Shader._macroMaskMap = [];
8380
- Shader._macroCounter = 0;
8381
- Shader._macroMap = Object.create(null);
8604
+ (function() {
8605
+ /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8606
+ })();
8607
+ (function() {
8608
+ /** @internal */ Shader._shaderExtension = [
8609
+ "GL_EXT_shader_texture_lod",
8610
+ "GL_OES_standard_derivatives",
8611
+ "GL_EXT_draw_buffers"
8612
+ ];
8613
+ })();
8614
+ (function() {
8615
+ /** @internal */ Shader._propertyIdMap = Object.create(null);
8616
+ })();
8617
+ (function() {
8618
+ Shader._shaderMap = Object.create(null);
8619
+ })();
8620
+ (function() {
8621
+ Shader._propertyNameMap = Object.create(null);
8622
+ })();
8623
+ (function() {
8624
+ Shader._macroMaskMap = [];
8625
+ })();
8626
+ (function() {
8627
+ Shader._macroCounter = 0;
8628
+ })();
8629
+ (function() {
8630
+ Shader._macroMap = Object.create(null);
8631
+ })();
8382
8632
 
8383
8633
  /**
8384
8634
  * Shader data collection,Correspondence includes shader properties data and macros data.
@@ -8560,10 +8810,10 @@ Shader._macroMap = Object.create(null);
8560
8810
  if (property != null) {
8561
8811
  if (typeof property === "number") {
8562
8812
  targetPropertyValueMap[k] = property;
8563
- } else if (_instanceof__default['default'](property, Texture)) {
8813
+ } else if (_instanceof(property, Texture)) {
8564
8814
  targetPropertyValueMap[k] = property;
8565
8815
  referCount > 0 && property._addRefCount(referCount);
8566
- } else if (_instanceof__default['default'](property, Array) || _instanceof__default['default'](property, Float32Array) || _instanceof__default['default'](property, Int32Array)) {
8816
+ } else if (_instanceof(property, Array) || _instanceof(property, Float32Array) || _instanceof(property, Int32Array)) {
8567
8817
  targetPropertyValueMap[k] = property.slice();
8568
8818
  } else {
8569
8819
  var targetProperty = targetPropertyValueMap[k];
@@ -8613,7 +8863,7 @@ Shader._macroMap = Object.create(null);
8613
8863
  for(var k in properties){
8614
8864
  var property = properties[k];
8615
8865
  // @todo: Separate array to speed performance.
8616
- if (property && _instanceof__default['default'](property, Texture)) {
8866
+ if (property && _instanceof(property, Texture)) {
8617
8867
  property._addRefCount(value);
8618
8868
  }
8619
8869
  }
@@ -8624,7 +8874,7 @@ Shader._macroMap = Object.create(null);
8624
8874
  /**
8625
8875
  * Light base class.
8626
8876
  */ var Light = /*#__PURE__*/ function(Component) {
8627
- _inherits__default['default'](Light, Component);
8877
+ _inherits(Light, Component);
8628
8878
  function Light() {
8629
8879
  var _this;
8630
8880
  _this = Component.apply(this, arguments) || this;
@@ -8638,9 +8888,9 @@ Shader._macroMap = Object.create(null);
8638
8888
  /** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
8639
8889
  /** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
8640
8890
  /** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
8891
+ /** @internal */ _this._lightIndex = -1;
8641
8892
  _this._color = new miniprogram.Color(1, 1, 1, 1);
8642
8893
  _this._lightColor = new miniprogram.Color();
8643
- /** @internal */ _this._lightIndex = -1;
8644
8894
  return _this;
8645
8895
  }
8646
8896
  var _proto = Light.prototype;
@@ -8651,7 +8901,7 @@ Shader._macroMap = Object.create(null);
8651
8901
  this._lightColor.a = this.color.a * this.intensity;
8652
8902
  return this._lightColor;
8653
8903
  };
8654
- _create_class__default['default'](Light, [
8904
+ _create_class(Light, [
8655
8905
  {
8656
8906
  key: "color",
8657
8907
  get: /**
@@ -8688,17 +8938,19 @@ Shader._macroMap = Object.create(null);
8688
8938
  ]);
8689
8939
  return Light;
8690
8940
  }(Component);
8691
- /**
8941
+ (function() {
8942
+ /**
8692
8943
  * Each type of light source is at most 10, beyond which it will not take effect.
8693
8944
  * */ Light._maxLight = 10;
8694
- _ts_decorate__default['default']([
8945
+ })();
8946
+ __decorate([
8695
8947
  ignoreClone
8696
8948
  ], Light.prototype, "_lightIndex", void 0);
8697
8949
 
8698
8950
  /**
8699
8951
  * Directional light.
8700
8952
  */ var DirectLight = /*#__PURE__*/ function(Light) {
8701
- _inherits__default['default'](DirectLight, Light);
8953
+ _inherits(DirectLight, Light);
8702
8954
  function DirectLight() {
8703
8955
  var _this;
8704
8956
  _this = Light.apply(this, arguments) || this;
@@ -8748,7 +9000,7 @@ _ts_decorate__default['default']([
8748
9000
  shaderData.setFloatArray(DirectLight._colorProperty, data.color);
8749
9001
  shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
8750
9002
  };
8751
- _create_class__default['default'](DirectLight, [
9003
+ _create_class(DirectLight, [
8752
9004
  {
8753
9005
  key: "direction",
8754
9006
  get: /**
@@ -8779,19 +9031,27 @@ _ts_decorate__default['default']([
8779
9031
  ]);
8780
9032
  return DirectLight;
8781
9033
  }(Light);
8782
- DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8783
- DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8784
- DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8785
- DirectLight._combinedData = {
8786
- cullingMask: new Int32Array(Light._maxLight * 2),
8787
- color: new Float32Array(Light._maxLight * 3),
8788
- direction: new Float32Array(Light._maxLight * 3)
8789
- };
9034
+ (function() {
9035
+ DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
9036
+ })();
9037
+ (function() {
9038
+ DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
9039
+ })();
9040
+ (function() {
9041
+ DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
9042
+ })();
9043
+ (function() {
9044
+ DirectLight._combinedData = {
9045
+ cullingMask: new Int32Array(Light._maxLight * 2),
9046
+ color: new Float32Array(Light._maxLight * 3),
9047
+ direction: new Float32Array(Light._maxLight * 3)
9048
+ };
9049
+ })();
8790
9050
 
8791
9051
  /**
8792
9052
  * Point light.
8793
9053
  */ var PointLight = /*#__PURE__*/ function(Light) {
8794
- _inherits__default['default'](PointLight, Light);
9054
+ _inherits(PointLight, Light);
8795
9055
  function PointLight() {
8796
9056
  var _this;
8797
9057
  _this = Light.apply(this, arguments) || this;
@@ -8843,7 +9103,7 @@ DirectLight._combinedData = {
8843
9103
  shaderData.setFloatArray(PointLight._positionProperty, data.position);
8844
9104
  shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
8845
9105
  };
8846
- _create_class__default['default'](PointLight, [
9106
+ _create_class(PointLight, [
8847
9107
  {
8848
9108
  key: "position",
8849
9109
  get: /**
@@ -8864,21 +9124,31 @@ DirectLight._combinedData = {
8864
9124
  ]);
8865
9125
  return PointLight;
8866
9126
  }(Light);
8867
- PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
8868
- PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
8869
- PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
8870
- PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
8871
- PointLight._combinedData = {
8872
- cullingMask: new Int32Array(Light._maxLight * 2),
8873
- color: new Float32Array(Light._maxLight * 3),
8874
- position: new Float32Array(Light._maxLight * 3),
8875
- distance: new Float32Array(Light._maxLight)
8876
- };
9127
+ (function() {
9128
+ PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
9129
+ })();
9130
+ (function() {
9131
+ PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
9132
+ })();
9133
+ (function() {
9134
+ PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9135
+ })();
9136
+ (function() {
9137
+ PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9138
+ })();
9139
+ (function() {
9140
+ PointLight._combinedData = {
9141
+ cullingMask: new Int32Array(Light._maxLight * 2),
9142
+ color: new Float32Array(Light._maxLight * 3),
9143
+ position: new Float32Array(Light._maxLight * 3),
9144
+ distance: new Float32Array(Light._maxLight)
9145
+ };
9146
+ })();
8877
9147
 
8878
9148
  /**
8879
9149
  * Spot light.
8880
9150
  */ var SpotLight = /*#__PURE__*/ function(Light) {
8881
- _inherits__default['default'](SpotLight, Light);
9151
+ _inherits(SpotLight, Light);
8882
9152
  function SpotLight() {
8883
9153
  var _this;
8884
9154
  _this = Light.apply(this, arguments) || this;
@@ -8947,7 +9217,7 @@ PointLight._combinedData = {
8947
9217
  shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
8948
9218
  shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
8949
9219
  };
8950
- _create_class__default['default'](SpotLight, [
9220
+ _create_class(SpotLight, [
8951
9221
  {
8952
9222
  key: "position",
8953
9223
  get: /**
@@ -8989,22 +9259,38 @@ PointLight._combinedData = {
8989
9259
  ]);
8990
9260
  return SpotLight;
8991
9261
  }(Light);
8992
- SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
8993
- SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
8994
- SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
8995
- SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
8996
- SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
8997
- SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
8998
- SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
8999
- SpotLight._combinedData = {
9000
- cullingMask: new Int32Array(Light._maxLight * 2),
9001
- color: new Float32Array(Light._maxLight * 3),
9002
- position: new Float32Array(Light._maxLight * 3),
9003
- direction: new Float32Array(Light._maxLight * 3),
9004
- distance: new Float32Array(Light._maxLight),
9005
- angleCos: new Float32Array(Light._maxLight),
9006
- penumbraCos: new Float32Array(Light._maxLight)
9007
- };
9262
+ (function() {
9263
+ SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9264
+ })();
9265
+ (function() {
9266
+ SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9267
+ })();
9268
+ (function() {
9269
+ SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9270
+ })();
9271
+ (function() {
9272
+ SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9273
+ })();
9274
+ (function() {
9275
+ SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9276
+ })();
9277
+ (function() {
9278
+ SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9279
+ })();
9280
+ (function() {
9281
+ SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9282
+ })();
9283
+ (function() {
9284
+ SpotLight._combinedData = {
9285
+ cullingMask: new Int32Array(Light._maxLight * 2),
9286
+ color: new Float32Array(Light._maxLight * 3),
9287
+ position: new Float32Array(Light._maxLight * 3),
9288
+ direction: new Float32Array(Light._maxLight * 3),
9289
+ distance: new Float32Array(Light._maxLight),
9290
+ angleCos: new Float32Array(Light._maxLight),
9291
+ penumbraCos: new Float32Array(Light._maxLight)
9292
+ };
9293
+ })();
9008
9294
 
9009
9295
  /**
9010
9296
  * Light manager.
@@ -9526,7 +9812,7 @@ SpotLight._combinedData = {
9526
9812
  /**
9527
9813
  * Material.
9528
9814
  */ var Material = /*#__PURE__*/ function(RefObject) {
9529
- _inherits__default['default'](Material, RefObject);
9815
+ _inherits(Material, RefObject);
9530
9816
  function Material(engine, shader) {
9531
9817
  var _this;
9532
9818
  _this = RefObject.call(this, engine) || this;
@@ -9570,7 +9856,7 @@ SpotLight._combinedData = {
9570
9856
  this._renderStates.length = 0;
9571
9857
  this._renderStates = null;
9572
9858
  };
9573
- _create_class__default['default'](Material, [
9859
+ _create_class(Material, [
9574
9860
  {
9575
9861
  key: "shaderData",
9576
9862
  get: /**
@@ -9662,7 +9948,7 @@ var RenderElement = function RenderElement() {
9662
9948
  /**
9663
9949
  * Render element.
9664
9950
  */ var MeshRenderElement = /*#__PURE__*/ function(RenderElement) {
9665
- _inherits__default['default'](MeshRenderElement, RenderElement);
9951
+ _inherits(MeshRenderElement, RenderElement);
9666
9952
  function MeshRenderElement() {
9667
9953
  return RenderElement.apply(this, arguments);
9668
9954
  }
@@ -9696,12 +9982,18 @@ var RenderElement = function RenderElement() {
9696
9982
  };
9697
9983
  return RenderContext;
9698
9984
  }();
9699
- /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9700
- RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9701
- RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9985
+ (function() {
9986
+ /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9987
+ })();
9988
+ (function() {
9989
+ RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9990
+ })();
9991
+ (function() {
9992
+ RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9993
+ })();
9702
9994
 
9703
9995
  var SpriteElement = /*#__PURE__*/ function(RenderElement) {
9704
- _inherits__default['default'](SpriteElement, RenderElement);
9996
+ _inherits(SpriteElement, RenderElement);
9705
9997
  function SpriteElement() {
9706
9998
  var _this;
9707
9999
  _this = RenderElement.call(this) || this;
@@ -9724,7 +10016,7 @@ var SpriteElement = /*#__PURE__*/ function(RenderElement) {
9724
10016
  }(RenderElement);
9725
10017
 
9726
10018
  var SpriteMaskElement = /*#__PURE__*/ function(RenderElement) {
9727
- _inherits__default['default'](SpriteMaskElement, RenderElement);
10019
+ _inherits(SpriteMaskElement, RenderElement);
9728
10020
  function SpriteMaskElement() {
9729
10021
  var _this;
9730
10022
  _this = RenderElement.call(this) || this;
@@ -9744,6 +10036,9 @@ var SpriteMaskElement = /*#__PURE__*/ function(RenderElement) {
9744
10036
  return SpriteMaskElement;
9745
10037
  }(RenderElement);
9746
10038
 
10039
+ /**
10040
+ * Sprite mask interaction.
10041
+ */ exports.SpriteMaskInteraction = void 0;
9747
10042
  (function(SpriteMaskInteraction) {
9748
10043
  SpriteMaskInteraction[SpriteMaskInteraction[/** The sprite will not interact with the masking system. */ "None"] = 0] = "None";
9749
10044
  SpriteMaskInteraction[SpriteMaskInteraction[/** The sprite will be visible only in areas where a mask is present. */ "VisibleInsideMask"] = 1] = "VisibleInsideMask";
@@ -9752,11 +10047,10 @@ var SpriteMaskElement = /*#__PURE__*/ function(RenderElement) {
9752
10047
 
9753
10048
  var _Renderer;
9754
10049
  exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9755
- _inherits__default['default'](Renderer1, Component);
10050
+ _inherits(Renderer1, Component);
9756
10051
  function Renderer1(entity) {
9757
10052
  var _this;
9758
10053
  _this = Component.call(this, entity) || this;
9759
- /** Whether cast shadow. */ _this.castShadows = true;
9760
10054
  /** @internal */ _this._onUpdateIndex = -1;
9761
10055
  /** @internal */ _this._rendererIndex = -1;
9762
10056
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
@@ -9773,11 +10067,12 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9773
10067
  _this._priority = 0;
9774
10068
  _this._receiveShadows = true;
9775
10069
  _this._rendererLayer = new miniprogram.Vector4();
10070
+ /** Whether cast shadow. */ _this.castShadows = true;
9776
10071
  var prototype = exports.Renderer.prototype;
9777
10072
  var shaderData = _this.shaderData;
9778
10073
  _this._overrideUpdate = _this.update !== prototype.update;
9779
10074
  shaderData._addRefCount(1);
9780
- _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized__default['default'](_this));
10075
+ _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
9781
10076
  _this._registerEntityTransformListener();
9782
10077
  shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
9783
10078
  shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
@@ -9981,7 +10276,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9981
10276
  _proto._onTransformChanged = function _onTransformChanged(type) {
9982
10277
  this._dirtyUpdateFlag |= 0x1;
9983
10278
  };
9984
- _create_class__default['default'](Renderer1, [
10279
+ _create_class(Renderer1, [
9985
10280
  {
9986
10281
  key: "shaderData",
9987
10282
  get: /**
@@ -10055,65 +10350,83 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10055
10350
  }
10056
10351
  ]);
10057
10352
  return Renderer1;
10058
- }(Component), _Renderer._tempVector0 = new miniprogram.Vector3(), _Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS"), _Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat"), _Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat"), _Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat"), _Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat"), _Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat"), _Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat"), _Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer"), _Renderer);
10059
- _ts_decorate__default['default']([
10353
+ }(Component), function() {
10354
+ _Renderer._tempVector0 = new miniprogram.Vector3();
10355
+ }(), function() {
10356
+ _Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS");
10357
+ }(), function() {
10358
+ _Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat");
10359
+ }(), function() {
10360
+ _Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat");
10361
+ }(), function() {
10362
+ _Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat");
10363
+ }(), function() {
10364
+ _Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat");
10365
+ }(), function() {
10366
+ _Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat");
10367
+ }(), function() {
10368
+ _Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat");
10369
+ }(), function() {
10370
+ _Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
10371
+ }(), _Renderer);
10372
+ __decorate([
10060
10373
  ignoreClone
10061
10374
  ], exports.Renderer.prototype, "_distanceForSort", void 0);
10062
- _ts_decorate__default['default']([
10375
+ __decorate([
10063
10376
  ignoreClone
10064
10377
  ], exports.Renderer.prototype, "_onUpdateIndex", void 0);
10065
- _ts_decorate__default['default']([
10378
+ __decorate([
10066
10379
  ignoreClone
10067
10380
  ], exports.Renderer.prototype, "_rendererIndex", void 0);
10068
- _ts_decorate__default['default']([
10381
+ __decorate([
10069
10382
  ignoreClone
10070
10383
  ], exports.Renderer.prototype, "_globalShaderMacro", void 0);
10071
- _ts_decorate__default['default']([
10384
+ __decorate([
10072
10385
  deepClone
10073
10386
  ], exports.Renderer.prototype, "_bounds", void 0);
10074
- _ts_decorate__default['default']([
10387
+ __decorate([
10075
10388
  ignoreClone
10076
10389
  ], exports.Renderer.prototype, "_renderFrameCount", void 0);
10077
- _ts_decorate__default['default']([
10390
+ __decorate([
10078
10391
  ignoreClone
10079
10392
  ], exports.Renderer.prototype, "_overrideUpdate", void 0);
10080
- _ts_decorate__default['default']([
10393
+ __decorate([
10081
10394
  ignoreClone
10082
10395
  ], exports.Renderer.prototype, "_materials", void 0);
10083
- _ts_decorate__default['default']([
10396
+ __decorate([
10084
10397
  ignoreClone
10085
10398
  ], exports.Renderer.prototype, "_dirtyUpdateFlag", void 0);
10086
- _ts_decorate__default['default']([
10399
+ __decorate([
10087
10400
  deepClone
10088
10401
  ], exports.Renderer.prototype, "_shaderData", void 0);
10089
- _ts_decorate__default['default']([
10402
+ __decorate([
10090
10403
  ignoreClone
10091
10404
  ], exports.Renderer.prototype, "_mvMatrix", void 0);
10092
- _ts_decorate__default['default']([
10405
+ __decorate([
10093
10406
  ignoreClone
10094
10407
  ], exports.Renderer.prototype, "_mvpMatrix", void 0);
10095
- _ts_decorate__default['default']([
10408
+ __decorate([
10096
10409
  ignoreClone
10097
10410
  ], exports.Renderer.prototype, "_mvInvMatrix", void 0);
10098
- _ts_decorate__default['default']([
10411
+ __decorate([
10099
10412
  ignoreClone
10100
10413
  ], exports.Renderer.prototype, "_normalMatrix", void 0);
10101
- _ts_decorate__default['default']([
10414
+ __decorate([
10102
10415
  ignoreClone
10103
10416
  ], exports.Renderer.prototype, "_materialsInstanced", void 0);
10104
- _ts_decorate__default['default']([
10417
+ __decorate([
10105
10418
  ignoreClone
10106
10419
  ], exports.Renderer.prototype, "_priority", void 0);
10107
- _ts_decorate__default['default']([
10420
+ __decorate([
10108
10421
  assignmentClone
10109
10422
  ], exports.Renderer.prototype, "_receiveShadows", void 0);
10110
- _ts_decorate__default['default']([
10423
+ __decorate([
10111
10424
  ignoreClone
10112
10425
  ], exports.Renderer.prototype, "_rendererLayer", void 0);
10113
- _ts_decorate__default['default']([
10426
+ __decorate([
10114
10427
  ignoreClone
10115
10428
  ], exports.Renderer.prototype, "_onTransformChanged", null);
10116
- exports.Renderer = _ts_decorate__default['default']([
10429
+ exports.Renderer = __decorate([
10117
10430
  dependentComponents(Transform)
10118
10431
  ], exports.Renderer);
10119
10432
  var RendererUpdateFlags;
@@ -10185,15 +10498,19 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
10185
10498
  renderUVs[3].set(right, top);
10186
10499
  };
10187
10500
  return SimpleSpriteAssembler1;
10188
- }(), _SimpleSpriteAssembler._rectangleTriangles = [
10189
- 0,
10190
- 1,
10191
- 2,
10192
- 2,
10193
- 1,
10194
- 3
10195
- ], _SimpleSpriteAssembler._worldMatrix = new miniprogram.Matrix(), _SimpleSpriteAssembler);
10196
- SimpleSpriteAssembler = _ts_decorate__default['default']([
10501
+ }(), function() {
10502
+ _SimpleSpriteAssembler._rectangleTriangles = [
10503
+ 0,
10504
+ 1,
10505
+ 2,
10506
+ 2,
10507
+ 1,
10508
+ 3
10509
+ ];
10510
+ }(), function() {
10511
+ _SimpleSpriteAssembler._worldMatrix = new miniprogram.Matrix();
10512
+ }(), _SimpleSpriteAssembler);
10513
+ SimpleSpriteAssembler = __decorate([
10197
10514
  StaticInterfaceImplement()
10198
10515
  ], SimpleSpriteAssembler);
10199
10516
 
@@ -10209,6 +10526,9 @@ SimpleSpriteAssembler = _ts_decorate__default['default']([
10209
10526
  this.color = color;
10210
10527
  };
10211
10528
 
10529
+ /**
10530
+ * Sprite mask layer.
10531
+ */ exports.SpriteMaskLayer = void 0;
10212
10532
  (function(SpriteMaskLayer) {
10213
10533
  SpriteMaskLayer[SpriteMaskLayer[/** Mask layer 0. */ "Layer0"] = 0x1] = "Layer0";
10214
10534
  SpriteMaskLayer[SpriteMaskLayer[/** Mask layer 1. */ "Layer1"] = 0x2] = "Layer1";
@@ -10262,7 +10582,7 @@ SimpleSpriteAssembler = _ts_decorate__default['default']([
10262
10582
  /**
10263
10583
  * A component for masking Sprites.
10264
10584
  */ var SpriteMask = /*#__PURE__*/ function(Renderer) {
10265
- _inherits__default['default'](SpriteMask, Renderer);
10585
+ _inherits(SpriteMask, Renderer);
10266
10586
  function SpriteMask(entity) {
10267
10587
  var _this;
10268
10588
  _this = Renderer.call(this, entity) || this;
@@ -10276,10 +10596,10 @@ SimpleSpriteAssembler = _ts_decorate__default['default']([
10276
10596
  _this._flipY = false;
10277
10597
  _this._alphaCutoff = 0.5;
10278
10598
  _this._renderData = new RenderData2D(4, [], []);
10279
- SimpleSpriteAssembler.resetData(_assert_this_initialized__default['default'](_this));
10599
+ SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
10280
10600
  _this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
10281
10601
  _this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
10282
- _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized__default['default'](_this));
10602
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
10283
10603
  return _this;
10284
10604
  }
10285
10605
  var _proto = SpriteMask.prototype;
@@ -10370,7 +10690,7 @@ SimpleSpriteAssembler = _ts_decorate__default['default']([
10370
10690
  break;
10371
10691
  }
10372
10692
  };
10373
- _create_class__default['default'](SpriteMask, [
10693
+ _create_class(SpriteMask, [
10374
10694
  {
10375
10695
  key: "width",
10376
10696
  get: /**
@@ -10488,36 +10808,40 @@ SimpleSpriteAssembler = _ts_decorate__default['default']([
10488
10808
  ]);
10489
10809
  return SpriteMask;
10490
10810
  }(exports.Renderer);
10491
- /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10492
- /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10493
- _ts_decorate__default['default']([
10811
+ (function() {
10812
+ /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10813
+ })();
10814
+ (function() {
10815
+ /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10816
+ })();
10817
+ __decorate([
10494
10818
  assignmentClone
10495
10819
  ], SpriteMask.prototype, "influenceLayers", void 0);
10496
- _ts_decorate__default['default']([
10820
+ __decorate([
10497
10821
  ignoreClone
10498
10822
  ], SpriteMask.prototype, "_sprite", void 0);
10499
- _ts_decorate__default['default']([
10823
+ __decorate([
10500
10824
  ignoreClone
10501
10825
  ], SpriteMask.prototype, "_automaticWidth", void 0);
10502
- _ts_decorate__default['default']([
10826
+ __decorate([
10503
10827
  ignoreClone
10504
10828
  ], SpriteMask.prototype, "_automaticHeight", void 0);
10505
- _ts_decorate__default['default']([
10829
+ __decorate([
10506
10830
  assignmentClone
10507
10831
  ], SpriteMask.prototype, "_customWidth", void 0);
10508
- _ts_decorate__default['default']([
10832
+ __decorate([
10509
10833
  assignmentClone
10510
10834
  ], SpriteMask.prototype, "_customHeight", void 0);
10511
- _ts_decorate__default['default']([
10835
+ __decorate([
10512
10836
  assignmentClone
10513
10837
  ], SpriteMask.prototype, "_flipX", void 0);
10514
- _ts_decorate__default['default']([
10838
+ __decorate([
10515
10839
  assignmentClone
10516
10840
  ], SpriteMask.prototype, "_flipY", void 0);
10517
- _ts_decorate__default['default']([
10841
+ __decorate([
10518
10842
  assignmentClone
10519
10843
  ], SpriteMask.prototype, "_alphaCutoff", void 0);
10520
- _ts_decorate__default['default']([
10844
+ __decorate([
10521
10845
  ignoreClone
10522
10846
  ], SpriteMask.prototype, "_onSpriteChange", null);
10523
10847
  var /**
@@ -10530,6 +10854,9 @@ var /**
10530
10854
  SpriteMaskUpdateFlags[SpriteMaskUpdateFlags[/** All. */ "All"] = 0x7] = "All";
10531
10855
  })(SpriteMaskUpdateFlags || (SpriteMaskUpdateFlags = {}));
10532
10856
 
10857
+ /**
10858
+ * Vertex element format.
10859
+ */ exports.VertexElementFormat = void 0;
10533
10860
  (function(VertexElementFormat) {
10534
10861
  VertexElementFormat[VertexElementFormat[/** 32-bit float */ "Float"] = 0] = "Float";
10535
10862
  VertexElementFormat[VertexElementFormat[/** Two-dimensional 32-bit float */ "Vector2"] = 1] = "Vector2";
@@ -10549,12 +10876,18 @@ var /**
10549
10876
  VertexElementFormat[VertexElementFormat[/** Four-dimensional 16-bit Normalized unsigned integer, range is [0, 1] */ "NormalizedUShort4"] = 15] = "NormalizedUShort4";
10550
10877
  })(exports.VertexElementFormat || (exports.VertexElementFormat = {}));
10551
10878
 
10879
+ /**
10880
+ * Buffer usage.
10881
+ */ exports.BufferUsage = void 0;
10552
10882
  (function(BufferUsage) {
10553
10883
  BufferUsage[BufferUsage[/** The buffer content are intended to be specified once, and used many times */ "Static"] = 0] = "Static";
10554
10884
  BufferUsage[BufferUsage[/** The buffer contents are intended to be respecified repeatedly, and used many times */ "Dynamic"] = 1] = "Dynamic";
10555
10885
  BufferUsage[BufferUsage[/** The buffer contents are intended to be specified once, and used at most a few times */ "Stream"] = 2] = "Stream";
10556
10886
  })(exports.BufferUsage || (exports.BufferUsage = {}));
10557
10887
 
10888
+ /**
10889
+ * Index format.
10890
+ */ exports.IndexFormat = void 0;
10558
10891
  (function(IndexFormat) {
10559
10892
  IndexFormat[IndexFormat[/** 8 bit */ "UInt8"] = 0] = "UInt8";
10560
10893
  IndexFormat[IndexFormat[/** 16 bit */ "UInt16"] = 1] = "UInt16";
@@ -10694,7 +11027,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10694
11027
  this._glElementInfo = BufferUtil._getElementInfo(this.format);
10695
11028
  this._instanceStepRate = Math.floor(instanceStepRate);
10696
11029
  }
10697
- _create_class__default['default'](VertexElement, [
11030
+ _create_class(VertexElement, [
10698
11031
  {
10699
11032
  key: "semantic",
10700
11033
  get: /**
@@ -10745,11 +11078,17 @@ var BufferUtil = /*#__PURE__*/ function() {
10745
11078
  return VertexElement;
10746
11079
  }();
10747
11080
 
11081
+ /**
11082
+ * Buffer binding flag.
11083
+ */ exports.BufferBindFlag = void 0;
10748
11084
  (function(BufferBindFlag) {
10749
11085
  BufferBindFlag[BufferBindFlag[/** Vertex buffer binding flag */ "VertexBuffer"] = 0] = "VertexBuffer";
10750
11086
  BufferBindFlag[BufferBindFlag[/** Index buffer binding flag */ "IndexBuffer"] = 1] = "IndexBuffer";
10751
11087
  })(exports.BufferBindFlag || (exports.BufferBindFlag = {}));
10752
11088
 
11089
+ /**
11090
+ * Define update strategy when call bufferData/bufferSubData func.
11091
+ */ exports.SetDataOptions = void 0;
10753
11092
  (function(SetDataOptions) {
10754
11093
  SetDataOptions[SetDataOptions[/** Can overwrite part of used buffer data and ensure correct rendering */ "None"] = 0] = "None";
10755
11094
  SetDataOptions[SetDataOptions[/** Discard old buffer and create a new buffer, and won't affect the previous rendering */ "Discard"] = 1] = "Discard";
@@ -10758,7 +11097,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10758
11097
  /**
10759
11098
  * Buffer.
10760
11099
  */ var Buffer = /*#__PURE__*/ function(RefObject) {
10761
- _inherits__default['default'](Buffer, RefObject);
11100
+ _inherits(Buffer, RefObject);
10762
11101
  function Buffer(engine, type, byteLengthOrData, bufferUsage) {
10763
11102
  if (bufferUsage === void 0) bufferUsage = exports.BufferUsage.Static;
10764
11103
  var _this;
@@ -10848,7 +11187,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10848
11187
  gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
10849
11188
  this._byteLength = dataLength;
10850
11189
  };
10851
- _create_class__default['default'](Buffer, [
11190
+ _create_class(Buffer, [
10852
11191
  {
10853
11192
  key: "type",
10854
11193
  get: /**
@@ -10877,6 +11216,9 @@ var BufferUtil = /*#__PURE__*/ function() {
10877
11216
  return Buffer;
10878
11217
  }(RefObject);
10879
11218
 
11219
+ /**
11220
+ * Mesh topology.
11221
+ */ exports.MeshTopology = void 0;
10880
11222
  (function(MeshTopology) {
10881
11223
  MeshTopology[MeshTopology[/** Draws a single dot */ "Points"] = 0] = "Points";
10882
11224
  MeshTopology[MeshTopology[/** Draws a line between a pair of vertices */ "Lines"] = 1] = "Lines";
@@ -10894,7 +11236,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10894
11236
  this._buffer = buffer;
10895
11237
  this._format = format;
10896
11238
  }
10897
- _create_class__default['default'](IndexBufferBinding, [
11239
+ _create_class(IndexBufferBinding, [
10898
11240
  {
10899
11241
  key: "buffer",
10900
11242
  get: /**
@@ -10934,7 +11276,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10934
11276
  /**
10935
11277
  * Mesh.
10936
11278
  */ var Mesh = /*#__PURE__*/ function(RefObject) {
10937
- _inherits__default['default'](Mesh, RefObject);
11279
+ _inherits(Mesh, RefObject);
10938
11280
  function Mesh(engine, name) {
10939
11281
  var _this;
10940
11282
  _this = RefObject.call(this, engine) || this;
@@ -10948,8 +11290,8 @@ var BufferUtil = /*#__PURE__*/ function() {
10948
11290
  _this._bounds = new miniprogram.BoundingBox();
10949
11291
  _this._subMeshes = [];
10950
11292
  _this.name = name;
10951
- _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized__default['default'](_this));
10952
- _this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized__default['default'](_this));
11293
+ _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized(_this));
11294
+ _this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized(_this));
10953
11295
  var bounds = _this._bounds;
10954
11296
  // @ts-ignore
10955
11297
  bounds.min._onValueChanged = _this._onBoundsChanged;
@@ -11075,7 +11417,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11075
11417
  _proto._onBoundsChanged = function _onBoundsChanged() {
11076
11418
  this._updateFlagManager.dispatch(0x1);
11077
11419
  };
11078
- _create_class__default['default'](Mesh, [
11420
+ _create_class(Mesh, [
11079
11421
  {
11080
11422
  key: "bounds",
11081
11423
  get: /**
@@ -11121,7 +11463,7 @@ var MeshModifyFlags;
11121
11463
  this._buffer = buffer;
11122
11464
  this._stride = stride;
11123
11465
  }
11124
- _create_class__default['default'](VertexBufferBinding, [
11466
+ _create_class(VertexBufferBinding, [
11125
11467
  {
11126
11468
  key: "buffer",
11127
11469
  get: /**
@@ -11568,13 +11910,27 @@ var MeshModifyFlags;
11568
11910
  };
11569
11911
  return BlendShapeManager;
11570
11912
  }();
11571
- BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11572
- BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11573
- BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11574
- BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11575
- BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11576
- BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11577
- BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11913
+ (function() {
11914
+ BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11915
+ })();
11916
+ (function() {
11917
+ BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11918
+ })();
11919
+ (function() {
11920
+ BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11921
+ })();
11922
+ (function() {
11923
+ BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11924
+ })();
11925
+ (function() {
11926
+ BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11927
+ })();
11928
+ (function() {
11929
+ BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11930
+ })();
11931
+ (function() {
11932
+ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11933
+ })();
11578
11934
 
11579
11935
  /**
11580
11936
  * Vertex attribute types of a vertex in a ModelMesh.
@@ -11599,7 +11955,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
11599
11955
  /**
11600
11956
  * Mesh containing common vertex elements of the model.
11601
11957
  */ var ModelMesh = /*#__PURE__*/ function(Mesh) {
11602
- _inherits__default['default'](ModelMesh, Mesh);
11958
+ _inherits(ModelMesh, Mesh);
11603
11959
  function ModelMesh(engine, name) {
11604
11960
  var _this;
11605
11961
  _this = Mesh.call(this, engine) || this;
@@ -11631,7 +11987,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
11631
11987
  _this._customVertexElements = [];
11632
11988
  _this._vertexCountChanged = false;
11633
11989
  _this.name = name;
11634
- _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized__default['default'](_this));
11990
+ _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
11635
11991
  return _this;
11636
11992
  }
11637
11993
  var _proto = ModelMesh.prototype;
@@ -11921,11 +12277,11 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
11921
12277
  }
11922
12278
  if (this._indices !== indices) {
11923
12279
  this._indices = indices;
11924
- if (_instanceof__default['default'](indices, Uint8Array)) {
12280
+ if (_instanceof(indices, Uint8Array)) {
11925
12281
  this._indicesFormat = exports.IndexFormat.UInt8;
11926
- } else if (_instanceof__default['default'](indices, Uint16Array)) {
12282
+ } else if (_instanceof(indices, Uint16Array)) {
11927
12283
  this._indicesFormat = exports.IndexFormat.UInt16;
11928
- } else if (_instanceof__default['default'](indices, Uint32Array)) {
12284
+ } else if (_instanceof(indices, Uint32Array)) {
11929
12285
  this._indicesFormat = exports.IndexFormat.UInt32;
11930
12286
  }
11931
12287
  }
@@ -12581,7 +12937,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12581
12937
  this._uv7 = null;
12582
12938
  this._blendShapeManager._releaseMemoryCache();
12583
12939
  };
12584
- _create_class__default['default'](ModelMesh, [
12940
+ _create_class(ModelMesh, [
12585
12941
  {
12586
12942
  key: "accessible",
12587
12943
  get: /**
@@ -12649,11 +13005,21 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12649
13005
  ]);
12650
13006
  return ModelMesh;
12651
13007
  }(Mesh);
12652
- ModelMesh._tempVec0 = new miniprogram.Vector3();
12653
- ModelMesh._tempVec1 = new miniprogram.Vector3();
12654
- ModelMesh._tempVec2 = new miniprogram.Vector3();
12655
- ModelMesh._tempVec3 = new miniprogram.Vector3();
12656
- ModelMesh._tempVec4 = new miniprogram.Vector3();
13008
+ (function() {
13009
+ ModelMesh._tempVec0 = new miniprogram.Vector3();
13010
+ })();
13011
+ (function() {
13012
+ ModelMesh._tempVec1 = new miniprogram.Vector3();
13013
+ })();
13014
+ (function() {
13015
+ ModelMesh._tempVec2 = new miniprogram.Vector3();
13016
+ })();
13017
+ (function() {
13018
+ ModelMesh._tempVec3 = new miniprogram.Vector3();
13019
+ })();
13020
+ (function() {
13021
+ ModelMesh._tempVec4 = new miniprogram.Vector3();
13022
+ })();
12657
13023
  var VertexChangedFlags;
12658
13024
  (function(VertexChangedFlags) {
12659
13025
  VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
@@ -12676,7 +13042,7 @@ var VertexChangedFlags;
12676
13042
  /**
12677
13043
  * Mesh skin data, equal glTF skins define
12678
13044
  */ var Skin = /*#__PURE__*/ function(EngineObject) {
12679
- _inherits__default['default'](Skin, EngineObject);
13045
+ _inherits(Skin, EngineObject);
12680
13046
  function Skin(name) {
12681
13047
  var _this;
12682
13048
  _this = EngineObject.call(this, null) || this;
@@ -12692,12 +13058,12 @@ var VertexChangedFlags;
12692
13058
  /**
12693
13059
  * MeshRenderer Component.
12694
13060
  */ var MeshRenderer = /*#__PURE__*/ function(Renderer) {
12695
- _inherits__default['default'](MeshRenderer, Renderer);
13061
+ _inherits(MeshRenderer, Renderer);
12696
13062
  function MeshRenderer(entity) {
12697
13063
  var _this;
12698
13064
  _this = Renderer.call(this, entity) || this;
12699
13065
  _this._enableVertexColor = false;
12700
- _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized__default['default'](_this));
13066
+ _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
12701
13067
  return _this;
12702
13068
  }
12703
13069
  var _proto = MeshRenderer.prototype;
@@ -12802,7 +13168,7 @@ var VertexChangedFlags;
12802
13168
  type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
12803
13169
  type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
12804
13170
  };
12805
- _create_class__default['default'](MeshRenderer, [
13171
+ _create_class(MeshRenderer, [
12806
13172
  {
12807
13173
  key: "mesh",
12808
13174
  get: /**
@@ -12833,15 +13199,25 @@ var VertexChangedFlags;
12833
13199
  ]);
12834
13200
  return MeshRenderer;
12835
13201
  }(exports.Renderer);
12836
- MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
12837
- MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
12838
- MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
12839
- MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
12840
- MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
12841
- _ts_decorate__default['default']([
13202
+ (function() {
13203
+ MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
13204
+ })();
13205
+ (function() {
13206
+ MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
13207
+ })();
13208
+ (function() {
13209
+ MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
13210
+ })();
13211
+ (function() {
13212
+ MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
13213
+ })();
13214
+ (function() {
13215
+ MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
13216
+ })();
13217
+ __decorate([
12842
13218
  ignoreClone
12843
13219
  ], MeshRenderer.prototype, "_mesh", void 0);
12844
- _ts_decorate__default['default']([
13220
+ __decorate([
12845
13221
  ignoreClone
12846
13222
  ], MeshRenderer.prototype, "_onMeshChanged", null);
12847
13223
  var /**
@@ -12897,13 +13273,13 @@ var Utils = /*#__PURE__*/ function() {
12897
13273
  };
12898
13274
  Utils._stringToPath = function _stringToPath(string) {
12899
13275
  var result = [];
12900
- if (string.charCodeAt(0) === charCodeOfDot$1) {
13276
+ if (string.charCodeAt(0) === charCodeOfDot) {
12901
13277
  result.push("");
12902
13278
  }
12903
- string.replace(rePropName$1, function(match, expression, quote, subString) {
13279
+ string.replace(rePropName, function(match, expression, quote, subString) {
12904
13280
  var key = match;
12905
13281
  if (quote) {
12906
- key = subString.replace(reEscapeChar$1, "$1");
13282
+ key = subString.replace(reEscapeChar, "$1");
12907
13283
  } else if (expression) {
12908
13284
  key = expression.trim();
12909
13285
  }
@@ -12913,9 +13289,9 @@ var Utils = /*#__PURE__*/ function() {
12913
13289
  };
12914
13290
  return Utils;
12915
13291
  }();
12916
- var charCodeOfDot$1 = ".".charCodeAt(0);
12917
- var reEscapeChar$1 = /\\(\\)?/g;
12918
- var rePropName$1 = RegExp(// Match anything that isn't a dot or bracket.
13292
+ var charCodeOfDot = ".".charCodeAt(0);
13293
+ var reEscapeChar = /\\(\\)?/g;
13294
+ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
12919
13295
  "[^.[\\]]+" + "|" + // Or match property names within brackets.
12920
13296
  "\\[(?:" + // Match a non-string expression.
12921
13297
  "([^\"'][^[]*)" + "|" + // Or match strings (supports escaping characters).
@@ -12925,7 +13301,7 @@ var rePropName$1 = RegExp(// Match anything that isn't a dot or bracket.
12925
13301
  /**
12926
13302
  * SkinnedMeshRenderer.
12927
13303
  */ var SkinnedMeshRenderer = /*#__PURE__*/ function(MeshRenderer) {
12928
- _inherits__default['default'](SkinnedMeshRenderer, MeshRenderer);
13304
+ _inherits(SkinnedMeshRenderer, MeshRenderer);
12929
13305
  function SkinnedMeshRenderer(entity) {
12930
13306
  var _this;
12931
13307
  _this = MeshRenderer.call(this, entity) || this;
@@ -12941,7 +13317,7 @@ var rePropName$1 = RegExp(// Match anything that isn't a dot or bracket.
12941
13317
  // For renderer is "ANGLE (AMD, AMD Radeon(TM) Graphics Direct3011 vs_5_0 ps_5_0, D3011)", compile shader si very slow because of max uniform is 4096.
12942
13318
  maxVertexUniformVectors = Math.min(maxVertexUniformVectors, rhi._options._maxAllowSkinUniformVectorCount);
12943
13319
  _this._maxVertexUniformVectors = maxVertexUniformVectors;
12944
- _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized__default['default'](_this));
13320
+ _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
12945
13321
  var localBounds = _this._localBounds;
12946
13322
  // @ts-ignore
12947
13323
  localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
@@ -13165,7 +13541,7 @@ var rePropName$1 = RegExp(// Match anything that isn't a dot or bracket.
13165
13541
  _proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
13166
13542
  this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
13167
13543
  };
13168
- _create_class__default['default'](SkinnedMeshRenderer, [
13544
+ _create_class(SkinnedMeshRenderer, [
13169
13545
  {
13170
13546
  key: "blendShapeWeights",
13171
13547
  get: /**
@@ -13230,44 +13606,52 @@ var rePropName$1 = RegExp(// Match anything that isn't a dot or bracket.
13230
13606
  ]);
13231
13607
  return SkinnedMeshRenderer;
13232
13608
  }(MeshRenderer);
13233
- SkinnedMeshRenderer._tempMatrix = new miniprogram.Matrix();
13234
- SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13235
- SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13236
- SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13237
- _ts_decorate__default['default']([
13609
+ (function() {
13610
+ SkinnedMeshRenderer._tempMatrix = new miniprogram.Matrix();
13611
+ })();
13612
+ (function() {
13613
+ SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13614
+ })();
13615
+ (function() {
13616
+ SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13617
+ })();
13618
+ (function() {
13619
+ SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13620
+ })();
13621
+ __decorate([
13238
13622
  ignoreClone
13239
13623
  ], SkinnedMeshRenderer.prototype, "_supportSkinning", void 0);
13240
- _ts_decorate__default['default']([
13624
+ __decorate([
13241
13625
  ignoreClone
13242
13626
  ], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
13243
- _ts_decorate__default['default']([
13627
+ __decorate([
13244
13628
  ignoreClone
13245
13629
  ], SkinnedMeshRenderer.prototype, "_jointDataCreateCache", void 0);
13246
- _ts_decorate__default['default']([
13630
+ __decorate([
13247
13631
  ignoreClone
13248
13632
  ], SkinnedMeshRenderer.prototype, "_blendShapeWeights", void 0);
13249
- _ts_decorate__default['default']([
13633
+ __decorate([
13250
13634
  ignoreClone
13251
13635
  ], SkinnedMeshRenderer.prototype, "_maxVertexUniformVectors", void 0);
13252
- _ts_decorate__default['default']([
13636
+ __decorate([
13253
13637
  ignoreClone
13254
13638
  ], SkinnedMeshRenderer.prototype, "_rootBone", void 0);
13255
- _ts_decorate__default['default']([
13639
+ __decorate([
13256
13640
  ignoreClone
13257
13641
  ], SkinnedMeshRenderer.prototype, "_localBounds", void 0);
13258
- _ts_decorate__default['default']([
13642
+ __decorate([
13259
13643
  ignoreClone
13260
13644
  ], SkinnedMeshRenderer.prototype, "_jointMatrices", void 0);
13261
- _ts_decorate__default['default']([
13645
+ __decorate([
13262
13646
  ignoreClone
13263
13647
  ], SkinnedMeshRenderer.prototype, "_jointTexture", void 0);
13264
- _ts_decorate__default['default']([
13648
+ __decorate([
13265
13649
  ignoreClone
13266
13650
  ], SkinnedMeshRenderer.prototype, "_jointEntities", void 0);
13267
- _ts_decorate__default['default']([
13651
+ __decorate([
13268
13652
  ignoreClone
13269
13653
  ], SkinnedMeshRenderer.prototype, "_condensedBlendShapeWeights", void 0);
13270
- _ts_decorate__default['default']([
13654
+ __decorate([
13271
13655
  ignoreClone
13272
13656
  ], SkinnedMeshRenderer.prototype, "_onLocalBoundsChanged", null);
13273
13657
 
@@ -13959,7 +14343,7 @@ _ts_decorate__default['default']([
13959
14343
  /**
13960
14344
  * BufferMesh.
13961
14345
  */ var BufferMesh = /*#__PURE__*/ function(Mesh) {
13962
- _inherits__default['default'](BufferMesh, Mesh);
14346
+ _inherits(BufferMesh, Mesh);
13963
14347
  function BufferMesh() {
13964
14348
  return Mesh.apply(this, arguments);
13965
14349
  }
@@ -14002,7 +14386,7 @@ _ts_decorate__default['default']([
14002
14386
  }
14003
14387
  this._setIndexBufferBinding(binding);
14004
14388
  };
14005
- _create_class__default['default'](BufferMesh, [
14389
+ _create_class(BufferMesh, [
14006
14390
  {
14007
14391
  key: "instanceCount",
14008
14392
  get: /**
@@ -14116,7 +14500,7 @@ _ts_decorate__default['default']([
14116
14500
  this._layoutChangeManager.dispatch(0, this);
14117
14501
  }
14118
14502
  };
14119
- _create_class__default['default'](BlendShape, [
14503
+ _create_class(BlendShape, [
14120
14504
  {
14121
14505
  key: "frames",
14122
14506
  get: /**
@@ -14277,11 +14661,15 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
14277
14661
  };
14278
14662
  return Basic2DBatcher;
14279
14663
  }();
14280
- /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14281
- Basic2DBatcher._canUploadSameBuffer = true;
14664
+ (function() {
14665
+ /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14666
+ })();
14667
+ (function() {
14668
+ Basic2DBatcher._canUploadSameBuffer = true;
14669
+ })();
14282
14670
 
14283
14671
  var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
14284
- _inherits__default['default'](SpriteMaskBatcher, Basic2DBatcher);
14672
+ _inherits(SpriteMaskBatcher, Basic2DBatcher);
14285
14673
  function SpriteMaskBatcher() {
14286
14674
  return Basic2DBatcher.apply(this, arguments);
14287
14675
  }
@@ -14417,7 +14805,7 @@ var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
14417
14805
  }();
14418
14806
 
14419
14807
  var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14420
- _inherits__default['default'](TextRenderElement, RenderElement);
14808
+ _inherits(TextRenderElement, RenderElement);
14421
14809
  function TextRenderElement() {
14422
14810
  var _this;
14423
14811
  _this = RenderElement.call(this) || this;
@@ -14433,12 +14821,18 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14433
14821
  return TextRenderElement;
14434
14822
  }(RenderElement);
14435
14823
 
14824
+ /**
14825
+ * The Background mode enumeration.
14826
+ */ exports.BackgroundMode = void 0;
14436
14827
  (function(BackgroundMode) {
14437
14828
  BackgroundMode[BackgroundMode[/* Solid color. */ "SolidColor"] = 0] = "SolidColor";
14438
14829
  BackgroundMode[BackgroundMode[/* Sky. */ "Sky"] = 1] = "Sky";
14439
14830
  BackgroundMode[BackgroundMode[/** Texture */ "Texture"] = 2] = "Texture";
14440
14831
  })(exports.BackgroundMode || (exports.BackgroundMode = {}));
14441
14832
 
14833
+ /**
14834
+ * Filling mode of background texture.
14835
+ */ exports.BackgroundTextureFillMode = void 0;
14442
14836
  (function(BackgroundTextureFillMode) {
14443
14837
  BackgroundTextureFillMode[BackgroundTextureFillMode[/* Maintain the aspect ratio and scale the texture to fit the width of the canvas. */ "AspectFitWidth"] = 0] = "AspectFitWidth";
14444
14838
  BackgroundTextureFillMode[BackgroundTextureFillMode[/* Maintain the aspect ratio and scale the texture to fit the height of the canvas. */ "AspectFitHeight"] = 1] = "AspectFitHeight";
@@ -14496,7 +14890,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14496
14890
  rhi.drawPrimitive(mesh, mesh.subMesh, program);
14497
14891
  cameraShaderData.setMatrix(RenderContext._vpMatrixProperty, originViewProjMatrix);
14498
14892
  };
14499
- _create_class__default['default'](Sky, [
14893
+ _create_class(Sky, [
14500
14894
  {
14501
14895
  key: "material",
14502
14896
  get: /**
@@ -14532,9 +14926,15 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14532
14926
  ]);
14533
14927
  return Sky;
14534
14928
  }();
14535
- Sky._epsilon = 1e-6;
14536
- Sky._viewProjMatrix = new miniprogram.Matrix();
14537
- Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14929
+ (function() {
14930
+ Sky._epsilon = 1e-6;
14931
+ })();
14932
+ (function() {
14933
+ Sky._viewProjMatrix = new miniprogram.Matrix();
14934
+ })();
14935
+ (function() {
14936
+ Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14937
+ })();
14538
14938
 
14539
14939
  /**
14540
14940
  * Background of scene.
@@ -14632,7 +15032,7 @@ Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky
14632
15032
  mesh.addSubMesh(0, indices.length);
14633
15033
  return mesh;
14634
15034
  };
14635
- _create_class__default['default'](Background, [
15035
+ _create_class(Background, [
14636
15036
  {
14637
15037
  key: "texture",
14638
15038
  get: /**
@@ -14672,6 +15072,9 @@ Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky
14672
15072
  return Background;
14673
15073
  }();
14674
15074
 
15075
+ /**
15076
+ * Fog Mode.
15077
+ */ exports.FogMode = void 0;
14675
15078
  (function(FogMode) {
14676
15079
  FogMode[FogMode[/** Disable fog. */ "None"] = 0] = "None";
14677
15080
  FogMode[FogMode[/** Linear fog. */ "Linear"] = 1] = "Linear";
@@ -14679,6 +15082,9 @@ Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky
14679
15082
  FogMode[FogMode[/** Exponential squared fog. */ "ExponentialSquared"] = 3] = "ExponentialSquared";
14680
15083
  })(exports.FogMode || (exports.FogMode = {}));
14681
15084
 
15085
+ /**
15086
+ * Diffuse mode.
15087
+ */ exports.DiffuseMode = void 0;
14682
15088
  (function(DiffuseMode) {
14683
15089
  DiffuseMode[DiffuseMode[/** Solid color mode. */ "SolidColor"] = 0] = "SolidColor";
14684
15090
  DiffuseMode[DiffuseMode[/**
@@ -14797,7 +15203,7 @@ Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky
14797
15203
  out[25] = src[25] * 0.429042;
14798
15204
  out[26] = src[26] * 0.429042;
14799
15205
  };
14800
- _create_class__default['default'](AmbientLight, [
15206
+ _create_class(AmbientLight, [
14801
15207
  {
14802
15208
  key: "specularTextureDecodeRGBM",
14803
15209
  get: /**
@@ -14908,20 +15314,38 @@ Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky
14908
15314
  ]);
14909
15315
  return AmbientLight;
14910
15316
  }();
14911
- AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
14912
- AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
14913
- AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
14914
- AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
14915
- AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
14916
- AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
14917
- AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
14918
- AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
14919
- AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15317
+ (function() {
15318
+ AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
15319
+ })();
15320
+ (function() {
15321
+ AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
15322
+ })();
15323
+ (function() {
15324
+ AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
15325
+ })();
15326
+ (function() {
15327
+ AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
15328
+ })();
15329
+ (function() {
15330
+ AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
15331
+ })();
15332
+ (function() {
15333
+ AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
15334
+ })();
15335
+ (function() {
15336
+ AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
15337
+ })();
15338
+ (function() {
15339
+ AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
15340
+ })();
15341
+ (function() {
15342
+ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15343
+ })();
14920
15344
 
14921
15345
  /**
14922
15346
  * Scene.
14923
15347
  */ var Scene = /*#__PURE__*/ function(EngineObject) {
14924
- _inherits__default['default'](Scene, EngineObject);
15348
+ _inherits(Scene, EngineObject);
14925
15349
  function Scene(engine, name) {
14926
15350
  var _this;
14927
15351
  _this = EngineObject.call(this, engine) || this;
@@ -14947,7 +15371,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
14947
15371
  var shaderData = _this.shaderData;
14948
15372
  shaderData._addRefCount(1);
14949
15373
  _this.ambientLight = new AmbientLight();
14950
- engine.sceneManager._allScenes.push(_assert_this_initialized__default['default'](_this));
15374
+ engine.sceneManager._allScenes.push(_assert_this_initialized(_this));
14951
15375
  shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
14952
15376
  shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
14953
15377
  shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
@@ -15157,7 +15581,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15157
15581
  this._fogParams.z = density / Math.LN2;
15158
15582
  this._fogParams.w = density / Math.sqrt(Math.LN2);
15159
15583
  };
15160
- _create_class__default['default'](Scene, [
15584
+ _create_class(Scene, [
15161
15585
  {
15162
15586
  key: "shaderData",
15163
15587
  get: /**
@@ -15301,8 +15725,12 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15301
15725
  ]);
15302
15726
  return Scene;
15303
15727
  }(EngineObject);
15304
- Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15305
- Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15728
+ (function() {
15729
+ Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15730
+ })();
15731
+ (function() {
15732
+ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15733
+ })();
15306
15734
 
15307
15735
  /**
15308
15736
  * Scene manager.
@@ -15350,7 +15778,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15350
15778
  }
15351
15779
  allScenes.length = 0;
15352
15780
  };
15353
- _create_class__default['default'](SceneManager, [
15781
+ _create_class(SceneManager, [
15354
15782
  {
15355
15783
  key: "activeScene",
15356
15784
  get: /**
@@ -15385,7 +15813,7 @@ var pbrSpecularFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_decl
15385
15813
 
15386
15814
  var pbrVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#include <blendShape_input>\n#include <uv_share>\n#include <color_share>\n#include <normal_share>\n#include <worldpos_share>\n#include <ShadowVertexDeclaration>\n#include <FogVertexDeclaration>\nvoid main(){\n#include <begin_position_vert>\n#include <begin_normal_vert>\n#include <blendShape_vert>\n#include <skinning_vert>\n#include <uv_vert>\n#include <color_vert>\n#include <normal_vert>\n#include <worldpos_vert>\n#include <position_vert>\n#include <ShadowVertex>\n#include <FogVertex>\n}"; // eslint-disable-line
15387
15815
 
15388
- var shadowMapFs = "#define GLSLIFY 1\n#ifdef OASIS_NO_DEPTH_TEXTURE\n/***Decompose and save depth value.*/vec4 pack(float depth){const vec4 bitShift=vec4(1.0,256.0,256.0*256.0,256.0*256.0*256.0);const vec4 bitMask=vec4(1.0/256.0,1.0/256.0,1.0/256.0,0.0);vec4 rgbaDepth=fract(depth*bitShift);rgbaDepth-=rgbaDepth.gbaa*bitMask;return rgbaDepth;}\n#endif\nvoid main(){\n#ifdef OASIS_NO_DEPTH_TEXTURE\ngl_FragColor=pack(gl_FragCoord.z);\n#else\ngl_FragColor=vec4(0.0,0.0,0.0,0.0);\n#endif\n}"; // eslint-disable-line
15816
+ var shadowMapFs = "#define GLSLIFY 1\n#ifdef OASIS_NO_DEPTH_TEXTURE\nvec4 pack(float depth){const vec4 bitShift=vec4(1.0,256.0,256.0*256.0,256.0*256.0*256.0);const vec4 bitMask=vec4(1.0/256.0,1.0/256.0,1.0/256.0,0.0);vec4 rgbaDepth=fract(depth*bitShift);rgbaDepth-=rgbaDepth.gbaa*bitMask;return rgbaDepth;}\n#endif\nvoid main(){\n#ifdef OASIS_NO_DEPTH_TEXTURE\ngl_FragColor=pack(gl_FragCoord.z);\n#else\ngl_FragColor=vec4(0.0,0.0,0.0,0.0);\n#endif\n}"; // eslint-disable-line
15389
15817
 
15390
15818
  var shadowMapVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#include <blendShape_input>\n#include <normal_share>\nuniform mat4 u_VPMat;uniform vec2 u_shadowBias;uniform vec3 u_lightDirection;vec3 applyShadowBias(vec3 positionWS){positionWS-=u_lightDirection*u_shadowBias.x;return positionWS;}vec3 applyShadowNormalBias(vec3 positionWS,vec3 normalWS){float invNdotL=1.0-clamp(dot(-u_lightDirection,normalWS),0.0,1.0);float scale=invNdotL*u_shadowBias.y;positionWS+=normalWS*vec3(scale);return positionWS;}void main(){\n#include <begin_position_vert>\n#include <begin_normal_vert>\n#include <blendShape_vert>\n#include <skinning_vert>\nvec4 positionWS=u_modelMat*position;positionWS.xyz=applyShadowBias(positionWS.xyz);\n#ifndef OMIT_NORMAL\n#ifdef O3_HAS_NORMAL\nvec3 normalWS=normalize(mat3(u_normalMat)*normal);positionWS.xyz=applyShadowNormalBias(positionWS.xyz,normalWS);\n#endif\n#endif\nvec4 positionCS=u_VPMat*positionWS;positionCS.z=max(positionCS.z,-1.0);gl_Position=positionCS;}"; // eslint-disable-line
15391
15819
 
@@ -15504,7 +15932,7 @@ ShaderPool.init();
15504
15932
  /**
15505
15933
  * Engine.
15506
15934
  */ var Engine = /*#__PURE__*/ function(EventDispatcher) {
15507
- _inherits__default['default'](Engine, EventDispatcher);
15935
+ _inherits(Engine, EventDispatcher);
15508
15936
  function Engine(canvas, hardwareRenderer, settings) {
15509
15937
  var _this;
15510
15938
  _this = EventDispatcher.call(this) || this;
@@ -15521,8 +15949,8 @@ ShaderPool.init();
15521
15949
  /** @internal */ _this._canSpriteBatch = true;
15522
15950
  /** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
15523
15951
  _this._settings = {};
15524
- _this._resourceManager = new ResourceManager(_assert_this_initialized__default['default'](_this));
15525
- _this._sceneManager = new SceneManager(_assert_this_initialized__default['default'](_this));
15952
+ _this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
15953
+ _this._sceneManager = new SceneManager(_assert_this_initialized(_this));
15526
15954
  _this._vSyncCount = 1;
15527
15955
  _this._targetFrameRate = 60;
15528
15956
  _this._time = new Time();
@@ -15546,25 +15974,25 @@ ShaderPool.init();
15546
15974
  };
15547
15975
  _this._hardwareRenderer = hardwareRenderer;
15548
15976
  _this._hardwareRenderer.init(canvas);
15549
- _this.physicsManager = new PhysicsManager(_assert_this_initialized__default['default'](_this));
15977
+ _this.physicsManager = new PhysicsManager(_assert_this_initialized(_this));
15550
15978
  _this._canvas = canvas;
15551
- _this._sceneManager.activeScene = new Scene(_assert_this_initialized__default['default'](_this), "DefaultScene");
15552
- _this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized__default['default'](_this));
15979
+ _this._sceneManager.activeScene = new Scene(_assert_this_initialized(_this), "DefaultScene");
15980
+ _this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized(_this));
15553
15981
  _this._spriteDefaultMaterial = _this._createSpriteMaterial();
15554
15982
  _this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
15555
- _this._textDefaultFont = Font.createFromOS(_assert_this_initialized__default['default'](_this), "Arial");
15983
+ _this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
15556
15984
  _this._textDefaultFont.isGCIgnored = true;
15557
- _this.inputManager = new InputManager(_assert_this_initialized__default['default'](_this));
15985
+ _this.inputManager = new InputManager(_assert_this_initialized(_this));
15558
15986
  var magentaPixel = new Uint8Array([
15559
15987
  255,
15560
15988
  0,
15561
15989
  255,
15562
15990
  255
15563
15991
  ]);
15564
- var magentaTexture2D = new Texture2D(_assert_this_initialized__default['default'](_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15992
+ var magentaTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15565
15993
  magentaTexture2D.setPixelBuffer(magentaPixel);
15566
15994
  magentaTexture2D.isGCIgnored = true;
15567
- var magentaTextureCube = new TextureCube(_assert_this_initialized__default['default'](_this), 1, exports.TextureFormat.R8G8B8A8, false);
15995
+ var magentaTextureCube = new TextureCube(_assert_this_initialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
15568
15996
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveX, magentaPixel);
15569
15997
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.NegativeX, magentaPixel);
15570
15998
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveY, magentaPixel);
@@ -15575,23 +16003,23 @@ ShaderPool.init();
15575
16003
  if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
15576
16004
  _this._macroCollection.enable(Engine._noDepthTextureMacro);
15577
16005
  } else {
15578
- var depthTexture2D = new Texture2D(_assert_this_initialized__default['default'](_this), 1, 1, exports.TextureFormat.Depth16, false);
16006
+ var depthTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
15579
16007
  depthTexture2D.isGCIgnored = true;
15580
16008
  _this._depthTexture2D = depthTexture2D;
15581
16009
  }
15582
16010
  _this._magentaTexture2D = magentaTexture2D;
15583
16011
  _this._magentaTextureCube = magentaTextureCube;
15584
16012
  if (hardwareRenderer.isWebGL2) {
15585
- var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized__default['default'](_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
16013
+ var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
15586
16014
  magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
15587
16015
  magentaTexture2DArray.isGCIgnored = true;
15588
16016
  _this._magentaTexture2DArray = magentaTexture2DArray;
15589
16017
  }
15590
- var magentaMaterial = new Material(_assert_this_initialized__default['default'](_this), Shader.find("unlit"));
16018
+ var magentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
15591
16019
  magentaMaterial.isGCIgnored = true;
15592
16020
  magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
15593
16021
  _this._magentaMaterial = magentaMaterial;
15594
- var backgroundTextureMaterial = new Material(_assert_this_initialized__default['default'](_this), Shader.find("background-texture"));
16022
+ var backgroundTextureMaterial = new Material(_assert_this_initialized(_this), Shader.find("background-texture"));
15595
16023
  backgroundTextureMaterial.isGCIgnored = true;
15596
16024
  backgroundTextureMaterial.renderState.depthState.compareFunction = exports.CompareFunction.LessEqual;
15597
16025
  _this._backgroundTextureMaterial = backgroundTextureMaterial;
@@ -15762,7 +16190,7 @@ ShaderPool.init();
15762
16190
  material.isGCIgnored = true;
15763
16191
  return material;
15764
16192
  };
15765
- _create_class__default['default'](Engine, [
16193
+ _create_class(Engine, [
15766
16194
  {
15767
16195
  key: "settings",
15768
16196
  get: /**
@@ -15850,14 +16278,20 @@ ShaderPool.init();
15850
16278
  ]);
15851
16279
  return Engine;
15852
16280
  }(EventDispatcher);
15853
- /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15854
- /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15855
- /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
16281
+ (function() {
16282
+ /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
16283
+ })();
16284
+ (function() {
16285
+ /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
16286
+ })();
16287
+ (function() {
16288
+ /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
16289
+ })();
15856
16290
 
15857
16291
  /**
15858
16292
  * Script class, used for logic writing.
15859
16293
  */ var Script = /*#__PURE__*/ function(Component) {
15860
- _inherits__default['default'](Script, Component);
16294
+ _inherits(Script, Component);
15861
16295
  function Script() {
15862
16296
  var _this;
15863
16297
  _this = Component.apply(this, arguments) || this;
@@ -16026,38 +16460,38 @@ ShaderPool.init();
16026
16460
  };
16027
16461
  return Script;
16028
16462
  }(Component);
16029
- _ts_decorate__default['default']([
16463
+ __decorate([
16030
16464
  ignoreClone
16031
16465
  ], Script.prototype, "_started", void 0);
16032
- _ts_decorate__default['default']([
16466
+ __decorate([
16033
16467
  ignoreClone
16034
16468
  ], Script.prototype, "_onStartIndex", void 0);
16035
- _ts_decorate__default['default']([
16469
+ __decorate([
16036
16470
  ignoreClone
16037
16471
  ], Script.prototype, "_onUpdateIndex", void 0);
16038
- _ts_decorate__default['default']([
16472
+ __decorate([
16039
16473
  ignoreClone
16040
16474
  ], Script.prototype, "_onLateUpdateIndex", void 0);
16041
- _ts_decorate__default['default']([
16475
+ __decorate([
16042
16476
  ignoreClone
16043
16477
  ], Script.prototype, "_onPhysicsUpdateIndex", void 0);
16044
- _ts_decorate__default['default']([
16478
+ __decorate([
16045
16479
  ignoreClone
16046
16480
  ], Script.prototype, "_onPreRenderIndex", void 0);
16047
- _ts_decorate__default['default']([
16481
+ __decorate([
16048
16482
  ignoreClone
16049
16483
  ], Script.prototype, "_onPostRenderIndex", void 0);
16050
- _ts_decorate__default['default']([
16484
+ __decorate([
16051
16485
  ignoreClone
16052
16486
  ], Script.prototype, "_entityScriptsIndex", void 0);
16053
- _ts_decorate__default['default']([
16487
+ __decorate([
16054
16488
  ignoreClone
16055
16489
  ], Script.prototype, "_waitHandlingInValid", void 0);
16056
16490
 
16057
16491
  /**
16058
16492
  * @internal
16059
16493
  */ var SpriteBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
16060
- _inherits__default['default'](SpriteBatcher, Basic2DBatcher);
16494
+ _inherits(SpriteBatcher, Basic2DBatcher);
16061
16495
  function SpriteBatcher() {
16062
16496
  return Basic2DBatcher.apply(this, arguments);
16063
16497
  }
@@ -16167,7 +16601,9 @@ _ts_decorate__default['default']([
16167
16601
  };
16168
16602
  return SpriteBatcher;
16169
16603
  }(Basic2DBatcher);
16170
- SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16604
+ (function() {
16605
+ SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16606
+ })();
16171
16607
 
16172
16608
  /**
16173
16609
  * Render queue.
@@ -16665,227 +17101,247 @@ var /**
16665
17101
  };
16666
17102
  return ShadowUtils;
16667
17103
  }();
16668
- ShadowUtils._tempMatrix0 = new miniprogram.Matrix();
16669
- // prettier-ignore
16670
- /** @internal */ ShadowUtils._shadowMapCoordMatrix = new miniprogram.Matrix(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);
16671
- ShadowUtils._frustumCorners = [
16672
- new miniprogram.Vector3(),
16673
- new miniprogram.Vector3(),
16674
- new miniprogram.Vector3(),
16675
- new miniprogram.Vector3(),
16676
- new miniprogram.Vector3(),
16677
- new miniprogram.Vector3(),
16678
- new miniprogram.Vector3(),
16679
- new miniprogram.Vector3()
16680
- ];
16681
- ShadowUtils._adjustNearPlane = new miniprogram.Plane(new miniprogram.Vector3());
16682
- ShadowUtils._adjustFarPlane = new miniprogram.Plane(new miniprogram.Vector3());
16683
- ShadowUtils._backPlaneFaces = new Array(5);
16684
- ShadowUtils._edgePlanePoint2 = new miniprogram.Vector3();
16685
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16686
- [
16687
- miniprogram.FrustumFace.Left,
16688
- miniprogram.FrustumFace.Right,
16689
- miniprogram.FrustumFace.Top,
16690
- miniprogram.FrustumFace.Bottom
16691
- ],
16692
- [
16693
- miniprogram.FrustumFace.Left,
16694
- miniprogram.FrustumFace.Right,
16695
- miniprogram.FrustumFace.Top,
16696
- miniprogram.FrustumFace.Bottom
16697
- ],
16698
- [
16699
- miniprogram.FrustumFace.Near,
16700
- miniprogram.FrustumFace.Far,
16701
- miniprogram.FrustumFace.Top,
16702
- miniprogram.FrustumFace.Bottom
16703
- ],
16704
- [
16705
- miniprogram.FrustumFace.Near,
16706
- miniprogram.FrustumFace.Far,
16707
- miniprogram.FrustumFace.Top,
16708
- miniprogram.FrustumFace.Bottom
16709
- ],
16710
- [
16711
- miniprogram.FrustumFace.Near,
16712
- miniprogram.FrustumFace.Far,
16713
- miniprogram.FrustumFace.Left,
16714
- miniprogram.FrustumFace.Right
16715
- ],
16716
- [
16717
- miniprogram.FrustumFace.Near,
16718
- miniprogram.FrustumFace.Far,
16719
- miniprogram.FrustumFace.Left,
16720
- miniprogram.FrustumFace.Right
16721
- ]
16722
- ];
16723
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16724
- [
16725
- // near, far, left, right, bottom, top
16726
- [
16727
- 8,
16728
- 8
16729
- ],
16730
- [
16731
- 8,
16732
- 8
16733
- ],
16734
- [
16735
- 4,
16736
- 5
16737
- ],
16738
- [
16739
- 6,
16740
- 7
16741
- ],
16742
- [
16743
- 7,
16744
- 4
16745
- ],
16746
- [
16747
- 5,
16748
- 6
16749
- ]
16750
- ],
16751
- [
16752
- // near, far, left, right, bottom, top
16753
- [
16754
- 8,
16755
- 8
16756
- ],
16757
- [
16758
- 8,
16759
- 8
16760
- ],
16761
- [
16762
- 1,
16763
- 0
16764
- ],
16765
- [
16766
- 3,
16767
- 2
16768
- ],
16769
- [
16770
- 0,
16771
- 3
16772
- ],
16773
- [
16774
- 2,
16775
- 1
16776
- ]
16777
- ],
16778
- [
16779
- // near, far, left, right, bottom, top
16780
- [
16781
- 5,
16782
- 4
16783
- ],
16784
- [
16785
- 0,
16786
- 1
16787
- ],
16788
- [
16789
- 8,
16790
- 8
16791
- ],
16792
- [
16793
- 8,
16794
- 8
16795
- ],
16796
- [
16797
- 4,
16798
- 0
16799
- ],
16800
- [
16801
- 1,
16802
- 5
16803
- ]
16804
- ],
16805
- [
16806
- // near, far, left, right, bottom, top
17104
+ (function() {
17105
+ ShadowUtils._tempMatrix0 = new miniprogram.Matrix();
17106
+ })();
17107
+ (function() {
17108
+ // prettier-ignore
17109
+ /** @internal */ ShadowUtils._shadowMapCoordMatrix = new miniprogram.Matrix(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);
17110
+ })();
17111
+ (function() {
17112
+ ShadowUtils._frustumCorners = [
17113
+ new miniprogram.Vector3(),
17114
+ new miniprogram.Vector3(),
17115
+ new miniprogram.Vector3(),
17116
+ new miniprogram.Vector3(),
17117
+ new miniprogram.Vector3(),
17118
+ new miniprogram.Vector3(),
17119
+ new miniprogram.Vector3(),
17120
+ new miniprogram.Vector3()
17121
+ ];
17122
+ })();
17123
+ (function() {
17124
+ ShadowUtils._adjustNearPlane = new miniprogram.Plane(new miniprogram.Vector3());
17125
+ })();
17126
+ (function() {
17127
+ ShadowUtils._adjustFarPlane = new miniprogram.Plane(new miniprogram.Vector3());
17128
+ })();
17129
+ (function() {
17130
+ ShadowUtils._backPlaneFaces = new Array(5);
17131
+ })();
17132
+ (function() {
17133
+ ShadowUtils._edgePlanePoint2 = new miniprogram.Vector3();
17134
+ })();
17135
+ (function() {
17136
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16807
17137
  [
16808
- 7,
16809
- 6
17138
+ miniprogram.FrustumFace.Left,
17139
+ miniprogram.FrustumFace.Right,
17140
+ miniprogram.FrustumFace.Top,
17141
+ miniprogram.FrustumFace.Bottom
16810
17142
  ],
16811
17143
  [
16812
- 2,
16813
- 3
17144
+ miniprogram.FrustumFace.Left,
17145
+ miniprogram.FrustumFace.Right,
17146
+ miniprogram.FrustumFace.Top,
17147
+ miniprogram.FrustumFace.Bottom
16814
17148
  ],
16815
17149
  [
16816
- 8,
16817
- 8
17150
+ miniprogram.FrustumFace.Near,
17151
+ miniprogram.FrustumFace.Far,
17152
+ miniprogram.FrustumFace.Top,
17153
+ miniprogram.FrustumFace.Bottom
16818
17154
  ],
16819
17155
  [
16820
- 8,
16821
- 8
17156
+ miniprogram.FrustumFace.Near,
17157
+ miniprogram.FrustumFace.Far,
17158
+ miniprogram.FrustumFace.Top,
17159
+ miniprogram.FrustumFace.Bottom
16822
17160
  ],
16823
17161
  [
16824
- 3,
16825
- 7
17162
+ miniprogram.FrustumFace.Near,
17163
+ miniprogram.FrustumFace.Far,
17164
+ miniprogram.FrustumFace.Left,
17165
+ miniprogram.FrustumFace.Right
16826
17166
  ],
16827
17167
  [
16828
- 6,
16829
- 2
17168
+ miniprogram.FrustumFace.Near,
17169
+ miniprogram.FrustumFace.Far,
17170
+ miniprogram.FrustumFace.Left,
17171
+ miniprogram.FrustumFace.Right
16830
17172
  ]
16831
- ],
16832
- [
16833
- // near, far, left, right, bottom, top
16834
- [
16835
- 4,
16836
- 7
16837
- ],
16838
- [
16839
- 3,
16840
- 0
16841
- ],
16842
- [
16843
- 0,
16844
- 4
16845
- ],
16846
- [
16847
- 7,
16848
- 3
16849
- ],
16850
- [
16851
- 8,
16852
- 8
16853
- ],
16854
- [
16855
- 8,
16856
- 8
16857
- ]
16858
- ],
16859
- [
16860
- // near, far, left, right, bottom, top
17173
+ ];
17174
+ })();
17175
+ (function() {
17176
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16861
17177
  [
16862
- 6,
16863
- 5
17178
+ // near, far, left, right, bottom, top
17179
+ [
17180
+ 8,
17181
+ 8
17182
+ ],
17183
+ [
17184
+ 8,
17185
+ 8
17186
+ ],
17187
+ [
17188
+ 4,
17189
+ 5
17190
+ ],
17191
+ [
17192
+ 6,
17193
+ 7
17194
+ ],
17195
+ [
17196
+ 7,
17197
+ 4
17198
+ ],
17199
+ [
17200
+ 5,
17201
+ 6
17202
+ ]
16864
17203
  ],
16865
17204
  [
16866
- 1,
16867
- 2
17205
+ // near, far, left, right, bottom, top
17206
+ [
17207
+ 8,
17208
+ 8
17209
+ ],
17210
+ [
17211
+ 8,
17212
+ 8
17213
+ ],
17214
+ [
17215
+ 1,
17216
+ 0
17217
+ ],
17218
+ [
17219
+ 3,
17220
+ 2
17221
+ ],
17222
+ [
17223
+ 0,
17224
+ 3
17225
+ ],
17226
+ [
17227
+ 2,
17228
+ 1
17229
+ ]
16868
17230
  ],
16869
17231
  [
16870
- 5,
16871
- 1
17232
+ // near, far, left, right, bottom, top
17233
+ [
17234
+ 5,
17235
+ 4
17236
+ ],
17237
+ [
17238
+ 0,
17239
+ 1
17240
+ ],
17241
+ [
17242
+ 8,
17243
+ 8
17244
+ ],
17245
+ [
17246
+ 8,
17247
+ 8
17248
+ ],
17249
+ [
17250
+ 4,
17251
+ 0
17252
+ ],
17253
+ [
17254
+ 1,
17255
+ 5
17256
+ ]
16872
17257
  ],
16873
17258
  [
16874
- 2,
16875
- 6
17259
+ // near, far, left, right, bottom, top
17260
+ [
17261
+ 7,
17262
+ 6
17263
+ ],
17264
+ [
17265
+ 2,
17266
+ 3
17267
+ ],
17268
+ [
17269
+ 8,
17270
+ 8
17271
+ ],
17272
+ [
17273
+ 8,
17274
+ 8
17275
+ ],
17276
+ [
17277
+ 3,
17278
+ 7
17279
+ ],
17280
+ [
17281
+ 6,
17282
+ 2
17283
+ ]
16876
17284
  ],
16877
17285
  [
16878
- 8,
16879
- 8
17286
+ // near, far, left, right, bottom, top
17287
+ [
17288
+ 4,
17289
+ 7
17290
+ ],
17291
+ [
17292
+ 3,
17293
+ 0
17294
+ ],
17295
+ [
17296
+ 0,
17297
+ 4
17298
+ ],
17299
+ [
17300
+ 7,
17301
+ 3
17302
+ ],
17303
+ [
17304
+ 8,
17305
+ 8
17306
+ ],
17307
+ [
17308
+ 8,
17309
+ 8
17310
+ ]
16880
17311
  ],
16881
17312
  [
16882
- 8,
16883
- 8
17313
+ // near, far, left, right, bottom, top
17314
+ [
17315
+ 6,
17316
+ 5
17317
+ ],
17318
+ [
17319
+ 1,
17320
+ 2
17321
+ ],
17322
+ [
17323
+ 5,
17324
+ 1
17325
+ ],
17326
+ [
17327
+ 2,
17328
+ 6
17329
+ ],
17330
+ [
17331
+ 8,
17332
+ 8
17333
+ ],
17334
+ [
17335
+ 8,
17336
+ 8
17337
+ ]
16884
17338
  ]
16885
- ]
16886
- ];
16887
- //now max shadow sample tent is 5x5, atlas borderSize at least 3=ceil(2.5),and +1 pixel is for global border for no cascade mode.
16888
- ShadowUtils.atlasBorderSize = 4.0;
17339
+ ];
17340
+ })();
17341
+ (function() {
17342
+ //now max shadow sample tent is 5x5, atlas borderSize at least 3=ceil(2.5),and +1 pixel is for global border for no cascade mode.
17343
+ ShadowUtils.atlasBorderSize = 4.0;
17344
+ })();
16889
17345
 
16890
17346
  /**
16891
17347
  * Cascade shadow caster.
@@ -17126,19 +17582,45 @@ ShadowUtils.atlasBorderSize = 4.0;
17126
17582
  };
17127
17583
  return CascadedShadowCasterPass;
17128
17584
  }();
17129
- CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17130
- CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17131
- CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17132
- CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17133
- CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17134
- CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17135
- CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17136
- CascadedShadowCasterPass._maxCascades = 4;
17137
- CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17138
- CascadedShadowCasterPass._viewport = new miniprogram.Vector4(0, 0, 1, 1);
17139
- CascadedShadowCasterPass._clearColor = new miniprogram.Color(1, 1, 1, 1);
17140
- CascadedShadowCasterPass._tempVector = new miniprogram.Vector3();
17141
- CascadedShadowCasterPass._tempMatrix0 = new miniprogram.Matrix();
17585
+ (function() {
17586
+ CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17587
+ })();
17588
+ (function() {
17589
+ CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17590
+ })();
17591
+ (function() {
17592
+ CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17593
+ })();
17594
+ (function() {
17595
+ CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17596
+ })();
17597
+ (function() {
17598
+ CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17599
+ })();
17600
+ (function() {
17601
+ CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17602
+ })();
17603
+ (function() {
17604
+ CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17605
+ })();
17606
+ (function() {
17607
+ CascadedShadowCasterPass._maxCascades = 4;
17608
+ })();
17609
+ (function() {
17610
+ CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17611
+ })();
17612
+ (function() {
17613
+ CascadedShadowCasterPass._viewport = new miniprogram.Vector4(0, 0, 1, 1);
17614
+ })();
17615
+ (function() {
17616
+ CascadedShadowCasterPass._clearColor = new miniprogram.Color(1, 1, 1, 1);
17617
+ })();
17618
+ (function() {
17619
+ CascadedShadowCasterPass._tempVector = new miniprogram.Vector3();
17620
+ })();
17621
+ (function() {
17622
+ CascadedShadowCasterPass._tempMatrix0 = new miniprogram.Matrix();
17623
+ })();
17142
17624
 
17143
17625
  var passNum = 0;
17144
17626
  /**
@@ -17215,7 +17697,7 @@ var passNum = 0;
17215
17697
  if (typeof nameOrPass === "string") {
17216
17698
  var renderPass = new RenderPass(nameOrPass, priority, renderTarget, replaceMaterial, mask);
17217
17699
  this._renderPassArray.push(renderPass);
17218
- } else if (_instanceof__default['default'](nameOrPass, RenderPass)) {
17700
+ } else if (_instanceof(nameOrPass, RenderPass)) {
17219
17701
  this._renderPassArray.push(nameOrPass);
17220
17702
  }
17221
17703
  this._renderPassArray.sort(function(p1, p2) {
@@ -17228,7 +17710,7 @@ var passNum = 0;
17228
17710
  */ _proto.removeRenderPass = function removeRenderPass(nameOrPass) {
17229
17711
  var pass;
17230
17712
  if (typeof nameOrPass === "string") pass = this.getRenderPass(nameOrPass);
17231
- else if (_instanceof__default['default'](nameOrPass, RenderPass)) pass = nameOrPass;
17713
+ else if (_instanceof(nameOrPass, RenderPass)) pass = nameOrPass;
17232
17714
  if (pass) {
17233
17715
  var idx = this._renderPassArray.indexOf(pass);
17234
17716
  this._renderPassArray.splice(idx, 1);
@@ -17371,7 +17853,7 @@ var passNum = 0;
17371
17853
  renderer._prepareRender(context);
17372
17854
  }
17373
17855
  };
17374
- _create_class__default['default'](BasicRenderPipeline, [
17856
+ _create_class(BasicRenderPipeline, [
17375
17857
  {
17376
17858
  key: "defaultRenderPass",
17377
17859
  get: /**
@@ -17383,17 +17865,27 @@ var passNum = 0;
17383
17865
  ]);
17384
17866
  return BasicRenderPipeline;
17385
17867
  }();
17386
- BasicRenderPipeline._tempVector0 = new miniprogram.Vector3();
17387
- BasicRenderPipeline._tempVector1 = new miniprogram.Vector3();
17868
+ (function() {
17869
+ BasicRenderPipeline._tempVector0 = new miniprogram.Vector3();
17870
+ })();
17871
+ (function() {
17872
+ BasicRenderPipeline._tempVector1 = new miniprogram.Vector3();
17873
+ })();
17388
17874
 
17389
17875
  var _Camera;
17390
17876
  var MathTemp = function MathTemp() {
17391
17877
  };
17392
- MathTemp.tempVec4 = new miniprogram.Vector4();
17393
- MathTemp.tempVec3 = new miniprogram.Vector3();
17394
- MathTemp.tempVec2 = new miniprogram.Vector2();
17878
+ (function() {
17879
+ MathTemp.tempVec4 = new miniprogram.Vector4();
17880
+ })();
17881
+ (function() {
17882
+ MathTemp.tempVec3 = new miniprogram.Vector3();
17883
+ })();
17884
+ (function() {
17885
+ MathTemp.tempVec2 = new miniprogram.Vector2();
17886
+ })();
17395
17887
  exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17396
- _inherits__default['default'](Camera1, Component);
17888
+ _inherits(Camera1, Component);
17397
17889
  function Camera1(entity) {
17398
17890
  var _this;
17399
17891
  _this = Component.call(this, entity) || this;
@@ -17408,6 +17900,8 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17408
17900
  * @remarks Support bit manipulation, corresponding to `Layer`.
17409
17901
  */ _this.cullingMask = exports.Layer.Everything;
17410
17902
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
17903
+ /** @internal */ _this._frustum = new miniprogram.BoundingFrustum();
17904
+ /** @internal */ _this._virtualCamera = new VirtualCamera();
17411
17905
  _this._shaderData = new ShaderData(ShaderDataGroup.Camera);
17412
17906
  _this._isProjMatSetting = false;
17413
17907
  _this._nearClipPlane = 0.1;
@@ -17419,8 +17913,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17419
17913
  _this._isFrustumProjectDirty = true;
17420
17914
  _this._customAspectRatio = undefined;
17421
17915
  _this._renderTarget = null;
17422
- /** @internal */ _this._frustum = new miniprogram.BoundingFrustum();
17423
- /** @internal */ _this._virtualCamera = new VirtualCamera();
17424
17916
  _this._viewport = new miniprogram.Vector4(0, 0, 1, 1);
17425
17917
  _this._inverseProjectionMatrix = new miniprogram.Matrix();
17426
17918
  _this._lastAspectSize = new miniprogram.Vector2(0, 0);
@@ -17430,7 +17922,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17430
17922
  _this._isViewMatrixDirty = transform.registerWorldChangeFlag();
17431
17923
  _this._isInvViewProjDirty = transform.registerWorldChangeFlag();
17432
17924
  _this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
17433
- _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized__default['default'](_this));
17925
+ _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
17434
17926
  _this.shaderData._addRefCount(1);
17435
17927
  return _this;
17436
17928
  }
@@ -17661,7 +18153,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17661
18153
  }
17662
18154
  return this._inverseProjectionMatrix;
17663
18155
  };
17664
- _create_class__default['default'](Camera1, [
18156
+ _create_class(Camera1, [
17665
18157
  {
17666
18158
  key: "shaderData",
17667
18159
  get: /**
@@ -17833,41 +18325,45 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17833
18325
  }
17834
18326
  ]);
17835
18327
  return Camera1;
17836
- }(Component), /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat"), /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos"), _Camera);
17837
- _ts_decorate__default['default']([
18328
+ }(Component), function() {
18329
+ /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat");
18330
+ }(), function() {
18331
+ /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
18332
+ }(), _Camera);
18333
+ __decorate([
17838
18334
  deepClone
17839
18335
  ], exports.Camera.prototype, "_frustum", void 0);
17840
- _ts_decorate__default['default']([
18336
+ __decorate([
17841
18337
  ignoreClone
17842
18338
  ], exports.Camera.prototype, "_renderPipeline", void 0);
17843
- _ts_decorate__default['default']([
18339
+ __decorate([
17844
18340
  ignoreClone
17845
18341
  ], exports.Camera.prototype, "_virtualCamera", void 0);
17846
- _ts_decorate__default['default']([
18342
+ __decorate([
17847
18343
  ignoreClone
17848
18344
  ], exports.Camera.prototype, "_frustumViewChangeFlag", void 0);
17849
- _ts_decorate__default['default']([
18345
+ __decorate([
17850
18346
  ignoreClone
17851
18347
  ], exports.Camera.prototype, "_transform", void 0);
17852
- _ts_decorate__default['default']([
18348
+ __decorate([
17853
18349
  ignoreClone
17854
18350
  ], exports.Camera.prototype, "_isViewMatrixDirty", void 0);
17855
- _ts_decorate__default['default']([
18351
+ __decorate([
17856
18352
  ignoreClone
17857
18353
  ], exports.Camera.prototype, "_isInvViewProjDirty", void 0);
17858
- _ts_decorate__default['default']([
18354
+ __decorate([
17859
18355
  deepClone
17860
18356
  ], exports.Camera.prototype, "_viewport", void 0);
17861
- _ts_decorate__default['default']([
18357
+ __decorate([
17862
18358
  deepClone
17863
18359
  ], exports.Camera.prototype, "_inverseProjectionMatrix", void 0);
17864
- _ts_decorate__default['default']([
18360
+ __decorate([
17865
18361
  deepClone
17866
18362
  ], exports.Camera.prototype, "_lastAspectSize", void 0);
17867
- _ts_decorate__default['default']([
18363
+ __decorate([
17868
18364
  deepClone
17869
18365
  ], exports.Camera.prototype, "_invViewProjMat", void 0);
17870
- exports.Camera = _ts_decorate__default['default']([
18366
+ exports.Camera = __decorate([
17871
18367
  dependentComponents(Transform)
17872
18368
  ], exports.Camera);
17873
18369
 
@@ -18046,8 +18542,13 @@ var MultiExecutor = /*#__PURE__*/ function() {
18046
18542
  };
18047
18543
  return Loader;
18048
18544
  }();
18049
- Loader._engineObjects = {};
18545
+ (function() {
18546
+ Loader._engineObjects = {};
18547
+ })();
18050
18548
 
18549
+ /**
18550
+ * Asset Type.
18551
+ */ exports.AssetType = void 0;
18051
18552
  (function(AssetType) {
18052
18553
  AssetType[/**
18053
18554
  * Plain text.
@@ -18079,11 +18580,17 @@ Loader._engineObjects = {};
18079
18580
  AssetType[/** Source Font, include ttf、 otf and woff. */ "SourceFont"] = "source-font";
18080
18581
  })(exports.AssetType || (exports.AssetType = {}));
18081
18582
 
18583
+ /**
18584
+ * Alpha blend mode.
18585
+ */ exports.BlendMode = void 0;
18082
18586
  (function(BlendMode) {
18083
18587
  BlendMode[BlendMode[/** SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */ "Normal"] = 0] = "Normal";
18084
18588
  BlendMode[BlendMode[/** SRC ALPHA * SRC + ONE * DEST */ "Additive"] = 1] = "Additive";
18085
18589
  })(exports.BlendMode || (exports.BlendMode = {}));
18086
18590
 
18591
+ /**
18592
+ * Set which face for render.
18593
+ */ exports.RenderFace = void 0;
18087
18594
  (function(RenderFace) {
18088
18595
  RenderFace[RenderFace[/** Render front face. */ "Front"] = 0] = "Front";
18089
18596
  RenderFace[RenderFace[/** Render back face. */ "Back"] = 1] = "Back";
@@ -18091,7 +18598,7 @@ Loader._engineObjects = {};
18091
18598
  })(exports.RenderFace || (exports.RenderFace = {}));
18092
18599
 
18093
18600
  var BaseMaterial = /*#__PURE__*/ function(Material) {
18094
- _inherits__default['default'](BaseMaterial, Material);
18601
+ _inherits(BaseMaterial, Material);
18095
18602
  function BaseMaterial(engine, shader) {
18096
18603
  var _this;
18097
18604
  _this = Material.call(this, engine, shader) || this;
@@ -18190,7 +18697,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18190
18697
  target._isTransparent = this._isTransparent;
18191
18698
  target._blendMode = this._blendMode;
18192
18699
  };
18193
- _create_class__default['default'](BaseMaterial, [
18700
+ _create_class(BaseMaterial, [
18194
18701
  {
18195
18702
  key: "shader",
18196
18703
  get: /**
@@ -18290,24 +18797,50 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18290
18797
  ]);
18291
18798
  return BaseMaterial;
18292
18799
  }(Material);
18293
- BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18294
- BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18295
- BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18296
- BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18297
- BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18298
- BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18299
- BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18300
- BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18301
- BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18302
- BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18303
- BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18304
- BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18305
- BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18800
+ (function() {
18801
+ BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18802
+ })();
18803
+ (function() {
18804
+ BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18805
+ })();
18806
+ (function() {
18807
+ BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18808
+ })();
18809
+ (function() {
18810
+ BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18811
+ })();
18812
+ (function() {
18813
+ BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18814
+ })();
18815
+ (function() {
18816
+ BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18817
+ })();
18818
+ (function() {
18819
+ BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18820
+ })();
18821
+ (function() {
18822
+ BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18823
+ })();
18824
+ (function() {
18825
+ BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18826
+ })();
18827
+ (function() {
18828
+ BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18829
+ })();
18830
+ (function() {
18831
+ BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18832
+ })();
18833
+ (function() {
18834
+ BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18835
+ })();
18836
+ (function() {
18837
+ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18838
+ })();
18306
18839
 
18307
18840
  /**
18308
18841
  * Blinn-phong Material.
18309
18842
  */ var BlinnPhongMaterial = /*#__PURE__*/ function(BaseMaterial) {
18310
- _inherits__default['default'](BlinnPhongMaterial, BaseMaterial);
18843
+ _inherits(BlinnPhongMaterial, BaseMaterial);
18311
18844
  function BlinnPhongMaterial(engine) {
18312
18845
  var _this;
18313
18846
  _this = BaseMaterial.call(this, engine, Shader.find("blinn-phong")) || this;
@@ -18330,7 +18863,7 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18330
18863
  this.cloneTo(dest);
18331
18864
  return dest;
18332
18865
  };
18333
- _create_class__default['default'](BlinnPhongMaterial, [
18866
+ _create_class(BlinnPhongMaterial, [
18334
18867
  {
18335
18868
  key: "baseColor",
18336
18869
  get: /**
@@ -18476,10 +19009,19 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18476
19009
  ]);
18477
19010
  return BlinnPhongMaterial;
18478
19011
  }(BaseMaterial);
18479
- BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18480
- BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18481
- BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
19012
+ (function() {
19013
+ BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
19014
+ })();
19015
+ (function() {
19016
+ BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
19017
+ })();
19018
+ (function() {
19019
+ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
19020
+ })();
18482
19021
 
19022
+ /**
19023
+ * Texture UV coordinate.
19024
+ */ exports.TextureCoordinate = void 0;
18483
19025
  (function(TextureCoordinate) {
18484
19026
  TextureCoordinate[TextureCoordinate["UV0"] = 0] = "UV0";
18485
19027
  TextureCoordinate[TextureCoordinate["UV1"] = 1] = "UV1";
@@ -18494,7 +19036,7 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18494
19036
  /**
18495
19037
  * PBR (Physically-Based Rendering) Material.
18496
19038
  */ var PBRBaseMaterial = /*#__PURE__*/ function(BaseMaterial) {
18497
- _inherits__default['default'](PBRBaseMaterial, BaseMaterial);
19039
+ _inherits(PBRBaseMaterial, BaseMaterial);
18498
19040
  function PBRBaseMaterial(engine, shader) {
18499
19041
  var _this;
18500
19042
  _this = BaseMaterial.call(this, engine, shader) || this;
@@ -18511,7 +19053,7 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18511
19053
  shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
18512
19054
  return _this;
18513
19055
  }
18514
- _create_class__default['default'](PBRBaseMaterial, [
19056
+ _create_class(PBRBaseMaterial, [
18515
19057
  {
18516
19058
  key: "baseColor",
18517
19059
  get: /**
@@ -18735,19 +19277,35 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18735
19277
  ]);
18736
19278
  return PBRBaseMaterial;
18737
19279
  }(BaseMaterial);
18738
- PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18739
- PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18740
- PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18741
- PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18742
- PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18743
- PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18744
- PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18745
- PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
19280
+ (function() {
19281
+ PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
19282
+ })();
19283
+ (function() {
19284
+ PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
19285
+ })();
19286
+ (function() {
19287
+ PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
19288
+ })();
19289
+ (function() {
19290
+ PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
19291
+ })();
19292
+ (function() {
19293
+ PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
19294
+ })();
19295
+ (function() {
19296
+ PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
19297
+ })();
19298
+ (function() {
19299
+ PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
19300
+ })();
19301
+ (function() {
19302
+ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
19303
+ })();
18746
19304
 
18747
19305
  /**
18748
19306
  * PBR (Metallic-Roughness Workflow) Material.
18749
19307
  */ var PBRMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
18750
- _inherits__default['default'](PBRMaterial, PBRBaseMaterial);
19308
+ _inherits(PBRMaterial, PBRBaseMaterial);
18751
19309
  function PBRMaterial(engine) {
18752
19310
  var _this;
18753
19311
  _this = PBRBaseMaterial.call(this, engine, Shader.find("pbr")) || this;
@@ -18764,7 +19322,7 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18764
19322
  this.cloneTo(dest);
18765
19323
  return dest;
18766
19324
  };
18767
- _create_class__default['default'](PBRMaterial, [
19325
+ _create_class(PBRMaterial, [
18768
19326
  {
18769
19327
  key: "ior",
18770
19328
  get: /**
@@ -18821,15 +19379,23 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18821
19379
  ]);
18822
19380
  return PBRMaterial;
18823
19381
  }(PBRBaseMaterial);
18824
- PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
18825
- PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
18826
- PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
18827
- PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
19382
+ (function() {
19383
+ PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
19384
+ })();
19385
+ (function() {
19386
+ PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
19387
+ })();
19388
+ (function() {
19389
+ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
19390
+ })();
19391
+ (function() {
19392
+ PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
19393
+ })();
18828
19394
 
18829
19395
  /**
18830
19396
  * PBR (Specular-Glossiness Workflow) Material.
18831
19397
  */ var PBRSpecularMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
18832
- _inherits__default['default'](PBRSpecularMaterial, PBRBaseMaterial);
19398
+ _inherits(PBRSpecularMaterial, PBRBaseMaterial);
18833
19399
  function PBRSpecularMaterial(engine) {
18834
19400
  var _this;
18835
19401
  _this = PBRBaseMaterial.call(this, engine, Shader.find("pbr-specular")) || this;
@@ -18845,7 +19411,7 @@ PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
18845
19411
  this.cloneTo(dest);
18846
19412
  return dest;
18847
19413
  };
18848
- _create_class__default['default'](PBRSpecularMaterial, [
19414
+ _create_class(PBRSpecularMaterial, [
18849
19415
  {
18850
19416
  key: "specularColor",
18851
19417
  get: /**
@@ -18891,15 +19457,23 @@ PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
18891
19457
  ]);
18892
19458
  return PBRSpecularMaterial;
18893
19459
  }(PBRBaseMaterial);
18894
- PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
18895
- PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
18896
- PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
18897
- PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19460
+ (function() {
19461
+ PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
19462
+ })();
19463
+ (function() {
19464
+ PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
19465
+ })();
19466
+ (function() {
19467
+ PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
19468
+ })();
19469
+ (function() {
19470
+ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19471
+ })();
18898
19472
 
18899
19473
  /**
18900
19474
  * Unlit Material.
18901
19475
  */ var UnlitMaterial = /*#__PURE__*/ function(BaseMaterial) {
18902
- _inherits__default['default'](UnlitMaterial, BaseMaterial);
19476
+ _inherits(UnlitMaterial, BaseMaterial);
18903
19477
  function UnlitMaterial(engine) {
18904
19478
  var _this;
18905
19479
  _this = BaseMaterial.call(this, engine, Shader.find("unlit")) || this;
@@ -18918,7 +19492,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
18918
19492
  this.cloneTo(dest);
18919
19493
  return dest;
18920
19494
  };
18921
- _create_class__default['default'](UnlitMaterial, [
19495
+ _create_class(UnlitMaterial, [
18922
19496
  {
18923
19497
  key: "baseColor",
18924
19498
  get: /**
@@ -18967,22 +19541,32 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
18967
19541
  return UnlitMaterial;
18968
19542
  }(BaseMaterial);
18969
19543
 
19544
+ /**
19545
+ * The horizontal alignment of the text.
19546
+ */ exports.TextHorizontalAlignment = void 0;
18970
19547
  (function(TextHorizontalAlignment) {
18971
19548
  TextHorizontalAlignment[TextHorizontalAlignment[/** Align left horizontally */ "Left"] = 0] = "Left";
18972
19549
  TextHorizontalAlignment[TextHorizontalAlignment[/** Align center horizontally */ "Center"] = 1] = "Center";
18973
19550
  TextHorizontalAlignment[TextHorizontalAlignment[/** Align right horizontally */ "Right"] = 2] = "Right";
18974
19551
  })(exports.TextHorizontalAlignment || (exports.TextHorizontalAlignment = {}));
19552
+ exports.TextVerticalAlignment = void 0;
18975
19553
  (function(TextVerticalAlignment) {
18976
19554
  TextVerticalAlignment[TextVerticalAlignment[/** Align top vertically */ "Top"] = 0] = "Top";
18977
19555
  TextVerticalAlignment[TextVerticalAlignment[/** Align center vertically */ "Center"] = 1] = "Center";
18978
19556
  TextVerticalAlignment[TextVerticalAlignment[/** Align bottom vertically */ "Bottom"] = 2] = "Bottom";
18979
19557
  })(exports.TextVerticalAlignment || (exports.TextVerticalAlignment = {}));
18980
19558
 
19559
+ /**
19560
+ * The way to handle the situation where wrapped text is too tall to fit in the height.
19561
+ */ exports.OverflowMode = void 0;
18981
19562
  (function(OverflowMode) {
18982
19563
  OverflowMode[OverflowMode[/** Overflow when the text is too tall */ "Overflow"] = 0] = "Overflow";
18983
19564
  OverflowMode[OverflowMode[/** Truncate with height when the text is too tall */ "Truncate"] = 1] = "Truncate";
18984
19565
  })(exports.OverflowMode || (exports.OverflowMode = {}));
18985
19566
 
19567
+ /**
19568
+ * The style of the font.
19569
+ */ exports.FontStyle = void 0;
18986
19570
  (function(FontStyle) {
18987
19571
  FontStyle[FontStyle[/** Set font without style */ "None"] = 0x0] = "None";
18988
19572
  FontStyle[FontStyle[/** Set font bold */ "Bold"] = 0x1] = "Bold";
@@ -18992,7 +19576,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
18992
19576
  /**
18993
19577
  * Sprite Atlas.
18994
19578
  */ var SpriteAtlas = /*#__PURE__*/ function(RefObject) {
18995
- _inherits__default['default'](SpriteAtlas, RefObject);
19579
+ _inherits(SpriteAtlas, RefObject);
18996
19580
  function SpriteAtlas(engine) {
18997
19581
  var _this;
18998
19582
  _this = RefObject.call(this, engine) || this;
@@ -19049,7 +19633,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
19049
19633
  this._sprites = null;
19050
19634
  this._spriteNamesToIndex = null;
19051
19635
  };
19052
- _create_class__default['default'](SpriteAtlas, [
19636
+ _create_class(SpriteAtlas, [
19053
19637
  {
19054
19638
  key: "sprites",
19055
19639
  get: /**
@@ -19062,6 +19646,9 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
19062
19646
  return SpriteAtlas;
19063
19647
  }(RefObject);
19064
19648
 
19649
+ /**
19650
+ * Sprite's drawing mode enumeration.
19651
+ */ exports.SpriteDrawMode = void 0;
19065
19652
  (function(SpriteDrawMode) {
19066
19653
  SpriteDrawMode[SpriteDrawMode[/** Overall scaling when modifying size. */ "Simple"] = 0] = "Simple";
19067
19654
  SpriteDrawMode[SpriteDrawMode[/** When modifying the size, it is transformed according to the 9-slice settings (border). */ "Sliced"] = 1] = "Sliced";
@@ -19070,7 +19657,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
19070
19657
  /**
19071
19658
  * 2D sprite.
19072
19659
  */ var Sprite = /*#__PURE__*/ function(RefObject) {
19073
- _inherits__default['default'](Sprite, RefObject);
19660
+ _inherits(Sprite, RefObject);
19074
19661
  function Sprite(engine, texture, region, pivot, border, name) {
19075
19662
  if (texture === void 0) texture = null;
19076
19663
  if (region === void 0) region = null;
@@ -19246,7 +19833,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
19246
19833
  }
19247
19834
  this._updateFlagManager.dispatch(type);
19248
19835
  };
19249
- _create_class__default['default'](Sprite, [
19836
+ _create_class(Sprite, [
19250
19837
  {
19251
19838
  key: "texture",
19252
19839
  get: /**
@@ -19560,15 +20147,17 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
19560
20147
  };
19561
20148
  SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
19562
20149
  return SlicedSpriteAssembler1;
19563
- }(), _SlicedSpriteAssembler._worldMatrix = new miniprogram.Matrix(), _SlicedSpriteAssembler);
19564
- SlicedSpriteAssembler = _ts_decorate__default['default']([
20150
+ }(), function() {
20151
+ _SlicedSpriteAssembler._worldMatrix = new miniprogram.Matrix();
20152
+ }(), _SlicedSpriteAssembler);
20153
+ SlicedSpriteAssembler = __decorate([
19565
20154
  StaticInterfaceImplement()
19566
20155
  ], SlicedSpriteAssembler);
19567
20156
 
19568
20157
  /**
19569
20158
  * Renders a Sprite for 2D graphics.
19570
20159
  */ var SpriteRenderer = /*#__PURE__*/ function(Renderer) {
19571
- _inherits__default['default'](SpriteRenderer, Renderer);
20160
+ _inherits(SpriteRenderer, Renderer);
19572
20161
  function SpriteRenderer(entity) {
19573
20162
  var _this;
19574
20163
  _this = Renderer.call(this, entity) || this;
@@ -19585,7 +20174,7 @@ SlicedSpriteAssembler = _ts_decorate__default['default']([
19585
20174
  _this._renderData = new RenderData2D(4, [], [], null, _this._color);
19586
20175
  _this.drawMode = exports.SpriteDrawMode.Simple;
19587
20176
  _this.setMaterial(_this._engine._spriteDefaultMaterial);
19588
- _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized__default['default'](_this));
20177
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
19589
20178
  return _this;
19590
20179
  }
19591
20180
  var _proto = SpriteRenderer.prototype;
@@ -19706,7 +20295,7 @@ SlicedSpriteAssembler = _ts_decorate__default['default']([
19706
20295
  break;
19707
20296
  }
19708
20297
  };
19709
- _create_class__default['default'](SpriteRenderer, [
20298
+ _create_class(SpriteRenderer, [
19710
20299
  {
19711
20300
  key: "drawMode",
19712
20301
  get: /**
@@ -19871,47 +20460,49 @@ SlicedSpriteAssembler = _ts_decorate__default['default']([
19871
20460
  ]);
19872
20461
  return SpriteRenderer;
19873
20462
  }(exports.Renderer);
19874
- /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
19875
- _ts_decorate__default['default']([
20463
+ (function() {
20464
+ /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20465
+ })();
20466
+ __decorate([
19876
20467
  ignoreClone
19877
20468
  ], SpriteRenderer.prototype, "_renderData", void 0);
19878
- _ts_decorate__default['default']([
20469
+ __decorate([
19879
20470
  ignoreClone
19880
20471
  ], SpriteRenderer.prototype, "_drawMode", void 0);
19881
- _ts_decorate__default['default']([
20472
+ __decorate([
19882
20473
  ignoreClone
19883
20474
  ], SpriteRenderer.prototype, "_assembler", void 0);
19884
- _ts_decorate__default['default']([
20475
+ __decorate([
19885
20476
  deepClone
19886
20477
  ], SpriteRenderer.prototype, "_color", void 0);
19887
- _ts_decorate__default['default']([
20478
+ __decorate([
19888
20479
  ignoreClone
19889
20480
  ], SpriteRenderer.prototype, "_sprite", void 0);
19890
- _ts_decorate__default['default']([
20481
+ __decorate([
19891
20482
  ignoreClone
19892
20483
  ], SpriteRenderer.prototype, "_automaticWidth", void 0);
19893
- _ts_decorate__default['default']([
20484
+ __decorate([
19894
20485
  ignoreClone
19895
20486
  ], SpriteRenderer.prototype, "_automaticHeight", void 0);
19896
- _ts_decorate__default['default']([
20487
+ __decorate([
19897
20488
  assignmentClone
19898
20489
  ], SpriteRenderer.prototype, "_customWidth", void 0);
19899
- _ts_decorate__default['default']([
20490
+ __decorate([
19900
20491
  assignmentClone
19901
20492
  ], SpriteRenderer.prototype, "_customHeight", void 0);
19902
- _ts_decorate__default['default']([
20493
+ __decorate([
19903
20494
  assignmentClone
19904
20495
  ], SpriteRenderer.prototype, "_flipX", void 0);
19905
- _ts_decorate__default['default']([
20496
+ __decorate([
19906
20497
  assignmentClone
19907
20498
  ], SpriteRenderer.prototype, "_flipY", void 0);
19908
- _ts_decorate__default['default']([
20499
+ __decorate([
19909
20500
  assignmentClone
19910
20501
  ], SpriteRenderer.prototype, "_maskLayer", void 0);
19911
- _ts_decorate__default['default']([
20502
+ __decorate([
19912
20503
  assignmentClone
19913
20504
  ], SpriteRenderer.prototype, "_maskInteraction", void 0);
19914
- _ts_decorate__default['default']([
20505
+ __decorate([
19915
20506
  ignoreClone
19916
20507
  ], SpriteRenderer.prototype, "_onSpriteChange", null);
19917
20508
  var /**
@@ -19936,14 +20527,16 @@ var /**
19936
20527
  ];
19937
20528
  this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
19938
20529
  };
19939
- CharRenderData.triangles = [
19940
- 0,
19941
- 2,
19942
- 1,
19943
- 2,
19944
- 0,
19945
- 3
19946
- ];
20530
+ (function() {
20531
+ CharRenderData.triangles = [
20532
+ 0,
20533
+ 2,
20534
+ 1,
20535
+ 2,
20536
+ 0,
20537
+ 3
20538
+ ];
20539
+ })();
19947
20540
 
19948
20541
  /**
19949
20542
  * @internal
@@ -20267,28 +20860,42 @@ CharRenderData.triangles = [
20267
20860
  };
20268
20861
  return TextUtils;
20269
20862
  }();
20270
- /** @internal */ TextUtils._genericFontFamilies = [
20271
- "serif",
20272
- "sans-serif",
20273
- "monospace",
20274
- "cursive",
20275
- "fantasy",
20276
- "system-ui",
20277
- "math",
20278
- "emoji",
20279
- "fangsong"
20280
- ];
20281
- /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20282
- TextUtils._measureBaseline = "M";
20283
- TextUtils._heightMultiplier = 2;
20284
- TextUtils._baselineMultiplier = 1.4;
20285
- TextUtils._fontSizeInfoCache = {};
20286
- TextUtils._textContext = null;
20863
+ (function() {
20864
+ /** @internal */ TextUtils._genericFontFamilies = [
20865
+ "serif",
20866
+ "sans-serif",
20867
+ "monospace",
20868
+ "cursive",
20869
+ "fantasy",
20870
+ "system-ui",
20871
+ "math",
20872
+ "emoji",
20873
+ "fangsong"
20874
+ ];
20875
+ })();
20876
+ (function() {
20877
+ /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20878
+ })();
20879
+ (function() {
20880
+ TextUtils._measureBaseline = "M";
20881
+ })();
20882
+ (function() {
20883
+ TextUtils._heightMultiplier = 2;
20884
+ })();
20885
+ (function() {
20886
+ TextUtils._baselineMultiplier = 1.4;
20887
+ })();
20888
+ (function() {
20889
+ TextUtils._fontSizeInfoCache = {};
20890
+ })();
20891
+ (function() {
20892
+ TextUtils._textContext = null;
20893
+ })();
20287
20894
 
20288
20895
  /**
20289
20896
  * Renders a text for 2D graphics.
20290
20897
  */ var TextRenderer = /*#__PURE__*/ function(Renderer) {
20291
- _inherits__default['default'](TextRenderer, Renderer);
20898
+ _inherits(TextRenderer, Renderer);
20292
20899
  function TextRenderer(entity) {
20293
20900
  var _this;
20294
20901
  _this = Renderer.call(this, entity) || this;
@@ -20310,7 +20917,7 @@ TextUtils._textContext = null;
20310
20917
  _this._overflowMode = exports.OverflowMode.Overflow;
20311
20918
  _this._maskInteraction = exports.SpriteMaskInteraction.None;
20312
20919
  _this._maskLayer = exports.SpriteMaskLayer.Layer0;
20313
- var engine = _assert_this_initialized__default['default'](_this).engine;
20920
+ var engine = _assert_this_initialized(_this).engine;
20314
20921
  _this._font = engine._textDefaultFont;
20315
20922
  _this._font._addRefCount(1);
20316
20923
  _this.setMaterial(engine._spriteDefaultMaterial);
@@ -20550,7 +21157,7 @@ TextUtils._textContext = null;
20550
21157
  Renderer.prototype._onTransformChanged.call(this, bit);
20551
21158
  this._setDirtyFlagTrue(0x4 | 0x8);
20552
21159
  };
20553
- _create_class__default['default'](TextRenderer, [
21160
+ _create_class(TextRenderer, [
20554
21161
  {
20555
21162
  key: "color",
20556
21163
  get: /**
@@ -20763,61 +21370,67 @@ TextUtils._textContext = null;
20763
21370
  ]);
20764
21371
  return TextRenderer;
20765
21372
  }(exports.Renderer);
20766
- TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20767
- TextRenderer._tempVec30 = new miniprogram.Vector3();
20768
- TextRenderer._tempVec31 = new miniprogram.Vector3();
20769
- _ts_decorate__default['default']([
21373
+ (function() {
21374
+ TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
21375
+ })();
21376
+ (function() {
21377
+ TextRenderer._tempVec30 = new miniprogram.Vector3();
21378
+ })();
21379
+ (function() {
21380
+ TextRenderer._tempVec31 = new miniprogram.Vector3();
21381
+ })();
21382
+ __decorate([
20770
21383
  assignmentClone
20771
21384
  ], TextRenderer.prototype, "_subFont", void 0);
20772
- _ts_decorate__default['default']([
21385
+ __decorate([
20773
21386
  ignoreClone
20774
21387
  ], TextRenderer.prototype, "_charRenderDatas", void 0);
20775
- _ts_decorate__default['default']([
21388
+ __decorate([
20776
21389
  ignoreClone
20777
21390
  ], TextRenderer.prototype, "_dirtyFlag", void 0);
20778
- _ts_decorate__default['default']([
21391
+ __decorate([
20779
21392
  deepClone
20780
21393
  ], TextRenderer.prototype, "_color", void 0);
20781
- _ts_decorate__default['default']([
21394
+ __decorate([
20782
21395
  assignmentClone
20783
21396
  ], TextRenderer.prototype, "_text", void 0);
20784
- _ts_decorate__default['default']([
21397
+ __decorate([
20785
21398
  assignmentClone
20786
21399
  ], TextRenderer.prototype, "_width", void 0);
20787
- _ts_decorate__default['default']([
21400
+ __decorate([
20788
21401
  assignmentClone
20789
21402
  ], TextRenderer.prototype, "_height", void 0);
20790
- _ts_decorate__default['default']([
21403
+ __decorate([
20791
21404
  ignoreClone
20792
21405
  ], TextRenderer.prototype, "_localBounds", void 0);
20793
- _ts_decorate__default['default']([
21406
+ __decorate([
20794
21407
  assignmentClone
20795
21408
  ], TextRenderer.prototype, "_font", void 0);
20796
- _ts_decorate__default['default']([
21409
+ __decorate([
20797
21410
  assignmentClone
20798
21411
  ], TextRenderer.prototype, "_fontSize", void 0);
20799
- _ts_decorate__default['default']([
21412
+ __decorate([
20800
21413
  assignmentClone
20801
21414
  ], TextRenderer.prototype, "_fontStyle", void 0);
20802
- _ts_decorate__default['default']([
21415
+ __decorate([
20803
21416
  assignmentClone
20804
21417
  ], TextRenderer.prototype, "_lineSpacing", void 0);
20805
- _ts_decorate__default['default']([
21418
+ __decorate([
20806
21419
  assignmentClone
20807
21420
  ], TextRenderer.prototype, "_horizontalAlignment", void 0);
20808
- _ts_decorate__default['default']([
21421
+ __decorate([
20809
21422
  assignmentClone
20810
21423
  ], TextRenderer.prototype, "_verticalAlignment", void 0);
20811
- _ts_decorate__default['default']([
21424
+ __decorate([
20812
21425
  assignmentClone
20813
21426
  ], TextRenderer.prototype, "_enableWrapping", void 0);
20814
- _ts_decorate__default['default']([
21427
+ __decorate([
20815
21428
  assignmentClone
20816
21429
  ], TextRenderer.prototype, "_overflowMode", void 0);
20817
- _ts_decorate__default['default']([
21430
+ __decorate([
20818
21431
  assignmentClone
20819
21432
  ], TextRenderer.prototype, "_maskInteraction", void 0);
20820
- _ts_decorate__default['default']([
21433
+ __decorate([
20821
21434
  assignmentClone
20822
21435
  ], TextRenderer.prototype, "_maskLayer", void 0);
20823
21436
  var DirtyFlag;
@@ -20972,7 +21585,9 @@ var DirtyFlag;
20972
21585
  };
20973
21586
  return AnimationCurveOwner;
20974
21587
  }();
20975
- AnimationCurveOwner._assemblerMap = new Map();
21588
+ (function() {
21589
+ AnimationCurveOwner._assemblerMap = new Map();
21590
+ })();
20976
21591
 
20977
21592
  /**
20978
21593
  * @internal
@@ -21186,7 +21801,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21186
21801
  }
21187
21802
  }
21188
21803
  };
21189
- _create_class__default['default'](AnimationClip, [
21804
+ _create_class(AnimationClip, [
21190
21805
  {
21191
21806
  key: "events",
21192
21807
  get: /**
@@ -21215,6 +21830,9 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21215
21830
  return AnimationClip;
21216
21831
  }();
21217
21832
 
21833
+ /**
21834
+ * Animation interpolation method.
21835
+ */ exports.InterpolationType = void 0;
21218
21836
  (function(InterpolationType) {
21219
21837
  InterpolationType[InterpolationType[/** Linear interpolation */ "Linear"] = 0] = "Linear";
21220
21838
  InterpolationType[InterpolationType[/** Cubic spline interpolation */ "CubicSpine"] = 1] = "CubicSpine";
@@ -21332,7 +21950,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21332
21950
  var result = this._evaluate(time, evaluateData);
21333
21951
  return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
21334
21952
  };
21335
- _create_class__default['default'](AnimationCurve, [
21953
+ _create_class(AnimationCurve, [
21336
21954
  {
21337
21955
  key: "interpolation",
21338
21956
  get: /**
@@ -21363,7 +21981,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21363
21981
 
21364
21982
  var _AnimationArrayCurve;
21365
21983
  exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(AnimationCurve) {
21366
- _inherits__default['default'](AnimationArrayCurve, AnimationCurve);
21984
+ _inherits(AnimationArrayCurve, AnimationCurve);
21367
21985
  function AnimationArrayCurve() {
21368
21986
  var _this;
21369
21987
  _this = AnimationCurve.call(this) || this;
@@ -21447,14 +22065,18 @@ exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Ani
21447
22065
  return out;
21448
22066
  };
21449
22067
  return AnimationArrayCurve;
21450
- }(AnimationCurve), /** @internal */ _AnimationArrayCurve._isReferenceType = true, /** @internal */ _AnimationArrayCurve._isInterpolationType = true, _AnimationArrayCurve);
21451
- exports.AnimationArrayCurve = _ts_decorate__default['default']([
22068
+ }(AnimationCurve), function() {
22069
+ /** @internal */ _AnimationArrayCurve._isReferenceType = true;
22070
+ }(), function() {
22071
+ /** @internal */ _AnimationArrayCurve._isInterpolationType = true;
22072
+ }(), _AnimationArrayCurve);
22073
+ exports.AnimationArrayCurve = __decorate([
21452
22074
  StaticInterfaceImplement()
21453
22075
  ], exports.AnimationArrayCurve);
21454
22076
 
21455
22077
  var _AnimationBoolCurve;
21456
22078
  exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(AnimationCurve) {
21457
- _inherits__default['default'](AnimationBoolCurve, AnimationCurve);
22079
+ _inherits(AnimationBoolCurve, AnimationCurve);
21458
22080
  function AnimationBoolCurve() {
21459
22081
  var _this;
21460
22082
  _this = AnimationCurve.call(this) || this;
@@ -21505,14 +22127,18 @@ exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Anima
21505
22127
  return frame.value;
21506
22128
  };
21507
22129
  return AnimationBoolCurve;
21508
- }(AnimationCurve), /** @internal */ _AnimationBoolCurve._isReferenceType = false, /** @internal */ _AnimationBoolCurve._isInterpolationType = false, _AnimationBoolCurve);
21509
- exports.AnimationBoolCurve = _ts_decorate__default['default']([
22130
+ }(AnimationCurve), function() {
22131
+ /** @internal */ _AnimationBoolCurve._isReferenceType = false;
22132
+ }(), function() {
22133
+ /** @internal */ _AnimationBoolCurve._isInterpolationType = false;
22134
+ }(), _AnimationBoolCurve);
22135
+ exports.AnimationBoolCurve = __decorate([
21510
22136
  StaticInterfaceImplement()
21511
22137
  ], exports.AnimationBoolCurve);
21512
22138
 
21513
22139
  var _AnimationColorCurve;
21514
22140
  exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(AnimationCurve) {
21515
- _inherits__default['default'](AnimationColorCurve, AnimationCurve);
22141
+ _inherits(AnimationColorCurve, AnimationCurve);
21516
22142
  function AnimationColorCurve() {
21517
22143
  var _this;
21518
22144
  _this = AnimationCurve.call(this) || this;
@@ -21603,14 +22229,18 @@ exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Ani
21603
22229
  return out;
21604
22230
  };
21605
22231
  return AnimationColorCurve;
21606
- }(AnimationCurve), /** @internal */ _AnimationColorCurve._isReferenceType = true, /** @internal */ _AnimationColorCurve._isInterpolationType = true, _AnimationColorCurve);
21607
- exports.AnimationColorCurve = _ts_decorate__default['default']([
22232
+ }(AnimationCurve), function() {
22233
+ /** @internal */ _AnimationColorCurve._isReferenceType = true;
22234
+ }(), function() {
22235
+ /** @internal */ _AnimationColorCurve._isInterpolationType = true;
22236
+ }(), _AnimationColorCurve);
22237
+ exports.AnimationColorCurve = __decorate([
21608
22238
  StaticInterfaceImplement()
21609
22239
  ], exports.AnimationColorCurve);
21610
22240
 
21611
22241
  var _AnimationFloatArrayCurve;
21612
22242
  exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ function(AnimationCurve) {
21613
- _inherits__default['default'](AnimationFloatArrayCurve, AnimationCurve);
22243
+ _inherits(AnimationFloatArrayCurve, AnimationCurve);
21614
22244
  function AnimationFloatArrayCurve() {
21615
22245
  return AnimationCurve.apply(this, arguments);
21616
22246
  }
@@ -21705,14 +22335,18 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
21705
22335
  return out;
21706
22336
  };
21707
22337
  return AnimationFloatArrayCurve;
21708
- }(AnimationCurve), /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true, /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true, _AnimationFloatArrayCurve);
21709
- exports.AnimationFloatArrayCurve = _ts_decorate__default['default']([
22338
+ }(AnimationCurve), function() {
22339
+ /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true;
22340
+ }(), function() {
22341
+ /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
22342
+ }(), _AnimationFloatArrayCurve);
22343
+ exports.AnimationFloatArrayCurve = __decorate([
21710
22344
  StaticInterfaceImplement()
21711
22345
  ], exports.AnimationFloatArrayCurve);
21712
22346
 
21713
22347
  var _AnimationFloatCurve;
21714
22348
  exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(AnimationCurve) {
21715
- _inherits__default['default'](AnimationFloatCurve, AnimationCurve);
22349
+ _inherits(AnimationFloatCurve, AnimationCurve);
21716
22350
  function AnimationFloatCurve() {
21717
22351
  var _this;
21718
22352
  _this = AnimationCurve.call(this) || this;
@@ -21775,14 +22409,18 @@ exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Ani
21775
22409
  }
21776
22410
  };
21777
22411
  return AnimationFloatCurve;
21778
- }(AnimationCurve), /** @internal */ _AnimationFloatCurve._isReferenceType = false, /** @internal */ _AnimationFloatCurve._isInterpolationType = true, _AnimationFloatCurve);
21779
- exports.AnimationFloatCurve = _ts_decorate__default['default']([
22412
+ }(AnimationCurve), function() {
22413
+ /** @internal */ _AnimationFloatCurve._isReferenceType = false;
22414
+ }(), function() {
22415
+ /** @internal */ _AnimationFloatCurve._isInterpolationType = true;
22416
+ }(), _AnimationFloatCurve);
22417
+ exports.AnimationFloatCurve = __decorate([
21780
22418
  StaticInterfaceImplement()
21781
22419
  ], exports.AnimationFloatCurve);
21782
22420
 
21783
22421
  var _AnimationQuaternionCurve;
21784
22422
  exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ function(AnimationCurve) {
21785
- _inherits__default['default'](AnimationQuaternionCurve1, AnimationCurve);
22423
+ _inherits(AnimationQuaternionCurve1, AnimationCurve);
21786
22424
  function AnimationQuaternionCurve1() {
21787
22425
  var _this;
21788
22426
  _this = AnimationCurve.call(this) || this;
@@ -21878,14 +22516,20 @@ exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ fu
21878
22516
  return out;
21879
22517
  };
21880
22518
  return AnimationQuaternionCurve1;
21881
- }(AnimationCurve), /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true, /** @internal */ _AnimationQuaternionCurve._isReferenceType = true, /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram.Quaternion(), _AnimationQuaternionCurve);
21882
- exports.AnimationQuaternionCurve = _ts_decorate__default['default']([
22519
+ }(AnimationCurve), function() {
22520
+ /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true;
22521
+ }(), function() {
22522
+ /** @internal */ _AnimationQuaternionCurve._isReferenceType = true;
22523
+ }(), function() {
22524
+ /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram.Quaternion();
22525
+ }(), _AnimationQuaternionCurve);
22526
+ exports.AnimationQuaternionCurve = __decorate([
21883
22527
  StaticInterfaceImplement()
21884
22528
  ], exports.AnimationQuaternionCurve);
21885
22529
 
21886
22530
  var _AnimationVector2Curve;
21887
22531
  exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function(AnimationCurve) {
21888
- _inherits__default['default'](AnimationVector2Curve, AnimationCurve);
22532
+ _inherits(AnimationVector2Curve, AnimationCurve);
21889
22533
  function AnimationVector2Curve() {
21890
22534
  var _this;
21891
22535
  _this = AnimationCurve.call(this) || this;
@@ -21964,14 +22608,18 @@ exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function
21964
22608
  return out;
21965
22609
  };
21966
22610
  return AnimationVector2Curve;
21967
- }(AnimationCurve), /** @internal */ _AnimationVector2Curve._isReferenceType = true, /** @internal */ _AnimationVector2Curve._isInterpolationType = true, _AnimationVector2Curve);
21968
- exports.AnimationVector2Curve = _ts_decorate__default['default']([
22611
+ }(AnimationCurve), function() {
22612
+ /** @internal */ _AnimationVector2Curve._isReferenceType = true;
22613
+ }(), function() {
22614
+ /** @internal */ _AnimationVector2Curve._isInterpolationType = true;
22615
+ }(), _AnimationVector2Curve);
22616
+ exports.AnimationVector2Curve = __decorate([
21969
22617
  StaticInterfaceImplement()
21970
22618
  ], exports.AnimationVector2Curve);
21971
22619
 
21972
22620
  var _AnimationVector3Curve;
21973
22621
  exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function(AnimationCurve) {
21974
- _inherits__default['default'](AnimationVector3Curve, AnimationCurve);
22622
+ _inherits(AnimationVector3Curve, AnimationCurve);
21975
22623
  function AnimationVector3Curve() {
21976
22624
  var _this;
21977
22625
  _this = AnimationCurve.call(this) || this;
@@ -22062,14 +22710,18 @@ exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function
22062
22710
  return out;
22063
22711
  };
22064
22712
  return AnimationVector3Curve;
22065
- }(AnimationCurve), /** @internal */ _AnimationVector3Curve._isReferenceType = true, /** @internal */ _AnimationVector3Curve._isInterpolationType = true, _AnimationVector3Curve);
22066
- exports.AnimationVector3Curve = _ts_decorate__default['default']([
22713
+ }(AnimationCurve), function() {
22714
+ /** @internal */ _AnimationVector3Curve._isReferenceType = true;
22715
+ }(), function() {
22716
+ /** @internal */ _AnimationVector3Curve._isInterpolationType = true;
22717
+ }(), _AnimationVector3Curve);
22718
+ exports.AnimationVector3Curve = __decorate([
22067
22719
  StaticInterfaceImplement()
22068
22720
  ], exports.AnimationVector3Curve);
22069
22721
 
22070
22722
  var _AnimationVector4Curve;
22071
22723
  exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function(AnimationCurve) {
22072
- _inherits__default['default'](AnimationVector4Curve, AnimationCurve);
22724
+ _inherits(AnimationVector4Curve, AnimationCurve);
22073
22725
  function AnimationVector4Curve() {
22074
22726
  var _this;
22075
22727
  _this = AnimationCurve.call(this) || this;
@@ -22160,16 +22812,24 @@ exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function
22160
22812
  return out;
22161
22813
  };
22162
22814
  return AnimationVector4Curve;
22163
- }(AnimationCurve), /** @internal */ _AnimationVector4Curve._isReferenceType = true, /** @internal */ _AnimationVector4Curve._isInterpolationType = true, _AnimationVector4Curve);
22164
- exports.AnimationVector4Curve = _ts_decorate__default['default']([
22815
+ }(AnimationCurve), function() {
22816
+ /** @internal */ _AnimationVector4Curve._isReferenceType = true;
22817
+ }(), function() {
22818
+ /** @internal */ _AnimationVector4Curve._isInterpolationType = true;
22819
+ }(), _AnimationVector4Curve);
22820
+ exports.AnimationVector4Curve = __decorate([
22165
22821
  StaticInterfaceImplement()
22166
22822
  ], exports.AnimationVector4Curve);
22167
22823
 
22824
+ /**
22825
+ * Animator culling mode.
22826
+ */ exports.AnimatorCullingMode = void 0;
22168
22827
  (function(AnimatorCullingMode) {
22169
22828
  AnimatorCullingMode[AnimatorCullingMode[/** Disable Culling. */ "None"] = 0] = "None";
22170
22829
  AnimatorCullingMode[AnimatorCullingMode[/** Completely disabled when renderers are all culled. */ "Complete"] = 1] = "Complete";
22171
22830
  })(exports.AnimatorCullingMode || (exports.AnimatorCullingMode = {}));
22172
22831
 
22832
+ exports.AnimatorLayerBlendingMode = void 0;
22173
22833
  (function(AnimatorLayerBlendingMode) {
22174
22834
  AnimatorLayerBlendingMode[AnimatorLayerBlendingMode["Override"] = 0] = "Override";
22175
22835
  AnimatorLayerBlendingMode[AnimatorLayerBlendingMode["Additive"] = 1] = "Additive";
@@ -22216,6 +22876,9 @@ exports.AnimationVector4Curve = _ts_decorate__default['default']([
22216
22876
  /** ExitTime represents the exact time at which the transition can take effect. This is represented in normalized time. */ this.exitTime = 1;
22217
22877
  };
22218
22878
 
22879
+ /**
22880
+ * Animation wrap mode.
22881
+ */ exports.WrapMode = void 0;
22219
22882
  (function(WrapMode) {
22220
22883
  WrapMode[WrapMode[/** Play once */ "Once"] = 0] = "Once";
22221
22884
  WrapMode[WrapMode[/** Loop play */ "Loop"] = 1] = "Loop";
@@ -22287,11 +22950,10 @@ exports.AnimationVector4Curve = _ts_decorate__default['default']([
22287
22950
  this.eventHandlers = [];
22288
22951
  };
22289
22952
 
22290
- var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
22291
22953
  /**
22292
22954
  * The controller of the animation system.
22293
22955
  */ var Animator = /*#__PURE__*/ function(Component) {
22294
- _inherits__default['default'](Animator, Component);
22956
+ _inherits(Animator, Component);
22295
22957
  function Animator(entity) {
22296
22958
  var _this;
22297
22959
  _this = Component.call(this, entity) || this;
@@ -22480,6 +23142,7 @@ var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPo
22480
23142
  var curve = curves[i];
22481
23143
  var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
22482
23144
  if (targetEntity) {
23145
+ var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
22483
23146
  var property = curve.property;
22484
23147
  var instanceId = targetEntity.instanceId;
22485
23148
  // Get owner
@@ -22913,7 +23576,7 @@ var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPo
22913
23576
  }
22914
23577
  owner.updateMark = this._updateMark;
22915
23578
  };
22916
- _create_class__default['default'](Animator, [
23579
+ _create_class(Animator, [
22917
23580
  {
22918
23581
  key: "animatorController",
22919
23582
  get: /**
@@ -22933,28 +23596,28 @@ var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPo
22933
23596
  ]);
22934
23597
  return Animator;
22935
23598
  }(Component);
22936
- _ts_decorate__default['default']([
23599
+ __decorate([
22937
23600
  assignmentClone
22938
23601
  ], Animator.prototype, "speed", void 0);
22939
- _ts_decorate__default['default']([
23602
+ __decorate([
22940
23603
  ignoreClone
22941
23604
  ], Animator.prototype, "_controllerUpdateFlag", void 0);
22942
- _ts_decorate__default['default']([
23605
+ __decorate([
22943
23606
  ignoreClone
22944
23607
  ], Animator.prototype, "_updateMark", void 0);
22945
- _ts_decorate__default['default']([
23608
+ __decorate([
22946
23609
  ignoreClone
22947
23610
  ], Animator.prototype, "_animatorLayersData", void 0);
22948
- _ts_decorate__default['default']([
23611
+ __decorate([
22949
23612
  ignoreClone
22950
23613
  ], Animator.prototype, "_curveOwnerPool", void 0);
22951
- _ts_decorate__default['default']([
23614
+ __decorate([
22952
23615
  ignoreClone
22953
23616
  ], Animator.prototype, "_animationEventHandlerPool", void 0);
22954
- _ts_decorate__default['default']([
23617
+ __decorate([
22955
23618
  ignoreClone
22956
23619
  ], Animator.prototype, "_tempAnimatorStateInfo", void 0);
22957
- _ts_decorate__default['default']([
23620
+ __decorate([
22958
23621
  ignoreClone
22959
23622
  ], Animator.prototype, "_controlledRenderers", void 0);
22960
23623
 
@@ -23004,7 +23667,7 @@ _ts_decorate__default['default']([
23004
23667
  */ _proto._registerChangeFlag = function _registerChangeFlag() {
23005
23668
  return this._updateFlagManager.createFlag(BoolUpdateFlag);
23006
23669
  };
23007
- _create_class__default['default'](AnimatorController, [
23670
+ _create_class(AnimatorController, [
23008
23671
  {
23009
23672
  key: "layers",
23010
23673
  get: /**
@@ -23138,7 +23801,7 @@ _ts_decorate__default['default']([
23138
23801
  index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
23139
23802
  }
23140
23803
  };
23141
- _create_class__default['default'](AnimatorState, [
23804
+ _create_class(AnimatorState, [
23142
23805
  {
23143
23806
  key: "transitions",
23144
23807
  get: /**
@@ -23241,6 +23904,7 @@ _ts_decorate__default['default']([
23241
23904
  return AnimatorStateMachine;
23242
23905
  }();
23243
23906
 
23907
+ exports.AnimatorConditionMode = void 0;
23244
23908
  (function(AnimatorConditionMode) {
23245
23909
  AnimatorConditionMode[AnimatorConditionMode["If"] = 0] = "If";
23246
23910
  AnimatorConditionMode[AnimatorConditionMode["IfNot"] = 1] = "IfNot";
@@ -23259,7 +23923,7 @@ _ts_decorate__default['default']([
23259
23923
  /**
23260
23924
  * SkyboxMaterial
23261
23925
  */ var SkyBoxMaterial = /*#__PURE__*/ function(Material) {
23262
- _inherits__default['default'](SkyBoxMaterial, Material);
23926
+ _inherits(SkyBoxMaterial, Material);
23263
23927
  function SkyBoxMaterial(engine) {
23264
23928
  var _this;
23265
23929
  _this = Material.call(this, engine, Shader.find("skybox")) || this;
@@ -23269,7 +23933,7 @@ _ts_decorate__default['default']([
23269
23933
  _this.shaderData.setVector4("u_cubeDecodeParam", _this._decodeParam);
23270
23934
  return _this;
23271
23935
  }
23272
- _create_class__default['default'](SkyBoxMaterial, [
23936
+ _create_class(SkyBoxMaterial, [
23273
23937
  {
23274
23938
  key: "textureDecodeRGBM",
23275
23939
  get: /**
@@ -23322,6 +23986,7 @@ var DirtyFlagType;
23322
23986
  DirtyFlagType[DirtyFlagType["Scale"] = 0x400] = "Scale";
23323
23987
  DirtyFlagType[DirtyFlagType["Everything"] = 0xffffffff] = "Everything";
23324
23988
  })(DirtyFlagType || (DirtyFlagType = {}));
23989
+ exports.ParticleRendererBlendMode = void 0;
23325
23990
  (function(ParticleRendererBlendMode) {
23326
23991
  ParticleRendererBlendMode[ParticleRendererBlendMode["Transparent"] = 0] = "Transparent";
23327
23992
  ParticleRendererBlendMode[ParticleRendererBlendMode["Additive"] = 1] = "Additive";
@@ -23329,7 +23994,7 @@ var DirtyFlagType;
23329
23994
  /**
23330
23995
  * Particle Renderer Component.
23331
23996
  */ var ParticleRenderer = /*#__PURE__*/ function(MeshRenderer) {
23332
- _inherits__default['default'](ParticleRenderer, MeshRenderer);
23997
+ _inherits(ParticleRenderer, MeshRenderer);
23333
23998
  function ParticleRenderer(props) {
23334
23999
  var _this;
23335
24000
  _this = MeshRenderer.call(this, props) || this;
@@ -23367,7 +24032,7 @@ var DirtyFlagType;
23367
24032
  _this._isFadeOut = false;
23368
24033
  _this._playOnEnable = true;
23369
24034
  _this._blendMode = 0;
23370
- _this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized__default['default'](_this));
24035
+ _this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
23371
24036
  //@ts-ignore
23372
24037
  _this._color._onValueChanged = _this._onColorChanged;
23373
24038
  _this.setMaterial(_this._createMaterial());
@@ -23644,7 +24309,7 @@ var DirtyFlagType;
23644
24309
  ParticleRenderer._getRandom = function _getRandom() {
23645
24310
  return Math.random() - 0.5;
23646
24311
  };
23647
- _create_class__default['default'](ParticleRenderer, [
24312
+ _create_class(ParticleRenderer, [
23648
24313
  {
23649
24314
  key: "texture",
23650
24315
  get: /**
@@ -24075,8 +24740,10 @@ var DirtyFlagType;
24075
24740
  ]);
24076
24741
  return ParticleRenderer;
24077
24742
  }(MeshRenderer);
24078
- /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24079
- _ts_decorate__default['default']([
24743
+ (function() {
24744
+ /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24745
+ })();
24746
+ __decorate([
24080
24747
  ignoreClone
24081
24748
  ], ParticleRenderer.prototype, "_onColorChanged", null);
24082
24749
 
@@ -24086,7 +24753,7 @@ var VERT_SHADER = "#define GLSLIFY 1\nattribute vec3 POSITION;attribute vec2 TEX
24086
24753
 
24087
24754
  Shader.create("trail", VERT_SHADER, FRAG_SHADER);
24088
24755
  var TrailMaterial = /*#__PURE__*/ function(Material) {
24089
- _inherits__default['default'](TrailMaterial, Material);
24756
+ _inherits(TrailMaterial, Material);
24090
24757
  function TrailMaterial(engine) {
24091
24758
  var _this;
24092
24759
  _this = Material.call(this, engine, Shader.find("trail")) || this;
@@ -24104,7 +24771,7 @@ var _tempVector3 = new miniprogram.Vector3();
24104
24771
  /**
24105
24772
  * @deprecated
24106
24773
  */ var TrailRenderer = /*#__PURE__*/ function(MeshRenderer) {
24107
- _inherits__default['default'](TrailRenderer, MeshRenderer);
24774
+ _inherits(TrailRenderer, MeshRenderer);
24108
24775
  function TrailRenderer(entity, props) {
24109
24776
  var _this;
24110
24777
  _this = MeshRenderer.call(this, entity) || this;
@@ -24292,7 +24959,7 @@ var _tempVector3 = new miniprogram.Vector3();
24292
24959
  * }
24293
24960
  * ```
24294
24961
  */ var Probe = /*#__PURE__*/ function(Script) {
24295
- _inherits__default['default'](Probe, Script);
24962
+ _inherits(Probe, Script);
24296
24963
  function Probe() {
24297
24964
  var _this;
24298
24965
  _this = Script.apply(this, arguments) || this;
@@ -24345,7 +25012,7 @@ var _tempVector3 = new miniprogram.Vector3();
24345
25012
  this._camera.renderTarget = this._oriCameraRenderTarget;
24346
25013
  this._camera.cullingMask = this._oriCameraCullingMask;
24347
25014
  };
24348
- _create_class__default['default'](Probe, [
25015
+ _create_class(Probe, [
24349
25016
  {
24350
25017
  key: "_texture",
24351
25018
  get: function get() {
@@ -24363,7 +25030,7 @@ var cacheDir = new miniprogram.Vector3();
24363
25030
  /**
24364
25031
  * Cube probe, generate cubeTexture, used for dynamic environment reflection and other effects.
24365
25032
  */ var CubeProbe = /*#__PURE__*/ function(Probe) {
24366
- _inherits__default['default'](CubeProbe, Probe);
25033
+ _inherits(CubeProbe, Probe);
24367
25034
  function CubeProbe() {
24368
25035
  var _this;
24369
25036
  _this = Probe.apply(this, arguments) || this;