@galacean/engine-core 0.9.0-beta.81 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,56 +16,48 @@ var miniprogram = require('@galacean/engine-math/dist/miniprogram');
16
16
  Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
17
17
  })(exports.Platform || (exports.Platform = {}));
18
18
 
19
- function _assertThisInitialized(self) {
20
- if (self === void 0) {
21
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
22
- }
19
+ function _assert_this_initialized(self) {
20
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
23
21
 
24
- return self;
22
+ return self;
25
23
  }
26
24
 
27
25
  function _defineProperties(target, props) {
28
- for (var i = 0; i < props.length; i++) {
29
- var descriptor = props[i];
30
- descriptor.enumerable = descriptor.enumerable || false;
31
- descriptor.configurable = true;
32
- if ("value" in descriptor) descriptor.writable = true;
33
- Object.defineProperty(target, descriptor.key, descriptor);
34
- }
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
35
  }
36
+ function _create_class(Constructor, protoProps, staticProps) {
37
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
38
+ if (staticProps) _defineProperties(Constructor, staticProps);
36
39
 
37
- function _createClass(Constructor, protoProps, staticProps) {
38
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
39
- if (staticProps) _defineProperties(Constructor, staticProps);
40
- return Constructor;
40
+ return Constructor;
41
41
  }
42
42
 
43
- function setPrototypeOf(o, p) {
44
- setPrototypeOf = Object.setPrototypeOf || function setPrototypeOf(o, p) {
45
- o.__proto__ = p;
46
- return o;
47
- };
43
+ function _set_prototype_of(o, p) {
44
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
45
+ o.__proto__ = p;
48
46
 
49
- return setPrototypeOf(o, p);
50
- }
47
+ return o;
48
+ };
51
49
 
52
- function _setPrototypeOf(o, p) {
53
- return setPrototypeOf(o, p);
50
+ return _set_prototype_of(o, p);
54
51
  }
55
52
 
56
53
  function _inherits(subClass, superClass) {
57
- if (typeof superClass !== "function" && superClass !== null) {
58
- throw new TypeError("Super expression must either be null or a function");
59
- }
60
-
61
- subClass.prototype = Object.create(superClass && superClass.prototype, {
62
- constructor: {
63
- value: subClass,
64
- writable: true,
65
- configurable: true
54
+ if (typeof superClass !== "function" && superClass !== null) {
55
+ throw new TypeError("Super expression must either be null or a function");
66
56
  }
67
- });
68
- if (superClass) _setPrototypeOf(subClass, superClass);
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);
69
61
  }
70
62
 
71
63
  /**
@@ -113,9 +105,15 @@ function _inherits(subClass, superClass) {
113
105
  };
114
106
  return MathUtil;
115
107
  }();
116
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
117
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
118
- /** 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
+ })();
119
117
 
120
118
  /**
121
119
  * Describes a color in the from of RGBA (in order: R, G, B, A).
@@ -325,7 +323,7 @@ function _inherits(subClass, superClass) {
325
323
  out._onValueChanged && out._onValueChanged();
326
324
  return out;
327
325
  };
328
- _createClass(Color, [
326
+ _create_class(Color, [
329
327
  {
330
328
  key: "r",
331
329
  get: /**
@@ -401,11 +399,9 @@ function __decorate(decorators, target, key, desc) {
401
399
  }
402
400
 
403
401
  function _instanceof(left, right) {
404
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
405
- return !!right[Symbol.hasInstance](left);
406
- } else {
407
- return left instanceof right;
408
- }
402
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
403
+ return !!right[Symbol.hasInstance](left);
404
+ } else return left instanceof right;
409
405
  }
410
406
 
411
407
  /**
@@ -586,16 +582,22 @@ function _instanceof(left, right) {
586
582
  };
587
583
  return CloneManager;
588
584
  }();
589
- /** @internal */ CloneManager._subCloneModeMap = new Map();
590
- /** @internal */ CloneManager._cloneModeMap = new Map();
591
- 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
+ })();
592
594
 
593
595
  /**
594
596
  * EngineObject.
595
597
  */ var EngineObject = /*#__PURE__*/ function() {
596
598
  function EngineObject(engine) {
597
- this._destroyed = false;
598
599
  /** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
600
+ this._destroyed = false;
599
601
  this._engine = engine;
600
602
  }
601
603
  var _proto = EngineObject.prototype;
@@ -607,7 +609,7 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
607
609
  (_this__engine_resourceManager = this._engine.resourceManager) == null ? void 0 : _this__engine_resourceManager._deleteAsset(this);
608
610
  this._destroyed = true;
609
611
  };
610
- _createClass(EngineObject, [
612
+ _create_class(EngineObject, [
611
613
  {
612
614
  key: "engine",
613
615
  get: /**
@@ -627,7 +629,9 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
627
629
  ]);
628
630
  return EngineObject;
629
631
  }();
630
- EngineObject._instanceIdCounter = 0;
632
+ (function() {
633
+ EngineObject._instanceIdCounter = 0;
634
+ })();
631
635
  __decorate([
632
636
  ignoreClone
633
637
  ], EngineObject.prototype, "instanceId", void 0);
@@ -644,7 +648,7 @@ __decorate([
644
648
  _this = EngineObject.call(this, engine) || this;
645
649
  /** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */ _this.isGCIgnored = false;
646
650
  _this._refCount = 0;
647
- engine.resourceManager._addRefObject(_this.instanceId, _assertThisInitialized(_this));
651
+ engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized(_this));
648
652
  return _this;
649
653
  }
650
654
  var _proto = RefObject.prototype;
@@ -686,7 +690,7 @@ __decorate([
686
690
  */ _proto._addToResourceManager = function _addToResourceManager(path) {
687
691
  this._engine.resourceManager._addAsset(path, this);
688
692
  };
689
- _createClass(RefObject, [
693
+ _create_class(RefObject, [
690
694
  {
691
695
  key: "refCount",
692
696
  get: /**
@@ -812,7 +816,7 @@ __decorate([
812
816
  _proto.stopPropagation = function stopPropagation() {
813
817
  this._propagationStopped = true;
814
818
  };
815
- _createClass(Event, [
819
+ _create_class(Event, [
816
820
  {
817
821
  key: "propagationStopped",
818
822
  get: function get() {
@@ -1088,7 +1092,7 @@ var Time = /*#__PURE__*/ function() {
1088
1092
  this._lastTickTime = now;
1089
1093
  this._frameCount++;
1090
1094
  };
1091
- _createClass(Time, [
1095
+ _create_class(Time, [
1092
1096
  {
1093
1097
  key: "frameCount",
1094
1098
  get: /*
@@ -1326,7 +1330,7 @@ exports.GLCapabilityType = void 0;
1326
1330
  _proto._getMipmapCount = function _getMipmapCount() {
1327
1331
  return this._mipmap ? Math.floor(Math.log2(Math.max(this._width, this._height))) + 1 : 1;
1328
1332
  };
1329
- _createClass(Texture, [
1333
+ _create_class(Texture, [
1330
1334
  {
1331
1335
  key: "format",
1332
1336
  get: /**
@@ -1476,7 +1480,7 @@ exports.GLCapabilityType = void 0;
1476
1480
  }
1477
1481
  _this._depthTexture = depth;
1478
1482
  }
1479
- _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assertThisInitialized(_this));
1483
+ _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized(_this));
1480
1484
  return _this;
1481
1485
  }
1482
1486
  var _proto = RenderTarget.prototype;
@@ -1518,7 +1522,7 @@ exports.GLCapabilityType = void 0;
1518
1522
  */ _proto._blitRenderTarget = function _blitRenderTarget() {
1519
1523
  this._platformRenderTarget.blitRenderTarget();
1520
1524
  };
1521
- _createClass(RenderTarget, [
1525
+ _create_class(RenderTarget, [
1522
1526
  {
1523
1527
  key: "autoGenerateMipmaps",
1524
1528
  get: /**
@@ -1590,7 +1594,7 @@ exports.GLCapabilityType = void 0;
1590
1594
  _this._format = format;
1591
1595
  _this._mipmapCount = _this._getMipmapCount();
1592
1596
  _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;
1593
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assertThisInitialized(_this));
1597
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized(_this));
1594
1598
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1595
1599
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1596
1600
  return _this;
@@ -1657,7 +1661,7 @@ exports.GLCapabilityType = void 0;
1657
1661
  _this._length = length;
1658
1662
  _this._format = format;
1659
1663
  _this._mipmapCount = _this._getMipmapCount();
1660
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assertThisInitialized(_this));
1664
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized(_this));
1661
1665
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1662
1666
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1663
1667
  return _this;
@@ -1709,7 +1713,7 @@ exports.GLCapabilityType = void 0;
1709
1713
  this._platformTexture.getPixelBuffer(elementIndex, xOrMipLevelOrOut, yOrMipLevel, width, height, mipLevelOrOut, out);
1710
1714
  }
1711
1715
  };
1712
- _createClass(Texture2DArray, [
1716
+ _create_class(Texture2DArray, [
1713
1717
  {
1714
1718
  key: "length",
1715
1719
  get: /**
@@ -1736,7 +1740,7 @@ exports.GLCapabilityType = void 0;
1736
1740
  _this._height = size;
1737
1741
  _this._format = format;
1738
1742
  _this._mipmapCount = _this._getMipmapCount();
1739
- _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assertThisInitialized(_this));
1743
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized(_this));
1740
1744
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1741
1745
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Clamp;
1742
1746
  return _this;
@@ -1863,7 +1867,7 @@ exports.GLCapabilityType = void 0;
1863
1867
  _proto.getCharInfo = function getCharInfo(char) {
1864
1868
  return this._charInfoMap[char.charCodeAt(0)];
1865
1869
  };
1866
- _createClass(FontAtlas, [
1870
+ _create_class(FontAtlas, [
1867
1871
  {
1868
1872
  key: "texture",
1869
1873
  get: function get() {
@@ -2011,7 +2015,7 @@ exports.GLCapabilityType = void 0;
2011
2015
  }
2012
2016
  return null;
2013
2017
  };
2014
- _createClass(Font, [
2018
+ _create_class(Font, [
2015
2019
  {
2016
2020
  key: "name",
2017
2021
  get: /**
@@ -2023,9 +2027,10 @@ exports.GLCapabilityType = void 0;
2023
2027
  ]);
2024
2028
  return Font;
2025
2029
  }(RefObject);
2026
- Font._fontMap = {};
2030
+ (function() {
2031
+ Font._fontMap = {};
2032
+ })();
2027
2033
 
2028
- var _Symbol_toStringTag = Symbol.toStringTag;
2029
2034
  var AssetPromise = /*#__PURE__*/ function() {
2030
2035
  function AssetPromise(executor) {
2031
2036
  var _this = this;
@@ -2144,9 +2149,9 @@ var AssetPromise = /*#__PURE__*/ function() {
2144
2149
  }
2145
2150
  });
2146
2151
  };
2147
- _createClass(AssetPromise, [
2152
+ _create_class(AssetPromise, [
2148
2153
  {
2149
- key: _Symbol_toStringTag,
2154
+ key: Symbol.toStringTag,
2150
2155
  get: /** compatible with Promise */ function get() {
2151
2156
  return "AssetPromise";
2152
2157
  }
@@ -2459,8 +2464,12 @@ var /** @internal */ PromiseState;
2459
2464
  };
2460
2465
  return ResourceManager;
2461
2466
  }();
2462
- /** Loader collection. */ ResourceManager._loaders = {};
2463
- ResourceManager._extTypeMapping = {};
2467
+ (function() {
2468
+ /** Loader collection. */ ResourceManager._loaders = {};
2469
+ })();
2470
+ (function() {
2471
+ ResourceManager._extTypeMapping = {};
2472
+ })();
2464
2473
  /**
2465
2474
  * Declare ResourceLoader's decorator.
2466
2475
  * @param assetType - Type of asset
@@ -2818,10 +2827,14 @@ var ComponentCloner = /*#__PURE__*/ function() {
2818
2827
  };
2819
2828
  return ComponentsDependencies;
2820
2829
  }();
2821
- /**
2830
+ (function() {
2831
+ /**
2822
2832
  * @internal
2823
2833
  */ ComponentsDependencies._dependenciesMap = new Map();
2824
- ComponentsDependencies._invDependenciesMap = new Map();
2834
+ })();
2835
+ (function() {
2836
+ ComponentsDependencies._invDependenciesMap = new Map();
2837
+ })();
2825
2838
  /**
2826
2839
  * Dependent components, automatically added if they do not exist.
2827
2840
  * @param components - Dependent components
@@ -2987,7 +3000,7 @@ ComponentsDependencies._invDependenciesMap = new Map();
2987
3000
  }
2988
3001
  }
2989
3002
  };
2990
- _createClass(Component, [
3003
+ _create_class(Component, [
2991
3004
  {
2992
3005
  key: "enabled",
2993
3006
  get: /**
@@ -3121,7 +3134,6 @@ __decorate([
3121
3134
  function Transform(entity) {
3122
3135
  var _this;
3123
3136
  _this = Component.call(this, entity) || this;
3124
- _this._dirtyFlag = 0xbc;
3125
3137
  _this._position = new miniprogram.Vector3();
3126
3138
  _this._rotation = new miniprogram.Vector3();
3127
3139
  _this._rotationQuaternion = new miniprogram.Quaternion();
@@ -3134,14 +3146,15 @@ __decorate([
3134
3146
  _this._worldMatrix = new miniprogram.Matrix();
3135
3147
  _this._isParentDirty = true;
3136
3148
  _this._parentTransformCache = null;
3149
+ _this._dirtyFlag = 0xbc;
3137
3150
  /** @internal */ _this._updateFlagManager = new UpdateFlagManager();
3138
- _this._onPositionChanged = _this._onPositionChanged.bind(_assertThisInitialized(_this));
3139
- _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assertThisInitialized(_this));
3140
- _this._onRotationChanged = _this._onRotationChanged.bind(_assertThisInitialized(_this));
3141
- _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assertThisInitialized(_this));
3142
- _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assertThisInitialized(_this));
3143
- _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assertThisInitialized(_this));
3144
- _this._onScaleChanged = _this._onScaleChanged.bind(_assertThisInitialized(_this));
3151
+ _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized(_this));
3152
+ _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized(_this));
3153
+ _this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized(_this));
3154
+ _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized(_this));
3155
+ _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3156
+ _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3157
+ _this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized(_this));
3145
3158
  //@ts-ignore
3146
3159
  _this._position._onValueChanged = _this._onPositionChanged;
3147
3160
  //@ts-ignore
@@ -3533,7 +3546,7 @@ __decorate([
3533
3546
  this._setDirtyFlagTrue(0x40);
3534
3547
  this._updateWorldScaleFlag();
3535
3548
  };
3536
- _createClass(Transform, [
3549
+ _create_class(Transform, [
3537
3550
  {
3538
3551
  key: "position",
3539
3552
  get: /**
@@ -3779,15 +3792,33 @@ __decorate([
3779
3792
  ]);
3780
3793
  return Transform;
3781
3794
  }(Component);
3782
- Transform._tempQuat0 = new miniprogram.Quaternion();
3783
- Transform._tempVec30 = new miniprogram.Vector3();
3784
- Transform._tempVec31 = new miniprogram.Vector3();
3785
- Transform._tempVec32 = new miniprogram.Vector3();
3786
- Transform._tempMat30 = new miniprogram.Matrix3x3();
3787
- Transform._tempMat31 = new miniprogram.Matrix3x3();
3788
- Transform._tempMat32 = new miniprogram.Matrix3x3();
3789
- Transform._tempMat41 = new miniprogram.Matrix();
3790
- Transform._tempMat42 = new miniprogram.Matrix();
3795
+ (function() {
3796
+ Transform._tempQuat0 = new miniprogram.Quaternion();
3797
+ })();
3798
+ (function() {
3799
+ Transform._tempVec30 = new miniprogram.Vector3();
3800
+ })();
3801
+ (function() {
3802
+ Transform._tempVec31 = new miniprogram.Vector3();
3803
+ })();
3804
+ (function() {
3805
+ Transform._tempVec32 = new miniprogram.Vector3();
3806
+ })();
3807
+ (function() {
3808
+ Transform._tempMat30 = new miniprogram.Matrix3x3();
3809
+ })();
3810
+ (function() {
3811
+ Transform._tempMat31 = new miniprogram.Matrix3x3();
3812
+ })();
3813
+ (function() {
3814
+ Transform._tempMat32 = new miniprogram.Matrix3x3();
3815
+ })();
3816
+ (function() {
3817
+ Transform._tempMat41 = new miniprogram.Matrix();
3818
+ })();
3819
+ (function() {
3820
+ Transform._tempMat42 = new miniprogram.Matrix();
3821
+ })();
3791
3822
  __decorate([
3792
3823
  deepClone
3793
3824
  ], Transform.prototype, "_position", void 0);
@@ -4287,7 +4318,7 @@ var TransformModifyFlags;
4287
4318
  this._traverseSetOwnerScene(children[i], scene);
4288
4319
  }
4289
4320
  };
4290
- _createClass(Entity, [
4321
+ _create_class(Entity, [
4291
4322
  {
4292
4323
  key: "isActive",
4293
4324
  get: /**
@@ -4505,7 +4536,7 @@ var TransformModifyFlags;
4505
4536
  }
4506
4537
  }
4507
4538
  };
4508
- _createClass(SystemInfo, null, [
4539
+ _create_class(SystemInfo, null, [
4509
4540
  {
4510
4541
  key: "devicePixelRatio",
4511
4542
  get: /**
@@ -4517,8 +4548,12 @@ var TransformModifyFlags;
4517
4548
  ]);
4518
4549
  return SystemInfo;
4519
4550
  }();
4520
- /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4521
- /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4551
+ (function() {
4552
+ /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4553
+ })();
4554
+ (function() {
4555
+ /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4556
+ })();
4522
4557
  SystemInfo._initialize();
4523
4558
 
4524
4559
  /**
@@ -5135,7 +5170,7 @@ SystemInfo._initialize();
5135
5170
  _proto._setGravity = function _setGravity() {
5136
5171
  this._nativePhysicsManager.setGravity(this._gravity);
5137
5172
  };
5138
- _createClass(PhysicsManager, [
5173
+ _create_class(PhysicsManager, [
5139
5174
  {
5140
5175
  key: "gravity",
5141
5176
  get: /**
@@ -5193,7 +5228,7 @@ SystemInfo._initialize();
5193
5228
  */ _proto._destroy = function _destroy() {
5194
5229
  this._nativeMaterial.destroy();
5195
5230
  };
5196
- _createClass(PhysicsMaterial, [
5231
+ _create_class(PhysicsMaterial, [
5197
5232
  {
5198
5233
  key: "bounciness",
5199
5234
  get: /**
@@ -5273,8 +5308,8 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5273
5308
  function Collider(entity) {
5274
5309
  var _this;
5275
5310
  _this = Component.call(this, entity) || this;
5276
- _this._shapes = [];
5277
5311
  /** @internal */ _this._index = -1;
5312
+ _this._shapes = [];
5278
5313
  _this._updateFlag = _this.entity.transform.registerWorldChangeFlag();
5279
5314
  return _this;
5280
5315
  }
@@ -5353,7 +5388,7 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5353
5388
  this.clearShapes();
5354
5389
  this._nativeCollider.destroy();
5355
5390
  };
5356
- _createClass(Collider, [
5391
+ _create_class(Collider, [
5357
5392
  {
5358
5393
  key: "shapes",
5359
5394
  get: /**
@@ -5393,7 +5428,7 @@ exports.Collider = __decorate([
5393
5428
  _this._upDirection = new miniprogram.Vector3(0, 1, 0);
5394
5429
  _this._slopeLimit = 0.707;
5395
5430
  _this._nativeCollider = PhysicsManager._nativePhysics.createCharacterController();
5396
- _this._setUpDirection = _this._setUpDirection.bind(_assertThisInitialized(_this));
5431
+ _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
5397
5432
  //@ts-ignore
5398
5433
  _this._upDirection._onValueChanged = _this._setUpDirection;
5399
5434
  return _this;
@@ -5466,7 +5501,7 @@ exports.Collider = __decorate([
5466
5501
  _proto._setUpDirection = function _setUpDirection() {
5467
5502
  this._nativeCollider.setUpDirection(this._upDirection);
5468
5503
  };
5469
- _createClass(CharacterController, [
5504
+ _create_class(CharacterController, [
5470
5505
  {
5471
5506
  key: "stepOffset",
5472
5507
  get: /**
@@ -5561,7 +5596,7 @@ exports.Collider = __decorate([
5561
5596
  _proto._setRotation = function _setRotation() {
5562
5597
  this._nativeShape.setRotation(this._rotation);
5563
5598
  };
5564
- _createClass(ColliderShape, [
5599
+ _create_class(ColliderShape, [
5565
5600
  {
5566
5601
  key: "collider",
5567
5602
  get: /**
@@ -5649,7 +5684,9 @@ exports.Collider = __decorate([
5649
5684
  ]);
5650
5685
  return ColliderShape;
5651
5686
  }();
5652
- ColliderShape._idGenerator = 0;
5687
+ (function() {
5688
+ ColliderShape._idGenerator = 0;
5689
+ })();
5653
5690
 
5654
5691
  /**
5655
5692
  * Physical collider shape for box.
@@ -5660,7 +5697,7 @@ ColliderShape._idGenerator = 0;
5660
5697
  _this = ColliderShape.call(this) || this;
5661
5698
  _this._size = new miniprogram.Vector3(1, 1, 1);
5662
5699
  _this._nativeShape = PhysicsManager._nativePhysics.createBoxColliderShape(_this._id, _this._size, _this._material._nativeMaterial);
5663
- _this._setSize = _this._setSize.bind(_assertThisInitialized(_this));
5700
+ _this._setSize = _this._setSize.bind(_assert_this_initialized(_this));
5664
5701
  //@ts-ignore
5665
5702
  _this._size._onValueChanged = _this._setSize;
5666
5703
  return _this;
@@ -5669,7 +5706,7 @@ ColliderShape._idGenerator = 0;
5669
5706
  _proto._setSize = function _setSize() {
5670
5707
  this._nativeShape.setSize(this._size);
5671
5708
  };
5672
- _createClass(BoxColliderShape, [
5709
+ _create_class(BoxColliderShape, [
5673
5710
  {
5674
5711
  key: "size",
5675
5712
  get: /**
@@ -5698,7 +5735,7 @@ ColliderShape._idGenerator = 0;
5698
5735
  _this._nativeShape = PhysicsManager._nativePhysics.createSphereColliderShape(_this._id, _this._radius, _this._material._nativeMaterial);
5699
5736
  return _this;
5700
5737
  }
5701
- _createClass(SphereColliderShape, [
5738
+ _create_class(SphereColliderShape, [
5702
5739
  {
5703
5740
  key: "radius",
5704
5741
  get: /**
@@ -5752,7 +5789,7 @@ ColliderShape._idGenerator = 0;
5752
5789
  _this._nativeShape = PhysicsManager._nativePhysics.createCapsuleColliderShape(_this._id, _this._radius, _this._height, _this._material._nativeMaterial);
5753
5790
  return _this;
5754
5791
  }
5755
- _createClass(CapsuleColliderShape, [
5792
+ _create_class(CapsuleColliderShape, [
5756
5793
  {
5757
5794
  key: "radius",
5758
5795
  get: /**
@@ -5811,7 +5848,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
5811
5848
  _this._connectedCollider.localPosition = new miniprogram.Vector3();
5812
5849
  return _this;
5813
5850
  }
5814
- _createClass(Joint, [
5851
+ _create_class(Joint, [
5815
5852
  {
5816
5853
  key: "connectedCollider",
5817
5854
  get: /**
@@ -5991,7 +6028,7 @@ exports.Joint = __decorate([
5991
6028
  collider.collider = this.entity.getComponent(exports.Collider);
5992
6029
  this._nativeJoint = PhysicsManager._nativePhysics.createHingeJoint(collider.collider._nativeCollider);
5993
6030
  };
5994
- _createClass(HingeJoint, [
6031
+ _create_class(HingeJoint, [
5995
6032
  {
5996
6033
  key: "axis",
5997
6034
  get: /**
@@ -6143,7 +6180,7 @@ exports.Joint = __decorate([
6143
6180
  collider.collider = this.entity.getComponent(exports.Collider);
6144
6181
  this._nativeJoint = PhysicsManager._nativePhysics.createSpringJoint(collider.collider._nativeCollider);
6145
6182
  };
6146
- _createClass(SpringJoint, [
6183
+ _create_class(SpringJoint, [
6147
6184
  {
6148
6185
  key: "swingOffset",
6149
6186
  get: /**
@@ -6299,10 +6336,10 @@ exports.Joint = __decorate([
6299
6336
  _this._sleepThreshold = 5e-3;
6300
6337
  var transform = _this.entity.transform;
6301
6338
  _this._nativeCollider = PhysicsManager._nativePhysics.createDynamicCollider(transform.worldPosition, transform.worldRotationQuaternion);
6302
- _this._setLinearVelocity = _this._setLinearVelocity.bind(_assertThisInitialized(_this));
6303
- _this._setAngularVelocity = _this._setAngularVelocity.bind(_assertThisInitialized(_this));
6304
- _this._setCenterOfMass = _this._setCenterOfMass.bind(_assertThisInitialized(_this));
6305
- _this._setInertiaTensor = _this._setInertiaTensor.bind(_assertThisInitialized(_this));
6339
+ _this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized(_this));
6340
+ _this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized(_this));
6341
+ _this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized(_this));
6342
+ _this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized(_this));
6306
6343
  //@ts-ignore
6307
6344
  _this._linearVelocity._onValueChanged = _this._setLinearVelocity;
6308
6345
  //@ts-ignore
@@ -6360,7 +6397,7 @@ exports.Joint = __decorate([
6360
6397
  _proto._setInertiaTensor = function _setInertiaTensor() {
6361
6398
  this._nativeCollider.setInertiaTensor(this._inertiaTensor);
6362
6399
  };
6363
- _createClass(DynamicCollider, [
6400
+ _create_class(DynamicCollider, [
6364
6401
  {
6365
6402
  key: "linearDamping",
6366
6403
  get: /**
@@ -6904,9 +6941,15 @@ exports.DynamicColliderConstraints = void 0;
6904
6941
  };
6905
6942
  return PointerManager;
6906
6943
  }();
6907
- PointerManager._tempRay = new miniprogram.Ray();
6908
- PointerManager._tempPoint = new miniprogram.Vector2();
6909
- PointerManager._tempHitResult = new HitResult();
6944
+ (function() {
6945
+ PointerManager._tempRay = new miniprogram.Ray();
6946
+ })();
6947
+ (function() {
6948
+ PointerManager._tempPoint = new miniprogram.Vector2();
6949
+ })();
6950
+ (function() {
6951
+ PointerManager._tempHitResult = new HitResult();
6952
+ })();
6910
6953
 
6911
6954
  /**
6912
6955
  * Wheel Manager.
@@ -7112,7 +7155,7 @@ PointerManager._tempHitResult = new HitResult();
7112
7155
  this._pointerManager._onFocus();
7113
7156
  this._keyboardManager._onFocus();
7114
7157
  };
7115
- _createClass(InputManager, [
7158
+ _create_class(InputManager, [
7116
7159
  {
7117
7160
  key: "pointers",
7118
7161
  get: /**
@@ -7299,8 +7342,12 @@ PointerManager._tempHitResult = new HitResult();
7299
7342
  }
7300
7343
  this._nameId = nameID;
7301
7344
  };
7302
- /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7303
- ShaderMacro._macroNameCounter = 0;
7345
+ (function() {
7346
+ /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7347
+ })();
7348
+ (function() {
7349
+ ShaderMacro._macroNameCounter = 0;
7350
+ })();
7304
7351
 
7305
7352
  /**
7306
7353
  * Shader macro collection.
@@ -7452,26 +7499,17 @@ ShaderMacro._macroNameCounter = 0;
7452
7499
  return ShaderMacroCollection;
7453
7500
  }();
7454
7501
 
7455
- function extends_() {
7456
- extends_ = Object.assign || function (target) {
7457
- for (var i = 1; i < arguments.length; i++) {
7458
- var source = arguments[i];
7459
-
7460
- for (var key in source) {
7461
- if (Object.prototype.hasOwnProperty.call(source, key)) {
7462
- target[key] = source[key];
7502
+ function _extends() {
7503
+ _extends = Object.assign || function assign(target) {
7504
+ for (var i = 1; i < arguments.length; i++) {
7505
+ var source = arguments[i];
7506
+ for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
7463
7507
  }
7464
- }
7465
- }
7466
-
7467
- return target;
7468
- };
7469
7508
 
7470
- return extends_.apply(this, arguments);
7471
- }
7509
+ return target;
7510
+ };
7472
7511
 
7473
- function _extends() {
7474
- return extends_.apply(this, arguments);
7512
+ return _extends.apply(this, arguments);
7475
7513
  }
7476
7514
 
7477
7515
  var camera_declare = "#define GLSLIFY 1\nuniform vec3 u_cameraPos;"; // eslint-disable-line
@@ -7484,8 +7522,6 @@ var transform_declare = "#define GLSLIFY 1\nuniform mat4 u_localMat;uniform mat4
7484
7522
 
7485
7523
  var color_share = "#define GLSLIFY 1\n#ifdef O3_HAS_VERTEXCOLOR\nvarying vec4 v_color;\n#endif\n"; // eslint-disable-line
7486
7524
 
7487
- var RendererFragmentDeclaration = "#define GLSLIFY 1\nuniform highp ivec4 oasis_RendererLayer;"; // eslint-disable-line
7488
-
7489
7525
  var FogFragmentDeclaration = "#define GLSLIFY 1\n#if OASIS_FOG_MODE != 0\nvarying vec3 v_positionVS;uniform vec4 oasis_FogColor;uniform vec4 oasis_FogParams;float ComputeFogIntensity(float fogDepth){\n#if OASIS_FOG_MODE == 1\nreturn clamp(fogDepth*oasis_FogParams.x+oasis_FogParams.y,0.0,1.0);\n#elif OASIS_FOG_MODE == 2\nreturn clamp(exp2(-fogDepth*oasis_FogParams.z),0.0,1.0);\n#elif OASIS_FOG_MODE == 3\nfloat factor=fogDepth*oasis_FogParams.w;return clamp(exp2(-factor*factor),0.0,1.0);\n#endif\n}\n#endif\n"; // eslint-disable-line
7490
7526
 
7491
7527
  var FogVertexDeclaration = "#define GLSLIFY 1\n#if OASIS_FOG_MODE != 0\nvarying vec3 v_positionVS;\n#endif\n"; // eslint-disable-line
@@ -7520,7 +7556,7 @@ var worldpos_vert = "#define GLSLIFY 1\n#ifdef O3_NEED_WORLDPOS\nvec4 temp_pos=u
7520
7556
 
7521
7557
  var FogFragment = "#define GLSLIFY 1\n#if OASIS_FOG_MODE != 0\nfloat fogIntensity=ComputeFogIntensity(length(v_positionVS));gl_FragColor.rgb=mix(oasis_FogColor.rgb,gl_FragColor.rgb,fogIntensity);\n#endif\n"; // eslint-disable-line
7522
7558
 
7523
- var light_frag_define = "#define GLSLIFY 1\n#ifdef O3_DIRECT_LIGHT_COUNT\nstruct DirectLight{vec3 color;vec3 direction;};uniform ivec2 u_directLightCullingMask[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightColor[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightDirection[O3_DIRECT_LIGHT_COUNT];\n#endif\n#ifdef O3_POINT_LIGHT_COUNT\nstruct PointLight{vec3 color;vec3 position;float distance;};uniform ivec2 u_pointLightCullingMask[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightColor[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightPosition[O3_POINT_LIGHT_COUNT];uniform float u_pointLightDistance[O3_POINT_LIGHT_COUNT];\n#endif\n#ifdef O3_SPOT_LIGHT_COUNT\nstruct SpotLight{vec3 color;vec3 position;vec3 direction;float distance;float angleCos;float penumbraCos;};uniform ivec2 u_spotLightCullingMask[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightColor[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightPosition[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightDirection[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightDistance[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightAngleCos[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightPenumbraCos[O3_SPOT_LIGHT_COUNT];\n#endif\nstruct EnvMapLight{vec3 diffuse;float mipMapLevel;float diffuseIntensity;float specularIntensity;};uniform EnvMapLight u_envMapLight;\n#ifdef O3_USE_SH\nuniform vec3 u_env_sh[9];\n#endif\n#ifdef O3_USE_SPECULAR_ENV\nuniform samplerCube u_env_specularSampler;\n#endif\n#ifndef GRAPHICS_API_WEBGL2\nbool isBitSet(float value,float mask,float bitIndex){return mod(floor(value/pow(2.0,bitIndex)),2.0)==1.0&&mod(floor(mask/pow(2.0,bitIndex)),2.0)==1.0;}\n#endif\nbool isRendererCulledByLight(ivec2 rendererLayer,ivec2 lightCullingMask){\n#ifdef GRAPHICS_API_WEBGL2\nreturn!((rendererLayer.x&lightCullingMask.x)!=0||(rendererLayer.y&lightCullingMask.y)!=0);\n#else\nfor(int i=0;i<16;i++){if(isBitSet(float(rendererLayer.x),float(lightCullingMask.x),float(i))||isBitSet(float(rendererLayer.y),float(lightCullingMask.y),float(i))){return false;}}return true;\n#endif\n}"; // eslint-disable-line
7559
+ var light_frag_define = "#define GLSLIFY 1\n#ifdef O3_DIRECT_LIGHT_COUNT\nstruct DirectLight{vec3 color;vec3 direction;};uniform ivec2 u_directLightCullingMask[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightColor[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightDirection[O3_DIRECT_LIGHT_COUNT];\n#endif\n#ifdef O3_POINT_LIGHT_COUNT\nstruct PointLight{vec3 color;vec3 position;float distance;};uniform ivec2 u_pointLightCullingMask[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightColor[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightPosition[O3_POINT_LIGHT_COUNT];uniform float u_pointLightDistance[O3_POINT_LIGHT_COUNT];\n#endif\n#ifdef O3_SPOT_LIGHT_COUNT\nstruct SpotLight{vec3 color;vec3 position;vec3 direction;float distance;float angleCos;float penumbraCos;};uniform ivec2 u_spotLightCullingMask[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightColor[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightPosition[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightDirection[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightDistance[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightAngleCos[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightPenumbraCos[O3_SPOT_LIGHT_COUNT];\n#endif\nstruct EnvMapLight{vec3 diffuse;float mipMapLevel;float diffuseIntensity;float specularIntensity;};uniform EnvMapLight u_envMapLight;uniform ivec4 oasis_RendererLayer;\n#ifdef O3_USE_SH\nuniform vec3 u_env_sh[9];\n#endif\n#ifdef O3_USE_SPECULAR_ENV\nuniform samplerCube u_env_specularSampler;\n#endif\n#ifndef GRAPHICS_API_WEBGL2\nbool isBitSet(float value,float mask,float bitIndex){return mod(floor(value/pow(2.0,bitIndex)),2.0)==1.0&&mod(floor(mask/pow(2.0,bitIndex)),2.0)==1.0;}\n#endif\nbool isRendererCulledByLight(ivec2 rendererLayer,ivec2 lightCullingMask){\n#ifdef GRAPHICS_API_WEBGL2\nreturn!((rendererLayer.x&lightCullingMask.x)!=0||(rendererLayer.y&lightCullingMask.y)!=0);\n#else\nfor(int i=0;i<16;i++){if(isBitSet(float(rendererLayer.x),float(lightCullingMask.x),float(i))||isBitSet(float(rendererLayer.y),float(lightCullingMask.y),float(i))){return false;}}return true;\n#endif\n}"; // eslint-disable-line
7524
7560
 
7525
7561
  var mobile_material_frag = "#define GLSLIFY 1\nuniform vec4 u_emissiveColor;uniform vec4 u_baseColor;uniform vec4 u_specularColor;uniform float u_shininess;uniform float u_normalIntensity;uniform float u_alphaCutoff;\n#ifdef EMISSIVETEXTURE\nuniform sampler2D u_emissiveTexture;\n#endif\n#ifdef BASETEXTURE\nuniform sampler2D u_baseTexture;\n#endif\n#ifdef O3_SPECULAR_TEXTURE\nuniform sampler2D u_specularTexture;\n#endif\n#ifdef NORMALTEXTURE\nuniform sampler2D u_normalTexture;\n#endif\n"; // eslint-disable-line
7526
7562
 
@@ -7612,7 +7648,6 @@ var ShaderLib = _extends({
7612
7648
  normal_share: normal_share,
7613
7649
  uv_share: uv_share,
7614
7650
  worldpos_share: worldpos_share,
7615
- RendererFragmentDeclaration: RendererFragmentDeclaration,
7616
7651
  FogVertexDeclaration: FogVertexDeclaration,
7617
7652
  FogFragmentDeclaration: FogFragmentDeclaration,
7618
7653
  begin_normal_vert: begin_normal_vert,
@@ -8316,7 +8351,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8316
8351
  return prefix + line;
8317
8352
  }).join("\n");
8318
8353
  };
8319
- _createClass(ShaderProgram, [
8354
+ _create_class(ShaderProgram, [
8320
8355
  {
8321
8356
  key: "isValid",
8322
8357
  get: /**
@@ -8328,7 +8363,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
8328
8363
  ]);
8329
8364
  return ShaderProgram;
8330
8365
  }();
8331
- ShaderProgram._counter = 0;
8366
+ (function() {
8367
+ ShaderProgram._counter = 0;
8368
+ })();
8332
8369
 
8333
8370
  /**
8334
8371
  * Shader pass containing vertex and fragment source.
@@ -8373,7 +8410,9 @@ ShaderProgram._counter = 0;
8373
8410
  };
8374
8411
  return ShaderPass;
8375
8412
  }();
8376
- ShaderPass._shaderPassCounter = 0;
8413
+ (function() {
8414
+ ShaderPass._shaderPassCounter = 0;
8415
+ })();
8377
8416
 
8378
8417
  /**
8379
8418
  * Shader property.
@@ -8382,7 +8421,7 @@ ShaderPass._shaderPassCounter = 0;
8382
8421
  this.name = name;
8383
8422
  this._uniqueId = ShaderProperty._propertyNameCounter++;
8384
8423
  }
8385
- _createClass(ShaderProperty, [
8424
+ _create_class(ShaderProperty, [
8386
8425
  {
8387
8426
  key: "type",
8388
8427
  get: /**
@@ -8394,7 +8433,9 @@ ShaderPass._shaderPassCounter = 0;
8394
8433
  ]);
8395
8434
  return ShaderProperty;
8396
8435
  }();
8397
- ShaderProperty._propertyNameCounter = 0;
8436
+ (function() {
8437
+ ShaderProperty._propertyNameCounter = 0;
8438
+ })();
8398
8439
 
8399
8440
  /**
8400
8441
  * Shader for rendering.
@@ -8507,7 +8548,7 @@ ShaderProperty._propertyNameCounter = 0;
8507
8548
  }
8508
8549
  }
8509
8550
  };
8510
- _createClass(Shader, [
8551
+ _create_class(Shader, [
8511
8552
  {
8512
8553
  key: "passes",
8513
8554
  get: /**
@@ -8519,18 +8560,34 @@ ShaderProperty._propertyNameCounter = 0;
8519
8560
  ]);
8520
8561
  return Shader;
8521
8562
  }();
8522
- /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8523
- /** @internal */ Shader._shaderExtension = [
8524
- "GL_EXT_shader_texture_lod",
8525
- "GL_OES_standard_derivatives",
8526
- "GL_EXT_draw_buffers"
8527
- ];
8528
- /** @internal */ Shader._propertyIdMap = Object.create(null);
8529
- Shader._shaderMap = Object.create(null);
8530
- Shader._propertyNameMap = Object.create(null);
8531
- Shader._macroMaskMap = [];
8532
- Shader._macroCounter = 0;
8533
- Shader._macroMap = Object.create(null);
8563
+ (function() {
8564
+ /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8565
+ })();
8566
+ (function() {
8567
+ /** @internal */ Shader._shaderExtension = [
8568
+ "GL_EXT_shader_texture_lod",
8569
+ "GL_OES_standard_derivatives",
8570
+ "GL_EXT_draw_buffers"
8571
+ ];
8572
+ })();
8573
+ (function() {
8574
+ /** @internal */ Shader._propertyIdMap = Object.create(null);
8575
+ })();
8576
+ (function() {
8577
+ Shader._shaderMap = Object.create(null);
8578
+ })();
8579
+ (function() {
8580
+ Shader._propertyNameMap = Object.create(null);
8581
+ })();
8582
+ (function() {
8583
+ Shader._macroMaskMap = [];
8584
+ })();
8585
+ (function() {
8586
+ Shader._macroCounter = 0;
8587
+ })();
8588
+ (function() {
8589
+ Shader._macroMap = Object.create(null);
8590
+ })();
8534
8591
 
8535
8592
  /**
8536
8593
  * Shader data collection,Correspondence includes shader properties data and macros data.
@@ -8788,9 +8845,9 @@ Shader._macroMap = Object.create(null);
8788
8845
  /** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
8789
8846
  /** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
8790
8847
  /** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
8848
+ /** @internal */ _this._lightIndex = -1;
8791
8849
  _this._color = new miniprogram.Color(1, 1, 1, 1);
8792
8850
  _this._lightColor = new miniprogram.Color();
8793
- /** @internal */ _this._lightIndex = -1;
8794
8851
  return _this;
8795
8852
  }
8796
8853
  var _proto = Light.prototype;
@@ -8801,7 +8858,7 @@ Shader._macroMap = Object.create(null);
8801
8858
  this._lightColor.a = this.color.a * this.intensity;
8802
8859
  return this._lightColor;
8803
8860
  };
8804
- _createClass(Light, [
8861
+ _create_class(Light, [
8805
8862
  {
8806
8863
  key: "color",
8807
8864
  get: /**
@@ -8838,9 +8895,11 @@ Shader._macroMap = Object.create(null);
8838
8895
  ]);
8839
8896
  return Light;
8840
8897
  }(Component);
8841
- /**
8898
+ (function() {
8899
+ /**
8842
8900
  * Each type of light source is at most 10, beyond which it will not take effect.
8843
8901
  * */ Light._maxLight = 10;
8902
+ })();
8844
8903
  __decorate([
8845
8904
  ignoreClone
8846
8905
  ], Light.prototype, "_lightIndex", void 0);
@@ -8898,7 +8957,7 @@ __decorate([
8898
8957
  shaderData.setFloatArray(DirectLight._colorProperty, data.color);
8899
8958
  shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
8900
8959
  };
8901
- _createClass(DirectLight, [
8960
+ _create_class(DirectLight, [
8902
8961
  {
8903
8962
  key: "direction",
8904
8963
  get: /**
@@ -8929,14 +8988,22 @@ __decorate([
8929
8988
  ]);
8930
8989
  return DirectLight;
8931
8990
  }(Light);
8932
- DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8933
- DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8934
- DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8935
- DirectLight._combinedData = {
8936
- cullingMask: new Int32Array(Light._maxLight * 2),
8937
- color: new Float32Array(Light._maxLight * 3),
8938
- direction: new Float32Array(Light._maxLight * 3)
8939
- };
8991
+ (function() {
8992
+ DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8993
+ })();
8994
+ (function() {
8995
+ DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8996
+ })();
8997
+ (function() {
8998
+ DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8999
+ })();
9000
+ (function() {
9001
+ DirectLight._combinedData = {
9002
+ cullingMask: new Int32Array(Light._maxLight * 2),
9003
+ color: new Float32Array(Light._maxLight * 3),
9004
+ direction: new Float32Array(Light._maxLight * 3)
9005
+ };
9006
+ })();
8940
9007
 
8941
9008
  /**
8942
9009
  * Point light.
@@ -8993,7 +9060,7 @@ DirectLight._combinedData = {
8993
9060
  shaderData.setFloatArray(PointLight._positionProperty, data.position);
8994
9061
  shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
8995
9062
  };
8996
- _createClass(PointLight, [
9063
+ _create_class(PointLight, [
8997
9064
  {
8998
9065
  key: "position",
8999
9066
  get: /**
@@ -9014,16 +9081,26 @@ DirectLight._combinedData = {
9014
9081
  ]);
9015
9082
  return PointLight;
9016
9083
  }(Light);
9017
- PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
9018
- PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
9019
- PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9020
- PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9021
- PointLight._combinedData = {
9022
- cullingMask: new Int32Array(Light._maxLight * 2),
9023
- color: new Float32Array(Light._maxLight * 3),
9024
- position: new Float32Array(Light._maxLight * 3),
9025
- distance: new Float32Array(Light._maxLight)
9026
- };
9084
+ (function() {
9085
+ PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
9086
+ })();
9087
+ (function() {
9088
+ PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
9089
+ })();
9090
+ (function() {
9091
+ PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9092
+ })();
9093
+ (function() {
9094
+ PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9095
+ })();
9096
+ (function() {
9097
+ PointLight._combinedData = {
9098
+ cullingMask: new Int32Array(Light._maxLight * 2),
9099
+ color: new Float32Array(Light._maxLight * 3),
9100
+ position: new Float32Array(Light._maxLight * 3),
9101
+ distance: new Float32Array(Light._maxLight)
9102
+ };
9103
+ })();
9027
9104
 
9028
9105
  /**
9029
9106
  * Spot light.
@@ -9097,7 +9174,7 @@ PointLight._combinedData = {
9097
9174
  shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
9098
9175
  shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
9099
9176
  };
9100
- _createClass(SpotLight, [
9177
+ _create_class(SpotLight, [
9101
9178
  {
9102
9179
  key: "position",
9103
9180
  get: /**
@@ -9139,22 +9216,38 @@ PointLight._combinedData = {
9139
9216
  ]);
9140
9217
  return SpotLight;
9141
9218
  }(Light);
9142
- SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9143
- SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9144
- SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9145
- SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9146
- SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9147
- SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9148
- SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9149
- SpotLight._combinedData = {
9150
- cullingMask: new Int32Array(Light._maxLight * 2),
9151
- color: new Float32Array(Light._maxLight * 3),
9152
- position: new Float32Array(Light._maxLight * 3),
9153
- direction: new Float32Array(Light._maxLight * 3),
9154
- distance: new Float32Array(Light._maxLight),
9155
- angleCos: new Float32Array(Light._maxLight),
9156
- penumbraCos: new Float32Array(Light._maxLight)
9157
- };
9219
+ (function() {
9220
+ SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9221
+ })();
9222
+ (function() {
9223
+ SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9224
+ })();
9225
+ (function() {
9226
+ SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9227
+ })();
9228
+ (function() {
9229
+ SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9230
+ })();
9231
+ (function() {
9232
+ SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9233
+ })();
9234
+ (function() {
9235
+ SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9236
+ })();
9237
+ (function() {
9238
+ SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9239
+ })();
9240
+ (function() {
9241
+ SpotLight._combinedData = {
9242
+ cullingMask: new Int32Array(Light._maxLight * 2),
9243
+ color: new Float32Array(Light._maxLight * 3),
9244
+ position: new Float32Array(Light._maxLight * 3),
9245
+ direction: new Float32Array(Light._maxLight * 3),
9246
+ distance: new Float32Array(Light._maxLight),
9247
+ angleCos: new Float32Array(Light._maxLight),
9248
+ penumbraCos: new Float32Array(Light._maxLight)
9249
+ };
9250
+ })();
9158
9251
 
9159
9252
  /**
9160
9253
  * Light manager.
@@ -9715,7 +9808,7 @@ SpotLight._combinedData = {
9715
9808
  /**
9716
9809
  * @override
9717
9810
  */ _proto._onDestroy = function _onDestroy() {};
9718
- _createClass(Material, [
9811
+ _create_class(Material, [
9719
9812
  {
9720
9813
  key: "shader",
9721
9814
  get: /**
@@ -9824,9 +9917,15 @@ var RenderElement = function RenderElement() {
9824
9917
  };
9825
9918
  return RenderContext;
9826
9919
  }();
9827
- /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9828
- RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9829
- RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9920
+ (function() {
9921
+ /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9922
+ })();
9923
+ (function() {
9924
+ RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9925
+ })();
9926
+ (function() {
9927
+ RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9928
+ })();
9830
9929
 
9831
9930
  var SpriteElement = /*#__PURE__*/ function(RenderElement) {
9832
9931
  _inherits(SpriteElement, RenderElement);
@@ -9881,7 +9980,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9881
9980
  function Renderer1(entity) {
9882
9981
  var _this;
9883
9982
  _this = Component.call(this, entity) || this;
9884
- /** Whether cast shadow. */ _this.castShadows = true;
9885
9983
  /** ShaderData related to renderer. */ _this.shaderData = new ShaderData(ShaderDataGroup.Renderer);
9886
9984
  /** @internal */ _this._onUpdateIndex = -1;
9887
9985
  /** @internal */ _this._rendererIndex = -1;
@@ -9898,11 +9996,12 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9898
9996
  _this._priority = 0;
9899
9997
  _this._receiveShadows = true;
9900
9998
  _this._rendererLayer = new miniprogram.Vector4();
9999
+ /** Whether cast shadow. */ _this.castShadows = true;
9901
10000
  var prototype = exports.Renderer.prototype;
9902
10001
  var shaderData = _this.shaderData;
9903
10002
  _this._overrideUpdate = _this.update !== prototype.update;
9904
10003
  shaderData._addRefCount(1);
9905
- _this._onTransformChanged = _this._onTransformChanged.bind(_assertThisInitialized(_this));
10004
+ _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
9906
10005
  _this._registerEntityTransformListener();
9907
10006
  shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
9908
10007
  shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
@@ -10087,7 +10186,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10087
10186
  _proto._onTransformChanged = function _onTransformChanged(type) {
10088
10187
  this._dirtyUpdateFlag |= 0x1;
10089
10188
  };
10090
- _createClass(Renderer1, [
10189
+ _create_class(Renderer1, [
10091
10190
  {
10092
10191
  key: "isCulled",
10093
10192
  get: /**
@@ -10153,7 +10252,25 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10153
10252
  }
10154
10253
  ]);
10155
10254
  return Renderer1;
10156
- }(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);
10255
+ }(Component), function() {
10256
+ _Renderer._tempVector0 = new miniprogram.Vector3();
10257
+ }(), function() {
10258
+ _Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS");
10259
+ }(), function() {
10260
+ _Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat");
10261
+ }(), function() {
10262
+ _Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat");
10263
+ }(), function() {
10264
+ _Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat");
10265
+ }(), function() {
10266
+ _Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat");
10267
+ }(), function() {
10268
+ _Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat");
10269
+ }(), function() {
10270
+ _Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat");
10271
+ }(), function() {
10272
+ _Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
10273
+ }(), _Renderer);
10157
10274
  __decorate([
10158
10275
  deepClone
10159
10276
  ], exports.Renderer.prototype, "shaderData", void 0);
@@ -10283,14 +10400,18 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
10283
10400
  renderUVs[3].set(right, top);
10284
10401
  };
10285
10402
  return SimpleSpriteAssembler1;
10286
- }(), _SimpleSpriteAssembler._rectangleTriangles = [
10287
- 0,
10288
- 1,
10289
- 2,
10290
- 2,
10291
- 1,
10292
- 3
10293
- ], _SimpleSpriteAssembler._worldMatrix = new miniprogram.Matrix(), _SimpleSpriteAssembler);
10403
+ }(), function() {
10404
+ _SimpleSpriteAssembler._rectangleTriangles = [
10405
+ 0,
10406
+ 1,
10407
+ 2,
10408
+ 2,
10409
+ 1,
10410
+ 3
10411
+ ];
10412
+ }(), function() {
10413
+ _SimpleSpriteAssembler._worldMatrix = new miniprogram.Matrix();
10414
+ }(), _SimpleSpriteAssembler);
10294
10415
  SimpleSpriteAssembler = __decorate([
10295
10416
  StaticInterfaceImplement()
10296
10417
  ], SimpleSpriteAssembler);
@@ -10375,10 +10496,10 @@ SimpleSpriteAssembler = __decorate([
10375
10496
  _this._flipY = false;
10376
10497
  _this._alphaCutoff = 0.5;
10377
10498
  _this._renderData = new RenderData2D(4, [], []);
10378
- SimpleSpriteAssembler.resetData(_assertThisInitialized(_this));
10499
+ SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
10379
10500
  _this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
10380
10501
  _this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
10381
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
10502
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
10382
10503
  return _this;
10383
10504
  }
10384
10505
  var _proto = SpriteMask.prototype;
@@ -10446,7 +10567,7 @@ SimpleSpriteAssembler = __decorate([
10446
10567
  break;
10447
10568
  }
10448
10569
  };
10449
- _createClass(SpriteMask, [
10570
+ _create_class(SpriteMask, [
10450
10571
  {
10451
10572
  key: "width",
10452
10573
  get: /**
@@ -10548,8 +10669,12 @@ SimpleSpriteAssembler = __decorate([
10548
10669
  ]);
10549
10670
  return SpriteMask;
10550
10671
  }(exports.Renderer);
10551
- /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10552
- /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10672
+ (function() {
10673
+ /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10674
+ })();
10675
+ (function() {
10676
+ /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10677
+ })();
10553
10678
  __decorate([
10554
10679
  assignmentClone
10555
10680
  ], SpriteMask.prototype, "influenceLayers", void 0);
@@ -10755,7 +10880,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10755
10880
  this._glElementInfo = BufferUtil._getElementInfo(this.format);
10756
10881
  this._instanceStepRate = Math.floor(instanceStepRate);
10757
10882
  }
10758
- _createClass(VertexElement, [
10883
+ _create_class(VertexElement, [
10759
10884
  {
10760
10885
  key: "semantic",
10761
10886
  get: /**
@@ -10915,7 +11040,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10915
11040
  gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
10916
11041
  this._byteLength = dataLength;
10917
11042
  };
10918
- _createClass(Buffer, [
11043
+ _create_class(Buffer, [
10919
11044
  {
10920
11045
  key: "type",
10921
11046
  get: /**
@@ -10964,7 +11089,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10964
11089
  this._buffer = buffer;
10965
11090
  this._format = format;
10966
11091
  }
10967
- _createClass(IndexBufferBinding, [
11092
+ _create_class(IndexBufferBinding, [
10968
11093
  {
10969
11094
  key: "buffer",
10970
11095
  get: /**
@@ -11013,8 +11138,8 @@ var BufferUtil = /*#__PURE__*/ function() {
11013
11138
  _this._bounds = new miniprogram.BoundingBox();
11014
11139
  _this._subMeshes = [];
11015
11140
  _this.name = name;
11016
- _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assertThisInitialized(_this));
11017
- _this._onBoundsChanged = _this._onBoundsChanged.bind(_assertThisInitialized(_this));
11141
+ _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized(_this));
11142
+ _this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized(_this));
11018
11143
  var bounds = _this._bounds;
11019
11144
  // @ts-ignore
11020
11145
  bounds.min._onValueChanged = _this._onBoundsChanged;
@@ -11131,7 +11256,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11131
11256
  _proto._onBoundsChanged = function _onBoundsChanged() {
11132
11257
  this._updateFlagManager.dispatch(0x1);
11133
11258
  };
11134
- _createClass(Mesh, [
11259
+ _create_class(Mesh, [
11135
11260
  {
11136
11261
  key: "bounds",
11137
11262
  get: /**
@@ -11177,7 +11302,7 @@ var MeshModifyFlags;
11177
11302
  this._buffer = buffer;
11178
11303
  this._stride = stride;
11179
11304
  }
11180
- _createClass(VertexBufferBinding, [
11305
+ _create_class(VertexBufferBinding, [
11181
11306
  {
11182
11307
  key: "buffer",
11183
11308
  get: /**
@@ -11623,13 +11748,27 @@ var MeshModifyFlags;
11623
11748
  };
11624
11749
  return BlendShapeManager;
11625
11750
  }();
11626
- BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11627
- BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11628
- BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11629
- BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11630
- BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11631
- BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11632
- BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11751
+ (function() {
11752
+ BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11753
+ })();
11754
+ (function() {
11755
+ BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11756
+ })();
11757
+ (function() {
11758
+ BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11759
+ })();
11760
+ (function() {
11761
+ BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11762
+ })();
11763
+ (function() {
11764
+ BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11765
+ })();
11766
+ (function() {
11767
+ BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11768
+ })();
11769
+ (function() {
11770
+ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11771
+ })();
11633
11772
 
11634
11773
  /**
11635
11774
  * Vertex attribute types of a vertex in a ModelMesh.
@@ -11686,7 +11825,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
11686
11825
  _this._customVertexElements = [];
11687
11826
  _this._vertexCountChanged = false;
11688
11827
  _this.name = name;
11689
- _this._blendShapeManager = new BlendShapeManager(engine, _assertThisInitialized(_this));
11828
+ _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
11690
11829
  return _this;
11691
11830
  }
11692
11831
  var _proto = ModelMesh.prototype;
@@ -12636,7 +12775,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12636
12775
  this._uv7 = null;
12637
12776
  this._blendShapeManager._releaseMemoryCache();
12638
12777
  };
12639
- _createClass(ModelMesh, [
12778
+ _create_class(ModelMesh, [
12640
12779
  {
12641
12780
  key: "accessible",
12642
12781
  get: /**
@@ -12704,11 +12843,21 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12704
12843
  ]);
12705
12844
  return ModelMesh;
12706
12845
  }(Mesh);
12707
- ModelMesh._tempVec0 = new miniprogram.Vector3();
12708
- ModelMesh._tempVec1 = new miniprogram.Vector3();
12709
- ModelMesh._tempVec2 = new miniprogram.Vector3();
12710
- ModelMesh._tempVec3 = new miniprogram.Vector3();
12711
- ModelMesh._tempVec4 = new miniprogram.Vector3();
12846
+ (function() {
12847
+ ModelMesh._tempVec0 = new miniprogram.Vector3();
12848
+ })();
12849
+ (function() {
12850
+ ModelMesh._tempVec1 = new miniprogram.Vector3();
12851
+ })();
12852
+ (function() {
12853
+ ModelMesh._tempVec2 = new miniprogram.Vector3();
12854
+ })();
12855
+ (function() {
12856
+ ModelMesh._tempVec3 = new miniprogram.Vector3();
12857
+ })();
12858
+ (function() {
12859
+ ModelMesh._tempVec4 = new miniprogram.Vector3();
12860
+ })();
12712
12861
  var VertexChangedFlags;
12713
12862
  (function(VertexChangedFlags) {
12714
12863
  VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
@@ -12751,7 +12900,7 @@ var VertexChangedFlags;
12751
12900
  function MeshRenderer(entity) {
12752
12901
  var _this;
12753
12902
  _this = Renderer.call(this, entity) || this;
12754
- _this._onMeshChanged = _this._onMeshChanged.bind(_assertThisInitialized(_this));
12903
+ _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
12755
12904
  return _this;
12756
12905
  }
12757
12906
  var _proto = MeshRenderer.prototype;
@@ -12854,7 +13003,7 @@ var VertexChangedFlags;
12854
13003
  type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
12855
13004
  type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
12856
13005
  };
12857
- _createClass(MeshRenderer, [
13006
+ _create_class(MeshRenderer, [
12858
13007
  {
12859
13008
  key: "mesh",
12860
13009
  get: /**
@@ -12871,11 +13020,21 @@ var VertexChangedFlags;
12871
13020
  ]);
12872
13021
  return MeshRenderer;
12873
13022
  }(exports.Renderer);
12874
- MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
12875
- MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
12876
- MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
12877
- MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
12878
- MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
13023
+ (function() {
13024
+ MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
13025
+ })();
13026
+ (function() {
13027
+ MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
13028
+ })();
13029
+ (function() {
13030
+ MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
13031
+ })();
13032
+ (function() {
13033
+ MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
13034
+ })();
13035
+ (function() {
13036
+ MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
13037
+ })();
12879
13038
  __decorate([
12880
13039
  ignoreClone
12881
13040
  ], MeshRenderer.prototype, "_mesh", void 0);
@@ -12978,7 +13137,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
12978
13137
  // 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.
12979
13138
  maxVertexUniformVectors = Math.min(maxVertexUniformVectors, 256);
12980
13139
  _this._maxVertexUniformVectors = maxVertexUniformVectors;
12981
- _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assertThisInitialized(_this));
13140
+ _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
12982
13141
  var localBounds = _this._localBounds;
12983
13142
  // @ts-ignore
12984
13143
  localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
@@ -13176,7 +13335,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13176
13335
  _proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
13177
13336
  this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
13178
13337
  };
13179
- _createClass(SkinnedMeshRenderer, [
13338
+ _create_class(SkinnedMeshRenderer, [
13180
13339
  {
13181
13340
  key: "blendShapeWeights",
13182
13341
  get: /**
@@ -13241,10 +13400,18 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13241
13400
  ]);
13242
13401
  return SkinnedMeshRenderer;
13243
13402
  }(MeshRenderer);
13244
- SkinnedMeshRenderer._tempMatrix = new miniprogram.Matrix();
13245
- SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13246
- SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13247
- SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13403
+ (function() {
13404
+ SkinnedMeshRenderer._tempMatrix = new miniprogram.Matrix();
13405
+ })();
13406
+ (function() {
13407
+ SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13408
+ })();
13409
+ (function() {
13410
+ SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13411
+ })();
13412
+ (function() {
13413
+ SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13414
+ })();
13248
13415
  __decorate([
13249
13416
  ignoreClone
13250
13417
  ], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
@@ -14010,7 +14177,7 @@ __decorate([
14010
14177
  }
14011
14178
  this._setIndexBufferBinding(binding);
14012
14179
  };
14013
- _createClass(BufferMesh, [
14180
+ _create_class(BufferMesh, [
14014
14181
  {
14015
14182
  key: "instanceCount",
14016
14183
  get: /**
@@ -14124,7 +14291,7 @@ __decorate([
14124
14291
  this._layoutChangeManager.dispatch(0, this);
14125
14292
  }
14126
14293
  };
14127
- _createClass(BlendShape, [
14294
+ _create_class(BlendShape, [
14128
14295
  {
14129
14296
  key: "frames",
14130
14297
  get: /**
@@ -14282,8 +14449,12 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
14282
14449
  };
14283
14450
  return Basic2DBatcher;
14284
14451
  }();
14285
- /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14286
- Basic2DBatcher._canUploadSameBuffer = true;
14452
+ (function() {
14453
+ /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14454
+ })();
14455
+ (function() {
14456
+ Basic2DBatcher._canUploadSameBuffer = true;
14457
+ })();
14287
14458
 
14288
14459
  var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
14289
14460
  _inherits(SpriteMaskBatcher, Basic2DBatcher);
@@ -14498,9 +14669,15 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14498
14669
  };
14499
14670
  return Sky;
14500
14671
  }();
14501
- Sky._epsilon = 1e-6;
14502
- Sky._viewProjMatrix = new miniprogram.Matrix();
14503
- Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14672
+ (function() {
14673
+ Sky._epsilon = 1e-6;
14674
+ })();
14675
+ (function() {
14676
+ Sky._viewProjMatrix = new miniprogram.Matrix();
14677
+ })();
14678
+ (function() {
14679
+ Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14680
+ })();
14504
14681
 
14505
14682
  /**
14506
14683
  * Background of scene.
@@ -14582,7 +14759,7 @@ Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky
14582
14759
  mesh.addSubMesh(0, indices.length);
14583
14760
  return mesh;
14584
14761
  };
14585
- _createClass(Background, [
14762
+ _create_class(Background, [
14586
14763
  {
14587
14764
  key: "texture",
14588
14765
  get: /**
@@ -14750,7 +14927,7 @@ Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky
14750
14927
  out[25] = src[25] * 0.429042;
14751
14928
  out[26] = src[26] * 0.429042;
14752
14929
  };
14753
- _createClass(AmbientLight, [
14930
+ _create_class(AmbientLight, [
14754
14931
  {
14755
14932
  key: "specularTextureDecodeRGBM",
14756
14933
  get: /**
@@ -14861,15 +15038,33 @@ Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky
14861
15038
  ]);
14862
15039
  return AmbientLight;
14863
15040
  }();
14864
- AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
14865
- AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
14866
- AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
14867
- AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
14868
- AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
14869
- AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
14870
- AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
14871
- AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
14872
- AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15041
+ (function() {
15042
+ AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
15043
+ })();
15044
+ (function() {
15045
+ AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
15046
+ })();
15047
+ (function() {
15048
+ AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
15049
+ })();
15050
+ (function() {
15051
+ AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
15052
+ })();
15053
+ (function() {
15054
+ AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
15055
+ })();
15056
+ (function() {
15057
+ AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
15058
+ })();
15059
+ (function() {
15060
+ AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
15061
+ })();
15062
+ (function() {
15063
+ AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
15064
+ })();
15065
+ (function() {
15066
+ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15067
+ })();
14873
15068
 
14874
15069
  /**
14875
15070
  * Scene.
@@ -14900,7 +15095,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
14900
15095
  var shaderData = _this.shaderData;
14901
15096
  shaderData._addRefCount(1);
14902
15097
  _this.ambientLight = new AmbientLight();
14903
- engine.sceneManager._allScenes.push(_assertThisInitialized(_this));
15098
+ engine.sceneManager._allScenes.push(_assert_this_initialized(_this));
14904
15099
  shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
14905
15100
  shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
14906
15101
  shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
@@ -15107,7 +15302,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15107
15302
  this._fogParams.z = density / Math.LN2;
15108
15303
  this._fogParams.w = density / Math.sqrt(Math.LN2);
15109
15304
  };
15110
- _createClass(Scene, [
15305
+ _create_class(Scene, [
15111
15306
  {
15112
15307
  key: "shadowCascades",
15113
15308
  get: /**
@@ -15235,8 +15430,12 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15235
15430
  ]);
15236
15431
  return Scene;
15237
15432
  }(EngineObject);
15238
- Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15239
- Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15433
+ (function() {
15434
+ Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15435
+ })();
15436
+ (function() {
15437
+ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15438
+ })();
15240
15439
 
15241
15440
  /**
15242
15441
  * Scene manager.
@@ -15284,7 +15483,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15284
15483
  }
15285
15484
  allScenes.length = 0;
15286
15485
  };
15287
- _createClass(SceneManager, [
15486
+ _create_class(SceneManager, [
15288
15487
  {
15289
15488
  key: "activeScene",
15290
15489
  get: /**
@@ -15305,7 +15504,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15305
15504
  return SceneManager;
15306
15505
  }();
15307
15506
 
15308
- var blinnPhongFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_declare>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <ShadowFragmentDeclaration>\n#include <mobile_material_frag>\n#include <RendererFragmentDeclaration>\n#include <FogFragmentDeclaration>\n#include <normal_get>\nvoid main(){\n#include <begin_mobile_frag>\n#include <begin_viewdir_frag>\n#include <mobile_blinnphong_frag>\ngl_FragColor=emission+ambient+diffuse+specular;\n#ifdef OASIS_TRANSPARENT\ngl_FragColor.a=diffuse.a;\n#else\ngl_FragColor.a=1.0;\n#endif\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
15507
+ var blinnPhongFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_declare>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <ShadowFragmentDeclaration>\n#include <mobile_material_frag>\n#include <FogFragmentDeclaration>\n#include <normal_get>\nvoid main(){\n#include <begin_mobile_frag>\n#include <begin_viewdir_frag>\n#include <mobile_blinnphong_frag>\ngl_FragColor=emission+ambient+diffuse+specular;\n#ifdef OASIS_TRANSPARENT\ngl_FragColor.a=diffuse.a;\n#else\ngl_FragColor.a=1.0;\n#endif\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
15309
15508
 
15310
15509
  var blinnPhongVs = "#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
15311
15510
 
@@ -15313,7 +15512,7 @@ var particleFs = "#define GLSLIFY 1\nvarying vec4 v_color;varying float v_lifeLe
15313
15512
 
15314
15513
  var particleVs = "#define GLSLIFY 1\nattribute vec3 a_position;attribute vec3 a_velocity;attribute vec3 a_acceleration;attribute vec4 a_color;attribute vec4 a_lifeAndSize;attribute vec2 a_rotation;attribute vec3 a_uv;attribute vec2 a_normalizedUv;uniform float u_time;uniform bool u_once;uniform mat4 u_MVPMat;varying vec4 v_color;varying float v_lifeLeft;varying vec2 v_uv;\n#ifdef is2d\nuniform mat4 u_viewInvMat;uniform mat4 u_projMat;uniform mat4 u_viewMat;uniform mat4 u_modelMat;\n#endif\nmat2 rotation2d(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_color=a_color;v_uv=a_uv.xy;float life=a_lifeAndSize.y;float startTime=a_lifeAndSize.x;float deltaTime=max(mod(u_time-startTime,life),0.0);if((u_once&&u_time>life+startTime)){deltaTime=0.0;}v_lifeLeft=1.0-deltaTime/life;float scale=a_lifeAndSize.z;vec3 position=a_position+(a_velocity+a_acceleration*deltaTime*0.5)*deltaTime;\n#ifdef isScaleByLifetime\nscale*=v_lifeLeft;\n#else\nscale*=pow(a_lifeAndSize.w,deltaTime);\n#endif\n#ifdef rotateToVelocity\nvec3 v=a_velocity+a_acceleration*deltaTime;float angle=atan(v.z,v.x)*2.0;\n#else\nfloat deltaAngle=deltaTime*a_rotation.y;float angle=a_rotation.x+deltaAngle;\n#endif\n#ifdef is2d\nvec2 rotatedPoint=rotation2d(angle)*vec2(a_normalizedUv.x,a_normalizedUv.y*a_uv.z);vec3 basisX=u_viewInvMat[0].xyz;vec3 basisZ=u_viewInvMat[1].xyz;vec3 localPosition=vec3(basisX*rotatedPoint.x+basisZ*rotatedPoint.y)*scale+position;gl_Position=u_projMat*u_viewMat*vec4(localPosition+u_modelMat[3].xyz,1.);\n#else\n#ifdef rotateToVelocity\nfloat s=sin(angle);float c=cos(angle);\n#else\nfloat s=sin(angle);float c=cos(angle);\n#endif\nvec4 rotatedPoint=vec4((a_normalizedUv.x*c+a_normalizedUv.y*a_uv.z*s)*scale,0.,(a_normalizedUv.x*s-a_normalizedUv.y*a_uv.z*c)*scale,1.);vec4 orientation=vec4(0,0,0,1);vec4 q2=orientation+orientation;vec4 qx=orientation.xxxw*q2.xyzx;vec4 qy=orientation.xyyw*q2.xyzy;vec4 qz=orientation.xxzw*q2.xxzz;mat4 localMatrix=mat4((1.0-qy.y)-qz.z,qx.y+qz.w,qx.z-qy.w,0,qx.y-qz.w,(1.0-qx.x)-qz.z,qy.z+qx.w,0,qx.z+qy.w,qy.z-qx.w,(1.0-qx.x)-qy.y,0,position.x,position.y,position.z,1);rotatedPoint=localMatrix*rotatedPoint;gl_Position=u_MVPMat*rotatedPoint;\n#endif\n}"; // eslint-disable-line
15315
15514
 
15316
- var pbrFs = "#define GLSLIFY 1\n#define IS_METALLIC_WORKFLOW\n#include <common>\n#include <camera_declare>\n#include <RendererFragmentDeclaration>\n#include <FogFragmentDeclaration>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <pbr_frag_define>\n#include <pbr_helper>\nvoid main(){\n#include <pbr_frag>\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
15515
+ var pbrFs = "#define GLSLIFY 1\n#define IS_METALLIC_WORKFLOW\n#include <common>\n#include <camera_declare>\n#include <FogFragmentDeclaration>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <pbr_frag_define>\n#include <pbr_helper>\nvoid main(){\n#include <pbr_frag>\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
15317
15516
 
15318
15517
  var pbrSpecularFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_declare>\n#include <FogFragmentDeclaration>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <pbr_frag_define>\n#include <pbr_helper>\nvoid main(){\n#include <pbr_frag>\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
15319
15518
 
@@ -15455,8 +15654,8 @@ ShaderPool.init();
15455
15654
  /** @internal */ _this._canSpriteBatch = true;
15456
15655
  /** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
15457
15656
  _this._settings = {};
15458
- _this._resourceManager = new ResourceManager(_assertThisInitialized(_this));
15459
- _this._sceneManager = new SceneManager(_assertThisInitialized(_this));
15657
+ _this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
15658
+ _this._sceneManager = new SceneManager(_assert_this_initialized(_this));
15460
15659
  _this._vSyncCount = 1;
15461
15660
  _this._targetFrameRate = 60;
15462
15661
  _this._time = new Time();
@@ -15480,25 +15679,25 @@ ShaderPool.init();
15480
15679
  };
15481
15680
  _this._hardwareRenderer = hardwareRenderer;
15482
15681
  _this._hardwareRenderer.init(canvas);
15483
- _this.physicsManager = new PhysicsManager(_assertThisInitialized(_this));
15682
+ _this.physicsManager = new PhysicsManager(_assert_this_initialized(_this));
15484
15683
  _this._canvas = canvas;
15485
- _this._sceneManager.activeScene = new Scene(_assertThisInitialized(_this), "DefaultScene");
15486
- _this._spriteMaskManager = new SpriteMaskManager(_assertThisInitialized(_this));
15684
+ _this._sceneManager.activeScene = new Scene(_assert_this_initialized(_this), "DefaultScene");
15685
+ _this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized(_this));
15487
15686
  _this._spriteDefaultMaterial = _this._createSpriteMaterial();
15488
15687
  _this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
15489
- _this._textDefaultFont = Font.createFromOS(_assertThisInitialized(_this), "Arial");
15688
+ _this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
15490
15689
  _this._textDefaultFont.isGCIgnored = false;
15491
- _this.inputManager = new InputManager(_assertThisInitialized(_this));
15690
+ _this.inputManager = new InputManager(_assert_this_initialized(_this));
15492
15691
  var magentaPixel = new Uint8Array([
15493
15692
  255,
15494
15693
  0,
15495
15694
  255,
15496
15695
  255
15497
15696
  ]);
15498
- var magentaTexture2D = new Texture2D(_assertThisInitialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15697
+ var magentaTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15499
15698
  magentaTexture2D.setPixelBuffer(magentaPixel);
15500
15699
  magentaTexture2D.isGCIgnored = true;
15501
- var magentaTextureCube = new TextureCube(_assertThisInitialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
15700
+ var magentaTextureCube = new TextureCube(_assert_this_initialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
15502
15701
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveX, magentaPixel);
15503
15702
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.NegativeX, magentaPixel);
15504
15703
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveY, magentaPixel);
@@ -15509,22 +15708,22 @@ ShaderPool.init();
15509
15708
  if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
15510
15709
  _this._macroCollection.enable(Engine._noDepthTextureMacro);
15511
15710
  } else {
15512
- var depthTexture2D = new Texture2D(_assertThisInitialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
15711
+ var depthTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
15513
15712
  depthTexture2D.isGCIgnored = true;
15514
15713
  _this._depthTexture2D = depthTexture2D;
15515
15714
  }
15516
15715
  _this._magentaTexture2D = magentaTexture2D;
15517
15716
  _this._magentaTextureCube = magentaTextureCube;
15518
15717
  if (hardwareRenderer.isWebGL2) {
15519
- var magentaTexture2DArray = new Texture2DArray(_assertThisInitialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
15718
+ var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
15520
15719
  magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
15521
15720
  magentaTexture2DArray.isGCIgnored = true;
15522
15721
  _this._magentaTexture2DArray = magentaTexture2DArray;
15523
15722
  }
15524
- var magentaMaterial = new Material(_assertThisInitialized(_this), Shader.find("unlit"));
15723
+ var magentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
15525
15724
  magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
15526
15725
  _this._magentaMaterial = magentaMaterial;
15527
- var backgroundTextureMaterial = new Material(_assertThisInitialized(_this), Shader.find("background-texture"));
15726
+ var backgroundTextureMaterial = new Material(_assert_this_initialized(_this), Shader.find("background-texture"));
15528
15727
  backgroundTextureMaterial.isGCIgnored = true;
15529
15728
  backgroundTextureMaterial.renderState.depthState.compareFunction = exports.CompareFunction.LessEqual;
15530
15729
  _this._backgroundTextureMaterial = backgroundTextureMaterial;
@@ -15695,7 +15894,7 @@ ShaderPool.init();
15695
15894
  material.isGCIgnored = true;
15696
15895
  return material;
15697
15896
  };
15698
- _createClass(Engine, [
15897
+ _create_class(Engine, [
15699
15898
  {
15700
15899
  key: "settings",
15701
15900
  get: /**
@@ -15783,9 +15982,15 @@ ShaderPool.init();
15783
15982
  ]);
15784
15983
  return Engine;
15785
15984
  }(EventDispatcher);
15786
- /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15787
- /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15788
- /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
15985
+ (function() {
15986
+ /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15987
+ })();
15988
+ (function() {
15989
+ /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15990
+ })();
15991
+ (function() {
15992
+ /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
15993
+ })();
15789
15994
 
15790
15995
  /**
15791
15996
  * Script class, used for logic writing.
@@ -16100,7 +16305,9 @@ __decorate([
16100
16305
  };
16101
16306
  return SpriteBatcher;
16102
16307
  }(Basic2DBatcher);
16103
- SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16308
+ (function() {
16309
+ SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16310
+ })();
16104
16311
 
16105
16312
  /**
16106
16313
  * Render queue.
@@ -16598,227 +16805,247 @@ var /**
16598
16805
  };
16599
16806
  return ShadowUtils;
16600
16807
  }();
16601
- ShadowUtils._tempMatrix0 = new miniprogram.Matrix();
16602
- // prettier-ignore
16603
- /** @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);
16604
- ShadowUtils._frustumCorners = [
16605
- new miniprogram.Vector3(),
16606
- new miniprogram.Vector3(),
16607
- new miniprogram.Vector3(),
16608
- new miniprogram.Vector3(),
16609
- new miniprogram.Vector3(),
16610
- new miniprogram.Vector3(),
16611
- new miniprogram.Vector3(),
16612
- new miniprogram.Vector3()
16613
- ];
16614
- ShadowUtils._adjustNearPlane = new miniprogram.Plane(new miniprogram.Vector3());
16615
- ShadowUtils._adjustFarPlane = new miniprogram.Plane(new miniprogram.Vector3());
16616
- ShadowUtils._backPlaneFaces = new Array(5);
16617
- ShadowUtils._edgePlanePoint2 = new miniprogram.Vector3();
16618
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16619
- [
16620
- miniprogram.FrustumFace.Left,
16621
- miniprogram.FrustumFace.Right,
16622
- miniprogram.FrustumFace.Top,
16623
- miniprogram.FrustumFace.Bottom
16624
- ],
16625
- [
16626
- miniprogram.FrustumFace.Left,
16627
- miniprogram.FrustumFace.Right,
16628
- miniprogram.FrustumFace.Top,
16629
- miniprogram.FrustumFace.Bottom
16630
- ],
16631
- [
16632
- miniprogram.FrustumFace.Near,
16633
- miniprogram.FrustumFace.Far,
16634
- miniprogram.FrustumFace.Top,
16635
- miniprogram.FrustumFace.Bottom
16636
- ],
16637
- [
16638
- miniprogram.FrustumFace.Near,
16639
- miniprogram.FrustumFace.Far,
16640
- miniprogram.FrustumFace.Top,
16641
- miniprogram.FrustumFace.Bottom
16642
- ],
16643
- [
16644
- miniprogram.FrustumFace.Near,
16645
- miniprogram.FrustumFace.Far,
16646
- miniprogram.FrustumFace.Left,
16647
- miniprogram.FrustumFace.Right
16648
- ],
16649
- [
16650
- miniprogram.FrustumFace.Near,
16651
- miniprogram.FrustumFace.Far,
16652
- miniprogram.FrustumFace.Left,
16653
- miniprogram.FrustumFace.Right
16654
- ]
16655
- ];
16656
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16657
- [
16658
- // near, far, left, right, bottom, top
16659
- [
16660
- 8,
16661
- 8
16662
- ],
16663
- [
16664
- 8,
16665
- 8
16666
- ],
16667
- [
16668
- 4,
16669
- 5
16670
- ],
16671
- [
16672
- 6,
16673
- 7
16674
- ],
16675
- [
16676
- 7,
16677
- 4
16678
- ],
16679
- [
16680
- 5,
16681
- 6
16682
- ]
16683
- ],
16684
- [
16685
- // near, far, left, right, bottom, top
16686
- [
16687
- 8,
16688
- 8
16689
- ],
16690
- [
16691
- 8,
16692
- 8
16693
- ],
16694
- [
16695
- 1,
16696
- 0
16697
- ],
16698
- [
16699
- 3,
16700
- 2
16701
- ],
16702
- [
16703
- 0,
16704
- 3
16705
- ],
16706
- [
16707
- 2,
16708
- 1
16709
- ]
16710
- ],
16711
- [
16712
- // near, far, left, right, bottom, top
16713
- [
16714
- 5,
16715
- 4
16716
- ],
16717
- [
16718
- 0,
16719
- 1
16720
- ],
16721
- [
16722
- 8,
16723
- 8
16724
- ],
16725
- [
16726
- 8,
16727
- 8
16728
- ],
16729
- [
16730
- 4,
16731
- 0
16732
- ],
16733
- [
16734
- 1,
16735
- 5
16736
- ]
16737
- ],
16738
- [
16739
- // near, far, left, right, bottom, top
16740
- [
16741
- 7,
16742
- 6
16743
- ],
16744
- [
16745
- 2,
16746
- 3
16747
- ],
16748
- [
16749
- 8,
16750
- 8
16751
- ],
16752
- [
16753
- 8,
16754
- 8
16755
- ],
16756
- [
16757
- 3,
16758
- 7
16759
- ],
16760
- [
16761
- 6,
16762
- 2
16763
- ]
16764
- ],
16765
- [
16766
- // near, far, left, right, bottom, top
16808
+ (function() {
16809
+ ShadowUtils._tempMatrix0 = new miniprogram.Matrix();
16810
+ })();
16811
+ (function() {
16812
+ // prettier-ignore
16813
+ /** @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);
16814
+ })();
16815
+ (function() {
16816
+ ShadowUtils._frustumCorners = [
16817
+ new miniprogram.Vector3(),
16818
+ new miniprogram.Vector3(),
16819
+ new miniprogram.Vector3(),
16820
+ new miniprogram.Vector3(),
16821
+ new miniprogram.Vector3(),
16822
+ new miniprogram.Vector3(),
16823
+ new miniprogram.Vector3(),
16824
+ new miniprogram.Vector3()
16825
+ ];
16826
+ })();
16827
+ (function() {
16828
+ ShadowUtils._adjustNearPlane = new miniprogram.Plane(new miniprogram.Vector3());
16829
+ })();
16830
+ (function() {
16831
+ ShadowUtils._adjustFarPlane = new miniprogram.Plane(new miniprogram.Vector3());
16832
+ })();
16833
+ (function() {
16834
+ ShadowUtils._backPlaneFaces = new Array(5);
16835
+ })();
16836
+ (function() {
16837
+ ShadowUtils._edgePlanePoint2 = new miniprogram.Vector3();
16838
+ })();
16839
+ (function() {
16840
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16767
16841
  [
16768
- 4,
16769
- 7
16842
+ miniprogram.FrustumFace.Left,
16843
+ miniprogram.FrustumFace.Right,
16844
+ miniprogram.FrustumFace.Top,
16845
+ miniprogram.FrustumFace.Bottom
16770
16846
  ],
16771
16847
  [
16772
- 3,
16773
- 0
16848
+ miniprogram.FrustumFace.Left,
16849
+ miniprogram.FrustumFace.Right,
16850
+ miniprogram.FrustumFace.Top,
16851
+ miniprogram.FrustumFace.Bottom
16774
16852
  ],
16775
16853
  [
16776
- 0,
16777
- 4
16854
+ miniprogram.FrustumFace.Near,
16855
+ miniprogram.FrustumFace.Far,
16856
+ miniprogram.FrustumFace.Top,
16857
+ miniprogram.FrustumFace.Bottom
16778
16858
  ],
16779
16859
  [
16780
- 7,
16781
- 3
16860
+ miniprogram.FrustumFace.Near,
16861
+ miniprogram.FrustumFace.Far,
16862
+ miniprogram.FrustumFace.Top,
16863
+ miniprogram.FrustumFace.Bottom
16782
16864
  ],
16783
16865
  [
16784
- 8,
16785
- 8
16866
+ miniprogram.FrustumFace.Near,
16867
+ miniprogram.FrustumFace.Far,
16868
+ miniprogram.FrustumFace.Left,
16869
+ miniprogram.FrustumFace.Right
16786
16870
  ],
16787
16871
  [
16788
- 8,
16789
- 8
16872
+ miniprogram.FrustumFace.Near,
16873
+ miniprogram.FrustumFace.Far,
16874
+ miniprogram.FrustumFace.Left,
16875
+ miniprogram.FrustumFace.Right
16790
16876
  ]
16791
- ],
16792
- [
16793
- // near, far, left, right, bottom, top
16877
+ ];
16878
+ })();
16879
+ (function() {
16880
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16794
16881
  [
16795
- 6,
16796
- 5
16882
+ // near, far, left, right, bottom, top
16883
+ [
16884
+ 8,
16885
+ 8
16886
+ ],
16887
+ [
16888
+ 8,
16889
+ 8
16890
+ ],
16891
+ [
16892
+ 4,
16893
+ 5
16894
+ ],
16895
+ [
16896
+ 6,
16897
+ 7
16898
+ ],
16899
+ [
16900
+ 7,
16901
+ 4
16902
+ ],
16903
+ [
16904
+ 5,
16905
+ 6
16906
+ ]
16797
16907
  ],
16798
16908
  [
16799
- 1,
16800
- 2
16909
+ // near, far, left, right, bottom, top
16910
+ [
16911
+ 8,
16912
+ 8
16913
+ ],
16914
+ [
16915
+ 8,
16916
+ 8
16917
+ ],
16918
+ [
16919
+ 1,
16920
+ 0
16921
+ ],
16922
+ [
16923
+ 3,
16924
+ 2
16925
+ ],
16926
+ [
16927
+ 0,
16928
+ 3
16929
+ ],
16930
+ [
16931
+ 2,
16932
+ 1
16933
+ ]
16801
16934
  ],
16802
16935
  [
16803
- 5,
16804
- 1
16936
+ // near, far, left, right, bottom, top
16937
+ [
16938
+ 5,
16939
+ 4
16940
+ ],
16941
+ [
16942
+ 0,
16943
+ 1
16944
+ ],
16945
+ [
16946
+ 8,
16947
+ 8
16948
+ ],
16949
+ [
16950
+ 8,
16951
+ 8
16952
+ ],
16953
+ [
16954
+ 4,
16955
+ 0
16956
+ ],
16957
+ [
16958
+ 1,
16959
+ 5
16960
+ ]
16805
16961
  ],
16806
16962
  [
16807
- 2,
16808
- 6
16963
+ // near, far, left, right, bottom, top
16964
+ [
16965
+ 7,
16966
+ 6
16967
+ ],
16968
+ [
16969
+ 2,
16970
+ 3
16971
+ ],
16972
+ [
16973
+ 8,
16974
+ 8
16975
+ ],
16976
+ [
16977
+ 8,
16978
+ 8
16979
+ ],
16980
+ [
16981
+ 3,
16982
+ 7
16983
+ ],
16984
+ [
16985
+ 6,
16986
+ 2
16987
+ ]
16809
16988
  ],
16810
16989
  [
16811
- 8,
16812
- 8
16990
+ // near, far, left, right, bottom, top
16991
+ [
16992
+ 4,
16993
+ 7
16994
+ ],
16995
+ [
16996
+ 3,
16997
+ 0
16998
+ ],
16999
+ [
17000
+ 0,
17001
+ 4
17002
+ ],
17003
+ [
17004
+ 7,
17005
+ 3
17006
+ ],
17007
+ [
17008
+ 8,
17009
+ 8
17010
+ ],
17011
+ [
17012
+ 8,
17013
+ 8
17014
+ ]
16813
17015
  ],
16814
17016
  [
16815
- 8,
16816
- 8
17017
+ // near, far, left, right, bottom, top
17018
+ [
17019
+ 6,
17020
+ 5
17021
+ ],
17022
+ [
17023
+ 1,
17024
+ 2
17025
+ ],
17026
+ [
17027
+ 5,
17028
+ 1
17029
+ ],
17030
+ [
17031
+ 2,
17032
+ 6
17033
+ ],
17034
+ [
17035
+ 8,
17036
+ 8
17037
+ ],
17038
+ [
17039
+ 8,
17040
+ 8
17041
+ ]
16817
17042
  ]
16818
- ]
16819
- ];
16820
- //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.
16821
- ShadowUtils.atlasBorderSize = 4.0;
17043
+ ];
17044
+ })();
17045
+ (function() {
17046
+ //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.
17047
+ ShadowUtils.atlasBorderSize = 4.0;
17048
+ })();
16822
17049
 
16823
17050
  /**
16824
17051
  * Cascade shadow caster.
@@ -17055,18 +17282,42 @@ ShadowUtils.atlasBorderSize = 4.0;
17055
17282
  };
17056
17283
  return CascadedShadowCasterPass;
17057
17284
  }();
17058
- CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17059
- CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17060
- CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17061
- CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17062
- CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17063
- CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17064
- CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17065
- CascadedShadowCasterPass._maxCascades = 4;
17066
- CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17067
- CascadedShadowCasterPass._clearColor = new miniprogram.Color(1, 1, 1, 1);
17068
- CascadedShadowCasterPass._tempVector = new miniprogram.Vector3();
17069
- CascadedShadowCasterPass._tempMatrix0 = new miniprogram.Matrix();
17285
+ (function() {
17286
+ CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17287
+ })();
17288
+ (function() {
17289
+ CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17290
+ })();
17291
+ (function() {
17292
+ CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17293
+ })();
17294
+ (function() {
17295
+ CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17296
+ })();
17297
+ (function() {
17298
+ CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17299
+ })();
17300
+ (function() {
17301
+ CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17302
+ })();
17303
+ (function() {
17304
+ CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17305
+ })();
17306
+ (function() {
17307
+ CascadedShadowCasterPass._maxCascades = 4;
17308
+ })();
17309
+ (function() {
17310
+ CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17311
+ })();
17312
+ (function() {
17313
+ CascadedShadowCasterPass._clearColor = new miniprogram.Color(1, 1, 1, 1);
17314
+ })();
17315
+ (function() {
17316
+ CascadedShadowCasterPass._tempVector = new miniprogram.Vector3();
17317
+ })();
17318
+ (function() {
17319
+ CascadedShadowCasterPass._tempMatrix0 = new miniprogram.Matrix();
17320
+ })();
17070
17321
 
17071
17322
  var passNum = 0;
17072
17323
  /**
@@ -17299,7 +17550,7 @@ var passNum = 0;
17299
17550
  renderer._prepareRender(context);
17300
17551
  }
17301
17552
  };
17302
- _createClass(BasicRenderPipeline, [
17553
+ _create_class(BasicRenderPipeline, [
17303
17554
  {
17304
17555
  key: "defaultRenderPass",
17305
17556
  get: /**
@@ -17311,15 +17562,25 @@ var passNum = 0;
17311
17562
  ]);
17312
17563
  return BasicRenderPipeline;
17313
17564
  }();
17314
- BasicRenderPipeline._tempVector0 = new miniprogram.Vector3();
17315
- BasicRenderPipeline._tempVector1 = new miniprogram.Vector3();
17565
+ (function() {
17566
+ BasicRenderPipeline._tempVector0 = new miniprogram.Vector3();
17567
+ })();
17568
+ (function() {
17569
+ BasicRenderPipeline._tempVector1 = new miniprogram.Vector3();
17570
+ })();
17316
17571
 
17317
17572
  var _Camera;
17318
17573
  var MathTemp = function MathTemp() {
17319
17574
  };
17320
- MathTemp.tempVec4 = new miniprogram.Vector4();
17321
- MathTemp.tempVec3 = new miniprogram.Vector3();
17322
- MathTemp.tempVec2 = new miniprogram.Vector2();
17575
+ (function() {
17576
+ MathTemp.tempVec4 = new miniprogram.Vector4();
17577
+ })();
17578
+ (function() {
17579
+ MathTemp.tempVec3 = new miniprogram.Vector3();
17580
+ })();
17581
+ (function() {
17582
+ MathTemp.tempVec2 = new miniprogram.Vector2();
17583
+ })();
17323
17584
  exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17324
17585
  _inherits(Camera1, Component);
17325
17586
  function Camera1(entity) {
@@ -17337,6 +17598,8 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17337
17598
  * @remarks Support bit manipulation, corresponding to `Layer`.
17338
17599
  */ _this.cullingMask = exports.Layer.Everything;
17339
17600
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
17601
+ /** @internal */ _this._frustum = new miniprogram.BoundingFrustum();
17602
+ /** @internal */ _this._virtualCamera = new VirtualCamera();
17340
17603
  _this._isProjMatSetting = false;
17341
17604
  _this._nearClipPlane = 0.1;
17342
17605
  _this._farClipPlane = 100;
@@ -17347,8 +17610,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17347
17610
  _this._isFrustumProjectDirty = true;
17348
17611
  _this._customAspectRatio = undefined;
17349
17612
  _this._renderTarget = null;
17350
- /** @internal */ _this._frustum = new miniprogram.BoundingFrustum();
17351
- /** @internal */ _this._virtualCamera = new VirtualCamera();
17352
17613
  _this._viewport = new miniprogram.Vector4(0, 0, 1, 1);
17353
17614
  _this._inverseProjectionMatrix = new miniprogram.Matrix();
17354
17615
  _this._lastAspectSize = new miniprogram.Vector2(0, 0);
@@ -17358,7 +17619,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17358
17619
  _this._isViewMatrixDirty = transform.registerWorldChangeFlag();
17359
17620
  _this._isInvViewProjDirty = transform.registerWorldChangeFlag();
17360
17621
  _this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
17361
- _this._renderPipeline = new BasicRenderPipeline(_assertThisInitialized(_this));
17622
+ _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
17362
17623
  _this.shaderData._addRefCount(1);
17363
17624
  return _this;
17364
17625
  }
@@ -17575,7 +17836,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17575
17836
  }
17576
17837
  return this._inverseProjectionMatrix;
17577
17838
  };
17578
- _createClass(Camera1, [
17839
+ _create_class(Camera1, [
17579
17840
  {
17580
17841
  key: "nearClipPlane",
17581
17842
  get: /**
@@ -17739,7 +18000,11 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17739
18000
  }
17740
18001
  ]);
17741
18002
  return Camera1;
17742
- }(Component), /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat"), /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos"), _Camera);
18003
+ }(Component), function() {
18004
+ /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat");
18005
+ }(), function() {
18006
+ /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
18007
+ }(), _Camera);
17743
18008
  __decorate([
17744
18009
  deepClone
17745
18010
  ], exports.Camera.prototype, "_frustum", void 0);
@@ -17950,7 +18215,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
17950
18215
  };
17951
18216
  return Loader;
17952
18217
  }();
17953
- Loader._engineObjects = {};
18218
+ (function() {
18219
+ Loader._engineObjects = {};
18220
+ })();
17954
18221
 
17955
18222
  /**
17956
18223
  * Asset Type.
@@ -18103,7 +18370,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18103
18370
  target._isTransparent = this._isTransparent;
18104
18371
  target._blendMode = this._blendMode;
18105
18372
  };
18106
- _createClass(BaseMaterial, [
18373
+ _create_class(BaseMaterial, [
18107
18374
  {
18108
18375
  key: "shader",
18109
18376
  get: /**
@@ -18203,19 +18470,45 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18203
18470
  ]);
18204
18471
  return BaseMaterial;
18205
18472
  }(Material);
18206
- BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18207
- BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18208
- BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18209
- BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18210
- BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18211
- BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18212
- BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18213
- BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18214
- BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18215
- BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18216
- BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18217
- BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18218
- BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18473
+ (function() {
18474
+ BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18475
+ })();
18476
+ (function() {
18477
+ BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18478
+ })();
18479
+ (function() {
18480
+ BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18481
+ })();
18482
+ (function() {
18483
+ BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18484
+ })();
18485
+ (function() {
18486
+ BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18487
+ })();
18488
+ (function() {
18489
+ BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18490
+ })();
18491
+ (function() {
18492
+ BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18493
+ })();
18494
+ (function() {
18495
+ BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18496
+ })();
18497
+ (function() {
18498
+ BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18499
+ })();
18500
+ (function() {
18501
+ BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18502
+ })();
18503
+ (function() {
18504
+ BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18505
+ })();
18506
+ (function() {
18507
+ BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18508
+ })();
18509
+ (function() {
18510
+ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18511
+ })();
18219
18512
 
18220
18513
  /**
18221
18514
  * Blinn-phong Material.
@@ -18243,7 +18536,7 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18243
18536
  this.cloneTo(dest);
18244
18537
  return dest;
18245
18538
  };
18246
- _createClass(BlinnPhongMaterial, [
18539
+ _create_class(BlinnPhongMaterial, [
18247
18540
  {
18248
18541
  key: "baseColor",
18249
18542
  get: /**
@@ -18389,9 +18682,15 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18389
18682
  ]);
18390
18683
  return BlinnPhongMaterial;
18391
18684
  }(BaseMaterial);
18392
- BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18393
- BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18394
- BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
18685
+ (function() {
18686
+ BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18687
+ })();
18688
+ (function() {
18689
+ BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18690
+ })();
18691
+ (function() {
18692
+ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
18693
+ })();
18395
18694
 
18396
18695
  /**
18397
18696
  * Texture UV coordinate.
@@ -18427,7 +18726,7 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18427
18726
  shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
18428
18727
  return _this;
18429
18728
  }
18430
- _createClass(PBRBaseMaterial, [
18729
+ _create_class(PBRBaseMaterial, [
18431
18730
  {
18432
18731
  key: "baseColor",
18433
18732
  get: /**
@@ -18651,14 +18950,30 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18651
18950
  ]);
18652
18951
  return PBRBaseMaterial;
18653
18952
  }(BaseMaterial);
18654
- PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18655
- PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18656
- PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18657
- PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18658
- PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18659
- PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18660
- PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18661
- PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
18953
+ (function() {
18954
+ PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18955
+ })();
18956
+ (function() {
18957
+ PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18958
+ })();
18959
+ (function() {
18960
+ PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18961
+ })();
18962
+ (function() {
18963
+ PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18964
+ })();
18965
+ (function() {
18966
+ PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18967
+ })();
18968
+ (function() {
18969
+ PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18970
+ })();
18971
+ (function() {
18972
+ PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18973
+ })();
18974
+ (function() {
18975
+ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
18976
+ })();
18662
18977
 
18663
18978
  /**
18664
18979
  * PBR (Metallic-Roughness Workflow) Material.
@@ -18679,7 +18994,7 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18679
18994
  this.cloneTo(dest);
18680
18995
  return dest;
18681
18996
  };
18682
- _createClass(PBRMaterial, [
18997
+ _create_class(PBRMaterial, [
18683
18998
  {
18684
18999
  key: "metallic",
18685
19000
  get: /**
@@ -18722,9 +19037,15 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18722
19037
  ]);
18723
19038
  return PBRMaterial;
18724
19039
  }(PBRBaseMaterial);
18725
- PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
18726
- PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
18727
- PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
19040
+ (function() {
19041
+ PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
19042
+ })();
19043
+ (function() {
19044
+ PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
19045
+ })();
19046
+ (function() {
19047
+ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
19048
+ })();
18728
19049
 
18729
19050
  /**
18730
19051
  * PBR (Specular-Glossiness Workflow) Material.
@@ -18745,7 +19066,7 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18745
19066
  this.cloneTo(dest);
18746
19067
  return dest;
18747
19068
  };
18748
- _createClass(PBRSpecularMaterial, [
19069
+ _create_class(PBRSpecularMaterial, [
18749
19070
  {
18750
19071
  key: "specularColor",
18751
19072
  get: /**
@@ -18791,10 +19112,18 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18791
19112
  ]);
18792
19113
  return PBRSpecularMaterial;
18793
19114
  }(PBRBaseMaterial);
18794
- PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
18795
- PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
18796
- PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
18797
- PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19115
+ (function() {
19116
+ PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
19117
+ })();
19118
+ (function() {
19119
+ PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
19120
+ })();
19121
+ (function() {
19122
+ PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
19123
+ })();
19124
+ (function() {
19125
+ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19126
+ })();
18798
19127
 
18799
19128
  /**
18800
19129
  * Unlit Material.
@@ -18818,7 +19147,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
18818
19147
  this.cloneTo(dest);
18819
19148
  return dest;
18820
19149
  };
18821
- _createClass(UnlitMaterial, [
19150
+ _create_class(UnlitMaterial, [
18822
19151
  {
18823
19152
  key: "baseColor",
18824
19153
  get: /**
@@ -18952,7 +19281,7 @@ exports.TextVerticalAlignment = void 0;
18952
19281
  this._sprites = null;
18953
19282
  this._spriteNamesToIndex = null;
18954
19283
  };
18955
- _createClass(SpriteAtlas, [
19284
+ _create_class(SpriteAtlas, [
18956
19285
  {
18957
19286
  key: "sprites",
18958
19287
  get: /**
@@ -19123,7 +19452,7 @@ exports.TextVerticalAlignment = void 0;
19123
19452
  }
19124
19453
  this._updateFlagManager.dispatch(type);
19125
19454
  };
19126
- _createClass(Sprite, [
19455
+ _create_class(Sprite, [
19127
19456
  {
19128
19457
  key: "texture",
19129
19458
  get: /**
@@ -19412,7 +19741,9 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
19412
19741
  };
19413
19742
  SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
19414
19743
  return SlicedSpriteAssembler1;
19415
- }(), _SlicedSpriteAssembler._worldMatrix = new miniprogram.Matrix(), _SlicedSpriteAssembler);
19744
+ }(), function() {
19745
+ _SlicedSpriteAssembler._worldMatrix = new miniprogram.Matrix();
19746
+ }(), _SlicedSpriteAssembler);
19416
19747
  SlicedSpriteAssembler = __decorate([
19417
19748
  StaticInterfaceImplement()
19418
19749
  ], SlicedSpriteAssembler);
@@ -19435,7 +19766,7 @@ SlicedSpriteAssembler = __decorate([
19435
19766
  _this._renderData = new RenderData2D(4, [], [], null, _this._color);
19436
19767
  _this.drawMode = exports.SpriteDrawMode.Simple;
19437
19768
  _this.setMaterial(_this._engine._spriteDefaultMaterial);
19438
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
19769
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
19439
19770
  return _this;
19440
19771
  }
19441
19772
  var _proto = SpriteRenderer.prototype;
@@ -19540,7 +19871,7 @@ SlicedSpriteAssembler = __decorate([
19540
19871
  break;
19541
19872
  }
19542
19873
  };
19543
- _createClass(SpriteRenderer, [
19874
+ _create_class(SpriteRenderer, [
19544
19875
  {
19545
19876
  key: "drawMode",
19546
19877
  get: /**
@@ -19689,7 +20020,9 @@ SlicedSpriteAssembler = __decorate([
19689
20020
  ]);
19690
20021
  return SpriteRenderer;
19691
20022
  }(exports.Renderer);
19692
- /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20023
+ (function() {
20024
+ /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20025
+ })();
19693
20026
  __decorate([
19694
20027
  ignoreClone
19695
20028
  ], SpriteRenderer.prototype, "_renderData", void 0);
@@ -19746,14 +20079,16 @@ var /**
19746
20079
  ];
19747
20080
  this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
19748
20081
  };
19749
- CharRenderData.triangles = [
19750
- 0,
19751
- 2,
19752
- 1,
19753
- 2,
19754
- 0,
19755
- 3
19756
- ];
20082
+ (function() {
20083
+ CharRenderData.triangles = [
20084
+ 0,
20085
+ 2,
20086
+ 1,
20087
+ 2,
20088
+ 0,
20089
+ 3
20090
+ ];
20091
+ })();
19757
20092
 
19758
20093
  /**
19759
20094
  * @internal
@@ -20077,23 +20412,37 @@ CharRenderData.triangles = [
20077
20412
  };
20078
20413
  return TextUtils;
20079
20414
  }();
20080
- /** @internal */ TextUtils._genericFontFamilies = [
20081
- "serif",
20082
- "sans-serif",
20083
- "monospace",
20084
- "cursive",
20085
- "fantasy",
20086
- "system-ui",
20087
- "math",
20088
- "emoji",
20089
- "fangsong"
20090
- ];
20091
- /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20092
- TextUtils._measureBaseline = "M";
20093
- TextUtils._heightMultiplier = 2;
20094
- TextUtils._baselineMultiplier = 1.4;
20095
- TextUtils._fontSizeInfoCache = {};
20096
- TextUtils._textContext = null;
20415
+ (function() {
20416
+ /** @internal */ TextUtils._genericFontFamilies = [
20417
+ "serif",
20418
+ "sans-serif",
20419
+ "monospace",
20420
+ "cursive",
20421
+ "fantasy",
20422
+ "system-ui",
20423
+ "math",
20424
+ "emoji",
20425
+ "fangsong"
20426
+ ];
20427
+ })();
20428
+ (function() {
20429
+ /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20430
+ })();
20431
+ (function() {
20432
+ TextUtils._measureBaseline = "M";
20433
+ })();
20434
+ (function() {
20435
+ TextUtils._heightMultiplier = 2;
20436
+ })();
20437
+ (function() {
20438
+ TextUtils._baselineMultiplier = 1.4;
20439
+ })();
20440
+ (function() {
20441
+ TextUtils._fontSizeInfoCache = {};
20442
+ })();
20443
+ (function() {
20444
+ TextUtils._textContext = null;
20445
+ })();
20097
20446
 
20098
20447
  /**
20099
20448
  * Renders a text for 2D graphics.
@@ -20120,7 +20469,7 @@ TextUtils._textContext = null;
20120
20469
  _this._overflowMode = exports.OverflowMode.Overflow;
20121
20470
  _this._maskInteraction = exports.SpriteMaskInteraction.None;
20122
20471
  _this._maskLayer = exports.SpriteMaskLayer.Layer0;
20123
- var engine = _assertThisInitialized(_this).engine;
20472
+ var engine = _assert_this_initialized(_this).engine;
20124
20473
  _this._font = engine._textDefaultFont;
20125
20474
  _this._font._addRefCount(1);
20126
20475
  _this.setMaterial(engine._spriteDefaultMaterial);
@@ -20359,7 +20708,7 @@ TextUtils._textContext = null;
20359
20708
  Renderer.prototype._onTransformChanged.call(this, bit);
20360
20709
  this._setDirtyFlagTrue(0x4 | 0x8);
20361
20710
  };
20362
- _createClass(TextRenderer, [
20711
+ _create_class(TextRenderer, [
20363
20712
  {
20364
20713
  key: "color",
20365
20714
  get: /**
@@ -20572,9 +20921,15 @@ TextUtils._textContext = null;
20572
20921
  ]);
20573
20922
  return TextRenderer;
20574
20923
  }(exports.Renderer);
20575
- TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20576
- TextRenderer._tempVec30 = new miniprogram.Vector3();
20577
- TextRenderer._tempVec31 = new miniprogram.Vector3();
20924
+ (function() {
20925
+ TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20926
+ })();
20927
+ (function() {
20928
+ TextRenderer._tempVec30 = new miniprogram.Vector3();
20929
+ })();
20930
+ (function() {
20931
+ TextRenderer._tempVec31 = new miniprogram.Vector3();
20932
+ })();
20578
20933
  __decorate([
20579
20934
  assignmentClone
20580
20935
  ], TextRenderer.prototype, "_subFont", void 0);
@@ -20791,7 +21146,9 @@ var DirtyFlag;
20791
21146
  };
20792
21147
  return AnimationCurveOwner;
20793
21148
  }();
20794
- AnimationCurveOwner._assemblerMap = new Map();
21149
+ (function() {
21150
+ AnimationCurveOwner._assemblerMap = new Map();
21151
+ })();
20795
21152
 
20796
21153
  /**
20797
21154
  * @internal
@@ -20965,7 +21322,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
20965
21322
  }
20966
21323
  }
20967
21324
  };
20968
- _createClass(AnimationClip, [
21325
+ _create_class(AnimationClip, [
20969
21326
  {
20970
21327
  key: "events",
20971
21328
  get: /**
@@ -21113,7 +21470,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21113
21470
  var result = this._evaluate(time, evaluateData);
21114
21471
  return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
21115
21472
  };
21116
- _createClass(AnimationCurve, [
21473
+ _create_class(AnimationCurve, [
21117
21474
  {
21118
21475
  key: "interpolation",
21119
21476
  get: /**
@@ -21223,7 +21580,11 @@ exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Ani
21223
21580
  return out;
21224
21581
  };
21225
21582
  return AnimationArrayCurve;
21226
- }(AnimationCurve), /** @internal */ _AnimationArrayCurve._isReferenceType = true, /** @internal */ _AnimationArrayCurve._isInterpolationType = true, _AnimationArrayCurve);
21583
+ }(AnimationCurve), function() {
21584
+ /** @internal */ _AnimationArrayCurve._isReferenceType = true;
21585
+ }(), function() {
21586
+ /** @internal */ _AnimationArrayCurve._isInterpolationType = true;
21587
+ }(), _AnimationArrayCurve);
21227
21588
  exports.AnimationArrayCurve = __decorate([
21228
21589
  StaticInterfaceImplement()
21229
21590
  ], exports.AnimationArrayCurve);
@@ -21276,7 +21637,11 @@ exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Anima
21276
21637
  return frame.value;
21277
21638
  };
21278
21639
  return AnimationBoolCurve;
21279
- }(AnimationCurve), /** @internal */ _AnimationBoolCurve._isReferenceType = false, /** @internal */ _AnimationBoolCurve._isInterpolationType = false, _AnimationBoolCurve);
21640
+ }(AnimationCurve), function() {
21641
+ /** @internal */ _AnimationBoolCurve._isReferenceType = false;
21642
+ }(), function() {
21643
+ /** @internal */ _AnimationBoolCurve._isInterpolationType = false;
21644
+ }(), _AnimationBoolCurve);
21280
21645
  exports.AnimationBoolCurve = __decorate([
21281
21646
  StaticInterfaceImplement()
21282
21647
  ], exports.AnimationBoolCurve);
@@ -21369,7 +21734,11 @@ exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Ani
21369
21734
  return out;
21370
21735
  };
21371
21736
  return AnimationColorCurve;
21372
- }(AnimationCurve), /** @internal */ _AnimationColorCurve._isReferenceType = true, /** @internal */ _AnimationColorCurve._isInterpolationType = true, _AnimationColorCurve);
21737
+ }(AnimationCurve), function() {
21738
+ /** @internal */ _AnimationColorCurve._isReferenceType = true;
21739
+ }(), function() {
21740
+ /** @internal */ _AnimationColorCurve._isInterpolationType = true;
21741
+ }(), _AnimationColorCurve);
21373
21742
  exports.AnimationColorCurve = __decorate([
21374
21743
  StaticInterfaceImplement()
21375
21744
  ], exports.AnimationColorCurve);
@@ -21465,7 +21834,11 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
21465
21834
  return out;
21466
21835
  };
21467
21836
  return AnimationFloatArrayCurve;
21468
- }(AnimationCurve), /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true, /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true, _AnimationFloatArrayCurve);
21837
+ }(AnimationCurve), function() {
21838
+ /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true;
21839
+ }(), function() {
21840
+ /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
21841
+ }(), _AnimationFloatArrayCurve);
21469
21842
  exports.AnimationFloatArrayCurve = __decorate([
21470
21843
  StaticInterfaceImplement()
21471
21844
  ], exports.AnimationFloatArrayCurve);
@@ -21530,7 +21903,11 @@ exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Ani
21530
21903
  }
21531
21904
  };
21532
21905
  return AnimationFloatCurve;
21533
- }(AnimationCurve), /** @internal */ _AnimationFloatCurve._isReferenceType = false, /** @internal */ _AnimationFloatCurve._isInterpolationType = true, _AnimationFloatCurve);
21906
+ }(AnimationCurve), function() {
21907
+ /** @internal */ _AnimationFloatCurve._isReferenceType = false;
21908
+ }(), function() {
21909
+ /** @internal */ _AnimationFloatCurve._isInterpolationType = true;
21910
+ }(), _AnimationFloatCurve);
21534
21911
  exports.AnimationFloatCurve = __decorate([
21535
21912
  StaticInterfaceImplement()
21536
21913
  ], exports.AnimationFloatCurve);
@@ -21628,7 +22005,13 @@ exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ fu
21628
22005
  return out;
21629
22006
  };
21630
22007
  return AnimationQuaternionCurve1;
21631
- }(AnimationCurve), /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true, /** @internal */ _AnimationQuaternionCurve._isReferenceType = true, /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram.Quaternion(), _AnimationQuaternionCurve);
22008
+ }(AnimationCurve), function() {
22009
+ /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true;
22010
+ }(), function() {
22011
+ /** @internal */ _AnimationQuaternionCurve._isReferenceType = true;
22012
+ }(), function() {
22013
+ /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram.Quaternion();
22014
+ }(), _AnimationQuaternionCurve);
21632
22015
  exports.AnimationQuaternionCurve = __decorate([
21633
22016
  StaticInterfaceImplement()
21634
22017
  ], exports.AnimationQuaternionCurve);
@@ -21709,7 +22092,11 @@ exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function
21709
22092
  return out;
21710
22093
  };
21711
22094
  return AnimationVector2Curve;
21712
- }(AnimationCurve), /** @internal */ _AnimationVector2Curve._isReferenceType = true, /** @internal */ _AnimationVector2Curve._isInterpolationType = true, _AnimationVector2Curve);
22095
+ }(AnimationCurve), function() {
22096
+ /** @internal */ _AnimationVector2Curve._isReferenceType = true;
22097
+ }(), function() {
22098
+ /** @internal */ _AnimationVector2Curve._isInterpolationType = true;
22099
+ }(), _AnimationVector2Curve);
21713
22100
  exports.AnimationVector2Curve = __decorate([
21714
22101
  StaticInterfaceImplement()
21715
22102
  ], exports.AnimationVector2Curve);
@@ -21802,7 +22189,11 @@ exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function
21802
22189
  return out;
21803
22190
  };
21804
22191
  return AnimationVector3Curve;
21805
- }(AnimationCurve), /** @internal */ _AnimationVector3Curve._isReferenceType = true, /** @internal */ _AnimationVector3Curve._isInterpolationType = true, _AnimationVector3Curve);
22192
+ }(AnimationCurve), function() {
22193
+ /** @internal */ _AnimationVector3Curve._isReferenceType = true;
22194
+ }(), function() {
22195
+ /** @internal */ _AnimationVector3Curve._isInterpolationType = true;
22196
+ }(), _AnimationVector3Curve);
21806
22197
  exports.AnimationVector3Curve = __decorate([
21807
22198
  StaticInterfaceImplement()
21808
22199
  ], exports.AnimationVector3Curve);
@@ -21895,7 +22286,11 @@ exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function
21895
22286
  return out;
21896
22287
  };
21897
22288
  return AnimationVector4Curve;
21898
- }(AnimationCurve), /** @internal */ _AnimationVector4Curve._isReferenceType = true, /** @internal */ _AnimationVector4Curve._isInterpolationType = true, _AnimationVector4Curve);
22289
+ }(AnimationCurve), function() {
22290
+ /** @internal */ _AnimationVector4Curve._isReferenceType = true;
22291
+ }(), function() {
22292
+ /** @internal */ _AnimationVector4Curve._isInterpolationType = true;
22293
+ }(), _AnimationVector4Curve);
21899
22294
  exports.AnimationVector4Curve = __decorate([
21900
22295
  StaticInterfaceImplement()
21901
22296
  ], exports.AnimationVector4Curve);
@@ -22611,7 +23006,7 @@ exports.AnimatorLayerBlendingMode = void 0;
22611
23006
  }
22612
23007
  }
22613
23008
  };
22614
- _createClass(Animator, [
23009
+ _create_class(Animator, [
22615
23010
  {
22616
23011
  key: "animatorController",
22617
23012
  get: /**
@@ -22702,7 +23097,7 @@ __decorate([
22702
23097
  */ _proto._registerChangeFlag = function _registerChangeFlag() {
22703
23098
  return this._updateFlagManager.createFlag(BoolUpdateFlag);
22704
23099
  };
22705
- _createClass(AnimatorController, [
23100
+ _create_class(AnimatorController, [
22706
23101
  {
22707
23102
  key: "layers",
22708
23103
  get: /**
@@ -22836,7 +23231,7 @@ __decorate([
22836
23231
  index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
22837
23232
  }
22838
23233
  };
22839
- _createClass(AnimatorState, [
23234
+ _create_class(AnimatorState, [
22840
23235
  {
22841
23236
  key: "transitions",
22842
23237
  get: /**
@@ -22968,7 +23363,7 @@ exports.AnimatorConditionMode = void 0;
22968
23363
  _this.shaderData.setVector4("u_cubeDecodeParam", _this._decodeParam);
22969
23364
  return _this;
22970
23365
  }
22971
- _createClass(SkyBoxMaterial, [
23366
+ _create_class(SkyBoxMaterial, [
22972
23367
  {
22973
23368
  key: "textureDecodeRGBM",
22974
23369
  get: /**
@@ -23067,7 +23462,7 @@ exports.ParticleRendererBlendMode = void 0;
23067
23462
  _this._isFadeOut = false;
23068
23463
  _this._playOnEnable = true;
23069
23464
  _this._blendMode = 0;
23070
- _this._onColorChanged = _this._onColorChanged.bind(_assertThisInitialized(_this));
23465
+ _this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
23071
23466
  //@ts-ignore
23072
23467
  _this._color._onValueChanged = _this._onColorChanged;
23073
23468
  _this.setMaterial(_this._createMaterial());
@@ -23344,7 +23739,7 @@ exports.ParticleRendererBlendMode = void 0;
23344
23739
  ParticleRenderer._getRandom = function _getRandom() {
23345
23740
  return Math.random() - 0.5;
23346
23741
  };
23347
- _createClass(ParticleRenderer, [
23742
+ _create_class(ParticleRenderer, [
23348
23743
  {
23349
23744
  key: "texture",
23350
23745
  get: /**
@@ -23775,7 +24170,9 @@ exports.ParticleRendererBlendMode = void 0;
23775
24170
  ]);
23776
24171
  return ParticleRenderer;
23777
24172
  }(MeshRenderer);
23778
- /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24173
+ (function() {
24174
+ /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24175
+ })();
23779
24176
  __decorate([
23780
24177
  ignoreClone
23781
24178
  ], ParticleRenderer.prototype, "_onColorChanged", null);
@@ -24045,7 +24442,7 @@ var _tempVector3 = new miniprogram.Vector3();
24045
24442
  this._camera.renderTarget = this._oriCameraRenderTarget;
24046
24443
  this._camera.cullingMask = this._oriCameraCullingMask;
24047
24444
  };
24048
- _createClass(Probe, [
24445
+ _create_class(Probe, [
24049
24446
  {
24050
24447
  key: "_texture",
24051
24448
  get: function get() {