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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -7483,8 +7521,6 @@ var transform_declare = "#define GLSLIFY 1\nuniform mat4 u_localMat;uniform mat4
7483
7521
 
7484
7522
  var color_share = "#define GLSLIFY 1\n#ifdef O3_HAS_VERTEXCOLOR\nvarying vec4 v_color;\n#endif\n"; // eslint-disable-line
7485
7523
 
7486
- var RendererFragmentDeclaration = "#define GLSLIFY 1\nuniform highp ivec4 oasis_RendererLayer;"; // eslint-disable-line
7487
-
7488
7524
  var FogFragmentDeclaration = "#define GLSLIFY 1\n#if OASIS_FOG_MODE != 0\nvarying vec3 v_positionVS;uniform vec4 oasis_FogColor;uniform vec4 oasis_FogParams;float ComputeFogIntensity(float fogDepth){\n#if OASIS_FOG_MODE == 1\nreturn clamp(fogDepth*oasis_FogParams.x+oasis_FogParams.y,0.0,1.0);\n#elif OASIS_FOG_MODE == 2\nreturn clamp(exp2(-fogDepth*oasis_FogParams.z),0.0,1.0);\n#elif OASIS_FOG_MODE == 3\nfloat factor=fogDepth*oasis_FogParams.w;return clamp(exp2(-factor*factor),0.0,1.0);\n#endif\n}\n#endif\n"; // eslint-disable-line
7489
7525
 
7490
7526
  var FogVertexDeclaration = "#define GLSLIFY 1\n#if OASIS_FOG_MODE != 0\nvarying vec3 v_positionVS;\n#endif\n"; // eslint-disable-line
@@ -7519,7 +7555,7 @@ var worldpos_vert = "#define GLSLIFY 1\n#ifdef O3_NEED_WORLDPOS\nvec4 temp_pos=u
7519
7555
 
7520
7556
  var FogFragment = "#define GLSLIFY 1\n#if OASIS_FOG_MODE != 0\nfloat fogIntensity=ComputeFogIntensity(length(v_positionVS));gl_FragColor.rgb=mix(oasis_FogColor.rgb,gl_FragColor.rgb,fogIntensity);\n#endif\n"; // eslint-disable-line
7521
7557
 
7522
- var light_frag_define = "#define GLSLIFY 1\n#ifdef O3_DIRECT_LIGHT_COUNT\nstruct DirectLight{vec3 color;vec3 direction;};uniform ivec2 u_directLightCullingMask[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightColor[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightDirection[O3_DIRECT_LIGHT_COUNT];\n#endif\n#ifdef O3_POINT_LIGHT_COUNT\nstruct PointLight{vec3 color;vec3 position;float distance;};uniform ivec2 u_pointLightCullingMask[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightColor[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightPosition[O3_POINT_LIGHT_COUNT];uniform float u_pointLightDistance[O3_POINT_LIGHT_COUNT];\n#endif\n#ifdef O3_SPOT_LIGHT_COUNT\nstruct SpotLight{vec3 color;vec3 position;vec3 direction;float distance;float angleCos;float penumbraCos;};uniform ivec2 u_spotLightCullingMask[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightColor[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightPosition[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightDirection[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightDistance[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightAngleCos[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightPenumbraCos[O3_SPOT_LIGHT_COUNT];\n#endif\nstruct EnvMapLight{vec3 diffuse;float mipMapLevel;float diffuseIntensity;float specularIntensity;};uniform EnvMapLight u_envMapLight;\n#ifdef O3_USE_SH\nuniform vec3 u_env_sh[9];\n#endif\n#ifdef O3_USE_SPECULAR_ENV\nuniform samplerCube u_env_specularSampler;\n#endif\n#ifndef GRAPHICS_API_WEBGL2\nbool isBitSet(float value,float mask,float bitIndex){return mod(floor(value/pow(2.0,bitIndex)),2.0)==1.0&&mod(floor(mask/pow(2.0,bitIndex)),2.0)==1.0;}\n#endif\nbool isRendererCulledByLight(ivec2 rendererLayer,ivec2 lightCullingMask){\n#ifdef GRAPHICS_API_WEBGL2\nreturn!((rendererLayer.x&lightCullingMask.x)!=0||(rendererLayer.y&lightCullingMask.y)!=0);\n#else\nfor(int i=0;i<16;i++){if(isBitSet(float(rendererLayer.x),float(lightCullingMask.x),float(i))||isBitSet(float(rendererLayer.y),float(lightCullingMask.y),float(i))){return false;}}return true;\n#endif\n}"; // eslint-disable-line
7558
+ var light_frag_define = "#define GLSLIFY 1\n#ifdef O3_DIRECT_LIGHT_COUNT\nstruct DirectLight{vec3 color;vec3 direction;};uniform ivec2 u_directLightCullingMask[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightColor[O3_DIRECT_LIGHT_COUNT];uniform vec3 u_directLightDirection[O3_DIRECT_LIGHT_COUNT];\n#endif\n#ifdef O3_POINT_LIGHT_COUNT\nstruct PointLight{vec3 color;vec3 position;float distance;};uniform ivec2 u_pointLightCullingMask[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightColor[O3_POINT_LIGHT_COUNT];uniform vec3 u_pointLightPosition[O3_POINT_LIGHT_COUNT];uniform float u_pointLightDistance[O3_POINT_LIGHT_COUNT];\n#endif\n#ifdef O3_SPOT_LIGHT_COUNT\nstruct SpotLight{vec3 color;vec3 position;vec3 direction;float distance;float angleCos;float penumbraCos;};uniform ivec2 u_spotLightCullingMask[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightColor[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightPosition[O3_SPOT_LIGHT_COUNT];uniform vec3 u_spotLightDirection[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightDistance[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightAngleCos[O3_SPOT_LIGHT_COUNT];uniform float u_spotLightPenumbraCos[O3_SPOT_LIGHT_COUNT];\n#endif\nstruct EnvMapLight{vec3 diffuse;float mipMapLevel;float diffuseIntensity;float specularIntensity;};uniform EnvMapLight u_envMapLight;uniform ivec4 oasis_RendererLayer;\n#ifdef O3_USE_SH\nuniform vec3 u_env_sh[9];\n#endif\n#ifdef O3_USE_SPECULAR_ENV\nuniform samplerCube u_env_specularSampler;\n#endif\n#ifndef GRAPHICS_API_WEBGL2\nbool isBitSet(float value,float mask,float bitIndex){return mod(floor(value/pow(2.0,bitIndex)),2.0)==1.0&&mod(floor(mask/pow(2.0,bitIndex)),2.0)==1.0;}\n#endif\nbool isRendererCulledByLight(ivec2 rendererLayer,ivec2 lightCullingMask){\n#ifdef GRAPHICS_API_WEBGL2\nreturn!((rendererLayer.x&lightCullingMask.x)!=0||(rendererLayer.y&lightCullingMask.y)!=0);\n#else\nfor(int i=0;i<16;i++){if(isBitSet(float(rendererLayer.x),float(lightCullingMask.x),float(i))||isBitSet(float(rendererLayer.y),float(lightCullingMask.y),float(i))){return false;}}return true;\n#endif\n}"; // eslint-disable-line
7523
7559
 
7524
7560
  var mobile_material_frag = "#define GLSLIFY 1\nuniform vec4 u_emissiveColor;uniform vec4 u_baseColor;uniform vec4 u_specularColor;uniform float u_shininess;uniform float u_normalIntensity;uniform float u_alphaCutoff;\n#ifdef EMISSIVETEXTURE\nuniform sampler2D u_emissiveTexture;\n#endif\n#ifdef BASETEXTURE\nuniform sampler2D u_baseTexture;\n#endif\n#ifdef O3_SPECULAR_TEXTURE\nuniform sampler2D u_specularTexture;\n#endif\n#ifdef NORMALTEXTURE\nuniform sampler2D u_normalTexture;\n#endif\n"; // eslint-disable-line
7525
7561
 
@@ -7611,7 +7647,6 @@ var ShaderLib = _extends({
7611
7647
  normal_share: normal_share,
7612
7648
  uv_share: uv_share,
7613
7649
  worldpos_share: worldpos_share,
7614
- RendererFragmentDeclaration: RendererFragmentDeclaration,
7615
7650
  FogVertexDeclaration: FogVertexDeclaration,
7616
7651
  FogFragmentDeclaration: FogFragmentDeclaration,
7617
7652
  begin_normal_vert: begin_normal_vert,
@@ -8315,7 +8350,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8315
8350
  return prefix + line;
8316
8351
  }).join("\n");
8317
8352
  };
8318
- _createClass(ShaderProgram, [
8353
+ _create_class(ShaderProgram, [
8319
8354
  {
8320
8355
  key: "isValid",
8321
8356
  get: /**
@@ -8327,7 +8362,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
8327
8362
  ]);
8328
8363
  return ShaderProgram;
8329
8364
  }();
8330
- ShaderProgram._counter = 0;
8365
+ (function() {
8366
+ ShaderProgram._counter = 0;
8367
+ })();
8331
8368
 
8332
8369
  /**
8333
8370
  * Shader pass containing vertex and fragment source.
@@ -8372,7 +8409,9 @@ ShaderProgram._counter = 0;
8372
8409
  };
8373
8410
  return ShaderPass;
8374
8411
  }();
8375
- ShaderPass._shaderPassCounter = 0;
8412
+ (function() {
8413
+ ShaderPass._shaderPassCounter = 0;
8414
+ })();
8376
8415
 
8377
8416
  /**
8378
8417
  * Shader property.
@@ -8381,7 +8420,7 @@ ShaderPass._shaderPassCounter = 0;
8381
8420
  this.name = name;
8382
8421
  this._uniqueId = ShaderProperty._propertyNameCounter++;
8383
8422
  }
8384
- _createClass(ShaderProperty, [
8423
+ _create_class(ShaderProperty, [
8385
8424
  {
8386
8425
  key: "type",
8387
8426
  get: /**
@@ -8393,7 +8432,9 @@ ShaderPass._shaderPassCounter = 0;
8393
8432
  ]);
8394
8433
  return ShaderProperty;
8395
8434
  }();
8396
- ShaderProperty._propertyNameCounter = 0;
8435
+ (function() {
8436
+ ShaderProperty._propertyNameCounter = 0;
8437
+ })();
8397
8438
 
8398
8439
  /**
8399
8440
  * Shader for rendering.
@@ -8506,7 +8547,7 @@ ShaderProperty._propertyNameCounter = 0;
8506
8547
  }
8507
8548
  }
8508
8549
  };
8509
- _createClass(Shader, [
8550
+ _create_class(Shader, [
8510
8551
  {
8511
8552
  key: "passes",
8512
8553
  get: /**
@@ -8518,18 +8559,34 @@ ShaderProperty._propertyNameCounter = 0;
8518
8559
  ]);
8519
8560
  return Shader;
8520
8561
  }();
8521
- /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8522
- /** @internal */ Shader._shaderExtension = [
8523
- "GL_EXT_shader_texture_lod",
8524
- "GL_OES_standard_derivatives",
8525
- "GL_EXT_draw_buffers"
8526
- ];
8527
- /** @internal */ Shader._propertyIdMap = Object.create(null);
8528
- Shader._shaderMap = Object.create(null);
8529
- Shader._propertyNameMap = Object.create(null);
8530
- Shader._macroMaskMap = [];
8531
- Shader._macroCounter = 0;
8532
- 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
+ })();
8533
8590
 
8534
8591
  /**
8535
8592
  * Shader data collection,Correspondence includes shader properties data and macros data.
@@ -8787,9 +8844,9 @@ Shader._macroMap = Object.create(null);
8787
8844
  /** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
8788
8845
  /** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
8789
8846
  /** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
8847
+ /** @internal */ _this._lightIndex = -1;
8790
8848
  _this._color = new engineMath.Color(1, 1, 1, 1);
8791
8849
  _this._lightColor = new engineMath.Color();
8792
- /** @internal */ _this._lightIndex = -1;
8793
8850
  return _this;
8794
8851
  }
8795
8852
  var _proto = Light.prototype;
@@ -8800,7 +8857,7 @@ Shader._macroMap = Object.create(null);
8800
8857
  this._lightColor.a = this.color.a * this.intensity;
8801
8858
  return this._lightColor;
8802
8859
  };
8803
- _createClass(Light, [
8860
+ _create_class(Light, [
8804
8861
  {
8805
8862
  key: "color",
8806
8863
  get: /**
@@ -8837,9 +8894,11 @@ Shader._macroMap = Object.create(null);
8837
8894
  ]);
8838
8895
  return Light;
8839
8896
  }(Component);
8840
- /**
8897
+ (function() {
8898
+ /**
8841
8899
  * Each type of light source is at most 10, beyond which it will not take effect.
8842
8900
  * */ Light._maxLight = 10;
8901
+ })();
8843
8902
  __decorate([
8844
8903
  ignoreClone
8845
8904
  ], Light.prototype, "_lightIndex", void 0);
@@ -8897,7 +8956,7 @@ __decorate([
8897
8956
  shaderData.setFloatArray(DirectLight._colorProperty, data.color);
8898
8957
  shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
8899
8958
  };
8900
- _createClass(DirectLight, [
8959
+ _create_class(DirectLight, [
8901
8960
  {
8902
8961
  key: "direction",
8903
8962
  get: /**
@@ -8928,14 +8987,22 @@ __decorate([
8928
8987
  ]);
8929
8988
  return DirectLight;
8930
8989
  }(Light);
8931
- DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8932
- DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8933
- DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8934
- DirectLight._combinedData = {
8935
- cullingMask: new Int32Array(Light._maxLight * 2),
8936
- color: new Float32Array(Light._maxLight * 3),
8937
- direction: new Float32Array(Light._maxLight * 3)
8938
- };
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
+ })();
8939
9006
 
8940
9007
  /**
8941
9008
  * Point light.
@@ -8992,7 +9059,7 @@ DirectLight._combinedData = {
8992
9059
  shaderData.setFloatArray(PointLight._positionProperty, data.position);
8993
9060
  shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
8994
9061
  };
8995
- _createClass(PointLight, [
9062
+ _create_class(PointLight, [
8996
9063
  {
8997
9064
  key: "position",
8998
9065
  get: /**
@@ -9013,16 +9080,26 @@ DirectLight._combinedData = {
9013
9080
  ]);
9014
9081
  return PointLight;
9015
9082
  }(Light);
9016
- PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
9017
- PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
9018
- PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9019
- PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9020
- PointLight._combinedData = {
9021
- cullingMask: new Int32Array(Light._maxLight * 2),
9022
- color: new Float32Array(Light._maxLight * 3),
9023
- position: new Float32Array(Light._maxLight * 3),
9024
- distance: new Float32Array(Light._maxLight)
9025
- };
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
+ })();
9026
9103
 
9027
9104
  /**
9028
9105
  * Spot light.
@@ -9096,7 +9173,7 @@ PointLight._combinedData = {
9096
9173
  shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
9097
9174
  shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
9098
9175
  };
9099
- _createClass(SpotLight, [
9176
+ _create_class(SpotLight, [
9100
9177
  {
9101
9178
  key: "position",
9102
9179
  get: /**
@@ -9138,22 +9215,38 @@ PointLight._combinedData = {
9138
9215
  ]);
9139
9216
  return SpotLight;
9140
9217
  }(Light);
9141
- SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9142
- SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9143
- SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9144
- SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9145
- SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9146
- SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9147
- SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9148
- SpotLight._combinedData = {
9149
- cullingMask: new Int32Array(Light._maxLight * 2),
9150
- color: new Float32Array(Light._maxLight * 3),
9151
- position: new Float32Array(Light._maxLight * 3),
9152
- direction: new Float32Array(Light._maxLight * 3),
9153
- distance: new Float32Array(Light._maxLight),
9154
- angleCos: new Float32Array(Light._maxLight),
9155
- penumbraCos: new Float32Array(Light._maxLight)
9156
- };
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
+ })();
9157
9250
 
9158
9251
  /**
9159
9252
  * Light manager.
@@ -9714,7 +9807,7 @@ SpotLight._combinedData = {
9714
9807
  /**
9715
9808
  * @override
9716
9809
  */ _proto._onDestroy = function _onDestroy() {};
9717
- _createClass(Material, [
9810
+ _create_class(Material, [
9718
9811
  {
9719
9812
  key: "shader",
9720
9813
  get: /**
@@ -9823,9 +9916,15 @@ var RenderElement = function RenderElement() {
9823
9916
  };
9824
9917
  return RenderContext;
9825
9918
  }();
9826
- /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9827
- RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9828
- 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
+ })();
9829
9928
 
9830
9929
  var SpriteElement = /*#__PURE__*/ function(RenderElement) {
9831
9930
  _inherits(SpriteElement, RenderElement);
@@ -9880,7 +9979,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9880
9979
  function Renderer1(entity) {
9881
9980
  var _this;
9882
9981
  _this = Component.call(this, entity) || this;
9883
- /** Whether cast shadow. */ _this.castShadows = true;
9884
9982
  /** ShaderData related to renderer. */ _this.shaderData = new ShaderData(ShaderDataGroup.Renderer);
9885
9983
  /** @internal */ _this._onUpdateIndex = -1;
9886
9984
  /** @internal */ _this._rendererIndex = -1;
@@ -9897,11 +9995,12 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9897
9995
  _this._priority = 0;
9898
9996
  _this._receiveShadows = true;
9899
9997
  _this._rendererLayer = new engineMath.Vector4();
9998
+ /** Whether cast shadow. */ _this.castShadows = true;
9900
9999
  var prototype = exports.Renderer.prototype;
9901
10000
  var shaderData = _this.shaderData;
9902
10001
  _this._overrideUpdate = _this.update !== prototype.update;
9903
10002
  shaderData._addRefCount(1);
9904
- _this._onTransformChanged = _this._onTransformChanged.bind(_assertThisInitialized(_this));
10003
+ _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
9905
10004
  _this._registerEntityTransformListener();
9906
10005
  shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
9907
10006
  shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
@@ -10086,7 +10185,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10086
10185
  _proto._onTransformChanged = function _onTransformChanged(type) {
10087
10186
  this._dirtyUpdateFlag |= 0x1;
10088
10187
  };
10089
- _createClass(Renderer1, [
10188
+ _create_class(Renderer1, [
10090
10189
  {
10091
10190
  key: "isCulled",
10092
10191
  get: /**
@@ -10152,7 +10251,25 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10152
10251
  }
10153
10252
  ]);
10154
10253
  return Renderer1;
10155
- }(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);
10156
10273
  __decorate([
10157
10274
  deepClone
10158
10275
  ], exports.Renderer.prototype, "shaderData", void 0);
@@ -10282,14 +10399,18 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
10282
10399
  renderUVs[3].set(right, top);
10283
10400
  };
10284
10401
  return SimpleSpriteAssembler1;
10285
- }(), _SimpleSpriteAssembler._rectangleTriangles = [
10286
- 0,
10287
- 1,
10288
- 2,
10289
- 2,
10290
- 1,
10291
- 3
10292
- ], _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);
10293
10414
  SimpleSpriteAssembler = __decorate([
10294
10415
  StaticInterfaceImplement()
10295
10416
  ], SimpleSpriteAssembler);
@@ -10374,10 +10495,10 @@ SimpleSpriteAssembler = __decorate([
10374
10495
  _this._flipY = false;
10375
10496
  _this._alphaCutoff = 0.5;
10376
10497
  _this._renderData = new RenderData2D(4, [], []);
10377
- SimpleSpriteAssembler.resetData(_assertThisInitialized(_this));
10498
+ SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
10378
10499
  _this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
10379
10500
  _this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
10380
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
10501
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
10381
10502
  return _this;
10382
10503
  }
10383
10504
  var _proto = SpriteMask.prototype;
@@ -10445,7 +10566,7 @@ SimpleSpriteAssembler = __decorate([
10445
10566
  break;
10446
10567
  }
10447
10568
  };
10448
- _createClass(SpriteMask, [
10569
+ _create_class(SpriteMask, [
10449
10570
  {
10450
10571
  key: "width",
10451
10572
  get: /**
@@ -10547,8 +10668,12 @@ SimpleSpriteAssembler = __decorate([
10547
10668
  ]);
10548
10669
  return SpriteMask;
10549
10670
  }(exports.Renderer);
10550
- /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10551
- /** @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
+ })();
10552
10677
  __decorate([
10553
10678
  assignmentClone
10554
10679
  ], SpriteMask.prototype, "influenceLayers", void 0);
@@ -10754,7 +10879,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10754
10879
  this._glElementInfo = BufferUtil._getElementInfo(this.format);
10755
10880
  this._instanceStepRate = Math.floor(instanceStepRate);
10756
10881
  }
10757
- _createClass(VertexElement, [
10882
+ _create_class(VertexElement, [
10758
10883
  {
10759
10884
  key: "semantic",
10760
10885
  get: /**
@@ -10914,7 +11039,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10914
11039
  gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
10915
11040
  this._byteLength = dataLength;
10916
11041
  };
10917
- _createClass(Buffer, [
11042
+ _create_class(Buffer, [
10918
11043
  {
10919
11044
  key: "type",
10920
11045
  get: /**
@@ -10963,7 +11088,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10963
11088
  this._buffer = buffer;
10964
11089
  this._format = format;
10965
11090
  }
10966
- _createClass(IndexBufferBinding, [
11091
+ _create_class(IndexBufferBinding, [
10967
11092
  {
10968
11093
  key: "buffer",
10969
11094
  get: /**
@@ -11012,8 +11137,8 @@ var BufferUtil = /*#__PURE__*/ function() {
11012
11137
  _this._bounds = new engineMath.BoundingBox();
11013
11138
  _this._subMeshes = [];
11014
11139
  _this.name = name;
11015
- _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assertThisInitialized(_this));
11016
- _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));
11017
11142
  var bounds = _this._bounds;
11018
11143
  // @ts-ignore
11019
11144
  bounds.min._onValueChanged = _this._onBoundsChanged;
@@ -11130,7 +11255,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11130
11255
  _proto._onBoundsChanged = function _onBoundsChanged() {
11131
11256
  this._updateFlagManager.dispatch(0x1);
11132
11257
  };
11133
- _createClass(Mesh, [
11258
+ _create_class(Mesh, [
11134
11259
  {
11135
11260
  key: "bounds",
11136
11261
  get: /**
@@ -11176,7 +11301,7 @@ var MeshModifyFlags;
11176
11301
  this._buffer = buffer;
11177
11302
  this._stride = stride;
11178
11303
  }
11179
- _createClass(VertexBufferBinding, [
11304
+ _create_class(VertexBufferBinding, [
11180
11305
  {
11181
11306
  key: "buffer",
11182
11307
  get: /**
@@ -11622,13 +11747,27 @@ var MeshModifyFlags;
11622
11747
  };
11623
11748
  return BlendShapeManager;
11624
11749
  }();
11625
- BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11626
- BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11627
- BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11628
- BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11629
- BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11630
- BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11631
- 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
+ })();
11632
11771
 
11633
11772
  /**
11634
11773
  * Vertex attribute types of a vertex in a ModelMesh.
@@ -11685,7 +11824,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
11685
11824
  _this._customVertexElements = [];
11686
11825
  _this._vertexCountChanged = false;
11687
11826
  _this.name = name;
11688
- _this._blendShapeManager = new BlendShapeManager(engine, _assertThisInitialized(_this));
11827
+ _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
11689
11828
  return _this;
11690
11829
  }
11691
11830
  var _proto = ModelMesh.prototype;
@@ -12635,7 +12774,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12635
12774
  this._uv7 = null;
12636
12775
  this._blendShapeManager._releaseMemoryCache();
12637
12776
  };
12638
- _createClass(ModelMesh, [
12777
+ _create_class(ModelMesh, [
12639
12778
  {
12640
12779
  key: "accessible",
12641
12780
  get: /**
@@ -12703,11 +12842,21 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12703
12842
  ]);
12704
12843
  return ModelMesh;
12705
12844
  }(Mesh);
12706
- ModelMesh._tempVec0 = new engineMath.Vector3();
12707
- ModelMesh._tempVec1 = new engineMath.Vector3();
12708
- ModelMesh._tempVec2 = new engineMath.Vector3();
12709
- ModelMesh._tempVec3 = new engineMath.Vector3();
12710
- 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
+ })();
12711
12860
  var VertexChangedFlags;
12712
12861
  (function(VertexChangedFlags) {
12713
12862
  VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
@@ -12750,7 +12899,7 @@ var VertexChangedFlags;
12750
12899
  function MeshRenderer(entity) {
12751
12900
  var _this;
12752
12901
  _this = Renderer.call(this, entity) || this;
12753
- _this._onMeshChanged = _this._onMeshChanged.bind(_assertThisInitialized(_this));
12902
+ _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
12754
12903
  return _this;
12755
12904
  }
12756
12905
  var _proto = MeshRenderer.prototype;
@@ -12853,7 +13002,7 @@ var VertexChangedFlags;
12853
13002
  type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
12854
13003
  type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
12855
13004
  };
12856
- _createClass(MeshRenderer, [
13005
+ _create_class(MeshRenderer, [
12857
13006
  {
12858
13007
  key: "mesh",
12859
13008
  get: /**
@@ -12870,11 +13019,21 @@ var VertexChangedFlags;
12870
13019
  ]);
12871
13020
  return MeshRenderer;
12872
13021
  }(exports.Renderer);
12873
- MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
12874
- MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
12875
- MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
12876
- MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
12877
- 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
+ })();
12878
13037
  __decorate([
12879
13038
  ignoreClone
12880
13039
  ], MeshRenderer.prototype, "_mesh", void 0);
@@ -12977,7 +13136,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
12977
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.
12978
13137
  maxVertexUniformVectors = Math.min(maxVertexUniformVectors, 256);
12979
13138
  _this._maxVertexUniformVectors = maxVertexUniformVectors;
12980
- _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assertThisInitialized(_this));
13139
+ _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
12981
13140
  var localBounds = _this._localBounds;
12982
13141
  // @ts-ignore
12983
13142
  localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
@@ -13175,7 +13334,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13175
13334
  _proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
13176
13335
  this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
13177
13336
  };
13178
- _createClass(SkinnedMeshRenderer, [
13337
+ _create_class(SkinnedMeshRenderer, [
13179
13338
  {
13180
13339
  key: "blendShapeWeights",
13181
13340
  get: /**
@@ -13240,10 +13399,18 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13240
13399
  ]);
13241
13400
  return SkinnedMeshRenderer;
13242
13401
  }(MeshRenderer);
13243
- SkinnedMeshRenderer._tempMatrix = new engineMath.Matrix();
13244
- SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13245
- SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13246
- 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
+ })();
13247
13414
  __decorate([
13248
13415
  ignoreClone
13249
13416
  ], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
@@ -14009,7 +14176,7 @@ __decorate([
14009
14176
  }
14010
14177
  this._setIndexBufferBinding(binding);
14011
14178
  };
14012
- _createClass(BufferMesh, [
14179
+ _create_class(BufferMesh, [
14013
14180
  {
14014
14181
  key: "instanceCount",
14015
14182
  get: /**
@@ -14123,7 +14290,7 @@ __decorate([
14123
14290
  this._layoutChangeManager.dispatch(0, this);
14124
14291
  }
14125
14292
  };
14126
- _createClass(BlendShape, [
14293
+ _create_class(BlendShape, [
14127
14294
  {
14128
14295
  key: "frames",
14129
14296
  get: /**
@@ -14281,8 +14448,12 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
14281
14448
  };
14282
14449
  return Basic2DBatcher;
14283
14450
  }();
14284
- /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14285
- Basic2DBatcher._canUploadSameBuffer = true;
14451
+ (function() {
14452
+ /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14453
+ })();
14454
+ (function() {
14455
+ Basic2DBatcher._canUploadSameBuffer = true;
14456
+ })();
14286
14457
 
14287
14458
  var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
14288
14459
  _inherits(SpriteMaskBatcher, Basic2DBatcher);
@@ -14497,9 +14668,15 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14497
14668
  };
14498
14669
  return Sky;
14499
14670
  }();
14500
- Sky._epsilon = 1e-6;
14501
- Sky._viewProjMatrix = new engineMath.Matrix();
14502
- 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
+ })();
14503
14680
 
14504
14681
  /**
14505
14682
  * Background of scene.
@@ -14581,7 +14758,7 @@ Sky._projectionMatrix = new engineMath.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky.
14581
14758
  mesh.addSubMesh(0, indices.length);
14582
14759
  return mesh;
14583
14760
  };
14584
- _createClass(Background, [
14761
+ _create_class(Background, [
14585
14762
  {
14586
14763
  key: "texture",
14587
14764
  get: /**
@@ -14749,7 +14926,7 @@ Sky._projectionMatrix = new engineMath.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky.
14749
14926
  out[25] = src[25] * 0.429042;
14750
14927
  out[26] = src[26] * 0.429042;
14751
14928
  };
14752
- _createClass(AmbientLight, [
14929
+ _create_class(AmbientLight, [
14753
14930
  {
14754
14931
  key: "specularTextureDecodeRGBM",
14755
14932
  get: /**
@@ -14860,15 +15037,33 @@ Sky._projectionMatrix = new engineMath.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky.
14860
15037
  ]);
14861
15038
  return AmbientLight;
14862
15039
  }();
14863
- AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
14864
- AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
14865
- AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
14866
- AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
14867
- AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
14868
- AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
14869
- AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
14870
- AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
14871
- 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
+ })();
14872
15067
 
14873
15068
  /**
14874
15069
  * Scene.
@@ -14899,7 +15094,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
14899
15094
  var shaderData = _this.shaderData;
14900
15095
  shaderData._addRefCount(1);
14901
15096
  _this.ambientLight = new AmbientLight();
14902
- engine.sceneManager._allScenes.push(_assertThisInitialized(_this));
15097
+ engine.sceneManager._allScenes.push(_assert_this_initialized(_this));
14903
15098
  shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
14904
15099
  shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
14905
15100
  shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
@@ -15106,7 +15301,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15106
15301
  this._fogParams.z = density / Math.LN2;
15107
15302
  this._fogParams.w = density / Math.sqrt(Math.LN2);
15108
15303
  };
15109
- _createClass(Scene, [
15304
+ _create_class(Scene, [
15110
15305
  {
15111
15306
  key: "shadowCascades",
15112
15307
  get: /**
@@ -15234,8 +15429,12 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15234
15429
  ]);
15235
15430
  return Scene;
15236
15431
  }(EngineObject);
15237
- Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15238
- 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
+ })();
15239
15438
 
15240
15439
  /**
15241
15440
  * Scene manager.
@@ -15283,7 +15482,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15283
15482
  }
15284
15483
  allScenes.length = 0;
15285
15484
  };
15286
- _createClass(SceneManager, [
15485
+ _create_class(SceneManager, [
15287
15486
  {
15288
15487
  key: "activeScene",
15289
15488
  get: /**
@@ -15304,7 +15503,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15304
15503
  return SceneManager;
15305
15504
  }();
15306
15505
 
15307
- var blinnPhongFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_declare>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <ShadowFragmentDeclaration>\n#include <mobile_material_frag>\n#include <RendererFragmentDeclaration>\n#include <FogFragmentDeclaration>\n#include <normal_get>\nvoid main(){\n#include <begin_mobile_frag>\n#include <begin_viewdir_frag>\n#include <mobile_blinnphong_frag>\ngl_FragColor=emission+ambient+diffuse+specular;\n#ifdef OASIS_TRANSPARENT\ngl_FragColor.a=diffuse.a;\n#else\ngl_FragColor.a=1.0;\n#endif\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
15506
+ var blinnPhongFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_declare>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <ShadowFragmentDeclaration>\n#include <mobile_material_frag>\n#include <FogFragmentDeclaration>\n#include <normal_get>\nvoid main(){\n#include <begin_mobile_frag>\n#include <begin_viewdir_frag>\n#include <mobile_blinnphong_frag>\ngl_FragColor=emission+ambient+diffuse+specular;\n#ifdef OASIS_TRANSPARENT\ngl_FragColor.a=diffuse.a;\n#else\ngl_FragColor.a=1.0;\n#endif\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
15308
15507
 
15309
15508
  var blinnPhongVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#include <blendShape_input>\n#include <uv_share>\n#include <color_share>\n#include <normal_share>\n#include <worldpos_share>\n#include <ShadowVertexDeclaration>\n#include <FogVertexDeclaration>\nvoid main(){\n#include <begin_position_vert>\n#include <begin_normal_vert>\n#include <blendShape_vert>\n#include <skinning_vert>\n#include <uv_vert>\n#include <color_vert>\n#include <normal_vert>\n#include <worldpos_vert>\n#include <position_vert>\n#include <ShadowVertex>\n#include <FogVertex>\n}"; // eslint-disable-line
15310
15509
 
@@ -15312,7 +15511,7 @@ var particleFs = "#define GLSLIFY 1\nvarying vec4 v_color;varying float v_lifeLe
15312
15511
 
15313
15512
  var particleVs = "#define GLSLIFY 1\nattribute vec3 a_position;attribute vec3 a_velocity;attribute vec3 a_acceleration;attribute vec4 a_color;attribute vec4 a_lifeAndSize;attribute vec2 a_rotation;attribute vec3 a_uv;attribute vec2 a_normalizedUv;uniform float u_time;uniform bool u_once;uniform mat4 u_MVPMat;varying vec4 v_color;varying float v_lifeLeft;varying vec2 v_uv;\n#ifdef is2d\nuniform mat4 u_viewInvMat;uniform mat4 u_projMat;uniform mat4 u_viewMat;uniform mat4 u_modelMat;\n#endif\nmat2 rotation2d(float angle){float s=sin(angle);float c=cos(angle);return mat2(c,-s,s,c);}void main(){v_color=a_color;v_uv=a_uv.xy;float life=a_lifeAndSize.y;float startTime=a_lifeAndSize.x;float deltaTime=max(mod(u_time-startTime,life),0.0);if((u_once&&u_time>life+startTime)){deltaTime=0.0;}v_lifeLeft=1.0-deltaTime/life;float scale=a_lifeAndSize.z;vec3 position=a_position+(a_velocity+a_acceleration*deltaTime*0.5)*deltaTime;\n#ifdef isScaleByLifetime\nscale*=v_lifeLeft;\n#else\nscale*=pow(a_lifeAndSize.w,deltaTime);\n#endif\n#ifdef rotateToVelocity\nvec3 v=a_velocity+a_acceleration*deltaTime;float angle=atan(v.z,v.x)*2.0;\n#else\nfloat deltaAngle=deltaTime*a_rotation.y;float angle=a_rotation.x+deltaAngle;\n#endif\n#ifdef is2d\nvec2 rotatedPoint=rotation2d(angle)*vec2(a_normalizedUv.x,a_normalizedUv.y*a_uv.z);vec3 basisX=u_viewInvMat[0].xyz;vec3 basisZ=u_viewInvMat[1].xyz;vec3 localPosition=vec3(basisX*rotatedPoint.x+basisZ*rotatedPoint.y)*scale+position;gl_Position=u_projMat*u_viewMat*vec4(localPosition+u_modelMat[3].xyz,1.);\n#else\n#ifdef rotateToVelocity\nfloat s=sin(angle);float c=cos(angle);\n#else\nfloat s=sin(angle);float c=cos(angle);\n#endif\nvec4 rotatedPoint=vec4((a_normalizedUv.x*c+a_normalizedUv.y*a_uv.z*s)*scale,0.,(a_normalizedUv.x*s-a_normalizedUv.y*a_uv.z*c)*scale,1.);vec4 orientation=vec4(0,0,0,1);vec4 q2=orientation+orientation;vec4 qx=orientation.xxxw*q2.xyzx;vec4 qy=orientation.xyyw*q2.xyzy;vec4 qz=orientation.xxzw*q2.xxzz;mat4 localMatrix=mat4((1.0-qy.y)-qz.z,qx.y+qz.w,qx.z-qy.w,0,qx.y-qz.w,(1.0-qx.x)-qz.z,qy.z+qx.w,0,qx.z+qy.w,qy.z-qx.w,(1.0-qx.x)-qy.y,0,position.x,position.y,position.z,1);rotatedPoint=localMatrix*rotatedPoint;gl_Position=u_MVPMat*rotatedPoint;\n#endif\n}"; // eslint-disable-line
15314
15513
 
15315
- var pbrFs = "#define GLSLIFY 1\n#define IS_METALLIC_WORKFLOW\n#include <common>\n#include <camera_declare>\n#include <RendererFragmentDeclaration>\n#include <FogFragmentDeclaration>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <pbr_frag_define>\n#include <pbr_helper>\nvoid main(){\n#include <pbr_frag>\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
15514
+ var pbrFs = "#define GLSLIFY 1\n#define IS_METALLIC_WORKFLOW\n#include <common>\n#include <camera_declare>\n#include <FogFragmentDeclaration>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <pbr_frag_define>\n#include <pbr_helper>\nvoid main(){\n#include <pbr_frag>\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
15316
15515
 
15317
15516
  var pbrSpecularFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_declare>\n#include <FogFragmentDeclaration>\n#include <uv_share>\n#include <normal_share>\n#include <color_share>\n#include <worldpos_share>\n#include <light_frag_define>\n#include <pbr_frag_define>\n#include <pbr_helper>\nvoid main(){\n#include <pbr_frag>\n#include <FogFragment>\n#ifndef OASIS_COLORSPACE_GAMMA\ngl_FragColor=linearToGamma(gl_FragColor);\n#endif\n}"; // eslint-disable-line
15318
15517
 
@@ -15454,8 +15653,8 @@ ShaderPool.init();
15454
15653
  /** @internal */ _this._canSpriteBatch = true;
15455
15654
  /** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
15456
15655
  _this._settings = {};
15457
- _this._resourceManager = new ResourceManager(_assertThisInitialized(_this));
15458
- _this._sceneManager = new SceneManager(_assertThisInitialized(_this));
15656
+ _this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
15657
+ _this._sceneManager = new SceneManager(_assert_this_initialized(_this));
15459
15658
  _this._vSyncCount = 1;
15460
15659
  _this._targetFrameRate = 60;
15461
15660
  _this._time = new Time();
@@ -15479,25 +15678,25 @@ ShaderPool.init();
15479
15678
  };
15480
15679
  _this._hardwareRenderer = hardwareRenderer;
15481
15680
  _this._hardwareRenderer.init(canvas);
15482
- _this.physicsManager = new PhysicsManager(_assertThisInitialized(_this));
15681
+ _this.physicsManager = new PhysicsManager(_assert_this_initialized(_this));
15483
15682
  _this._canvas = canvas;
15484
- _this._sceneManager.activeScene = new Scene(_assertThisInitialized(_this), "DefaultScene");
15485
- _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));
15486
15685
  _this._spriteDefaultMaterial = _this._createSpriteMaterial();
15487
15686
  _this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
15488
- _this._textDefaultFont = Font.createFromOS(_assertThisInitialized(_this), "Arial");
15687
+ _this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
15489
15688
  _this._textDefaultFont.isGCIgnored = false;
15490
- _this.inputManager = new InputManager(_assertThisInitialized(_this));
15689
+ _this.inputManager = new InputManager(_assert_this_initialized(_this));
15491
15690
  var magentaPixel = new Uint8Array([
15492
15691
  255,
15493
15692
  0,
15494
15693
  255,
15495
15694
  255
15496
15695
  ]);
15497
- 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);
15498
15697
  magentaTexture2D.setPixelBuffer(magentaPixel);
15499
15698
  magentaTexture2D.isGCIgnored = true;
15500
- 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);
15501
15700
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveX, magentaPixel);
15502
15701
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.NegativeX, magentaPixel);
15503
15702
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveY, magentaPixel);
@@ -15508,22 +15707,22 @@ ShaderPool.init();
15508
15707
  if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
15509
15708
  _this._macroCollection.enable(Engine._noDepthTextureMacro);
15510
15709
  } else {
15511
- 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);
15512
15711
  depthTexture2D.isGCIgnored = true;
15513
15712
  _this._depthTexture2D = depthTexture2D;
15514
15713
  }
15515
15714
  _this._magentaTexture2D = magentaTexture2D;
15516
15715
  _this._magentaTextureCube = magentaTextureCube;
15517
15716
  if (hardwareRenderer.isWebGL2) {
15518
- 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);
15519
15718
  magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
15520
15719
  magentaTexture2DArray.isGCIgnored = true;
15521
15720
  _this._magentaTexture2DArray = magentaTexture2DArray;
15522
15721
  }
15523
- var magentaMaterial = new Material(_assertThisInitialized(_this), Shader.find("unlit"));
15722
+ var magentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
15524
15723
  magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
15525
15724
  _this._magentaMaterial = magentaMaterial;
15526
- var backgroundTextureMaterial = new Material(_assertThisInitialized(_this), Shader.find("background-texture"));
15725
+ var backgroundTextureMaterial = new Material(_assert_this_initialized(_this), Shader.find("background-texture"));
15527
15726
  backgroundTextureMaterial.isGCIgnored = true;
15528
15727
  backgroundTextureMaterial.renderState.depthState.compareFunction = exports.CompareFunction.LessEqual;
15529
15728
  _this._backgroundTextureMaterial = backgroundTextureMaterial;
@@ -15694,7 +15893,7 @@ ShaderPool.init();
15694
15893
  material.isGCIgnored = true;
15695
15894
  return material;
15696
15895
  };
15697
- _createClass(Engine, [
15896
+ _create_class(Engine, [
15698
15897
  {
15699
15898
  key: "settings",
15700
15899
  get: /**
@@ -15782,9 +15981,15 @@ ShaderPool.init();
15782
15981
  ]);
15783
15982
  return Engine;
15784
15983
  }(EventDispatcher);
15785
- /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15786
- /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15787
- /** @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
+ })();
15788
15993
 
15789
15994
  /**
15790
15995
  * Script class, used for logic writing.
@@ -16099,7 +16304,9 @@ __decorate([
16099
16304
  };
16100
16305
  return SpriteBatcher;
16101
16306
  }(Basic2DBatcher);
16102
- SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16307
+ (function() {
16308
+ SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16309
+ })();
16103
16310
 
16104
16311
  /**
16105
16312
  * Render queue.
@@ -16597,227 +16804,247 @@ var /**
16597
16804
  };
16598
16805
  return ShadowUtils;
16599
16806
  }();
16600
- ShadowUtils._tempMatrix0 = new engineMath.Matrix();
16601
- // prettier-ignore
16602
- /** @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);
16603
- ShadowUtils._frustumCorners = [
16604
- new engineMath.Vector3(),
16605
- new engineMath.Vector3(),
16606
- new engineMath.Vector3(),
16607
- new engineMath.Vector3(),
16608
- new engineMath.Vector3(),
16609
- new engineMath.Vector3(),
16610
- new engineMath.Vector3(),
16611
- new engineMath.Vector3()
16612
- ];
16613
- ShadowUtils._adjustNearPlane = new engineMath.Plane(new engineMath.Vector3());
16614
- ShadowUtils._adjustFarPlane = new engineMath.Plane(new engineMath.Vector3());
16615
- ShadowUtils._backPlaneFaces = new Array(5);
16616
- ShadowUtils._edgePlanePoint2 = new engineMath.Vector3();
16617
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16618
- [
16619
- engineMath.FrustumFace.Left,
16620
- engineMath.FrustumFace.Right,
16621
- engineMath.FrustumFace.Top,
16622
- engineMath.FrustumFace.Bottom
16623
- ],
16624
- [
16625
- engineMath.FrustumFace.Left,
16626
- engineMath.FrustumFace.Right,
16627
- engineMath.FrustumFace.Top,
16628
- engineMath.FrustumFace.Bottom
16629
- ],
16630
- [
16631
- engineMath.FrustumFace.Near,
16632
- engineMath.FrustumFace.Far,
16633
- engineMath.FrustumFace.Top,
16634
- engineMath.FrustumFace.Bottom
16635
- ],
16636
- [
16637
- engineMath.FrustumFace.Near,
16638
- engineMath.FrustumFace.Far,
16639
- engineMath.FrustumFace.Top,
16640
- engineMath.FrustumFace.Bottom
16641
- ],
16642
- [
16643
- engineMath.FrustumFace.Near,
16644
- engineMath.FrustumFace.Far,
16645
- engineMath.FrustumFace.Left,
16646
- engineMath.FrustumFace.Right
16647
- ],
16648
- [
16649
- engineMath.FrustumFace.Near,
16650
- engineMath.FrustumFace.Far,
16651
- engineMath.FrustumFace.Left,
16652
- engineMath.FrustumFace.Right
16653
- ]
16654
- ];
16655
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16656
- [
16657
- // near, far, left, right, bottom, top
16658
- [
16659
- 8,
16660
- 8
16661
- ],
16662
- [
16663
- 8,
16664
- 8
16665
- ],
16666
- [
16667
- 4,
16668
- 5
16669
- ],
16670
- [
16671
- 6,
16672
- 7
16673
- ],
16674
- [
16675
- 7,
16676
- 4
16677
- ],
16678
- [
16679
- 5,
16680
- 6
16681
- ]
16682
- ],
16683
- [
16684
- // near, far, left, right, bottom, top
16685
- [
16686
- 8,
16687
- 8
16688
- ],
16689
- [
16690
- 8,
16691
- 8
16692
- ],
16693
- [
16694
- 1,
16695
- 0
16696
- ],
16697
- [
16698
- 3,
16699
- 2
16700
- ],
16701
- [
16702
- 0,
16703
- 3
16704
- ],
16705
- [
16706
- 2,
16707
- 1
16708
- ]
16709
- ],
16710
- [
16711
- // near, far, left, right, bottom, top
16712
- [
16713
- 5,
16714
- 4
16715
- ],
16716
- [
16717
- 0,
16718
- 1
16719
- ],
16720
- [
16721
- 8,
16722
- 8
16723
- ],
16724
- [
16725
- 8,
16726
- 8
16727
- ],
16728
- [
16729
- 4,
16730
- 0
16731
- ],
16732
- [
16733
- 1,
16734
- 5
16735
- ]
16736
- ],
16737
- [
16738
- // near, far, left, right, bottom, top
16739
- [
16740
- 7,
16741
- 6
16742
- ],
16743
- [
16744
- 2,
16745
- 3
16746
- ],
16747
- [
16748
- 8,
16749
- 8
16750
- ],
16751
- [
16752
- 8,
16753
- 8
16754
- ],
16755
- [
16756
- 3,
16757
- 7
16758
- ],
16759
- [
16760
- 6,
16761
- 2
16762
- ]
16763
- ],
16764
- [
16765
- // 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 = [
16766
16840
  [
16767
- 4,
16768
- 7
16841
+ engineMath.FrustumFace.Left,
16842
+ engineMath.FrustumFace.Right,
16843
+ engineMath.FrustumFace.Top,
16844
+ engineMath.FrustumFace.Bottom
16769
16845
  ],
16770
16846
  [
16771
- 3,
16772
- 0
16847
+ engineMath.FrustumFace.Left,
16848
+ engineMath.FrustumFace.Right,
16849
+ engineMath.FrustumFace.Top,
16850
+ engineMath.FrustumFace.Bottom
16773
16851
  ],
16774
16852
  [
16775
- 0,
16776
- 4
16853
+ engineMath.FrustumFace.Near,
16854
+ engineMath.FrustumFace.Far,
16855
+ engineMath.FrustumFace.Top,
16856
+ engineMath.FrustumFace.Bottom
16777
16857
  ],
16778
16858
  [
16779
- 7,
16780
- 3
16859
+ engineMath.FrustumFace.Near,
16860
+ engineMath.FrustumFace.Far,
16861
+ engineMath.FrustumFace.Top,
16862
+ engineMath.FrustumFace.Bottom
16781
16863
  ],
16782
16864
  [
16783
- 8,
16784
- 8
16865
+ engineMath.FrustumFace.Near,
16866
+ engineMath.FrustumFace.Far,
16867
+ engineMath.FrustumFace.Left,
16868
+ engineMath.FrustumFace.Right
16785
16869
  ],
16786
16870
  [
16787
- 8,
16788
- 8
16871
+ engineMath.FrustumFace.Near,
16872
+ engineMath.FrustumFace.Far,
16873
+ engineMath.FrustumFace.Left,
16874
+ engineMath.FrustumFace.Right
16789
16875
  ]
16790
- ],
16791
- [
16792
- // near, far, left, right, bottom, top
16876
+ ];
16877
+ })();
16878
+ (function() {
16879
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16793
16880
  [
16794
- 6,
16795
- 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
+ ]
16796
16906
  ],
16797
16907
  [
16798
- 1,
16799
- 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
+ ]
16800
16933
  ],
16801
16934
  [
16802
- 5,
16803
- 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
+ ]
16804
16960
  ],
16805
16961
  [
16806
- 2,
16807
- 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
+ ]
16808
16987
  ],
16809
16988
  [
16810
- 8,
16811
- 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
+ ]
16812
17014
  ],
16813
17015
  [
16814
- 8,
16815
- 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
+ ]
16816
17041
  ]
16817
- ]
16818
- ];
16819
- //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.
16820
- 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
+ })();
16821
17048
 
16822
17049
  /**
16823
17050
  * Cascade shadow caster.
@@ -17054,18 +17281,42 @@ ShadowUtils.atlasBorderSize = 4.0;
17054
17281
  };
17055
17282
  return CascadedShadowCasterPass;
17056
17283
  }();
17057
- CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17058
- CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17059
- CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17060
- CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17061
- CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17062
- CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17063
- CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17064
- CascadedShadowCasterPass._maxCascades = 4;
17065
- CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17066
- CascadedShadowCasterPass._clearColor = new engineMath.Color(1, 1, 1, 1);
17067
- CascadedShadowCasterPass._tempVector = new engineMath.Vector3();
17068
- 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
+ })();
17069
17320
 
17070
17321
  var passNum = 0;
17071
17322
  /**
@@ -17298,7 +17549,7 @@ var passNum = 0;
17298
17549
  renderer._prepareRender(context);
17299
17550
  }
17300
17551
  };
17301
- _createClass(BasicRenderPipeline, [
17552
+ _create_class(BasicRenderPipeline, [
17302
17553
  {
17303
17554
  key: "defaultRenderPass",
17304
17555
  get: /**
@@ -17310,15 +17561,25 @@ var passNum = 0;
17310
17561
  ]);
17311
17562
  return BasicRenderPipeline;
17312
17563
  }();
17313
- BasicRenderPipeline._tempVector0 = new engineMath.Vector3();
17314
- BasicRenderPipeline._tempVector1 = new engineMath.Vector3();
17564
+ (function() {
17565
+ BasicRenderPipeline._tempVector0 = new engineMath.Vector3();
17566
+ })();
17567
+ (function() {
17568
+ BasicRenderPipeline._tempVector1 = new engineMath.Vector3();
17569
+ })();
17315
17570
 
17316
17571
  var _Camera;
17317
17572
  var MathTemp = function MathTemp() {
17318
17573
  };
17319
- MathTemp.tempVec4 = new engineMath.Vector4();
17320
- MathTemp.tempVec3 = new engineMath.Vector3();
17321
- 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
+ })();
17322
17583
  exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17323
17584
  _inherits(Camera1, Component);
17324
17585
  function Camera1(entity) {
@@ -17336,6 +17597,8 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17336
17597
  * @remarks Support bit manipulation, corresponding to `Layer`.
17337
17598
  */ _this.cullingMask = exports.Layer.Everything;
17338
17599
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
17600
+ /** @internal */ _this._frustum = new engineMath.BoundingFrustum();
17601
+ /** @internal */ _this._virtualCamera = new VirtualCamera();
17339
17602
  _this._isProjMatSetting = false;
17340
17603
  _this._nearClipPlane = 0.1;
17341
17604
  _this._farClipPlane = 100;
@@ -17346,8 +17609,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17346
17609
  _this._isFrustumProjectDirty = true;
17347
17610
  _this._customAspectRatio = undefined;
17348
17611
  _this._renderTarget = null;
17349
- /** @internal */ _this._frustum = new engineMath.BoundingFrustum();
17350
- /** @internal */ _this._virtualCamera = new VirtualCamera();
17351
17612
  _this._viewport = new engineMath.Vector4(0, 0, 1, 1);
17352
17613
  _this._inverseProjectionMatrix = new engineMath.Matrix();
17353
17614
  _this._lastAspectSize = new engineMath.Vector2(0, 0);
@@ -17357,7 +17618,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17357
17618
  _this._isViewMatrixDirty = transform.registerWorldChangeFlag();
17358
17619
  _this._isInvViewProjDirty = transform.registerWorldChangeFlag();
17359
17620
  _this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
17360
- _this._renderPipeline = new BasicRenderPipeline(_assertThisInitialized(_this));
17621
+ _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
17361
17622
  _this.shaderData._addRefCount(1);
17362
17623
  return _this;
17363
17624
  }
@@ -17574,7 +17835,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17574
17835
  }
17575
17836
  return this._inverseProjectionMatrix;
17576
17837
  };
17577
- _createClass(Camera1, [
17838
+ _create_class(Camera1, [
17578
17839
  {
17579
17840
  key: "nearClipPlane",
17580
17841
  get: /**
@@ -17738,7 +17999,11 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17738
17999
  }
17739
18000
  ]);
17740
18001
  return Camera1;
17741
- }(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);
17742
18007
  __decorate([
17743
18008
  deepClone
17744
18009
  ], exports.Camera.prototype, "_frustum", void 0);
@@ -17949,7 +18214,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
17949
18214
  };
17950
18215
  return Loader;
17951
18216
  }();
17952
- Loader._engineObjects = {};
18217
+ (function() {
18218
+ Loader._engineObjects = {};
18219
+ })();
17953
18220
 
17954
18221
  /**
17955
18222
  * Asset Type.
@@ -18102,7 +18369,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18102
18369
  target._isTransparent = this._isTransparent;
18103
18370
  target._blendMode = this._blendMode;
18104
18371
  };
18105
- _createClass(BaseMaterial, [
18372
+ _create_class(BaseMaterial, [
18106
18373
  {
18107
18374
  key: "shader",
18108
18375
  get: /**
@@ -18202,19 +18469,45 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18202
18469
  ]);
18203
18470
  return BaseMaterial;
18204
18471
  }(Material);
18205
- BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18206
- BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18207
- BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18208
- BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18209
- BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18210
- BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18211
- BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18212
- BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18213
- BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18214
- BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18215
- BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18216
- BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18217
- 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
+ })();
18218
18511
 
18219
18512
  /**
18220
18513
  * Blinn-phong Material.
@@ -18242,7 +18535,7 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18242
18535
  this.cloneTo(dest);
18243
18536
  return dest;
18244
18537
  };
18245
- _createClass(BlinnPhongMaterial, [
18538
+ _create_class(BlinnPhongMaterial, [
18246
18539
  {
18247
18540
  key: "baseColor",
18248
18541
  get: /**
@@ -18388,9 +18681,15 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18388
18681
  ]);
18389
18682
  return BlinnPhongMaterial;
18390
18683
  }(BaseMaterial);
18391
- BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18392
- BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18393
- 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
+ })();
18394
18693
 
18395
18694
  /**
18396
18695
  * Texture UV coordinate.
@@ -18426,7 +18725,7 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18426
18725
  shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
18427
18726
  return _this;
18428
18727
  }
18429
- _createClass(PBRBaseMaterial, [
18728
+ _create_class(PBRBaseMaterial, [
18430
18729
  {
18431
18730
  key: "baseColor",
18432
18731
  get: /**
@@ -18650,14 +18949,30 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18650
18949
  ]);
18651
18950
  return PBRBaseMaterial;
18652
18951
  }(BaseMaterial);
18653
- PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18654
- PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18655
- PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18656
- PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18657
- PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18658
- PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18659
- PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18660
- 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
+ })();
18661
18976
 
18662
18977
  /**
18663
18978
  * PBR (Metallic-Roughness Workflow) Material.
@@ -18678,7 +18993,7 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18678
18993
  this.cloneTo(dest);
18679
18994
  return dest;
18680
18995
  };
18681
- _createClass(PBRMaterial, [
18996
+ _create_class(PBRMaterial, [
18682
18997
  {
18683
18998
  key: "metallic",
18684
18999
  get: /**
@@ -18721,9 +19036,15 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18721
19036
  ]);
18722
19037
  return PBRMaterial;
18723
19038
  }(PBRBaseMaterial);
18724
- PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
18725
- PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
18726
- 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
+ })();
18727
19048
 
18728
19049
  /**
18729
19050
  * PBR (Specular-Glossiness Workflow) Material.
@@ -18744,7 +19065,7 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18744
19065
  this.cloneTo(dest);
18745
19066
  return dest;
18746
19067
  };
18747
- _createClass(PBRSpecularMaterial, [
19068
+ _create_class(PBRSpecularMaterial, [
18748
19069
  {
18749
19070
  key: "specularColor",
18750
19071
  get: /**
@@ -18790,10 +19111,18 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18790
19111
  ]);
18791
19112
  return PBRSpecularMaterial;
18792
19113
  }(PBRBaseMaterial);
18793
- PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
18794
- PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
18795
- PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
18796
- 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
+ })();
18797
19126
 
18798
19127
  /**
18799
19128
  * Unlit Material.
@@ -18817,7 +19146,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
18817
19146
  this.cloneTo(dest);
18818
19147
  return dest;
18819
19148
  };
18820
- _createClass(UnlitMaterial, [
19149
+ _create_class(UnlitMaterial, [
18821
19150
  {
18822
19151
  key: "baseColor",
18823
19152
  get: /**
@@ -18951,7 +19280,7 @@ exports.TextVerticalAlignment = void 0;
18951
19280
  this._sprites = null;
18952
19281
  this._spriteNamesToIndex = null;
18953
19282
  };
18954
- _createClass(SpriteAtlas, [
19283
+ _create_class(SpriteAtlas, [
18955
19284
  {
18956
19285
  key: "sprites",
18957
19286
  get: /**
@@ -19122,7 +19451,7 @@ exports.TextVerticalAlignment = void 0;
19122
19451
  }
19123
19452
  this._updateFlagManager.dispatch(type);
19124
19453
  };
19125
- _createClass(Sprite, [
19454
+ _create_class(Sprite, [
19126
19455
  {
19127
19456
  key: "texture",
19128
19457
  get: /**
@@ -19411,7 +19740,9 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
19411
19740
  };
19412
19741
  SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
19413
19742
  return SlicedSpriteAssembler1;
19414
- }(), _SlicedSpriteAssembler._worldMatrix = new engineMath.Matrix(), _SlicedSpriteAssembler);
19743
+ }(), function() {
19744
+ _SlicedSpriteAssembler._worldMatrix = new engineMath.Matrix();
19745
+ }(), _SlicedSpriteAssembler);
19415
19746
  SlicedSpriteAssembler = __decorate([
19416
19747
  StaticInterfaceImplement()
19417
19748
  ], SlicedSpriteAssembler);
@@ -19434,7 +19765,7 @@ SlicedSpriteAssembler = __decorate([
19434
19765
  _this._renderData = new RenderData2D(4, [], [], null, _this._color);
19435
19766
  _this.drawMode = exports.SpriteDrawMode.Simple;
19436
19767
  _this.setMaterial(_this._engine._spriteDefaultMaterial);
19437
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
19768
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
19438
19769
  return _this;
19439
19770
  }
19440
19771
  var _proto = SpriteRenderer.prototype;
@@ -19539,7 +19870,7 @@ SlicedSpriteAssembler = __decorate([
19539
19870
  break;
19540
19871
  }
19541
19872
  };
19542
- _createClass(SpriteRenderer, [
19873
+ _create_class(SpriteRenderer, [
19543
19874
  {
19544
19875
  key: "drawMode",
19545
19876
  get: /**
@@ -19688,7 +20019,9 @@ SlicedSpriteAssembler = __decorate([
19688
20019
  ]);
19689
20020
  return SpriteRenderer;
19690
20021
  }(exports.Renderer);
19691
- /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20022
+ (function() {
20023
+ /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20024
+ })();
19692
20025
  __decorate([
19693
20026
  ignoreClone
19694
20027
  ], SpriteRenderer.prototype, "_renderData", void 0);
@@ -19745,14 +20078,16 @@ var /**
19745
20078
  ];
19746
20079
  this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
19747
20080
  };
19748
- CharRenderData.triangles = [
19749
- 0,
19750
- 2,
19751
- 1,
19752
- 2,
19753
- 0,
19754
- 3
19755
- ];
20081
+ (function() {
20082
+ CharRenderData.triangles = [
20083
+ 0,
20084
+ 2,
20085
+ 1,
20086
+ 2,
20087
+ 0,
20088
+ 3
20089
+ ];
20090
+ })();
19756
20091
 
19757
20092
  /**
19758
20093
  * @internal
@@ -20076,23 +20411,37 @@ CharRenderData.triangles = [
20076
20411
  };
20077
20412
  return TextUtils;
20078
20413
  }();
20079
- /** @internal */ TextUtils._genericFontFamilies = [
20080
- "serif",
20081
- "sans-serif",
20082
- "monospace",
20083
- "cursive",
20084
- "fantasy",
20085
- "system-ui",
20086
- "math",
20087
- "emoji",
20088
- "fangsong"
20089
- ];
20090
- /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20091
- TextUtils._measureBaseline = "M";
20092
- TextUtils._heightMultiplier = 2;
20093
- TextUtils._baselineMultiplier = 1.4;
20094
- TextUtils._fontSizeInfoCache = {};
20095
- 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
+ })();
20096
20445
 
20097
20446
  /**
20098
20447
  * Renders a text for 2D graphics.
@@ -20119,7 +20468,7 @@ TextUtils._textContext = null;
20119
20468
  _this._overflowMode = exports.OverflowMode.Overflow;
20120
20469
  _this._maskInteraction = exports.SpriteMaskInteraction.None;
20121
20470
  _this._maskLayer = exports.SpriteMaskLayer.Layer0;
20122
- var engine = _assertThisInitialized(_this).engine;
20471
+ var engine = _assert_this_initialized(_this).engine;
20123
20472
  _this._font = engine._textDefaultFont;
20124
20473
  _this._font._addRefCount(1);
20125
20474
  _this.setMaterial(engine._spriteDefaultMaterial);
@@ -20358,7 +20707,7 @@ TextUtils._textContext = null;
20358
20707
  Renderer.prototype._onTransformChanged.call(this, bit);
20359
20708
  this._setDirtyFlagTrue(0x4 | 0x8);
20360
20709
  };
20361
- _createClass(TextRenderer, [
20710
+ _create_class(TextRenderer, [
20362
20711
  {
20363
20712
  key: "color",
20364
20713
  get: /**
@@ -20571,9 +20920,15 @@ TextUtils._textContext = null;
20571
20920
  ]);
20572
20921
  return TextRenderer;
20573
20922
  }(exports.Renderer);
20574
- TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20575
- TextRenderer._tempVec30 = new engineMath.Vector3();
20576
- 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
+ })();
20577
20932
  __decorate([
20578
20933
  assignmentClone
20579
20934
  ], TextRenderer.prototype, "_subFont", void 0);
@@ -20790,7 +21145,9 @@ var DirtyFlag;
20790
21145
  };
20791
21146
  return AnimationCurveOwner;
20792
21147
  }();
20793
- AnimationCurveOwner._assemblerMap = new Map();
21148
+ (function() {
21149
+ AnimationCurveOwner._assemblerMap = new Map();
21150
+ })();
20794
21151
 
20795
21152
  /**
20796
21153
  * @internal
@@ -20964,7 +21321,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
20964
21321
  }
20965
21322
  }
20966
21323
  };
20967
- _createClass(AnimationClip, [
21324
+ _create_class(AnimationClip, [
20968
21325
  {
20969
21326
  key: "events",
20970
21327
  get: /**
@@ -21112,7 +21469,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21112
21469
  var result = this._evaluate(time, evaluateData);
21113
21470
  return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
21114
21471
  };
21115
- _createClass(AnimationCurve, [
21472
+ _create_class(AnimationCurve, [
21116
21473
  {
21117
21474
  key: "interpolation",
21118
21475
  get: /**
@@ -21222,7 +21579,11 @@ exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Ani
21222
21579
  return out;
21223
21580
  };
21224
21581
  return AnimationArrayCurve;
21225
- }(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);
21226
21587
  exports.AnimationArrayCurve = __decorate([
21227
21588
  StaticInterfaceImplement()
21228
21589
  ], exports.AnimationArrayCurve);
@@ -21275,7 +21636,11 @@ exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Anima
21275
21636
  return frame.value;
21276
21637
  };
21277
21638
  return AnimationBoolCurve;
21278
- }(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);
21279
21644
  exports.AnimationBoolCurve = __decorate([
21280
21645
  StaticInterfaceImplement()
21281
21646
  ], exports.AnimationBoolCurve);
@@ -21368,7 +21733,11 @@ exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Ani
21368
21733
  return out;
21369
21734
  };
21370
21735
  return AnimationColorCurve;
21371
- }(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);
21372
21741
  exports.AnimationColorCurve = __decorate([
21373
21742
  StaticInterfaceImplement()
21374
21743
  ], exports.AnimationColorCurve);
@@ -21464,7 +21833,11 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
21464
21833
  return out;
21465
21834
  };
21466
21835
  return AnimationFloatArrayCurve;
21467
- }(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);
21468
21841
  exports.AnimationFloatArrayCurve = __decorate([
21469
21842
  StaticInterfaceImplement()
21470
21843
  ], exports.AnimationFloatArrayCurve);
@@ -21529,7 +21902,11 @@ exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Ani
21529
21902
  }
21530
21903
  };
21531
21904
  return AnimationFloatCurve;
21532
- }(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);
21533
21910
  exports.AnimationFloatCurve = __decorate([
21534
21911
  StaticInterfaceImplement()
21535
21912
  ], exports.AnimationFloatCurve);
@@ -21627,7 +22004,13 @@ exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ fu
21627
22004
  return out;
21628
22005
  };
21629
22006
  return AnimationQuaternionCurve1;
21630
- }(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);
21631
22014
  exports.AnimationQuaternionCurve = __decorate([
21632
22015
  StaticInterfaceImplement()
21633
22016
  ], exports.AnimationQuaternionCurve);
@@ -21708,7 +22091,11 @@ exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function
21708
22091
  return out;
21709
22092
  };
21710
22093
  return AnimationVector2Curve;
21711
- }(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);
21712
22099
  exports.AnimationVector2Curve = __decorate([
21713
22100
  StaticInterfaceImplement()
21714
22101
  ], exports.AnimationVector2Curve);
@@ -21801,7 +22188,11 @@ exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function
21801
22188
  return out;
21802
22189
  };
21803
22190
  return AnimationVector3Curve;
21804
- }(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);
21805
22196
  exports.AnimationVector3Curve = __decorate([
21806
22197
  StaticInterfaceImplement()
21807
22198
  ], exports.AnimationVector3Curve);
@@ -21894,7 +22285,11 @@ exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function
21894
22285
  return out;
21895
22286
  };
21896
22287
  return AnimationVector4Curve;
21897
- }(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);
21898
22293
  exports.AnimationVector4Curve = __decorate([
21899
22294
  StaticInterfaceImplement()
21900
22295
  ], exports.AnimationVector4Curve);
@@ -22610,7 +23005,7 @@ exports.AnimatorLayerBlendingMode = void 0;
22610
23005
  }
22611
23006
  }
22612
23007
  };
22613
- _createClass(Animator, [
23008
+ _create_class(Animator, [
22614
23009
  {
22615
23010
  key: "animatorController",
22616
23011
  get: /**
@@ -22701,7 +23096,7 @@ __decorate([
22701
23096
  */ _proto._registerChangeFlag = function _registerChangeFlag() {
22702
23097
  return this._updateFlagManager.createFlag(BoolUpdateFlag);
22703
23098
  };
22704
- _createClass(AnimatorController, [
23099
+ _create_class(AnimatorController, [
22705
23100
  {
22706
23101
  key: "layers",
22707
23102
  get: /**
@@ -22835,7 +23230,7 @@ __decorate([
22835
23230
  index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
22836
23231
  }
22837
23232
  };
22838
- _createClass(AnimatorState, [
23233
+ _create_class(AnimatorState, [
22839
23234
  {
22840
23235
  key: "transitions",
22841
23236
  get: /**
@@ -22967,7 +23362,7 @@ exports.AnimatorConditionMode = void 0;
22967
23362
  _this.shaderData.setVector4("u_cubeDecodeParam", _this._decodeParam);
22968
23363
  return _this;
22969
23364
  }
22970
- _createClass(SkyBoxMaterial, [
23365
+ _create_class(SkyBoxMaterial, [
22971
23366
  {
22972
23367
  key: "textureDecodeRGBM",
22973
23368
  get: /**
@@ -23066,7 +23461,7 @@ exports.ParticleRendererBlendMode = void 0;
23066
23461
  _this._isFadeOut = false;
23067
23462
  _this._playOnEnable = true;
23068
23463
  _this._blendMode = 0;
23069
- _this._onColorChanged = _this._onColorChanged.bind(_assertThisInitialized(_this));
23464
+ _this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
23070
23465
  //@ts-ignore
23071
23466
  _this._color._onValueChanged = _this._onColorChanged;
23072
23467
  _this.setMaterial(_this._createMaterial());
@@ -23343,7 +23738,7 @@ exports.ParticleRendererBlendMode = void 0;
23343
23738
  ParticleRenderer._getRandom = function _getRandom() {
23344
23739
  return Math.random() - 0.5;
23345
23740
  };
23346
- _createClass(ParticleRenderer, [
23741
+ _create_class(ParticleRenderer, [
23347
23742
  {
23348
23743
  key: "texture",
23349
23744
  get: /**
@@ -23774,7 +24169,9 @@ exports.ParticleRendererBlendMode = void 0;
23774
24169
  ]);
23775
24170
  return ParticleRenderer;
23776
24171
  }(MeshRenderer);
23777
- /** 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
+ })();
23778
24175
  __decorate([
23779
24176
  ignoreClone
23780
24177
  ], ParticleRenderer.prototype, "_onColorChanged", null);
@@ -24044,7 +24441,7 @@ var _tempVector3 = new engineMath.Vector3();
24044
24441
  this._camera.renderTarget = this._oriCameraRenderTarget;
24045
24442
  this._camera.cullingMask = this._oriCameraCullingMask;
24046
24443
  };
24047
- _createClass(Probe, [
24444
+ _create_class(Probe, [
24048
24445
  {
24049
24446
  key: "_texture",
24050
24447
  get: function get() {