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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -15,56 +15,48 @@ var engineMath = require('@galacean/engine-math');
15
15
  Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
16
16
  })(exports.Platform || (exports.Platform = {}));
17
17
 
18
- function _assertThisInitialized(self) {
19
- if (self === void 0) {
20
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
21
- }
18
+ function _assert_this_initialized(self) {
19
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
22
20
 
23
- return self;
21
+ return self;
24
22
  }
25
23
 
26
24
  function _defineProperties(target, props) {
27
- for (var i = 0; i < props.length; i++) {
28
- var descriptor = props[i];
29
- descriptor.enumerable = descriptor.enumerable || false;
30
- descriptor.configurable = true;
31
- if ("value" in descriptor) descriptor.writable = true;
32
- Object.defineProperty(target, descriptor.key, descriptor);
33
- }
25
+ for (var i = 0; i < props.length; i++) {
26
+ var descriptor = props[i];
27
+ descriptor.enumerable = descriptor.enumerable || false;
28
+ descriptor.configurable = true;
29
+
30
+ if ("value" in descriptor) descriptor.writable = true;
31
+
32
+ Object.defineProperty(target, descriptor.key, descriptor);
33
+ }
34
34
  }
35
+ function _create_class(Constructor, protoProps, staticProps) {
36
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
37
+ if (staticProps) _defineProperties(Constructor, staticProps);
35
38
 
36
- function _createClass(Constructor, protoProps, staticProps) {
37
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
38
- if (staticProps) _defineProperties(Constructor, staticProps);
39
- return Constructor;
39
+ return Constructor;
40
40
  }
41
41
 
42
- function setPrototypeOf(o, p) {
43
- setPrototypeOf = Object.setPrototypeOf || function setPrototypeOf(o, p) {
44
- o.__proto__ = p;
45
- return o;
46
- };
42
+ function _set_prototype_of(o, p) {
43
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
44
+ o.__proto__ = p;
47
45
 
48
- return setPrototypeOf(o, p);
49
- }
46
+ return o;
47
+ };
50
48
 
51
- function _setPrototypeOf(o, p) {
52
- return setPrototypeOf(o, p);
49
+ return _set_prototype_of(o, p);
53
50
  }
54
51
 
55
52
  function _inherits(subClass, superClass) {
56
- if (typeof superClass !== "function" && superClass !== null) {
57
- throw new TypeError("Super expression must either be null or a function");
58
- }
59
-
60
- subClass.prototype = Object.create(superClass && superClass.prototype, {
61
- constructor: {
62
- value: subClass,
63
- writable: true,
64
- configurable: true
53
+ if (typeof superClass !== "function" && superClass !== null) {
54
+ throw new TypeError("Super expression must either be null or a function");
65
55
  }
66
- });
67
- if (superClass) _setPrototypeOf(subClass, superClass);
56
+
57
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
58
+
59
+ if (superClass) _set_prototype_of(subClass, superClass);
68
60
  }
69
61
 
70
62
  /**
@@ -112,9 +104,15 @@ function _inherits(subClass, superClass) {
112
104
  };
113
105
  return MathUtil;
114
106
  }();
115
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
116
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
117
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
107
+ (function() {
108
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
109
+ })();
110
+ (function() {
111
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
112
+ })();
113
+ (function() {
114
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
115
+ })();
118
116
 
119
117
  /**
120
118
  * Describes a color in the from of RGBA (in order: R, G, B, A).
@@ -324,7 +322,7 @@ function _inherits(subClass, superClass) {
324
322
  out._onValueChanged && out._onValueChanged();
325
323
  return out;
326
324
  };
327
- _createClass(Color, [
325
+ _create_class(Color, [
328
326
  {
329
327
  key: "r",
330
328
  get: /**
@@ -400,11 +398,9 @@ function __decorate(decorators, target, key, desc) {
400
398
  }
401
399
 
402
400
  function _instanceof(left, right) {
403
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
404
- return !!right[Symbol.hasInstance](left);
405
- } else {
406
- return left instanceof right;
407
- }
401
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
402
+ return !!right[Symbol.hasInstance](left);
403
+ } else return left instanceof right;
408
404
  }
409
405
 
410
406
  /**
@@ -585,16 +581,22 @@ function _instanceof(left, right) {
585
581
  };
586
582
  return CloneManager;
587
583
  }();
588
- /** @internal */ CloneManager._subCloneModeMap = new Map();
589
- /** @internal */ CloneManager._cloneModeMap = new Map();
590
- CloneManager._objectType = Object.getPrototypeOf(Object);
584
+ (function() {
585
+ /** @internal */ CloneManager._subCloneModeMap = new Map();
586
+ })();
587
+ (function() {
588
+ /** @internal */ CloneManager._cloneModeMap = new Map();
589
+ })();
590
+ (function() {
591
+ CloneManager._objectType = Object.getPrototypeOf(Object);
592
+ })();
591
593
 
592
594
  /**
593
595
  * EngineObject.
594
596
  */ var EngineObject = /*#__PURE__*/ function() {
595
597
  function EngineObject(engine) {
596
- this._destroyed = false;
597
598
  /** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
599
+ this._destroyed = false;
598
600
  this._engine = engine;
599
601
  }
600
602
  var _proto = EngineObject.prototype;
@@ -606,7 +608,7 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
606
608
  (_this__engine_resourceManager = this._engine.resourceManager) == null ? void 0 : _this__engine_resourceManager._deleteAsset(this);
607
609
  this._destroyed = true;
608
610
  };
609
- _createClass(EngineObject, [
611
+ _create_class(EngineObject, [
610
612
  {
611
613
  key: "engine",
612
614
  get: /**
@@ -626,7 +628,9 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
626
628
  ]);
627
629
  return EngineObject;
628
630
  }();
629
- EngineObject._instanceIdCounter = 0;
631
+ (function() {
632
+ EngineObject._instanceIdCounter = 0;
633
+ })();
630
634
  __decorate([
631
635
  ignoreClone
632
636
  ], EngineObject.prototype, "instanceId", void 0);
@@ -643,7 +647,7 @@ __decorate([
643
647
  _this = EngineObject.call(this, engine) || this;
644
648
  /** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */ _this.isGCIgnored = false;
645
649
  _this._refCount = 0;
646
- engine.resourceManager._addRefObject(_this.instanceId, _assertThisInitialized(_this));
650
+ engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized(_this));
647
651
  return _this;
648
652
  }
649
653
  var _proto = RefObject.prototype;
@@ -685,7 +689,7 @@ __decorate([
685
689
  */ _proto._addToResourceManager = function _addToResourceManager(path) {
686
690
  this._engine.resourceManager._addAsset(path, this);
687
691
  };
688
- _createClass(RefObject, [
692
+ _create_class(RefObject, [
689
693
  {
690
694
  key: "refCount",
691
695
  get: /**
@@ -811,7 +815,7 @@ __decorate([
811
815
  _proto.stopPropagation = function stopPropagation() {
812
816
  this._propagationStopped = true;
813
817
  };
814
- _createClass(Event, [
818
+ _create_class(Event, [
815
819
  {
816
820
  key: "propagationStopped",
817
821
  get: function get() {
@@ -1087,7 +1091,7 @@ var Time = /*#__PURE__*/ function() {
1087
1091
  this._lastTickTime = now;
1088
1092
  this._frameCount++;
1089
1093
  };
1090
- _createClass(Time, [
1094
+ _create_class(Time, [
1091
1095
  {
1092
1096
  key: "frameCount",
1093
1097
  get: /*
@@ -1325,7 +1329,7 @@ exports.GLCapabilityType = void 0;
1325
1329
  _proto._getMipmapCount = function _getMipmapCount() {
1326
1330
  return this._mipmap ? Math.floor(Math.log2(Math.max(this._width, this._height))) + 1 : 1;
1327
1331
  };
1328
- _createClass(Texture, [
1332
+ _create_class(Texture, [
1329
1333
  {
1330
1334
  key: "format",
1331
1335
  get: /**
@@ -1475,7 +1479,7 @@ exports.GLCapabilityType = void 0;
1475
1479
  }
1476
1480
  _this._depthTexture = depth;
1477
1481
  }
1478
- _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assertThisInitialized(_this));
1482
+ _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized(_this));
1479
1483
  return _this;
1480
1484
  }
1481
1485
  var _proto = RenderTarget.prototype;
@@ -1517,7 +1521,7 @@ exports.GLCapabilityType = void 0;
1517
1521
  */ _proto._blitRenderTarget = function _blitRenderTarget() {
1518
1522
  this._platformRenderTarget.blitRenderTarget();
1519
1523
  };
1520
- _createClass(RenderTarget, [
1524
+ _create_class(RenderTarget, [
1521
1525
  {
1522
1526
  key: "autoGenerateMipmaps",
1523
1527
  get: /**
@@ -1589,7 +1593,7 @@ exports.GLCapabilityType = void 0;
1589
1593
  _this._format = format;
1590
1594
  _this._mipmapCount = _this._getMipmapCount();
1591
1595
  _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;
1592
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assertThisInitialized(_this));
1596
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized(_this));
1593
1597
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1594
1598
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1595
1599
  return _this;
@@ -1656,7 +1660,7 @@ exports.GLCapabilityType = void 0;
1656
1660
  _this._length = length;
1657
1661
  _this._format = format;
1658
1662
  _this._mipmapCount = _this._getMipmapCount();
1659
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assertThisInitialized(_this));
1663
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized(_this));
1660
1664
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1661
1665
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1662
1666
  return _this;
@@ -1708,7 +1712,7 @@ exports.GLCapabilityType = void 0;
1708
1712
  this._platformTexture.getPixelBuffer(elementIndex, xOrMipLevelOrOut, yOrMipLevel, width, height, mipLevelOrOut, out);
1709
1713
  }
1710
1714
  };
1711
- _createClass(Texture2DArray, [
1715
+ _create_class(Texture2DArray, [
1712
1716
  {
1713
1717
  key: "length",
1714
1718
  get: /**
@@ -1735,7 +1739,7 @@ exports.GLCapabilityType = void 0;
1735
1739
  _this._height = size;
1736
1740
  _this._format = format;
1737
1741
  _this._mipmapCount = _this._getMipmapCount();
1738
- _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assertThisInitialized(_this));
1742
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized(_this));
1739
1743
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1740
1744
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Clamp;
1741
1745
  return _this;
@@ -1862,7 +1866,7 @@ exports.GLCapabilityType = void 0;
1862
1866
  _proto.getCharInfo = function getCharInfo(char) {
1863
1867
  return this._charInfoMap[char.charCodeAt(0)];
1864
1868
  };
1865
- _createClass(FontAtlas, [
1869
+ _create_class(FontAtlas, [
1866
1870
  {
1867
1871
  key: "texture",
1868
1872
  get: function get() {
@@ -2010,7 +2014,7 @@ exports.GLCapabilityType = void 0;
2010
2014
  }
2011
2015
  return null;
2012
2016
  };
2013
- _createClass(Font, [
2017
+ _create_class(Font, [
2014
2018
  {
2015
2019
  key: "name",
2016
2020
  get: /**
@@ -2022,9 +2026,10 @@ exports.GLCapabilityType = void 0;
2022
2026
  ]);
2023
2027
  return Font;
2024
2028
  }(RefObject);
2025
- Font._fontMap = {};
2029
+ (function() {
2030
+ Font._fontMap = {};
2031
+ })();
2026
2032
 
2027
- var _Symbol_toStringTag = Symbol.toStringTag;
2028
2033
  var AssetPromise = /*#__PURE__*/ function() {
2029
2034
  function AssetPromise(executor) {
2030
2035
  var _this = this;
@@ -2143,9 +2148,9 @@ var AssetPromise = /*#__PURE__*/ function() {
2143
2148
  }
2144
2149
  });
2145
2150
  };
2146
- _createClass(AssetPromise, [
2151
+ _create_class(AssetPromise, [
2147
2152
  {
2148
- key: _Symbol_toStringTag,
2153
+ key: Symbol.toStringTag,
2149
2154
  get: /** compatible with Promise */ function get() {
2150
2155
  return "AssetPromise";
2151
2156
  }
@@ -2458,8 +2463,12 @@ var /** @internal */ PromiseState;
2458
2463
  };
2459
2464
  return ResourceManager;
2460
2465
  }();
2461
- /** Loader collection. */ ResourceManager._loaders = {};
2462
- ResourceManager._extTypeMapping = {};
2466
+ (function() {
2467
+ /** Loader collection. */ ResourceManager._loaders = {};
2468
+ })();
2469
+ (function() {
2470
+ ResourceManager._extTypeMapping = {};
2471
+ })();
2463
2472
  /**
2464
2473
  * Declare ResourceLoader's decorator.
2465
2474
  * @param assetType - Type of asset
@@ -2817,10 +2826,14 @@ var ComponentCloner = /*#__PURE__*/ function() {
2817
2826
  };
2818
2827
  return ComponentsDependencies;
2819
2828
  }();
2820
- /**
2829
+ (function() {
2830
+ /**
2821
2831
  * @internal
2822
2832
  */ ComponentsDependencies._dependenciesMap = new Map();
2823
- ComponentsDependencies._invDependenciesMap = new Map();
2833
+ })();
2834
+ (function() {
2835
+ ComponentsDependencies._invDependenciesMap = new Map();
2836
+ })();
2824
2837
  /**
2825
2838
  * Dependent components, automatically added if they do not exist.
2826
2839
  * @param components - Dependent components
@@ -2986,7 +2999,7 @@ ComponentsDependencies._invDependenciesMap = new Map();
2986
2999
  }
2987
3000
  }
2988
3001
  };
2989
- _createClass(Component, [
3002
+ _create_class(Component, [
2990
3003
  {
2991
3004
  key: "enabled",
2992
3005
  get: /**
@@ -3120,7 +3133,6 @@ __decorate([
3120
3133
  function Transform(entity) {
3121
3134
  var _this;
3122
3135
  _this = Component.call(this, entity) || this;
3123
- _this._dirtyFlag = 0xbc;
3124
3136
  _this._position = new engineMath.Vector3();
3125
3137
  _this._rotation = new engineMath.Vector3();
3126
3138
  _this._rotationQuaternion = new engineMath.Quaternion();
@@ -3133,14 +3145,15 @@ __decorate([
3133
3145
  _this._worldMatrix = new engineMath.Matrix();
3134
3146
  _this._isParentDirty = true;
3135
3147
  _this._parentTransformCache = null;
3148
+ _this._dirtyFlag = 0xbc;
3136
3149
  /** @internal */ _this._updateFlagManager = new UpdateFlagManager();
3137
- _this._onPositionChanged = _this._onPositionChanged.bind(_assertThisInitialized(_this));
3138
- _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assertThisInitialized(_this));
3139
- _this._onRotationChanged = _this._onRotationChanged.bind(_assertThisInitialized(_this));
3140
- _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assertThisInitialized(_this));
3141
- _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assertThisInitialized(_this));
3142
- _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assertThisInitialized(_this));
3143
- _this._onScaleChanged = _this._onScaleChanged.bind(_assertThisInitialized(_this));
3150
+ _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized(_this));
3151
+ _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized(_this));
3152
+ _this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized(_this));
3153
+ _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized(_this));
3154
+ _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3155
+ _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3156
+ _this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized(_this));
3144
3157
  //@ts-ignore
3145
3158
  _this._position._onValueChanged = _this._onPositionChanged;
3146
3159
  //@ts-ignore
@@ -3532,7 +3545,7 @@ __decorate([
3532
3545
  this._setDirtyFlagTrue(0x40);
3533
3546
  this._updateWorldScaleFlag();
3534
3547
  };
3535
- _createClass(Transform, [
3548
+ _create_class(Transform, [
3536
3549
  {
3537
3550
  key: "position",
3538
3551
  get: /**
@@ -3778,15 +3791,33 @@ __decorate([
3778
3791
  ]);
3779
3792
  return Transform;
3780
3793
  }(Component);
3781
- Transform._tempQuat0 = new engineMath.Quaternion();
3782
- Transform._tempVec30 = new engineMath.Vector3();
3783
- Transform._tempVec31 = new engineMath.Vector3();
3784
- Transform._tempVec32 = new engineMath.Vector3();
3785
- Transform._tempMat30 = new engineMath.Matrix3x3();
3786
- Transform._tempMat31 = new engineMath.Matrix3x3();
3787
- Transform._tempMat32 = new engineMath.Matrix3x3();
3788
- Transform._tempMat41 = new engineMath.Matrix();
3789
- Transform._tempMat42 = new engineMath.Matrix();
3794
+ (function() {
3795
+ Transform._tempQuat0 = new engineMath.Quaternion();
3796
+ })();
3797
+ (function() {
3798
+ Transform._tempVec30 = new engineMath.Vector3();
3799
+ })();
3800
+ (function() {
3801
+ Transform._tempVec31 = new engineMath.Vector3();
3802
+ })();
3803
+ (function() {
3804
+ Transform._tempVec32 = new engineMath.Vector3();
3805
+ })();
3806
+ (function() {
3807
+ Transform._tempMat30 = new engineMath.Matrix3x3();
3808
+ })();
3809
+ (function() {
3810
+ Transform._tempMat31 = new engineMath.Matrix3x3();
3811
+ })();
3812
+ (function() {
3813
+ Transform._tempMat32 = new engineMath.Matrix3x3();
3814
+ })();
3815
+ (function() {
3816
+ Transform._tempMat41 = new engineMath.Matrix();
3817
+ })();
3818
+ (function() {
3819
+ Transform._tempMat42 = new engineMath.Matrix();
3820
+ })();
3790
3821
  __decorate([
3791
3822
  deepClone
3792
3823
  ], Transform.prototype, "_position", void 0);
@@ -4286,7 +4317,7 @@ var TransformModifyFlags;
4286
4317
  this._traverseSetOwnerScene(children[i], scene);
4287
4318
  }
4288
4319
  };
4289
- _createClass(Entity, [
4320
+ _create_class(Entity, [
4290
4321
  {
4291
4322
  key: "isActive",
4292
4323
  get: /**
@@ -4504,7 +4535,7 @@ var TransformModifyFlags;
4504
4535
  }
4505
4536
  }
4506
4537
  };
4507
- _createClass(SystemInfo, null, [
4538
+ _create_class(SystemInfo, null, [
4508
4539
  {
4509
4540
  key: "devicePixelRatio",
4510
4541
  get: /**
@@ -4516,8 +4547,12 @@ var TransformModifyFlags;
4516
4547
  ]);
4517
4548
  return SystemInfo;
4518
4549
  }();
4519
- /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4520
- /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4550
+ (function() {
4551
+ /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4552
+ })();
4553
+ (function() {
4554
+ /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4555
+ })();
4521
4556
  SystemInfo._initialize();
4522
4557
 
4523
4558
  /**
@@ -5134,7 +5169,7 @@ SystemInfo._initialize();
5134
5169
  _proto._setGravity = function _setGravity() {
5135
5170
  this._nativePhysicsManager.setGravity(this._gravity);
5136
5171
  };
5137
- _createClass(PhysicsManager, [
5172
+ _create_class(PhysicsManager, [
5138
5173
  {
5139
5174
  key: "gravity",
5140
5175
  get: /**
@@ -5192,7 +5227,7 @@ SystemInfo._initialize();
5192
5227
  */ _proto._destroy = function _destroy() {
5193
5228
  this._nativeMaterial.destroy();
5194
5229
  };
5195
- _createClass(PhysicsMaterial, [
5230
+ _create_class(PhysicsMaterial, [
5196
5231
  {
5197
5232
  key: "bounciness",
5198
5233
  get: /**
@@ -5272,8 +5307,8 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5272
5307
  function Collider(entity) {
5273
5308
  var _this;
5274
5309
  _this = Component.call(this, entity) || this;
5275
- _this._shapes = [];
5276
5310
  /** @internal */ _this._index = -1;
5311
+ _this._shapes = [];
5277
5312
  _this._updateFlag = _this.entity.transform.registerWorldChangeFlag();
5278
5313
  return _this;
5279
5314
  }
@@ -5352,7 +5387,7 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5352
5387
  this.clearShapes();
5353
5388
  this._nativeCollider.destroy();
5354
5389
  };
5355
- _createClass(Collider, [
5390
+ _create_class(Collider, [
5356
5391
  {
5357
5392
  key: "shapes",
5358
5393
  get: /**
@@ -5392,7 +5427,7 @@ exports.Collider = __decorate([
5392
5427
  _this._upDirection = new engineMath.Vector3(0, 1, 0);
5393
5428
  _this._slopeLimit = 0.707;
5394
5429
  _this._nativeCollider = PhysicsManager._nativePhysics.createCharacterController();
5395
- _this._setUpDirection = _this._setUpDirection.bind(_assertThisInitialized(_this));
5430
+ _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
5396
5431
  //@ts-ignore
5397
5432
  _this._upDirection._onValueChanged = _this._setUpDirection;
5398
5433
  return _this;
@@ -5465,7 +5500,7 @@ exports.Collider = __decorate([
5465
5500
  _proto._setUpDirection = function _setUpDirection() {
5466
5501
  this._nativeCollider.setUpDirection(this._upDirection);
5467
5502
  };
5468
- _createClass(CharacterController, [
5503
+ _create_class(CharacterController, [
5469
5504
  {
5470
5505
  key: "stepOffset",
5471
5506
  get: /**
@@ -5560,7 +5595,7 @@ exports.Collider = __decorate([
5560
5595
  _proto._setRotation = function _setRotation() {
5561
5596
  this._nativeShape.setRotation(this._rotation);
5562
5597
  };
5563
- _createClass(ColliderShape, [
5598
+ _create_class(ColliderShape, [
5564
5599
  {
5565
5600
  key: "collider",
5566
5601
  get: /**
@@ -5648,7 +5683,9 @@ exports.Collider = __decorate([
5648
5683
  ]);
5649
5684
  return ColliderShape;
5650
5685
  }();
5651
- ColliderShape._idGenerator = 0;
5686
+ (function() {
5687
+ ColliderShape._idGenerator = 0;
5688
+ })();
5652
5689
 
5653
5690
  /**
5654
5691
  * Physical collider shape for box.
@@ -5659,7 +5696,7 @@ ColliderShape._idGenerator = 0;
5659
5696
  _this = ColliderShape.call(this) || this;
5660
5697
  _this._size = new engineMath.Vector3(1, 1, 1);
5661
5698
  _this._nativeShape = PhysicsManager._nativePhysics.createBoxColliderShape(_this._id, _this._size, _this._material._nativeMaterial);
5662
- _this._setSize = _this._setSize.bind(_assertThisInitialized(_this));
5699
+ _this._setSize = _this._setSize.bind(_assert_this_initialized(_this));
5663
5700
  //@ts-ignore
5664
5701
  _this._size._onValueChanged = _this._setSize;
5665
5702
  return _this;
@@ -5668,7 +5705,7 @@ ColliderShape._idGenerator = 0;
5668
5705
  _proto._setSize = function _setSize() {
5669
5706
  this._nativeShape.setSize(this._size);
5670
5707
  };
5671
- _createClass(BoxColliderShape, [
5708
+ _create_class(BoxColliderShape, [
5672
5709
  {
5673
5710
  key: "size",
5674
5711
  get: /**
@@ -5697,7 +5734,7 @@ ColliderShape._idGenerator = 0;
5697
5734
  _this._nativeShape = PhysicsManager._nativePhysics.createSphereColliderShape(_this._id, _this._radius, _this._material._nativeMaterial);
5698
5735
  return _this;
5699
5736
  }
5700
- _createClass(SphereColliderShape, [
5737
+ _create_class(SphereColliderShape, [
5701
5738
  {
5702
5739
  key: "radius",
5703
5740
  get: /**
@@ -5751,7 +5788,7 @@ ColliderShape._idGenerator = 0;
5751
5788
  _this._nativeShape = PhysicsManager._nativePhysics.createCapsuleColliderShape(_this._id, _this._radius, _this._height, _this._material._nativeMaterial);
5752
5789
  return _this;
5753
5790
  }
5754
- _createClass(CapsuleColliderShape, [
5791
+ _create_class(CapsuleColliderShape, [
5755
5792
  {
5756
5793
  key: "radius",
5757
5794
  get: /**
@@ -5810,7 +5847,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
5810
5847
  _this._connectedCollider.localPosition = new engineMath.Vector3();
5811
5848
  return _this;
5812
5849
  }
5813
- _createClass(Joint, [
5850
+ _create_class(Joint, [
5814
5851
  {
5815
5852
  key: "connectedCollider",
5816
5853
  get: /**
@@ -5990,7 +6027,7 @@ exports.Joint = __decorate([
5990
6027
  collider.collider = this.entity.getComponent(exports.Collider);
5991
6028
  this._nativeJoint = PhysicsManager._nativePhysics.createHingeJoint(collider.collider._nativeCollider);
5992
6029
  };
5993
- _createClass(HingeJoint, [
6030
+ _create_class(HingeJoint, [
5994
6031
  {
5995
6032
  key: "axis",
5996
6033
  get: /**
@@ -6142,7 +6179,7 @@ exports.Joint = __decorate([
6142
6179
  collider.collider = this.entity.getComponent(exports.Collider);
6143
6180
  this._nativeJoint = PhysicsManager._nativePhysics.createSpringJoint(collider.collider._nativeCollider);
6144
6181
  };
6145
- _createClass(SpringJoint, [
6182
+ _create_class(SpringJoint, [
6146
6183
  {
6147
6184
  key: "swingOffset",
6148
6185
  get: /**
@@ -6298,10 +6335,10 @@ exports.Joint = __decorate([
6298
6335
  _this._sleepThreshold = 5e-3;
6299
6336
  var transform = _this.entity.transform;
6300
6337
  _this._nativeCollider = PhysicsManager._nativePhysics.createDynamicCollider(transform.worldPosition, transform.worldRotationQuaternion);
6301
- _this._setLinearVelocity = _this._setLinearVelocity.bind(_assertThisInitialized(_this));
6302
- _this._setAngularVelocity = _this._setAngularVelocity.bind(_assertThisInitialized(_this));
6303
- _this._setCenterOfMass = _this._setCenterOfMass.bind(_assertThisInitialized(_this));
6304
- _this._setInertiaTensor = _this._setInertiaTensor.bind(_assertThisInitialized(_this));
6338
+ _this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized(_this));
6339
+ _this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized(_this));
6340
+ _this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized(_this));
6341
+ _this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized(_this));
6305
6342
  //@ts-ignore
6306
6343
  _this._linearVelocity._onValueChanged = _this._setLinearVelocity;
6307
6344
  //@ts-ignore
@@ -6359,7 +6396,7 @@ exports.Joint = __decorate([
6359
6396
  _proto._setInertiaTensor = function _setInertiaTensor() {
6360
6397
  this._nativeCollider.setInertiaTensor(this._inertiaTensor);
6361
6398
  };
6362
- _createClass(DynamicCollider, [
6399
+ _create_class(DynamicCollider, [
6363
6400
  {
6364
6401
  key: "linearDamping",
6365
6402
  get: /**
@@ -6903,9 +6940,15 @@ exports.DynamicColliderConstraints = void 0;
6903
6940
  };
6904
6941
  return PointerManager;
6905
6942
  }();
6906
- PointerManager._tempRay = new engineMath.Ray();
6907
- PointerManager._tempPoint = new engineMath.Vector2();
6908
- PointerManager._tempHitResult = new HitResult();
6943
+ (function() {
6944
+ PointerManager._tempRay = new engineMath.Ray();
6945
+ })();
6946
+ (function() {
6947
+ PointerManager._tempPoint = new engineMath.Vector2();
6948
+ })();
6949
+ (function() {
6950
+ PointerManager._tempHitResult = new HitResult();
6951
+ })();
6909
6952
 
6910
6953
  /**
6911
6954
  * Wheel Manager.
@@ -7111,7 +7154,7 @@ PointerManager._tempHitResult = new HitResult();
7111
7154
  this._pointerManager._onFocus();
7112
7155
  this._keyboardManager._onFocus();
7113
7156
  };
7114
- _createClass(InputManager, [
7157
+ _create_class(InputManager, [
7115
7158
  {
7116
7159
  key: "pointers",
7117
7160
  get: /**
@@ -7298,8 +7341,12 @@ PointerManager._tempHitResult = new HitResult();
7298
7341
  }
7299
7342
  this._nameId = nameID;
7300
7343
  };
7301
- /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7302
- ShaderMacro._macroNameCounter = 0;
7344
+ (function() {
7345
+ /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7346
+ })();
7347
+ (function() {
7348
+ ShaderMacro._macroNameCounter = 0;
7349
+ })();
7303
7350
 
7304
7351
  /**
7305
7352
  * Shader macro collection.
@@ -7451,26 +7498,17 @@ ShaderMacro._macroNameCounter = 0;
7451
7498
  return ShaderMacroCollection;
7452
7499
  }();
7453
7500
 
7454
- function extends_() {
7455
- extends_ = Object.assign || function (target) {
7456
- for (var i = 1; i < arguments.length; i++) {
7457
- var source = arguments[i];
7458
-
7459
- for (var key in source) {
7460
- if (Object.prototype.hasOwnProperty.call(source, key)) {
7461
- target[key] = source[key];
7501
+ function _extends() {
7502
+ _extends = Object.assign || function assign(target) {
7503
+ for (var i = 1; i < arguments.length; i++) {
7504
+ var source = arguments[i];
7505
+ for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
7462
7506
  }
7463
- }
7464
- }
7465
-
7466
- return target;
7467
- };
7468
7507
 
7469
- return extends_.apply(this, arguments);
7470
- }
7508
+ return target;
7509
+ };
7471
7510
 
7472
- function _extends() {
7473
- return extends_.apply(this, arguments);
7511
+ return _extends.apply(this, arguments);
7474
7512
  }
7475
7513
 
7476
7514
  var camera_declare = "#define GLSLIFY 1\nuniform vec3 u_cameraPos;"; // eslint-disable-line
@@ -8312,7 +8350,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8312
8350
  return prefix + line;
8313
8351
  }).join("\n");
8314
8352
  };
8315
- _createClass(ShaderProgram, [
8353
+ _create_class(ShaderProgram, [
8316
8354
  {
8317
8355
  key: "isValid",
8318
8356
  get: /**
@@ -8324,7 +8362,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
8324
8362
  ]);
8325
8363
  return ShaderProgram;
8326
8364
  }();
8327
- ShaderProgram._counter = 0;
8365
+ (function() {
8366
+ ShaderProgram._counter = 0;
8367
+ })();
8328
8368
 
8329
8369
  /**
8330
8370
  * Shader pass containing vertex and fragment source.
@@ -8369,7 +8409,9 @@ ShaderProgram._counter = 0;
8369
8409
  };
8370
8410
  return ShaderPass;
8371
8411
  }();
8372
- ShaderPass._shaderPassCounter = 0;
8412
+ (function() {
8413
+ ShaderPass._shaderPassCounter = 0;
8414
+ })();
8373
8415
 
8374
8416
  /**
8375
8417
  * Shader property.
@@ -8378,7 +8420,7 @@ ShaderPass._shaderPassCounter = 0;
8378
8420
  this.name = name;
8379
8421
  this._uniqueId = ShaderProperty._propertyNameCounter++;
8380
8422
  }
8381
- _createClass(ShaderProperty, [
8423
+ _create_class(ShaderProperty, [
8382
8424
  {
8383
8425
  key: "type",
8384
8426
  get: /**
@@ -8390,7 +8432,9 @@ ShaderPass._shaderPassCounter = 0;
8390
8432
  ]);
8391
8433
  return ShaderProperty;
8392
8434
  }();
8393
- ShaderProperty._propertyNameCounter = 0;
8435
+ (function() {
8436
+ ShaderProperty._propertyNameCounter = 0;
8437
+ })();
8394
8438
 
8395
8439
  /**
8396
8440
  * Shader for rendering.
@@ -8503,7 +8547,7 @@ ShaderProperty._propertyNameCounter = 0;
8503
8547
  }
8504
8548
  }
8505
8549
  };
8506
- _createClass(Shader, [
8550
+ _create_class(Shader, [
8507
8551
  {
8508
8552
  key: "passes",
8509
8553
  get: /**
@@ -8515,18 +8559,34 @@ ShaderProperty._propertyNameCounter = 0;
8515
8559
  ]);
8516
8560
  return Shader;
8517
8561
  }();
8518
- /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8519
- /** @internal */ Shader._shaderExtension = [
8520
- "GL_EXT_shader_texture_lod",
8521
- "GL_OES_standard_derivatives",
8522
- "GL_EXT_draw_buffers"
8523
- ];
8524
- /** @internal */ Shader._propertyIdMap = Object.create(null);
8525
- Shader._shaderMap = Object.create(null);
8526
- Shader._propertyNameMap = Object.create(null);
8527
- Shader._macroMaskMap = [];
8528
- Shader._macroCounter = 0;
8529
- Shader._macroMap = Object.create(null);
8562
+ (function() {
8563
+ /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8564
+ })();
8565
+ (function() {
8566
+ /** @internal */ Shader._shaderExtension = [
8567
+ "GL_EXT_shader_texture_lod",
8568
+ "GL_OES_standard_derivatives",
8569
+ "GL_EXT_draw_buffers"
8570
+ ];
8571
+ })();
8572
+ (function() {
8573
+ /** @internal */ Shader._propertyIdMap = Object.create(null);
8574
+ })();
8575
+ (function() {
8576
+ Shader._shaderMap = Object.create(null);
8577
+ })();
8578
+ (function() {
8579
+ Shader._propertyNameMap = Object.create(null);
8580
+ })();
8581
+ (function() {
8582
+ Shader._macroMaskMap = [];
8583
+ })();
8584
+ (function() {
8585
+ Shader._macroCounter = 0;
8586
+ })();
8587
+ (function() {
8588
+ Shader._macroMap = Object.create(null);
8589
+ })();
8530
8590
 
8531
8591
  /**
8532
8592
  * Shader data collection,Correspondence includes shader properties data and macros data.
@@ -8784,9 +8844,9 @@ Shader._macroMap = Object.create(null);
8784
8844
  /** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
8785
8845
  /** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
8786
8846
  /** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
8847
+ /** @internal */ _this._lightIndex = -1;
8787
8848
  _this._color = new engineMath.Color(1, 1, 1, 1);
8788
8849
  _this._lightColor = new engineMath.Color();
8789
- /** @internal */ _this._lightIndex = -1;
8790
8850
  return _this;
8791
8851
  }
8792
8852
  var _proto = Light.prototype;
@@ -8797,7 +8857,7 @@ Shader._macroMap = Object.create(null);
8797
8857
  this._lightColor.a = this.color.a * this.intensity;
8798
8858
  return this._lightColor;
8799
8859
  };
8800
- _createClass(Light, [
8860
+ _create_class(Light, [
8801
8861
  {
8802
8862
  key: "color",
8803
8863
  get: /**
@@ -8834,9 +8894,11 @@ Shader._macroMap = Object.create(null);
8834
8894
  ]);
8835
8895
  return Light;
8836
8896
  }(Component);
8837
- /**
8897
+ (function() {
8898
+ /**
8838
8899
  * Each type of light source is at most 10, beyond which it will not take effect.
8839
8900
  * */ Light._maxLight = 10;
8901
+ })();
8840
8902
  __decorate([
8841
8903
  ignoreClone
8842
8904
  ], Light.prototype, "_lightIndex", void 0);
@@ -8894,7 +8956,7 @@ __decorate([
8894
8956
  shaderData.setFloatArray(DirectLight._colorProperty, data.color);
8895
8957
  shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
8896
8958
  };
8897
- _createClass(DirectLight, [
8959
+ _create_class(DirectLight, [
8898
8960
  {
8899
8961
  key: "direction",
8900
8962
  get: /**
@@ -8925,14 +8987,22 @@ __decorate([
8925
8987
  ]);
8926
8988
  return DirectLight;
8927
8989
  }(Light);
8928
- DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8929
- DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8930
- DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8931
- DirectLight._combinedData = {
8932
- cullingMask: new Int32Array(Light._maxLight * 2),
8933
- color: new Float32Array(Light._maxLight * 3),
8934
- direction: new Float32Array(Light._maxLight * 3)
8935
- };
8990
+ (function() {
8991
+ DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8992
+ })();
8993
+ (function() {
8994
+ DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8995
+ })();
8996
+ (function() {
8997
+ DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8998
+ })();
8999
+ (function() {
9000
+ DirectLight._combinedData = {
9001
+ cullingMask: new Int32Array(Light._maxLight * 2),
9002
+ color: new Float32Array(Light._maxLight * 3),
9003
+ direction: new Float32Array(Light._maxLight * 3)
9004
+ };
9005
+ })();
8936
9006
 
8937
9007
  /**
8938
9008
  * Point light.
@@ -8989,7 +9059,7 @@ DirectLight._combinedData = {
8989
9059
  shaderData.setFloatArray(PointLight._positionProperty, data.position);
8990
9060
  shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
8991
9061
  };
8992
- _createClass(PointLight, [
9062
+ _create_class(PointLight, [
8993
9063
  {
8994
9064
  key: "position",
8995
9065
  get: /**
@@ -9010,16 +9080,26 @@ DirectLight._combinedData = {
9010
9080
  ]);
9011
9081
  return PointLight;
9012
9082
  }(Light);
9013
- PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
9014
- PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
9015
- PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9016
- PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9017
- PointLight._combinedData = {
9018
- cullingMask: new Int32Array(Light._maxLight * 2),
9019
- color: new Float32Array(Light._maxLight * 3),
9020
- position: new Float32Array(Light._maxLight * 3),
9021
- distance: new Float32Array(Light._maxLight)
9022
- };
9083
+ (function() {
9084
+ PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
9085
+ })();
9086
+ (function() {
9087
+ PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
9088
+ })();
9089
+ (function() {
9090
+ PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9091
+ })();
9092
+ (function() {
9093
+ PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9094
+ })();
9095
+ (function() {
9096
+ PointLight._combinedData = {
9097
+ cullingMask: new Int32Array(Light._maxLight * 2),
9098
+ color: new Float32Array(Light._maxLight * 3),
9099
+ position: new Float32Array(Light._maxLight * 3),
9100
+ distance: new Float32Array(Light._maxLight)
9101
+ };
9102
+ })();
9023
9103
 
9024
9104
  /**
9025
9105
  * Spot light.
@@ -9093,7 +9173,7 @@ PointLight._combinedData = {
9093
9173
  shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
9094
9174
  shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
9095
9175
  };
9096
- _createClass(SpotLight, [
9176
+ _create_class(SpotLight, [
9097
9177
  {
9098
9178
  key: "position",
9099
9179
  get: /**
@@ -9135,22 +9215,38 @@ PointLight._combinedData = {
9135
9215
  ]);
9136
9216
  return SpotLight;
9137
9217
  }(Light);
9138
- SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9139
- SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9140
- SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9141
- SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9142
- SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9143
- SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9144
- SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9145
- SpotLight._combinedData = {
9146
- cullingMask: new Int32Array(Light._maxLight * 2),
9147
- color: new Float32Array(Light._maxLight * 3),
9148
- position: new Float32Array(Light._maxLight * 3),
9149
- direction: new Float32Array(Light._maxLight * 3),
9150
- distance: new Float32Array(Light._maxLight),
9151
- angleCos: new Float32Array(Light._maxLight),
9152
- penumbraCos: new Float32Array(Light._maxLight)
9153
- };
9218
+ (function() {
9219
+ SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9220
+ })();
9221
+ (function() {
9222
+ SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9223
+ })();
9224
+ (function() {
9225
+ SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9226
+ })();
9227
+ (function() {
9228
+ SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9229
+ })();
9230
+ (function() {
9231
+ SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9232
+ })();
9233
+ (function() {
9234
+ SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9235
+ })();
9236
+ (function() {
9237
+ SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9238
+ })();
9239
+ (function() {
9240
+ SpotLight._combinedData = {
9241
+ cullingMask: new Int32Array(Light._maxLight * 2),
9242
+ color: new Float32Array(Light._maxLight * 3),
9243
+ position: new Float32Array(Light._maxLight * 3),
9244
+ direction: new Float32Array(Light._maxLight * 3),
9245
+ distance: new Float32Array(Light._maxLight),
9246
+ angleCos: new Float32Array(Light._maxLight),
9247
+ penumbraCos: new Float32Array(Light._maxLight)
9248
+ };
9249
+ })();
9154
9250
 
9155
9251
  /**
9156
9252
  * Light manager.
@@ -9711,7 +9807,7 @@ SpotLight._combinedData = {
9711
9807
  /**
9712
9808
  * @override
9713
9809
  */ _proto._onDestroy = function _onDestroy() {};
9714
- _createClass(Material, [
9810
+ _create_class(Material, [
9715
9811
  {
9716
9812
  key: "shader",
9717
9813
  get: /**
@@ -9820,9 +9916,15 @@ var RenderElement = function RenderElement() {
9820
9916
  };
9821
9917
  return RenderContext;
9822
9918
  }();
9823
- /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9824
- RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9825
- RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9919
+ (function() {
9920
+ /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9921
+ })();
9922
+ (function() {
9923
+ RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9924
+ })();
9925
+ (function() {
9926
+ RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9927
+ })();
9826
9928
 
9827
9929
  var SpriteElement = /*#__PURE__*/ function(RenderElement) {
9828
9930
  _inherits(SpriteElement, RenderElement);
@@ -9877,7 +9979,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9877
9979
  function Renderer1(entity) {
9878
9980
  var _this;
9879
9981
  _this = Component.call(this, entity) || this;
9880
- /** Whether cast shadow. */ _this.castShadows = true;
9881
9982
  /** ShaderData related to renderer. */ _this.shaderData = new ShaderData(ShaderDataGroup.Renderer);
9882
9983
  /** @internal */ _this._onUpdateIndex = -1;
9883
9984
  /** @internal */ _this._rendererIndex = -1;
@@ -9894,11 +9995,12 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9894
9995
  _this._priority = 0;
9895
9996
  _this._receiveShadows = true;
9896
9997
  _this._rendererLayer = new engineMath.Vector4();
9998
+ /** Whether cast shadow. */ _this.castShadows = true;
9897
9999
  var prototype = exports.Renderer.prototype;
9898
10000
  var shaderData = _this.shaderData;
9899
10001
  _this._overrideUpdate = _this.update !== prototype.update;
9900
10002
  shaderData._addRefCount(1);
9901
- _this._onTransformChanged = _this._onTransformChanged.bind(_assertThisInitialized(_this));
10003
+ _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
9902
10004
  _this._registerEntityTransformListener();
9903
10005
  shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
9904
10006
  shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
@@ -10083,7 +10185,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10083
10185
  _proto._onTransformChanged = function _onTransformChanged(type) {
10084
10186
  this._dirtyUpdateFlag |= 0x1;
10085
10187
  };
10086
- _createClass(Renderer1, [
10188
+ _create_class(Renderer1, [
10087
10189
  {
10088
10190
  key: "isCulled",
10089
10191
  get: /**
@@ -10149,7 +10251,25 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10149
10251
  }
10150
10252
  ]);
10151
10253
  return Renderer1;
10152
- }(Component), _Renderer._tempVector0 = new engineMath.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);
10254
+ }(Component), function() {
10255
+ _Renderer._tempVector0 = new engineMath.Vector3();
10256
+ }(), function() {
10257
+ _Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS");
10258
+ }(), function() {
10259
+ _Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat");
10260
+ }(), function() {
10261
+ _Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat");
10262
+ }(), function() {
10263
+ _Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat");
10264
+ }(), function() {
10265
+ _Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat");
10266
+ }(), function() {
10267
+ _Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat");
10268
+ }(), function() {
10269
+ _Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat");
10270
+ }(), function() {
10271
+ _Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
10272
+ }(), _Renderer);
10153
10273
  __decorate([
10154
10274
  deepClone
10155
10275
  ], exports.Renderer.prototype, "shaderData", void 0);
@@ -10279,14 +10399,18 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
10279
10399
  renderUVs[3].set(right, top);
10280
10400
  };
10281
10401
  return SimpleSpriteAssembler1;
10282
- }(), _SimpleSpriteAssembler._rectangleTriangles = [
10283
- 0,
10284
- 1,
10285
- 2,
10286
- 2,
10287
- 1,
10288
- 3
10289
- ], _SimpleSpriteAssembler._worldMatrix = new engineMath.Matrix(), _SimpleSpriteAssembler);
10402
+ }(), function() {
10403
+ _SimpleSpriteAssembler._rectangleTriangles = [
10404
+ 0,
10405
+ 1,
10406
+ 2,
10407
+ 2,
10408
+ 1,
10409
+ 3
10410
+ ];
10411
+ }(), function() {
10412
+ _SimpleSpriteAssembler._worldMatrix = new engineMath.Matrix();
10413
+ }(), _SimpleSpriteAssembler);
10290
10414
  SimpleSpriteAssembler = __decorate([
10291
10415
  StaticInterfaceImplement()
10292
10416
  ], SimpleSpriteAssembler);
@@ -10371,10 +10495,10 @@ SimpleSpriteAssembler = __decorate([
10371
10495
  _this._flipY = false;
10372
10496
  _this._alphaCutoff = 0.5;
10373
10497
  _this._renderData = new RenderData2D(4, [], []);
10374
- SimpleSpriteAssembler.resetData(_assertThisInitialized(_this));
10498
+ SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
10375
10499
  _this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
10376
10500
  _this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
10377
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
10501
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
10378
10502
  return _this;
10379
10503
  }
10380
10504
  var _proto = SpriteMask.prototype;
@@ -10442,7 +10566,7 @@ SimpleSpriteAssembler = __decorate([
10442
10566
  break;
10443
10567
  }
10444
10568
  };
10445
- _createClass(SpriteMask, [
10569
+ _create_class(SpriteMask, [
10446
10570
  {
10447
10571
  key: "width",
10448
10572
  get: /**
@@ -10544,8 +10668,12 @@ SimpleSpriteAssembler = __decorate([
10544
10668
  ]);
10545
10669
  return SpriteMask;
10546
10670
  }(exports.Renderer);
10547
- /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10548
- /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10671
+ (function() {
10672
+ /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10673
+ })();
10674
+ (function() {
10675
+ /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10676
+ })();
10549
10677
  __decorate([
10550
10678
  assignmentClone
10551
10679
  ], SpriteMask.prototype, "influenceLayers", void 0);
@@ -10751,7 +10879,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10751
10879
  this._glElementInfo = BufferUtil._getElementInfo(this.format);
10752
10880
  this._instanceStepRate = Math.floor(instanceStepRate);
10753
10881
  }
10754
- _createClass(VertexElement, [
10882
+ _create_class(VertexElement, [
10755
10883
  {
10756
10884
  key: "semantic",
10757
10885
  get: /**
@@ -10911,7 +11039,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10911
11039
  gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
10912
11040
  this._byteLength = dataLength;
10913
11041
  };
10914
- _createClass(Buffer, [
11042
+ _create_class(Buffer, [
10915
11043
  {
10916
11044
  key: "type",
10917
11045
  get: /**
@@ -10960,7 +11088,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10960
11088
  this._buffer = buffer;
10961
11089
  this._format = format;
10962
11090
  }
10963
- _createClass(IndexBufferBinding, [
11091
+ _create_class(IndexBufferBinding, [
10964
11092
  {
10965
11093
  key: "buffer",
10966
11094
  get: /**
@@ -11009,8 +11137,8 @@ var BufferUtil = /*#__PURE__*/ function() {
11009
11137
  _this._bounds = new engineMath.BoundingBox();
11010
11138
  _this._subMeshes = [];
11011
11139
  _this.name = name;
11012
- _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assertThisInitialized(_this));
11013
- _this._onBoundsChanged = _this._onBoundsChanged.bind(_assertThisInitialized(_this));
11140
+ _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized(_this));
11141
+ _this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized(_this));
11014
11142
  var bounds = _this._bounds;
11015
11143
  // @ts-ignore
11016
11144
  bounds.min._onValueChanged = _this._onBoundsChanged;
@@ -11127,7 +11255,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11127
11255
  _proto._onBoundsChanged = function _onBoundsChanged() {
11128
11256
  this._updateFlagManager.dispatch(0x1);
11129
11257
  };
11130
- _createClass(Mesh, [
11258
+ _create_class(Mesh, [
11131
11259
  {
11132
11260
  key: "bounds",
11133
11261
  get: /**
@@ -11173,7 +11301,7 @@ var MeshModifyFlags;
11173
11301
  this._buffer = buffer;
11174
11302
  this._stride = stride;
11175
11303
  }
11176
- _createClass(VertexBufferBinding, [
11304
+ _create_class(VertexBufferBinding, [
11177
11305
  {
11178
11306
  key: "buffer",
11179
11307
  get: /**
@@ -11619,13 +11747,27 @@ var MeshModifyFlags;
11619
11747
  };
11620
11748
  return BlendShapeManager;
11621
11749
  }();
11622
- BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11623
- BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11624
- BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11625
- BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11626
- BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11627
- BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11628
- BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11750
+ (function() {
11751
+ BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11752
+ })();
11753
+ (function() {
11754
+ BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11755
+ })();
11756
+ (function() {
11757
+ BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11758
+ })();
11759
+ (function() {
11760
+ BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11761
+ })();
11762
+ (function() {
11763
+ BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11764
+ })();
11765
+ (function() {
11766
+ BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11767
+ })();
11768
+ (function() {
11769
+ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11770
+ })();
11629
11771
 
11630
11772
  /**
11631
11773
  * Vertex attribute types of a vertex in a ModelMesh.
@@ -11682,7 +11824,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
11682
11824
  _this._customVertexElements = [];
11683
11825
  _this._vertexCountChanged = false;
11684
11826
  _this.name = name;
11685
- _this._blendShapeManager = new BlendShapeManager(engine, _assertThisInitialized(_this));
11827
+ _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
11686
11828
  return _this;
11687
11829
  }
11688
11830
  var _proto = ModelMesh.prototype;
@@ -12632,7 +12774,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12632
12774
  this._uv7 = null;
12633
12775
  this._blendShapeManager._releaseMemoryCache();
12634
12776
  };
12635
- _createClass(ModelMesh, [
12777
+ _create_class(ModelMesh, [
12636
12778
  {
12637
12779
  key: "accessible",
12638
12780
  get: /**
@@ -12700,11 +12842,21 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12700
12842
  ]);
12701
12843
  return ModelMesh;
12702
12844
  }(Mesh);
12703
- ModelMesh._tempVec0 = new engineMath.Vector3();
12704
- ModelMesh._tempVec1 = new engineMath.Vector3();
12705
- ModelMesh._tempVec2 = new engineMath.Vector3();
12706
- ModelMesh._tempVec3 = new engineMath.Vector3();
12707
- ModelMesh._tempVec4 = new engineMath.Vector3();
12845
+ (function() {
12846
+ ModelMesh._tempVec0 = new engineMath.Vector3();
12847
+ })();
12848
+ (function() {
12849
+ ModelMesh._tempVec1 = new engineMath.Vector3();
12850
+ })();
12851
+ (function() {
12852
+ ModelMesh._tempVec2 = new engineMath.Vector3();
12853
+ })();
12854
+ (function() {
12855
+ ModelMesh._tempVec3 = new engineMath.Vector3();
12856
+ })();
12857
+ (function() {
12858
+ ModelMesh._tempVec4 = new engineMath.Vector3();
12859
+ })();
12708
12860
  var VertexChangedFlags;
12709
12861
  (function(VertexChangedFlags) {
12710
12862
  VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
@@ -12747,7 +12899,7 @@ var VertexChangedFlags;
12747
12899
  function MeshRenderer(entity) {
12748
12900
  var _this;
12749
12901
  _this = Renderer.call(this, entity) || this;
12750
- _this._onMeshChanged = _this._onMeshChanged.bind(_assertThisInitialized(_this));
12902
+ _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
12751
12903
  return _this;
12752
12904
  }
12753
12905
  var _proto = MeshRenderer.prototype;
@@ -12850,7 +13002,7 @@ var VertexChangedFlags;
12850
13002
  type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
12851
13003
  type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
12852
13004
  };
12853
- _createClass(MeshRenderer, [
13005
+ _create_class(MeshRenderer, [
12854
13006
  {
12855
13007
  key: "mesh",
12856
13008
  get: /**
@@ -12867,11 +13019,21 @@ var VertexChangedFlags;
12867
13019
  ]);
12868
13020
  return MeshRenderer;
12869
13021
  }(exports.Renderer);
12870
- MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
12871
- MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
12872
- MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
12873
- MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
12874
- MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
13022
+ (function() {
13023
+ MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
13024
+ })();
13025
+ (function() {
13026
+ MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
13027
+ })();
13028
+ (function() {
13029
+ MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
13030
+ })();
13031
+ (function() {
13032
+ MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
13033
+ })();
13034
+ (function() {
13035
+ MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
13036
+ })();
12875
13037
  __decorate([
12876
13038
  ignoreClone
12877
13039
  ], MeshRenderer.prototype, "_mesh", void 0);
@@ -12974,7 +13136,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
12974
13136
  // 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.
12975
13137
  maxVertexUniformVectors = Math.min(maxVertexUniformVectors, 256);
12976
13138
  _this._maxVertexUniformVectors = maxVertexUniformVectors;
12977
- _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assertThisInitialized(_this));
13139
+ _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
12978
13140
  var localBounds = _this._localBounds;
12979
13141
  // @ts-ignore
12980
13142
  localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
@@ -13172,7 +13334,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13172
13334
  _proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
13173
13335
  this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
13174
13336
  };
13175
- _createClass(SkinnedMeshRenderer, [
13337
+ _create_class(SkinnedMeshRenderer, [
13176
13338
  {
13177
13339
  key: "blendShapeWeights",
13178
13340
  get: /**
@@ -13237,10 +13399,18 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13237
13399
  ]);
13238
13400
  return SkinnedMeshRenderer;
13239
13401
  }(MeshRenderer);
13240
- SkinnedMeshRenderer._tempMatrix = new engineMath.Matrix();
13241
- SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13242
- SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13243
- SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13402
+ (function() {
13403
+ SkinnedMeshRenderer._tempMatrix = new engineMath.Matrix();
13404
+ })();
13405
+ (function() {
13406
+ SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13407
+ })();
13408
+ (function() {
13409
+ SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13410
+ })();
13411
+ (function() {
13412
+ SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13413
+ })();
13244
13414
  __decorate([
13245
13415
  ignoreClone
13246
13416
  ], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
@@ -14006,7 +14176,7 @@ __decorate([
14006
14176
  }
14007
14177
  this._setIndexBufferBinding(binding);
14008
14178
  };
14009
- _createClass(BufferMesh, [
14179
+ _create_class(BufferMesh, [
14010
14180
  {
14011
14181
  key: "instanceCount",
14012
14182
  get: /**
@@ -14120,7 +14290,7 @@ __decorate([
14120
14290
  this._layoutChangeManager.dispatch(0, this);
14121
14291
  }
14122
14292
  };
14123
- _createClass(BlendShape, [
14293
+ _create_class(BlendShape, [
14124
14294
  {
14125
14295
  key: "frames",
14126
14296
  get: /**
@@ -14278,8 +14448,12 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
14278
14448
  };
14279
14449
  return Basic2DBatcher;
14280
14450
  }();
14281
- /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14282
- Basic2DBatcher._canUploadSameBuffer = true;
14451
+ (function() {
14452
+ /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14453
+ })();
14454
+ (function() {
14455
+ Basic2DBatcher._canUploadSameBuffer = true;
14456
+ })();
14283
14457
 
14284
14458
  var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
14285
14459
  _inherits(SpriteMaskBatcher, Basic2DBatcher);
@@ -14494,9 +14668,15 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14494
14668
  };
14495
14669
  return Sky;
14496
14670
  }();
14497
- Sky._epsilon = 1e-6;
14498
- Sky._viewProjMatrix = new engineMath.Matrix();
14499
- Sky._projectionMatrix = new engineMath.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14671
+ (function() {
14672
+ Sky._epsilon = 1e-6;
14673
+ })();
14674
+ (function() {
14675
+ Sky._viewProjMatrix = new engineMath.Matrix();
14676
+ })();
14677
+ (function() {
14678
+ Sky._projectionMatrix = new engineMath.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14679
+ })();
14500
14680
 
14501
14681
  /**
14502
14682
  * Background of scene.
@@ -14578,7 +14758,7 @@ Sky._projectionMatrix = new engineMath.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky.
14578
14758
  mesh.addSubMesh(0, indices.length);
14579
14759
  return mesh;
14580
14760
  };
14581
- _createClass(Background, [
14761
+ _create_class(Background, [
14582
14762
  {
14583
14763
  key: "texture",
14584
14764
  get: /**
@@ -14746,7 +14926,7 @@ Sky._projectionMatrix = new engineMath.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky.
14746
14926
  out[25] = src[25] * 0.429042;
14747
14927
  out[26] = src[26] * 0.429042;
14748
14928
  };
14749
- _createClass(AmbientLight, [
14929
+ _create_class(AmbientLight, [
14750
14930
  {
14751
14931
  key: "specularTextureDecodeRGBM",
14752
14932
  get: /**
@@ -14857,15 +15037,33 @@ Sky._projectionMatrix = new engineMath.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky.
14857
15037
  ]);
14858
15038
  return AmbientLight;
14859
15039
  }();
14860
- AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
14861
- AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
14862
- AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
14863
- AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
14864
- AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
14865
- AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
14866
- AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
14867
- AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
14868
- AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15040
+ (function() {
15041
+ AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
15042
+ })();
15043
+ (function() {
15044
+ AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
15045
+ })();
15046
+ (function() {
15047
+ AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
15048
+ })();
15049
+ (function() {
15050
+ AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
15051
+ })();
15052
+ (function() {
15053
+ AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
15054
+ })();
15055
+ (function() {
15056
+ AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
15057
+ })();
15058
+ (function() {
15059
+ AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
15060
+ })();
15061
+ (function() {
15062
+ AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
15063
+ })();
15064
+ (function() {
15065
+ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15066
+ })();
14869
15067
 
14870
15068
  /**
14871
15069
  * Scene.
@@ -14896,7 +15094,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
14896
15094
  var shaderData = _this.shaderData;
14897
15095
  shaderData._addRefCount(1);
14898
15096
  _this.ambientLight = new AmbientLight();
14899
- engine.sceneManager._allScenes.push(_assertThisInitialized(_this));
15097
+ engine.sceneManager._allScenes.push(_assert_this_initialized(_this));
14900
15098
  shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
14901
15099
  shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
14902
15100
  shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
@@ -15103,7 +15301,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15103
15301
  this._fogParams.z = density / Math.LN2;
15104
15302
  this._fogParams.w = density / Math.sqrt(Math.LN2);
15105
15303
  };
15106
- _createClass(Scene, [
15304
+ _create_class(Scene, [
15107
15305
  {
15108
15306
  key: "shadowCascades",
15109
15307
  get: /**
@@ -15231,8 +15429,12 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15231
15429
  ]);
15232
15430
  return Scene;
15233
15431
  }(EngineObject);
15234
- Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15235
- Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15432
+ (function() {
15433
+ Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15434
+ })();
15435
+ (function() {
15436
+ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15437
+ })();
15236
15438
 
15237
15439
  /**
15238
15440
  * Scene manager.
@@ -15280,7 +15482,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15280
15482
  }
15281
15483
  allScenes.length = 0;
15282
15484
  };
15283
- _createClass(SceneManager, [
15485
+ _create_class(SceneManager, [
15284
15486
  {
15285
15487
  key: "activeScene",
15286
15488
  get: /**
@@ -15451,8 +15653,8 @@ ShaderPool.init();
15451
15653
  /** @internal */ _this._canSpriteBatch = true;
15452
15654
  /** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
15453
15655
  _this._settings = {};
15454
- _this._resourceManager = new ResourceManager(_assertThisInitialized(_this));
15455
- _this._sceneManager = new SceneManager(_assertThisInitialized(_this));
15656
+ _this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
15657
+ _this._sceneManager = new SceneManager(_assert_this_initialized(_this));
15456
15658
  _this._vSyncCount = 1;
15457
15659
  _this._targetFrameRate = 60;
15458
15660
  _this._time = new Time();
@@ -15476,25 +15678,25 @@ ShaderPool.init();
15476
15678
  };
15477
15679
  _this._hardwareRenderer = hardwareRenderer;
15478
15680
  _this._hardwareRenderer.init(canvas);
15479
- _this.physicsManager = new PhysicsManager(_assertThisInitialized(_this));
15681
+ _this.physicsManager = new PhysicsManager(_assert_this_initialized(_this));
15480
15682
  _this._canvas = canvas;
15481
- _this._sceneManager.activeScene = new Scene(_assertThisInitialized(_this), "DefaultScene");
15482
- _this._spriteMaskManager = new SpriteMaskManager(_assertThisInitialized(_this));
15683
+ _this._sceneManager.activeScene = new Scene(_assert_this_initialized(_this), "DefaultScene");
15684
+ _this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized(_this));
15483
15685
  _this._spriteDefaultMaterial = _this._createSpriteMaterial();
15484
15686
  _this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
15485
- _this._textDefaultFont = Font.createFromOS(_assertThisInitialized(_this), "Arial");
15687
+ _this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
15486
15688
  _this._textDefaultFont.isGCIgnored = false;
15487
- _this.inputManager = new InputManager(_assertThisInitialized(_this));
15689
+ _this.inputManager = new InputManager(_assert_this_initialized(_this));
15488
15690
  var magentaPixel = new Uint8Array([
15489
15691
  255,
15490
15692
  0,
15491
15693
  255,
15492
15694
  255
15493
15695
  ]);
15494
- var magentaTexture2D = new Texture2D(_assertThisInitialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15696
+ var magentaTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15495
15697
  magentaTexture2D.setPixelBuffer(magentaPixel);
15496
15698
  magentaTexture2D.isGCIgnored = true;
15497
- var magentaTextureCube = new TextureCube(_assertThisInitialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
15699
+ var magentaTextureCube = new TextureCube(_assert_this_initialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
15498
15700
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveX, magentaPixel);
15499
15701
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.NegativeX, magentaPixel);
15500
15702
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveY, magentaPixel);
@@ -15505,22 +15707,22 @@ ShaderPool.init();
15505
15707
  if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
15506
15708
  _this._macroCollection.enable(Engine._noDepthTextureMacro);
15507
15709
  } else {
15508
- var depthTexture2D = new Texture2D(_assertThisInitialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
15710
+ var depthTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
15509
15711
  depthTexture2D.isGCIgnored = true;
15510
15712
  _this._depthTexture2D = depthTexture2D;
15511
15713
  }
15512
15714
  _this._magentaTexture2D = magentaTexture2D;
15513
15715
  _this._magentaTextureCube = magentaTextureCube;
15514
15716
  if (hardwareRenderer.isWebGL2) {
15515
- var magentaTexture2DArray = new Texture2DArray(_assertThisInitialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
15717
+ var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
15516
15718
  magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
15517
15719
  magentaTexture2DArray.isGCIgnored = true;
15518
15720
  _this._magentaTexture2DArray = magentaTexture2DArray;
15519
15721
  }
15520
- var magentaMaterial = new Material(_assertThisInitialized(_this), Shader.find("unlit"));
15722
+ var magentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
15521
15723
  magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
15522
15724
  _this._magentaMaterial = magentaMaterial;
15523
- var backgroundTextureMaterial = new Material(_assertThisInitialized(_this), Shader.find("background-texture"));
15725
+ var backgroundTextureMaterial = new Material(_assert_this_initialized(_this), Shader.find("background-texture"));
15524
15726
  backgroundTextureMaterial.isGCIgnored = true;
15525
15727
  backgroundTextureMaterial.renderState.depthState.compareFunction = exports.CompareFunction.LessEqual;
15526
15728
  _this._backgroundTextureMaterial = backgroundTextureMaterial;
@@ -15691,7 +15893,7 @@ ShaderPool.init();
15691
15893
  material.isGCIgnored = true;
15692
15894
  return material;
15693
15895
  };
15694
- _createClass(Engine, [
15896
+ _create_class(Engine, [
15695
15897
  {
15696
15898
  key: "settings",
15697
15899
  get: /**
@@ -15779,9 +15981,15 @@ ShaderPool.init();
15779
15981
  ]);
15780
15982
  return Engine;
15781
15983
  }(EventDispatcher);
15782
- /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15783
- /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15784
- /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
15984
+ (function() {
15985
+ /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15986
+ })();
15987
+ (function() {
15988
+ /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15989
+ })();
15990
+ (function() {
15991
+ /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
15992
+ })();
15785
15993
 
15786
15994
  /**
15787
15995
  * Script class, used for logic writing.
@@ -16096,7 +16304,9 @@ __decorate([
16096
16304
  };
16097
16305
  return SpriteBatcher;
16098
16306
  }(Basic2DBatcher);
16099
- SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16307
+ (function() {
16308
+ SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16309
+ })();
16100
16310
 
16101
16311
  /**
16102
16312
  * Render queue.
@@ -16594,227 +16804,247 @@ var /**
16594
16804
  };
16595
16805
  return ShadowUtils;
16596
16806
  }();
16597
- ShadowUtils._tempMatrix0 = new engineMath.Matrix();
16598
- // prettier-ignore
16599
- /** @internal */ ShadowUtils._shadowMapCoordMatrix = new engineMath.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);
16600
- ShadowUtils._frustumCorners = [
16601
- new engineMath.Vector3(),
16602
- new engineMath.Vector3(),
16603
- new engineMath.Vector3(),
16604
- new engineMath.Vector3(),
16605
- new engineMath.Vector3(),
16606
- new engineMath.Vector3(),
16607
- new engineMath.Vector3(),
16608
- new engineMath.Vector3()
16609
- ];
16610
- ShadowUtils._adjustNearPlane = new engineMath.Plane(new engineMath.Vector3());
16611
- ShadowUtils._adjustFarPlane = new engineMath.Plane(new engineMath.Vector3());
16612
- ShadowUtils._backPlaneFaces = new Array(5);
16613
- ShadowUtils._edgePlanePoint2 = new engineMath.Vector3();
16614
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16615
- [
16616
- engineMath.FrustumFace.Left,
16617
- engineMath.FrustumFace.Right,
16618
- engineMath.FrustumFace.Top,
16619
- engineMath.FrustumFace.Bottom
16620
- ],
16621
- [
16622
- engineMath.FrustumFace.Left,
16623
- engineMath.FrustumFace.Right,
16624
- engineMath.FrustumFace.Top,
16625
- engineMath.FrustumFace.Bottom
16626
- ],
16627
- [
16628
- engineMath.FrustumFace.Near,
16629
- engineMath.FrustumFace.Far,
16630
- engineMath.FrustumFace.Top,
16631
- engineMath.FrustumFace.Bottom
16632
- ],
16633
- [
16634
- engineMath.FrustumFace.Near,
16635
- engineMath.FrustumFace.Far,
16636
- engineMath.FrustumFace.Top,
16637
- engineMath.FrustumFace.Bottom
16638
- ],
16639
- [
16640
- engineMath.FrustumFace.Near,
16641
- engineMath.FrustumFace.Far,
16642
- engineMath.FrustumFace.Left,
16643
- engineMath.FrustumFace.Right
16644
- ],
16645
- [
16646
- engineMath.FrustumFace.Near,
16647
- engineMath.FrustumFace.Far,
16648
- engineMath.FrustumFace.Left,
16649
- engineMath.FrustumFace.Right
16650
- ]
16651
- ];
16652
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16653
- [
16654
- // near, far, left, right, bottom, top
16655
- [
16656
- 8,
16657
- 8
16658
- ],
16659
- [
16660
- 8,
16661
- 8
16662
- ],
16663
- [
16664
- 4,
16665
- 5
16666
- ],
16667
- [
16668
- 6,
16669
- 7
16670
- ],
16671
- [
16672
- 7,
16673
- 4
16674
- ],
16675
- [
16676
- 5,
16677
- 6
16678
- ]
16679
- ],
16680
- [
16681
- // near, far, left, right, bottom, top
16682
- [
16683
- 8,
16684
- 8
16685
- ],
16686
- [
16687
- 8,
16688
- 8
16689
- ],
16690
- [
16691
- 1,
16692
- 0
16693
- ],
16694
- [
16695
- 3,
16696
- 2
16697
- ],
16698
- [
16699
- 0,
16700
- 3
16701
- ],
16702
- [
16703
- 2,
16704
- 1
16705
- ]
16706
- ],
16707
- [
16708
- // near, far, left, right, bottom, top
16709
- [
16710
- 5,
16711
- 4
16712
- ],
16713
- [
16714
- 0,
16715
- 1
16716
- ],
16717
- [
16718
- 8,
16719
- 8
16720
- ],
16721
- [
16722
- 8,
16723
- 8
16724
- ],
16725
- [
16726
- 4,
16727
- 0
16728
- ],
16729
- [
16730
- 1,
16731
- 5
16732
- ]
16733
- ],
16734
- [
16735
- // near, far, left, right, bottom, top
16736
- [
16737
- 7,
16738
- 6
16739
- ],
16740
- [
16741
- 2,
16742
- 3
16743
- ],
16744
- [
16745
- 8,
16746
- 8
16747
- ],
16748
- [
16749
- 8,
16750
- 8
16751
- ],
16752
- [
16753
- 3,
16754
- 7
16755
- ],
16756
- [
16757
- 6,
16758
- 2
16759
- ]
16760
- ],
16761
- [
16762
- // near, far, left, right, bottom, top
16807
+ (function() {
16808
+ ShadowUtils._tempMatrix0 = new engineMath.Matrix();
16809
+ })();
16810
+ (function() {
16811
+ // prettier-ignore
16812
+ /** @internal */ ShadowUtils._shadowMapCoordMatrix = new engineMath.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);
16813
+ })();
16814
+ (function() {
16815
+ ShadowUtils._frustumCorners = [
16816
+ new engineMath.Vector3(),
16817
+ new engineMath.Vector3(),
16818
+ new engineMath.Vector3(),
16819
+ new engineMath.Vector3(),
16820
+ new engineMath.Vector3(),
16821
+ new engineMath.Vector3(),
16822
+ new engineMath.Vector3(),
16823
+ new engineMath.Vector3()
16824
+ ];
16825
+ })();
16826
+ (function() {
16827
+ ShadowUtils._adjustNearPlane = new engineMath.Plane(new engineMath.Vector3());
16828
+ })();
16829
+ (function() {
16830
+ ShadowUtils._adjustFarPlane = new engineMath.Plane(new engineMath.Vector3());
16831
+ })();
16832
+ (function() {
16833
+ ShadowUtils._backPlaneFaces = new Array(5);
16834
+ })();
16835
+ (function() {
16836
+ ShadowUtils._edgePlanePoint2 = new engineMath.Vector3();
16837
+ })();
16838
+ (function() {
16839
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16763
16840
  [
16764
- 4,
16765
- 7
16841
+ engineMath.FrustumFace.Left,
16842
+ engineMath.FrustumFace.Right,
16843
+ engineMath.FrustumFace.Top,
16844
+ engineMath.FrustumFace.Bottom
16766
16845
  ],
16767
16846
  [
16768
- 3,
16769
- 0
16847
+ engineMath.FrustumFace.Left,
16848
+ engineMath.FrustumFace.Right,
16849
+ engineMath.FrustumFace.Top,
16850
+ engineMath.FrustumFace.Bottom
16770
16851
  ],
16771
16852
  [
16772
- 0,
16773
- 4
16853
+ engineMath.FrustumFace.Near,
16854
+ engineMath.FrustumFace.Far,
16855
+ engineMath.FrustumFace.Top,
16856
+ engineMath.FrustumFace.Bottom
16774
16857
  ],
16775
16858
  [
16776
- 7,
16777
- 3
16859
+ engineMath.FrustumFace.Near,
16860
+ engineMath.FrustumFace.Far,
16861
+ engineMath.FrustumFace.Top,
16862
+ engineMath.FrustumFace.Bottom
16778
16863
  ],
16779
16864
  [
16780
- 8,
16781
- 8
16865
+ engineMath.FrustumFace.Near,
16866
+ engineMath.FrustumFace.Far,
16867
+ engineMath.FrustumFace.Left,
16868
+ engineMath.FrustumFace.Right
16782
16869
  ],
16783
16870
  [
16784
- 8,
16785
- 8
16871
+ engineMath.FrustumFace.Near,
16872
+ engineMath.FrustumFace.Far,
16873
+ engineMath.FrustumFace.Left,
16874
+ engineMath.FrustumFace.Right
16786
16875
  ]
16787
- ],
16788
- [
16789
- // near, far, left, right, bottom, top
16876
+ ];
16877
+ })();
16878
+ (function() {
16879
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16790
16880
  [
16791
- 6,
16792
- 5
16881
+ // near, far, left, right, bottom, top
16882
+ [
16883
+ 8,
16884
+ 8
16885
+ ],
16886
+ [
16887
+ 8,
16888
+ 8
16889
+ ],
16890
+ [
16891
+ 4,
16892
+ 5
16893
+ ],
16894
+ [
16895
+ 6,
16896
+ 7
16897
+ ],
16898
+ [
16899
+ 7,
16900
+ 4
16901
+ ],
16902
+ [
16903
+ 5,
16904
+ 6
16905
+ ]
16793
16906
  ],
16794
16907
  [
16795
- 1,
16796
- 2
16908
+ // near, far, left, right, bottom, top
16909
+ [
16910
+ 8,
16911
+ 8
16912
+ ],
16913
+ [
16914
+ 8,
16915
+ 8
16916
+ ],
16917
+ [
16918
+ 1,
16919
+ 0
16920
+ ],
16921
+ [
16922
+ 3,
16923
+ 2
16924
+ ],
16925
+ [
16926
+ 0,
16927
+ 3
16928
+ ],
16929
+ [
16930
+ 2,
16931
+ 1
16932
+ ]
16797
16933
  ],
16798
16934
  [
16799
- 5,
16800
- 1
16935
+ // near, far, left, right, bottom, top
16936
+ [
16937
+ 5,
16938
+ 4
16939
+ ],
16940
+ [
16941
+ 0,
16942
+ 1
16943
+ ],
16944
+ [
16945
+ 8,
16946
+ 8
16947
+ ],
16948
+ [
16949
+ 8,
16950
+ 8
16951
+ ],
16952
+ [
16953
+ 4,
16954
+ 0
16955
+ ],
16956
+ [
16957
+ 1,
16958
+ 5
16959
+ ]
16801
16960
  ],
16802
16961
  [
16803
- 2,
16804
- 6
16962
+ // near, far, left, right, bottom, top
16963
+ [
16964
+ 7,
16965
+ 6
16966
+ ],
16967
+ [
16968
+ 2,
16969
+ 3
16970
+ ],
16971
+ [
16972
+ 8,
16973
+ 8
16974
+ ],
16975
+ [
16976
+ 8,
16977
+ 8
16978
+ ],
16979
+ [
16980
+ 3,
16981
+ 7
16982
+ ],
16983
+ [
16984
+ 6,
16985
+ 2
16986
+ ]
16805
16987
  ],
16806
16988
  [
16807
- 8,
16808
- 8
16989
+ // near, far, left, right, bottom, top
16990
+ [
16991
+ 4,
16992
+ 7
16993
+ ],
16994
+ [
16995
+ 3,
16996
+ 0
16997
+ ],
16998
+ [
16999
+ 0,
17000
+ 4
17001
+ ],
17002
+ [
17003
+ 7,
17004
+ 3
17005
+ ],
17006
+ [
17007
+ 8,
17008
+ 8
17009
+ ],
17010
+ [
17011
+ 8,
17012
+ 8
17013
+ ]
16809
17014
  ],
16810
17015
  [
16811
- 8,
16812
- 8
17016
+ // near, far, left, right, bottom, top
17017
+ [
17018
+ 6,
17019
+ 5
17020
+ ],
17021
+ [
17022
+ 1,
17023
+ 2
17024
+ ],
17025
+ [
17026
+ 5,
17027
+ 1
17028
+ ],
17029
+ [
17030
+ 2,
17031
+ 6
17032
+ ],
17033
+ [
17034
+ 8,
17035
+ 8
17036
+ ],
17037
+ [
17038
+ 8,
17039
+ 8
17040
+ ]
16813
17041
  ]
16814
- ]
16815
- ];
16816
- //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.
16817
- ShadowUtils.atlasBorderSize = 4.0;
17042
+ ];
17043
+ })();
17044
+ (function() {
17045
+ //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.
17046
+ ShadowUtils.atlasBorderSize = 4.0;
17047
+ })();
16818
17048
 
16819
17049
  /**
16820
17050
  * Cascade shadow caster.
@@ -17051,18 +17281,42 @@ ShadowUtils.atlasBorderSize = 4.0;
17051
17281
  };
17052
17282
  return CascadedShadowCasterPass;
17053
17283
  }();
17054
- CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17055
- CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17056
- CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17057
- CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17058
- CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17059
- CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17060
- CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17061
- CascadedShadowCasterPass._maxCascades = 4;
17062
- CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17063
- CascadedShadowCasterPass._clearColor = new engineMath.Color(1, 1, 1, 1);
17064
- CascadedShadowCasterPass._tempVector = new engineMath.Vector3();
17065
- CascadedShadowCasterPass._tempMatrix0 = new engineMath.Matrix();
17284
+ (function() {
17285
+ CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17286
+ })();
17287
+ (function() {
17288
+ CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17289
+ })();
17290
+ (function() {
17291
+ CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17292
+ })();
17293
+ (function() {
17294
+ CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17295
+ })();
17296
+ (function() {
17297
+ CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17298
+ })();
17299
+ (function() {
17300
+ CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17301
+ })();
17302
+ (function() {
17303
+ CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17304
+ })();
17305
+ (function() {
17306
+ CascadedShadowCasterPass._maxCascades = 4;
17307
+ })();
17308
+ (function() {
17309
+ CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17310
+ })();
17311
+ (function() {
17312
+ CascadedShadowCasterPass._clearColor = new engineMath.Color(1, 1, 1, 1);
17313
+ })();
17314
+ (function() {
17315
+ CascadedShadowCasterPass._tempVector = new engineMath.Vector3();
17316
+ })();
17317
+ (function() {
17318
+ CascadedShadowCasterPass._tempMatrix0 = new engineMath.Matrix();
17319
+ })();
17066
17320
 
17067
17321
  var passNum = 0;
17068
17322
  /**
@@ -17295,7 +17549,7 @@ var passNum = 0;
17295
17549
  renderer._prepareRender(context);
17296
17550
  }
17297
17551
  };
17298
- _createClass(BasicRenderPipeline, [
17552
+ _create_class(BasicRenderPipeline, [
17299
17553
  {
17300
17554
  key: "defaultRenderPass",
17301
17555
  get: /**
@@ -17307,15 +17561,25 @@ var passNum = 0;
17307
17561
  ]);
17308
17562
  return BasicRenderPipeline;
17309
17563
  }();
17310
- BasicRenderPipeline._tempVector0 = new engineMath.Vector3();
17311
- BasicRenderPipeline._tempVector1 = new engineMath.Vector3();
17564
+ (function() {
17565
+ BasicRenderPipeline._tempVector0 = new engineMath.Vector3();
17566
+ })();
17567
+ (function() {
17568
+ BasicRenderPipeline._tempVector1 = new engineMath.Vector3();
17569
+ })();
17312
17570
 
17313
17571
  var _Camera;
17314
17572
  var MathTemp = function MathTemp() {
17315
17573
  };
17316
- MathTemp.tempVec4 = new engineMath.Vector4();
17317
- MathTemp.tempVec3 = new engineMath.Vector3();
17318
- MathTemp.tempVec2 = new engineMath.Vector2();
17574
+ (function() {
17575
+ MathTemp.tempVec4 = new engineMath.Vector4();
17576
+ })();
17577
+ (function() {
17578
+ MathTemp.tempVec3 = new engineMath.Vector3();
17579
+ })();
17580
+ (function() {
17581
+ MathTemp.tempVec2 = new engineMath.Vector2();
17582
+ })();
17319
17583
  exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17320
17584
  _inherits(Camera1, Component);
17321
17585
  function Camera1(entity) {
@@ -17333,6 +17597,8 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17333
17597
  * @remarks Support bit manipulation, corresponding to `Layer`.
17334
17598
  */ _this.cullingMask = exports.Layer.Everything;
17335
17599
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
17600
+ /** @internal */ _this._frustum = new engineMath.BoundingFrustum();
17601
+ /** @internal */ _this._virtualCamera = new VirtualCamera();
17336
17602
  _this._isProjMatSetting = false;
17337
17603
  _this._nearClipPlane = 0.1;
17338
17604
  _this._farClipPlane = 100;
@@ -17343,8 +17609,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17343
17609
  _this._isFrustumProjectDirty = true;
17344
17610
  _this._customAspectRatio = undefined;
17345
17611
  _this._renderTarget = null;
17346
- /** @internal */ _this._frustum = new engineMath.BoundingFrustum();
17347
- /** @internal */ _this._virtualCamera = new VirtualCamera();
17348
17612
  _this._viewport = new engineMath.Vector4(0, 0, 1, 1);
17349
17613
  _this._inverseProjectionMatrix = new engineMath.Matrix();
17350
17614
  _this._lastAspectSize = new engineMath.Vector2(0, 0);
@@ -17354,7 +17618,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17354
17618
  _this._isViewMatrixDirty = transform.registerWorldChangeFlag();
17355
17619
  _this._isInvViewProjDirty = transform.registerWorldChangeFlag();
17356
17620
  _this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
17357
- _this._renderPipeline = new BasicRenderPipeline(_assertThisInitialized(_this));
17621
+ _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
17358
17622
  _this.shaderData._addRefCount(1);
17359
17623
  return _this;
17360
17624
  }
@@ -17571,7 +17835,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17571
17835
  }
17572
17836
  return this._inverseProjectionMatrix;
17573
17837
  };
17574
- _createClass(Camera1, [
17838
+ _create_class(Camera1, [
17575
17839
  {
17576
17840
  key: "nearClipPlane",
17577
17841
  get: /**
@@ -17735,7 +17999,11 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17735
17999
  }
17736
18000
  ]);
17737
18001
  return Camera1;
17738
- }(Component), /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat"), /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos"), _Camera);
18002
+ }(Component), function() {
18003
+ /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat");
18004
+ }(), function() {
18005
+ /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
18006
+ }(), _Camera);
17739
18007
  __decorate([
17740
18008
  deepClone
17741
18009
  ], exports.Camera.prototype, "_frustum", void 0);
@@ -17946,7 +18214,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
17946
18214
  };
17947
18215
  return Loader;
17948
18216
  }();
17949
- Loader._engineObjects = {};
18217
+ (function() {
18218
+ Loader._engineObjects = {};
18219
+ })();
17950
18220
 
17951
18221
  /**
17952
18222
  * Asset Type.
@@ -18099,7 +18369,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18099
18369
  target._isTransparent = this._isTransparent;
18100
18370
  target._blendMode = this._blendMode;
18101
18371
  };
18102
- _createClass(BaseMaterial, [
18372
+ _create_class(BaseMaterial, [
18103
18373
  {
18104
18374
  key: "shader",
18105
18375
  get: /**
@@ -18199,19 +18469,45 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18199
18469
  ]);
18200
18470
  return BaseMaterial;
18201
18471
  }(Material);
18202
- BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18203
- BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18204
- BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18205
- BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18206
- BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18207
- BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18208
- BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18209
- BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18210
- BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18211
- BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18212
- BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18213
- BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18214
- BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18472
+ (function() {
18473
+ BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18474
+ })();
18475
+ (function() {
18476
+ BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18477
+ })();
18478
+ (function() {
18479
+ BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18480
+ })();
18481
+ (function() {
18482
+ BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18483
+ })();
18484
+ (function() {
18485
+ BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18486
+ })();
18487
+ (function() {
18488
+ BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18489
+ })();
18490
+ (function() {
18491
+ BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18492
+ })();
18493
+ (function() {
18494
+ BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18495
+ })();
18496
+ (function() {
18497
+ BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18498
+ })();
18499
+ (function() {
18500
+ BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18501
+ })();
18502
+ (function() {
18503
+ BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18504
+ })();
18505
+ (function() {
18506
+ BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18507
+ })();
18508
+ (function() {
18509
+ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18510
+ })();
18215
18511
 
18216
18512
  /**
18217
18513
  * Blinn-phong Material.
@@ -18239,7 +18535,7 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18239
18535
  this.cloneTo(dest);
18240
18536
  return dest;
18241
18537
  };
18242
- _createClass(BlinnPhongMaterial, [
18538
+ _create_class(BlinnPhongMaterial, [
18243
18539
  {
18244
18540
  key: "baseColor",
18245
18541
  get: /**
@@ -18385,9 +18681,15 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18385
18681
  ]);
18386
18682
  return BlinnPhongMaterial;
18387
18683
  }(BaseMaterial);
18388
- BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18389
- BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18390
- BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
18684
+ (function() {
18685
+ BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18686
+ })();
18687
+ (function() {
18688
+ BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18689
+ })();
18690
+ (function() {
18691
+ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
18692
+ })();
18391
18693
 
18392
18694
  /**
18393
18695
  * Texture UV coordinate.
@@ -18423,7 +18725,7 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18423
18725
  shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
18424
18726
  return _this;
18425
18727
  }
18426
- _createClass(PBRBaseMaterial, [
18728
+ _create_class(PBRBaseMaterial, [
18427
18729
  {
18428
18730
  key: "baseColor",
18429
18731
  get: /**
@@ -18647,14 +18949,30 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18647
18949
  ]);
18648
18950
  return PBRBaseMaterial;
18649
18951
  }(BaseMaterial);
18650
- PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18651
- PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18652
- PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18653
- PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18654
- PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18655
- PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18656
- PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18657
- PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
18952
+ (function() {
18953
+ PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18954
+ })();
18955
+ (function() {
18956
+ PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18957
+ })();
18958
+ (function() {
18959
+ PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18960
+ })();
18961
+ (function() {
18962
+ PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18963
+ })();
18964
+ (function() {
18965
+ PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18966
+ })();
18967
+ (function() {
18968
+ PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18969
+ })();
18970
+ (function() {
18971
+ PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18972
+ })();
18973
+ (function() {
18974
+ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
18975
+ })();
18658
18976
 
18659
18977
  /**
18660
18978
  * PBR (Metallic-Roughness Workflow) Material.
@@ -18675,7 +18993,7 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18675
18993
  this.cloneTo(dest);
18676
18994
  return dest;
18677
18995
  };
18678
- _createClass(PBRMaterial, [
18996
+ _create_class(PBRMaterial, [
18679
18997
  {
18680
18998
  key: "metallic",
18681
18999
  get: /**
@@ -18718,9 +19036,15 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18718
19036
  ]);
18719
19037
  return PBRMaterial;
18720
19038
  }(PBRBaseMaterial);
18721
- PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
18722
- PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
18723
- PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
19039
+ (function() {
19040
+ PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
19041
+ })();
19042
+ (function() {
19043
+ PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
19044
+ })();
19045
+ (function() {
19046
+ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
19047
+ })();
18724
19048
 
18725
19049
  /**
18726
19050
  * PBR (Specular-Glossiness Workflow) Material.
@@ -18741,7 +19065,7 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18741
19065
  this.cloneTo(dest);
18742
19066
  return dest;
18743
19067
  };
18744
- _createClass(PBRSpecularMaterial, [
19068
+ _create_class(PBRSpecularMaterial, [
18745
19069
  {
18746
19070
  key: "specularColor",
18747
19071
  get: /**
@@ -18787,10 +19111,18 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18787
19111
  ]);
18788
19112
  return PBRSpecularMaterial;
18789
19113
  }(PBRBaseMaterial);
18790
- PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
18791
- PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
18792
- PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
18793
- PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19114
+ (function() {
19115
+ PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
19116
+ })();
19117
+ (function() {
19118
+ PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
19119
+ })();
19120
+ (function() {
19121
+ PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
19122
+ })();
19123
+ (function() {
19124
+ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19125
+ })();
18794
19126
 
18795
19127
  /**
18796
19128
  * Unlit Material.
@@ -18814,7 +19146,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
18814
19146
  this.cloneTo(dest);
18815
19147
  return dest;
18816
19148
  };
18817
- _createClass(UnlitMaterial, [
19149
+ _create_class(UnlitMaterial, [
18818
19150
  {
18819
19151
  key: "baseColor",
18820
19152
  get: /**
@@ -18948,7 +19280,7 @@ exports.TextVerticalAlignment = void 0;
18948
19280
  this._sprites = null;
18949
19281
  this._spriteNamesToIndex = null;
18950
19282
  };
18951
- _createClass(SpriteAtlas, [
19283
+ _create_class(SpriteAtlas, [
18952
19284
  {
18953
19285
  key: "sprites",
18954
19286
  get: /**
@@ -19119,7 +19451,7 @@ exports.TextVerticalAlignment = void 0;
19119
19451
  }
19120
19452
  this._updateFlagManager.dispatch(type);
19121
19453
  };
19122
- _createClass(Sprite, [
19454
+ _create_class(Sprite, [
19123
19455
  {
19124
19456
  key: "texture",
19125
19457
  get: /**
@@ -19408,7 +19740,9 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
19408
19740
  };
19409
19741
  SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
19410
19742
  return SlicedSpriteAssembler1;
19411
- }(), _SlicedSpriteAssembler._worldMatrix = new engineMath.Matrix(), _SlicedSpriteAssembler);
19743
+ }(), function() {
19744
+ _SlicedSpriteAssembler._worldMatrix = new engineMath.Matrix();
19745
+ }(), _SlicedSpriteAssembler);
19412
19746
  SlicedSpriteAssembler = __decorate([
19413
19747
  StaticInterfaceImplement()
19414
19748
  ], SlicedSpriteAssembler);
@@ -19431,7 +19765,7 @@ SlicedSpriteAssembler = __decorate([
19431
19765
  _this._renderData = new RenderData2D(4, [], [], null, _this._color);
19432
19766
  _this.drawMode = exports.SpriteDrawMode.Simple;
19433
19767
  _this.setMaterial(_this._engine._spriteDefaultMaterial);
19434
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
19768
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
19435
19769
  return _this;
19436
19770
  }
19437
19771
  var _proto = SpriteRenderer.prototype;
@@ -19536,7 +19870,7 @@ SlicedSpriteAssembler = __decorate([
19536
19870
  break;
19537
19871
  }
19538
19872
  };
19539
- _createClass(SpriteRenderer, [
19873
+ _create_class(SpriteRenderer, [
19540
19874
  {
19541
19875
  key: "drawMode",
19542
19876
  get: /**
@@ -19685,7 +20019,9 @@ SlicedSpriteAssembler = __decorate([
19685
20019
  ]);
19686
20020
  return SpriteRenderer;
19687
20021
  }(exports.Renderer);
19688
- /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20022
+ (function() {
20023
+ /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20024
+ })();
19689
20025
  __decorate([
19690
20026
  ignoreClone
19691
20027
  ], SpriteRenderer.prototype, "_renderData", void 0);
@@ -19742,14 +20078,16 @@ var /**
19742
20078
  ];
19743
20079
  this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
19744
20080
  };
19745
- CharRenderData.triangles = [
19746
- 0,
19747
- 2,
19748
- 1,
19749
- 2,
19750
- 0,
19751
- 3
19752
- ];
20081
+ (function() {
20082
+ CharRenderData.triangles = [
20083
+ 0,
20084
+ 2,
20085
+ 1,
20086
+ 2,
20087
+ 0,
20088
+ 3
20089
+ ];
20090
+ })();
19753
20091
 
19754
20092
  /**
19755
20093
  * @internal
@@ -20073,23 +20411,37 @@ CharRenderData.triangles = [
20073
20411
  };
20074
20412
  return TextUtils;
20075
20413
  }();
20076
- /** @internal */ TextUtils._genericFontFamilies = [
20077
- "serif",
20078
- "sans-serif",
20079
- "monospace",
20080
- "cursive",
20081
- "fantasy",
20082
- "system-ui",
20083
- "math",
20084
- "emoji",
20085
- "fangsong"
20086
- ];
20087
- /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20088
- TextUtils._measureBaseline = "M";
20089
- TextUtils._heightMultiplier = 2;
20090
- TextUtils._baselineMultiplier = 1.4;
20091
- TextUtils._fontSizeInfoCache = {};
20092
- TextUtils._textContext = null;
20414
+ (function() {
20415
+ /** @internal */ TextUtils._genericFontFamilies = [
20416
+ "serif",
20417
+ "sans-serif",
20418
+ "monospace",
20419
+ "cursive",
20420
+ "fantasy",
20421
+ "system-ui",
20422
+ "math",
20423
+ "emoji",
20424
+ "fangsong"
20425
+ ];
20426
+ })();
20427
+ (function() {
20428
+ /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20429
+ })();
20430
+ (function() {
20431
+ TextUtils._measureBaseline = "M";
20432
+ })();
20433
+ (function() {
20434
+ TextUtils._heightMultiplier = 2;
20435
+ })();
20436
+ (function() {
20437
+ TextUtils._baselineMultiplier = 1.4;
20438
+ })();
20439
+ (function() {
20440
+ TextUtils._fontSizeInfoCache = {};
20441
+ })();
20442
+ (function() {
20443
+ TextUtils._textContext = null;
20444
+ })();
20093
20445
 
20094
20446
  /**
20095
20447
  * Renders a text for 2D graphics.
@@ -20116,7 +20468,7 @@ TextUtils._textContext = null;
20116
20468
  _this._overflowMode = exports.OverflowMode.Overflow;
20117
20469
  _this._maskInteraction = exports.SpriteMaskInteraction.None;
20118
20470
  _this._maskLayer = exports.SpriteMaskLayer.Layer0;
20119
- var engine = _assertThisInitialized(_this).engine;
20471
+ var engine = _assert_this_initialized(_this).engine;
20120
20472
  _this._font = engine._textDefaultFont;
20121
20473
  _this._font._addRefCount(1);
20122
20474
  _this.setMaterial(engine._spriteDefaultMaterial);
@@ -20355,7 +20707,7 @@ TextUtils._textContext = null;
20355
20707
  Renderer.prototype._onTransformChanged.call(this, bit);
20356
20708
  this._setDirtyFlagTrue(0x4 | 0x8);
20357
20709
  };
20358
- _createClass(TextRenderer, [
20710
+ _create_class(TextRenderer, [
20359
20711
  {
20360
20712
  key: "color",
20361
20713
  get: /**
@@ -20568,9 +20920,15 @@ TextUtils._textContext = null;
20568
20920
  ]);
20569
20921
  return TextRenderer;
20570
20922
  }(exports.Renderer);
20571
- TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20572
- TextRenderer._tempVec30 = new engineMath.Vector3();
20573
- TextRenderer._tempVec31 = new engineMath.Vector3();
20923
+ (function() {
20924
+ TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20925
+ })();
20926
+ (function() {
20927
+ TextRenderer._tempVec30 = new engineMath.Vector3();
20928
+ })();
20929
+ (function() {
20930
+ TextRenderer._tempVec31 = new engineMath.Vector3();
20931
+ })();
20574
20932
  __decorate([
20575
20933
  assignmentClone
20576
20934
  ], TextRenderer.prototype, "_subFont", void 0);
@@ -20787,7 +21145,9 @@ var DirtyFlag;
20787
21145
  };
20788
21146
  return AnimationCurveOwner;
20789
21147
  }();
20790
- AnimationCurveOwner._assemblerMap = new Map();
21148
+ (function() {
21149
+ AnimationCurveOwner._assemblerMap = new Map();
21150
+ })();
20791
21151
 
20792
21152
  /**
20793
21153
  * @internal
@@ -20961,7 +21321,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
20961
21321
  }
20962
21322
  }
20963
21323
  };
20964
- _createClass(AnimationClip, [
21324
+ _create_class(AnimationClip, [
20965
21325
  {
20966
21326
  key: "events",
20967
21327
  get: /**
@@ -21109,7 +21469,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21109
21469
  var result = this._evaluate(time, evaluateData);
21110
21470
  return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
21111
21471
  };
21112
- _createClass(AnimationCurve, [
21472
+ _create_class(AnimationCurve, [
21113
21473
  {
21114
21474
  key: "interpolation",
21115
21475
  get: /**
@@ -21219,7 +21579,11 @@ exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Ani
21219
21579
  return out;
21220
21580
  };
21221
21581
  return AnimationArrayCurve;
21222
- }(AnimationCurve), /** @internal */ _AnimationArrayCurve._isReferenceType = true, /** @internal */ _AnimationArrayCurve._isInterpolationType = true, _AnimationArrayCurve);
21582
+ }(AnimationCurve), function() {
21583
+ /** @internal */ _AnimationArrayCurve._isReferenceType = true;
21584
+ }(), function() {
21585
+ /** @internal */ _AnimationArrayCurve._isInterpolationType = true;
21586
+ }(), _AnimationArrayCurve);
21223
21587
  exports.AnimationArrayCurve = __decorate([
21224
21588
  StaticInterfaceImplement()
21225
21589
  ], exports.AnimationArrayCurve);
@@ -21272,7 +21636,11 @@ exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Anima
21272
21636
  return frame.value;
21273
21637
  };
21274
21638
  return AnimationBoolCurve;
21275
- }(AnimationCurve), /** @internal */ _AnimationBoolCurve._isReferenceType = false, /** @internal */ _AnimationBoolCurve._isInterpolationType = false, _AnimationBoolCurve);
21639
+ }(AnimationCurve), function() {
21640
+ /** @internal */ _AnimationBoolCurve._isReferenceType = false;
21641
+ }(), function() {
21642
+ /** @internal */ _AnimationBoolCurve._isInterpolationType = false;
21643
+ }(), _AnimationBoolCurve);
21276
21644
  exports.AnimationBoolCurve = __decorate([
21277
21645
  StaticInterfaceImplement()
21278
21646
  ], exports.AnimationBoolCurve);
@@ -21365,7 +21733,11 @@ exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Ani
21365
21733
  return out;
21366
21734
  };
21367
21735
  return AnimationColorCurve;
21368
- }(AnimationCurve), /** @internal */ _AnimationColorCurve._isReferenceType = true, /** @internal */ _AnimationColorCurve._isInterpolationType = true, _AnimationColorCurve);
21736
+ }(AnimationCurve), function() {
21737
+ /** @internal */ _AnimationColorCurve._isReferenceType = true;
21738
+ }(), function() {
21739
+ /** @internal */ _AnimationColorCurve._isInterpolationType = true;
21740
+ }(), _AnimationColorCurve);
21369
21741
  exports.AnimationColorCurve = __decorate([
21370
21742
  StaticInterfaceImplement()
21371
21743
  ], exports.AnimationColorCurve);
@@ -21461,7 +21833,11 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
21461
21833
  return out;
21462
21834
  };
21463
21835
  return AnimationFloatArrayCurve;
21464
- }(AnimationCurve), /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true, /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true, _AnimationFloatArrayCurve);
21836
+ }(AnimationCurve), function() {
21837
+ /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true;
21838
+ }(), function() {
21839
+ /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
21840
+ }(), _AnimationFloatArrayCurve);
21465
21841
  exports.AnimationFloatArrayCurve = __decorate([
21466
21842
  StaticInterfaceImplement()
21467
21843
  ], exports.AnimationFloatArrayCurve);
@@ -21526,7 +21902,11 @@ exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Ani
21526
21902
  }
21527
21903
  };
21528
21904
  return AnimationFloatCurve;
21529
- }(AnimationCurve), /** @internal */ _AnimationFloatCurve._isReferenceType = false, /** @internal */ _AnimationFloatCurve._isInterpolationType = true, _AnimationFloatCurve);
21905
+ }(AnimationCurve), function() {
21906
+ /** @internal */ _AnimationFloatCurve._isReferenceType = false;
21907
+ }(), function() {
21908
+ /** @internal */ _AnimationFloatCurve._isInterpolationType = true;
21909
+ }(), _AnimationFloatCurve);
21530
21910
  exports.AnimationFloatCurve = __decorate([
21531
21911
  StaticInterfaceImplement()
21532
21912
  ], exports.AnimationFloatCurve);
@@ -21624,7 +22004,13 @@ exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ fu
21624
22004
  return out;
21625
22005
  };
21626
22006
  return AnimationQuaternionCurve1;
21627
- }(AnimationCurve), /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true, /** @internal */ _AnimationQuaternionCurve._isReferenceType = true, /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new engineMath.Quaternion(), _AnimationQuaternionCurve);
22007
+ }(AnimationCurve), function() {
22008
+ /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true;
22009
+ }(), function() {
22010
+ /** @internal */ _AnimationQuaternionCurve._isReferenceType = true;
22011
+ }(), function() {
22012
+ /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new engineMath.Quaternion();
22013
+ }(), _AnimationQuaternionCurve);
21628
22014
  exports.AnimationQuaternionCurve = __decorate([
21629
22015
  StaticInterfaceImplement()
21630
22016
  ], exports.AnimationQuaternionCurve);
@@ -21705,7 +22091,11 @@ exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function
21705
22091
  return out;
21706
22092
  };
21707
22093
  return AnimationVector2Curve;
21708
- }(AnimationCurve), /** @internal */ _AnimationVector2Curve._isReferenceType = true, /** @internal */ _AnimationVector2Curve._isInterpolationType = true, _AnimationVector2Curve);
22094
+ }(AnimationCurve), function() {
22095
+ /** @internal */ _AnimationVector2Curve._isReferenceType = true;
22096
+ }(), function() {
22097
+ /** @internal */ _AnimationVector2Curve._isInterpolationType = true;
22098
+ }(), _AnimationVector2Curve);
21709
22099
  exports.AnimationVector2Curve = __decorate([
21710
22100
  StaticInterfaceImplement()
21711
22101
  ], exports.AnimationVector2Curve);
@@ -21798,7 +22188,11 @@ exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function
21798
22188
  return out;
21799
22189
  };
21800
22190
  return AnimationVector3Curve;
21801
- }(AnimationCurve), /** @internal */ _AnimationVector3Curve._isReferenceType = true, /** @internal */ _AnimationVector3Curve._isInterpolationType = true, _AnimationVector3Curve);
22191
+ }(AnimationCurve), function() {
22192
+ /** @internal */ _AnimationVector3Curve._isReferenceType = true;
22193
+ }(), function() {
22194
+ /** @internal */ _AnimationVector3Curve._isInterpolationType = true;
22195
+ }(), _AnimationVector3Curve);
21802
22196
  exports.AnimationVector3Curve = __decorate([
21803
22197
  StaticInterfaceImplement()
21804
22198
  ], exports.AnimationVector3Curve);
@@ -21891,7 +22285,11 @@ exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function
21891
22285
  return out;
21892
22286
  };
21893
22287
  return AnimationVector4Curve;
21894
- }(AnimationCurve), /** @internal */ _AnimationVector4Curve._isReferenceType = true, /** @internal */ _AnimationVector4Curve._isInterpolationType = true, _AnimationVector4Curve);
22288
+ }(AnimationCurve), function() {
22289
+ /** @internal */ _AnimationVector4Curve._isReferenceType = true;
22290
+ }(), function() {
22291
+ /** @internal */ _AnimationVector4Curve._isInterpolationType = true;
22292
+ }(), _AnimationVector4Curve);
21895
22293
  exports.AnimationVector4Curve = __decorate([
21896
22294
  StaticInterfaceImplement()
21897
22295
  ], exports.AnimationVector4Curve);
@@ -22607,7 +23005,7 @@ exports.AnimatorLayerBlendingMode = void 0;
22607
23005
  }
22608
23006
  }
22609
23007
  };
22610
- _createClass(Animator, [
23008
+ _create_class(Animator, [
22611
23009
  {
22612
23010
  key: "animatorController",
22613
23011
  get: /**
@@ -22698,7 +23096,7 @@ __decorate([
22698
23096
  */ _proto._registerChangeFlag = function _registerChangeFlag() {
22699
23097
  return this._updateFlagManager.createFlag(BoolUpdateFlag);
22700
23098
  };
22701
- _createClass(AnimatorController, [
23099
+ _create_class(AnimatorController, [
22702
23100
  {
22703
23101
  key: "layers",
22704
23102
  get: /**
@@ -22832,7 +23230,7 @@ __decorate([
22832
23230
  index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
22833
23231
  }
22834
23232
  };
22835
- _createClass(AnimatorState, [
23233
+ _create_class(AnimatorState, [
22836
23234
  {
22837
23235
  key: "transitions",
22838
23236
  get: /**
@@ -22964,7 +23362,7 @@ exports.AnimatorConditionMode = void 0;
22964
23362
  _this.shaderData.setVector4("u_cubeDecodeParam", _this._decodeParam);
22965
23363
  return _this;
22966
23364
  }
22967
- _createClass(SkyBoxMaterial, [
23365
+ _create_class(SkyBoxMaterial, [
22968
23366
  {
22969
23367
  key: "textureDecodeRGBM",
22970
23368
  get: /**
@@ -23063,7 +23461,7 @@ exports.ParticleRendererBlendMode = void 0;
23063
23461
  _this._isFadeOut = false;
23064
23462
  _this._playOnEnable = true;
23065
23463
  _this._blendMode = 0;
23066
- _this._onColorChanged = _this._onColorChanged.bind(_assertThisInitialized(_this));
23464
+ _this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
23067
23465
  //@ts-ignore
23068
23466
  _this._color._onValueChanged = _this._onColorChanged;
23069
23467
  _this.setMaterial(_this._createMaterial());
@@ -23340,7 +23738,7 @@ exports.ParticleRendererBlendMode = void 0;
23340
23738
  ParticleRenderer._getRandom = function _getRandom() {
23341
23739
  return Math.random() - 0.5;
23342
23740
  };
23343
- _createClass(ParticleRenderer, [
23741
+ _create_class(ParticleRenderer, [
23344
23742
  {
23345
23743
  key: "texture",
23346
23744
  get: /**
@@ -23771,7 +24169,9 @@ exports.ParticleRendererBlendMode = void 0;
23771
24169
  ]);
23772
24170
  return ParticleRenderer;
23773
24171
  }(MeshRenderer);
23774
- /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24172
+ (function() {
24173
+ /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24174
+ })();
23775
24175
  __decorate([
23776
24176
  ignoreClone
23777
24177
  ], ParticleRenderer.prototype, "_onColorChanged", null);
@@ -24041,7 +24441,7 @@ var _tempVector3 = new engineMath.Vector3();
24041
24441
  this._camera.renderTarget = this._oriCameraRenderTarget;
24042
24442
  this._camera.cullingMask = this._oriCameraCullingMask;
24043
24443
  };
24044
- _createClass(Probe, [
24444
+ _create_class(Probe, [
24045
24445
  {
24046
24446
  key: "_texture",
24047
24447
  get: function get() {