@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/module.js CHANGED
@@ -11,56 +11,48 @@ import { Quaternion, Vector3, Matrix3x3, Matrix, MathUtil as MathUtil$1, Vector2
11
11
  Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
12
12
  })(Platform || (Platform = {}));
13
13
 
14
- function _assertThisInitialized(self) {
15
- if (self === void 0) {
16
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
17
- }
14
+ function _assert_this_initialized(self) {
15
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
18
16
 
19
- return self;
17
+ return self;
20
18
  }
21
19
 
22
20
  function _defineProperties(target, props) {
23
- for (var i = 0; i < props.length; i++) {
24
- var descriptor = props[i];
25
- descriptor.enumerable = descriptor.enumerable || false;
26
- descriptor.configurable = true;
27
- if ("value" in descriptor) descriptor.writable = true;
28
- Object.defineProperty(target, descriptor.key, descriptor);
29
- }
21
+ for (var i = 0; i < props.length; i++) {
22
+ var descriptor = props[i];
23
+ descriptor.enumerable = descriptor.enumerable || false;
24
+ descriptor.configurable = true;
25
+
26
+ if ("value" in descriptor) descriptor.writable = true;
27
+
28
+ Object.defineProperty(target, descriptor.key, descriptor);
29
+ }
30
30
  }
31
+ function _create_class(Constructor, protoProps, staticProps) {
32
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
33
+ if (staticProps) _defineProperties(Constructor, staticProps);
31
34
 
32
- function _createClass(Constructor, protoProps, staticProps) {
33
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
34
- if (staticProps) _defineProperties(Constructor, staticProps);
35
- return Constructor;
35
+ return Constructor;
36
36
  }
37
37
 
38
- function setPrototypeOf(o, p) {
39
- setPrototypeOf = Object.setPrototypeOf || function setPrototypeOf(o, p) {
40
- o.__proto__ = p;
41
- return o;
42
- };
38
+ function _set_prototype_of(o, p) {
39
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
40
+ o.__proto__ = p;
43
41
 
44
- return setPrototypeOf(o, p);
45
- }
42
+ return o;
43
+ };
46
44
 
47
- function _setPrototypeOf(o, p) {
48
- return setPrototypeOf(o, p);
45
+ return _set_prototype_of(o, p);
49
46
  }
50
47
 
51
48
  function _inherits(subClass, superClass) {
52
- if (typeof superClass !== "function" && superClass !== null) {
53
- throw new TypeError("Super expression must either be null or a function");
54
- }
55
-
56
- subClass.prototype = Object.create(superClass && superClass.prototype, {
57
- constructor: {
58
- value: subClass,
59
- writable: true,
60
- configurable: true
49
+ if (typeof superClass !== "function" && superClass !== null) {
50
+ throw new TypeError("Super expression must either be null or a function");
61
51
  }
62
- });
63
- if (superClass) _setPrototypeOf(subClass, superClass);
52
+
53
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
54
+
55
+ if (superClass) _set_prototype_of(subClass, superClass);
64
56
  }
65
57
 
66
58
  /**
@@ -108,9 +100,15 @@ function _inherits(subClass, superClass) {
108
100
  };
109
101
  return MathUtil;
110
102
  }();
111
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
112
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
113
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
103
+ (function() {
104
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
105
+ })();
106
+ (function() {
107
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
108
+ })();
109
+ (function() {
110
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
111
+ })();
114
112
 
115
113
  /**
116
114
  * Describes a color in the from of RGBA (in order: R, G, B, A).
@@ -320,7 +318,7 @@ function _inherits(subClass, superClass) {
320
318
  out._onValueChanged && out._onValueChanged();
321
319
  return out;
322
320
  };
323
- _createClass(Color, [
321
+ _create_class(Color, [
324
322
  {
325
323
  key: "r",
326
324
  get: /**
@@ -396,11 +394,9 @@ function __decorate(decorators, target, key, desc) {
396
394
  }
397
395
 
398
396
  function _instanceof(left, right) {
399
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
400
- return !!right[Symbol.hasInstance](left);
401
- } else {
402
- return left instanceof right;
403
- }
397
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
398
+ return !!right[Symbol.hasInstance](left);
399
+ } else return left instanceof right;
404
400
  }
405
401
 
406
402
  /**
@@ -581,16 +577,22 @@ function _instanceof(left, right) {
581
577
  };
582
578
  return CloneManager;
583
579
  }();
584
- /** @internal */ CloneManager._subCloneModeMap = new Map();
585
- /** @internal */ CloneManager._cloneModeMap = new Map();
586
- CloneManager._objectType = Object.getPrototypeOf(Object);
580
+ (function() {
581
+ /** @internal */ CloneManager._subCloneModeMap = new Map();
582
+ })();
583
+ (function() {
584
+ /** @internal */ CloneManager._cloneModeMap = new Map();
585
+ })();
586
+ (function() {
587
+ CloneManager._objectType = Object.getPrototypeOf(Object);
588
+ })();
587
589
 
588
590
  /**
589
591
  * EngineObject.
590
592
  */ var EngineObject = /*#__PURE__*/ function() {
591
593
  function EngineObject(engine) {
592
- this._destroyed = false;
593
594
  /** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
595
+ this._destroyed = false;
594
596
  this._engine = engine;
595
597
  }
596
598
  var _proto = EngineObject.prototype;
@@ -602,7 +604,7 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
602
604
  (_this__engine_resourceManager = this._engine.resourceManager) == null ? void 0 : _this__engine_resourceManager._deleteAsset(this);
603
605
  this._destroyed = true;
604
606
  };
605
- _createClass(EngineObject, [
607
+ _create_class(EngineObject, [
606
608
  {
607
609
  key: "engine",
608
610
  get: /**
@@ -622,7 +624,9 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
622
624
  ]);
623
625
  return EngineObject;
624
626
  }();
625
- EngineObject._instanceIdCounter = 0;
627
+ (function() {
628
+ EngineObject._instanceIdCounter = 0;
629
+ })();
626
630
  __decorate([
627
631
  ignoreClone
628
632
  ], EngineObject.prototype, "instanceId", void 0);
@@ -639,7 +643,7 @@ __decorate([
639
643
  _this = EngineObject.call(this, engine) || this;
640
644
  /** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */ _this.isGCIgnored = false;
641
645
  _this._refCount = 0;
642
- engine.resourceManager._addRefObject(_this.instanceId, _assertThisInitialized(_this));
646
+ engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized(_this));
643
647
  return _this;
644
648
  }
645
649
  var _proto = RefObject.prototype;
@@ -681,7 +685,7 @@ __decorate([
681
685
  */ _proto._addToResourceManager = function _addToResourceManager(path) {
682
686
  this._engine.resourceManager._addAsset(path, this);
683
687
  };
684
- _createClass(RefObject, [
688
+ _create_class(RefObject, [
685
689
  {
686
690
  key: "refCount",
687
691
  get: /**
@@ -807,7 +811,7 @@ __decorate([
807
811
  _proto.stopPropagation = function stopPropagation() {
808
812
  this._propagationStopped = true;
809
813
  };
810
- _createClass(Event, [
814
+ _create_class(Event, [
811
815
  {
812
816
  key: "propagationStopped",
813
817
  get: function get() {
@@ -1083,7 +1087,7 @@ var Time = /*#__PURE__*/ function() {
1083
1087
  this._lastTickTime = now;
1084
1088
  this._frameCount++;
1085
1089
  };
1086
- _createClass(Time, [
1090
+ _create_class(Time, [
1087
1091
  {
1088
1092
  key: "frameCount",
1089
1093
  get: /*
@@ -1321,7 +1325,7 @@ var GLCapabilityType;
1321
1325
  _proto._getMipmapCount = function _getMipmapCount() {
1322
1326
  return this._mipmap ? Math.floor(Math.log2(Math.max(this._width, this._height))) + 1 : 1;
1323
1327
  };
1324
- _createClass(Texture, [
1328
+ _create_class(Texture, [
1325
1329
  {
1326
1330
  key: "format",
1327
1331
  get: /**
@@ -1471,7 +1475,7 @@ var GLCapabilityType;
1471
1475
  }
1472
1476
  _this._depthTexture = depth;
1473
1477
  }
1474
- _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assertThisInitialized(_this));
1478
+ _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized(_this));
1475
1479
  return _this;
1476
1480
  }
1477
1481
  var _proto = RenderTarget.prototype;
@@ -1513,7 +1517,7 @@ var GLCapabilityType;
1513
1517
  */ _proto._blitRenderTarget = function _blitRenderTarget() {
1514
1518
  this._platformRenderTarget.blitRenderTarget();
1515
1519
  };
1516
- _createClass(RenderTarget, [
1520
+ _create_class(RenderTarget, [
1517
1521
  {
1518
1522
  key: "autoGenerateMipmaps",
1519
1523
  get: /**
@@ -1585,7 +1589,7 @@ var GLCapabilityType;
1585
1589
  _this._format = format;
1586
1590
  _this._mipmapCount = _this._getMipmapCount();
1587
1591
  _this._isDepthTexture = format == TextureFormat.Depth || format == TextureFormat.DepthStencil || format == TextureFormat.Depth16 || format == TextureFormat.Depth24 || format == TextureFormat.Depth32 || format == TextureFormat.Depth24Stencil8 || format == TextureFormat.Depth32Stencil8;
1588
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assertThisInitialized(_this));
1592
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized(_this));
1589
1593
  _this.filterMode = TextureFilterMode.Bilinear;
1590
1594
  _this.wrapModeU = _this.wrapModeV = TextureWrapMode.Repeat;
1591
1595
  return _this;
@@ -1652,7 +1656,7 @@ var GLCapabilityType;
1652
1656
  _this._length = length;
1653
1657
  _this._format = format;
1654
1658
  _this._mipmapCount = _this._getMipmapCount();
1655
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assertThisInitialized(_this));
1659
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized(_this));
1656
1660
  _this.filterMode = TextureFilterMode.Bilinear;
1657
1661
  _this.wrapModeU = _this.wrapModeV = TextureWrapMode.Repeat;
1658
1662
  return _this;
@@ -1704,7 +1708,7 @@ var GLCapabilityType;
1704
1708
  this._platformTexture.getPixelBuffer(elementIndex, xOrMipLevelOrOut, yOrMipLevel, width, height, mipLevelOrOut, out);
1705
1709
  }
1706
1710
  };
1707
- _createClass(Texture2DArray, [
1711
+ _create_class(Texture2DArray, [
1708
1712
  {
1709
1713
  key: "length",
1710
1714
  get: /**
@@ -1731,7 +1735,7 @@ var GLCapabilityType;
1731
1735
  _this._height = size;
1732
1736
  _this._format = format;
1733
1737
  _this._mipmapCount = _this._getMipmapCount();
1734
- _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assertThisInitialized(_this));
1738
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized(_this));
1735
1739
  _this.filterMode = TextureFilterMode.Bilinear;
1736
1740
  _this.wrapModeU = _this.wrapModeV = TextureWrapMode.Clamp;
1737
1741
  return _this;
@@ -1858,7 +1862,7 @@ var GLCapabilityType;
1858
1862
  _proto.getCharInfo = function getCharInfo(char) {
1859
1863
  return this._charInfoMap[char.charCodeAt(0)];
1860
1864
  };
1861
- _createClass(FontAtlas, [
1865
+ _create_class(FontAtlas, [
1862
1866
  {
1863
1867
  key: "texture",
1864
1868
  get: function get() {
@@ -2006,7 +2010,7 @@ var GLCapabilityType;
2006
2010
  }
2007
2011
  return null;
2008
2012
  };
2009
- _createClass(Font, [
2013
+ _create_class(Font, [
2010
2014
  {
2011
2015
  key: "name",
2012
2016
  get: /**
@@ -2018,9 +2022,10 @@ var GLCapabilityType;
2018
2022
  ]);
2019
2023
  return Font;
2020
2024
  }(RefObject);
2021
- Font._fontMap = {};
2025
+ (function() {
2026
+ Font._fontMap = {};
2027
+ })();
2022
2028
 
2023
- var _Symbol_toStringTag = Symbol.toStringTag;
2024
2029
  var AssetPromise = /*#__PURE__*/ function() {
2025
2030
  function AssetPromise(executor) {
2026
2031
  var _this = this;
@@ -2139,9 +2144,9 @@ var AssetPromise = /*#__PURE__*/ function() {
2139
2144
  }
2140
2145
  });
2141
2146
  };
2142
- _createClass(AssetPromise, [
2147
+ _create_class(AssetPromise, [
2143
2148
  {
2144
- key: _Symbol_toStringTag,
2149
+ key: Symbol.toStringTag,
2145
2150
  get: /** compatible with Promise */ function get() {
2146
2151
  return "AssetPromise";
2147
2152
  }
@@ -2454,8 +2459,12 @@ var /** @internal */ PromiseState;
2454
2459
  };
2455
2460
  return ResourceManager;
2456
2461
  }();
2457
- /** Loader collection. */ ResourceManager._loaders = {};
2458
- ResourceManager._extTypeMapping = {};
2462
+ (function() {
2463
+ /** Loader collection. */ ResourceManager._loaders = {};
2464
+ })();
2465
+ (function() {
2466
+ ResourceManager._extTypeMapping = {};
2467
+ })();
2459
2468
  /**
2460
2469
  * Declare ResourceLoader's decorator.
2461
2470
  * @param assetType - Type of asset
@@ -2813,10 +2822,14 @@ var ComponentCloner = /*#__PURE__*/ function() {
2813
2822
  };
2814
2823
  return ComponentsDependencies;
2815
2824
  }();
2816
- /**
2825
+ (function() {
2826
+ /**
2817
2827
  * @internal
2818
2828
  */ ComponentsDependencies._dependenciesMap = new Map();
2819
- ComponentsDependencies._invDependenciesMap = new Map();
2829
+ })();
2830
+ (function() {
2831
+ ComponentsDependencies._invDependenciesMap = new Map();
2832
+ })();
2820
2833
  /**
2821
2834
  * Dependent components, automatically added if they do not exist.
2822
2835
  * @param components - Dependent components
@@ -2982,7 +2995,7 @@ ComponentsDependencies._invDependenciesMap = new Map();
2982
2995
  }
2983
2996
  }
2984
2997
  };
2985
- _createClass(Component, [
2998
+ _create_class(Component, [
2986
2999
  {
2987
3000
  key: "enabled",
2988
3001
  get: /**
@@ -3116,7 +3129,6 @@ __decorate([
3116
3129
  function Transform(entity) {
3117
3130
  var _this;
3118
3131
  _this = Component.call(this, entity) || this;
3119
- _this._dirtyFlag = 0xbc;
3120
3132
  _this._position = new Vector3();
3121
3133
  _this._rotation = new Vector3();
3122
3134
  _this._rotationQuaternion = new Quaternion();
@@ -3129,14 +3141,15 @@ __decorate([
3129
3141
  _this._worldMatrix = new Matrix();
3130
3142
  _this._isParentDirty = true;
3131
3143
  _this._parentTransformCache = null;
3144
+ _this._dirtyFlag = 0xbc;
3132
3145
  /** @internal */ _this._updateFlagManager = new UpdateFlagManager();
3133
- _this._onPositionChanged = _this._onPositionChanged.bind(_assertThisInitialized(_this));
3134
- _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assertThisInitialized(_this));
3135
- _this._onRotationChanged = _this._onRotationChanged.bind(_assertThisInitialized(_this));
3136
- _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assertThisInitialized(_this));
3137
- _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assertThisInitialized(_this));
3138
- _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assertThisInitialized(_this));
3139
- _this._onScaleChanged = _this._onScaleChanged.bind(_assertThisInitialized(_this));
3146
+ _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized(_this));
3147
+ _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized(_this));
3148
+ _this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized(_this));
3149
+ _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized(_this));
3150
+ _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3151
+ _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3152
+ _this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized(_this));
3140
3153
  //@ts-ignore
3141
3154
  _this._position._onValueChanged = _this._onPositionChanged;
3142
3155
  //@ts-ignore
@@ -3528,7 +3541,7 @@ __decorate([
3528
3541
  this._setDirtyFlagTrue(0x40);
3529
3542
  this._updateWorldScaleFlag();
3530
3543
  };
3531
- _createClass(Transform, [
3544
+ _create_class(Transform, [
3532
3545
  {
3533
3546
  key: "position",
3534
3547
  get: /**
@@ -3774,15 +3787,33 @@ __decorate([
3774
3787
  ]);
3775
3788
  return Transform;
3776
3789
  }(Component);
3777
- Transform._tempQuat0 = new Quaternion();
3778
- Transform._tempVec30 = new Vector3();
3779
- Transform._tempVec31 = new Vector3();
3780
- Transform._tempVec32 = new Vector3();
3781
- Transform._tempMat30 = new Matrix3x3();
3782
- Transform._tempMat31 = new Matrix3x3();
3783
- Transform._tempMat32 = new Matrix3x3();
3784
- Transform._tempMat41 = new Matrix();
3785
- Transform._tempMat42 = new Matrix();
3790
+ (function() {
3791
+ Transform._tempQuat0 = new Quaternion();
3792
+ })();
3793
+ (function() {
3794
+ Transform._tempVec30 = new Vector3();
3795
+ })();
3796
+ (function() {
3797
+ Transform._tempVec31 = new Vector3();
3798
+ })();
3799
+ (function() {
3800
+ Transform._tempVec32 = new Vector3();
3801
+ })();
3802
+ (function() {
3803
+ Transform._tempMat30 = new Matrix3x3();
3804
+ })();
3805
+ (function() {
3806
+ Transform._tempMat31 = new Matrix3x3();
3807
+ })();
3808
+ (function() {
3809
+ Transform._tempMat32 = new Matrix3x3();
3810
+ })();
3811
+ (function() {
3812
+ Transform._tempMat41 = new Matrix();
3813
+ })();
3814
+ (function() {
3815
+ Transform._tempMat42 = new Matrix();
3816
+ })();
3786
3817
  __decorate([
3787
3818
  deepClone
3788
3819
  ], Transform.prototype, "_position", void 0);
@@ -4282,7 +4313,7 @@ var TransformModifyFlags;
4282
4313
  this._traverseSetOwnerScene(children[i], scene);
4283
4314
  }
4284
4315
  };
4285
- _createClass(Entity, [
4316
+ _create_class(Entity, [
4286
4317
  {
4287
4318
  key: "isActive",
4288
4319
  get: /**
@@ -4500,7 +4531,7 @@ var TransformModifyFlags;
4500
4531
  }
4501
4532
  }
4502
4533
  };
4503
- _createClass(SystemInfo, null, [
4534
+ _create_class(SystemInfo, null, [
4504
4535
  {
4505
4536
  key: "devicePixelRatio",
4506
4537
  get: /**
@@ -4512,8 +4543,12 @@ var TransformModifyFlags;
4512
4543
  ]);
4513
4544
  return SystemInfo;
4514
4545
  }();
4515
- /** The platform is running on. */ SystemInfo.platform = Platform.Unknown;
4516
- /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4546
+ (function() {
4547
+ /** The platform is running on. */ SystemInfo.platform = Platform.Unknown;
4548
+ })();
4549
+ (function() {
4550
+ /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4551
+ })();
4517
4552
  SystemInfo._initialize();
4518
4553
 
4519
4554
  /**
@@ -5130,7 +5165,7 @@ SystemInfo._initialize();
5130
5165
  _proto._setGravity = function _setGravity() {
5131
5166
  this._nativePhysicsManager.setGravity(this._gravity);
5132
5167
  };
5133
- _createClass(PhysicsManager, [
5168
+ _create_class(PhysicsManager, [
5134
5169
  {
5135
5170
  key: "gravity",
5136
5171
  get: /**
@@ -5188,7 +5223,7 @@ SystemInfo._initialize();
5188
5223
  */ _proto._destroy = function _destroy() {
5189
5224
  this._nativeMaterial.destroy();
5190
5225
  };
5191
- _createClass(PhysicsMaterial, [
5226
+ _create_class(PhysicsMaterial, [
5192
5227
  {
5193
5228
  key: "bounciness",
5194
5229
  get: /**
@@ -5268,8 +5303,8 @@ var Collider = /*#__PURE__*/ function(Component) {
5268
5303
  function Collider(entity) {
5269
5304
  var _this;
5270
5305
  _this = Component.call(this, entity) || this;
5271
- _this._shapes = [];
5272
5306
  /** @internal */ _this._index = -1;
5307
+ _this._shapes = [];
5273
5308
  _this._updateFlag = _this.entity.transform.registerWorldChangeFlag();
5274
5309
  return _this;
5275
5310
  }
@@ -5348,7 +5383,7 @@ var Collider = /*#__PURE__*/ function(Component) {
5348
5383
  this.clearShapes();
5349
5384
  this._nativeCollider.destroy();
5350
5385
  };
5351
- _createClass(Collider, [
5386
+ _create_class(Collider, [
5352
5387
  {
5353
5388
  key: "shapes",
5354
5389
  get: /**
@@ -5388,7 +5423,7 @@ Collider = __decorate([
5388
5423
  _this._upDirection = new Vector3(0, 1, 0);
5389
5424
  _this._slopeLimit = 0.707;
5390
5425
  _this._nativeCollider = PhysicsManager._nativePhysics.createCharacterController();
5391
- _this._setUpDirection = _this._setUpDirection.bind(_assertThisInitialized(_this));
5426
+ _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
5392
5427
  //@ts-ignore
5393
5428
  _this._upDirection._onValueChanged = _this._setUpDirection;
5394
5429
  return _this;
@@ -5461,7 +5496,7 @@ Collider = __decorate([
5461
5496
  _proto._setUpDirection = function _setUpDirection() {
5462
5497
  this._nativeCollider.setUpDirection(this._upDirection);
5463
5498
  };
5464
- _createClass(CharacterController, [
5499
+ _create_class(CharacterController, [
5465
5500
  {
5466
5501
  key: "stepOffset",
5467
5502
  get: /**
@@ -5556,7 +5591,7 @@ Collider = __decorate([
5556
5591
  _proto._setRotation = function _setRotation() {
5557
5592
  this._nativeShape.setRotation(this._rotation);
5558
5593
  };
5559
- _createClass(ColliderShape, [
5594
+ _create_class(ColliderShape, [
5560
5595
  {
5561
5596
  key: "collider",
5562
5597
  get: /**
@@ -5644,7 +5679,9 @@ Collider = __decorate([
5644
5679
  ]);
5645
5680
  return ColliderShape;
5646
5681
  }();
5647
- ColliderShape._idGenerator = 0;
5682
+ (function() {
5683
+ ColliderShape._idGenerator = 0;
5684
+ })();
5648
5685
 
5649
5686
  /**
5650
5687
  * Physical collider shape for box.
@@ -5655,7 +5692,7 @@ ColliderShape._idGenerator = 0;
5655
5692
  _this = ColliderShape.call(this) || this;
5656
5693
  _this._size = new Vector3(1, 1, 1);
5657
5694
  _this._nativeShape = PhysicsManager._nativePhysics.createBoxColliderShape(_this._id, _this._size, _this._material._nativeMaterial);
5658
- _this._setSize = _this._setSize.bind(_assertThisInitialized(_this));
5695
+ _this._setSize = _this._setSize.bind(_assert_this_initialized(_this));
5659
5696
  //@ts-ignore
5660
5697
  _this._size._onValueChanged = _this._setSize;
5661
5698
  return _this;
@@ -5664,7 +5701,7 @@ ColliderShape._idGenerator = 0;
5664
5701
  _proto._setSize = function _setSize() {
5665
5702
  this._nativeShape.setSize(this._size);
5666
5703
  };
5667
- _createClass(BoxColliderShape, [
5704
+ _create_class(BoxColliderShape, [
5668
5705
  {
5669
5706
  key: "size",
5670
5707
  get: /**
@@ -5693,7 +5730,7 @@ ColliderShape._idGenerator = 0;
5693
5730
  _this._nativeShape = PhysicsManager._nativePhysics.createSphereColliderShape(_this._id, _this._radius, _this._material._nativeMaterial);
5694
5731
  return _this;
5695
5732
  }
5696
- _createClass(SphereColliderShape, [
5733
+ _create_class(SphereColliderShape, [
5697
5734
  {
5698
5735
  key: "radius",
5699
5736
  get: /**
@@ -5747,7 +5784,7 @@ ColliderShape._idGenerator = 0;
5747
5784
  _this._nativeShape = PhysicsManager._nativePhysics.createCapsuleColliderShape(_this._id, _this._radius, _this._height, _this._material._nativeMaterial);
5748
5785
  return _this;
5749
5786
  }
5750
- _createClass(CapsuleColliderShape, [
5787
+ _create_class(CapsuleColliderShape, [
5751
5788
  {
5752
5789
  key: "radius",
5753
5790
  get: /**
@@ -5806,7 +5843,7 @@ var Joint = /*#__PURE__*/ function(Component) {
5806
5843
  _this._connectedCollider.localPosition = new Vector3();
5807
5844
  return _this;
5808
5845
  }
5809
- _createClass(Joint, [
5846
+ _create_class(Joint, [
5810
5847
  {
5811
5848
  key: "connectedCollider",
5812
5849
  get: /**
@@ -5986,7 +6023,7 @@ Joint = __decorate([
5986
6023
  collider.collider = this.entity.getComponent(Collider);
5987
6024
  this._nativeJoint = PhysicsManager._nativePhysics.createHingeJoint(collider.collider._nativeCollider);
5988
6025
  };
5989
- _createClass(HingeJoint, [
6026
+ _create_class(HingeJoint, [
5990
6027
  {
5991
6028
  key: "axis",
5992
6029
  get: /**
@@ -6138,7 +6175,7 @@ Joint = __decorate([
6138
6175
  collider.collider = this.entity.getComponent(Collider);
6139
6176
  this._nativeJoint = PhysicsManager._nativePhysics.createSpringJoint(collider.collider._nativeCollider);
6140
6177
  };
6141
- _createClass(SpringJoint, [
6178
+ _create_class(SpringJoint, [
6142
6179
  {
6143
6180
  key: "swingOffset",
6144
6181
  get: /**
@@ -6294,10 +6331,10 @@ Joint = __decorate([
6294
6331
  _this._sleepThreshold = 5e-3;
6295
6332
  var transform = _this.entity.transform;
6296
6333
  _this._nativeCollider = PhysicsManager._nativePhysics.createDynamicCollider(transform.worldPosition, transform.worldRotationQuaternion);
6297
- _this._setLinearVelocity = _this._setLinearVelocity.bind(_assertThisInitialized(_this));
6298
- _this._setAngularVelocity = _this._setAngularVelocity.bind(_assertThisInitialized(_this));
6299
- _this._setCenterOfMass = _this._setCenterOfMass.bind(_assertThisInitialized(_this));
6300
- _this._setInertiaTensor = _this._setInertiaTensor.bind(_assertThisInitialized(_this));
6334
+ _this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized(_this));
6335
+ _this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized(_this));
6336
+ _this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized(_this));
6337
+ _this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized(_this));
6301
6338
  //@ts-ignore
6302
6339
  _this._linearVelocity._onValueChanged = _this._setLinearVelocity;
6303
6340
  //@ts-ignore
@@ -6355,7 +6392,7 @@ Joint = __decorate([
6355
6392
  _proto._setInertiaTensor = function _setInertiaTensor() {
6356
6393
  this._nativeCollider.setInertiaTensor(this._inertiaTensor);
6357
6394
  };
6358
- _createClass(DynamicCollider, [
6395
+ _create_class(DynamicCollider, [
6359
6396
  {
6360
6397
  key: "linearDamping",
6361
6398
  get: /**
@@ -6899,9 +6936,15 @@ var DynamicColliderConstraints;
6899
6936
  };
6900
6937
  return PointerManager;
6901
6938
  }();
6902
- PointerManager._tempRay = new Ray();
6903
- PointerManager._tempPoint = new Vector2();
6904
- PointerManager._tempHitResult = new HitResult();
6939
+ (function() {
6940
+ PointerManager._tempRay = new Ray();
6941
+ })();
6942
+ (function() {
6943
+ PointerManager._tempPoint = new Vector2();
6944
+ })();
6945
+ (function() {
6946
+ PointerManager._tempHitResult = new HitResult();
6947
+ })();
6905
6948
 
6906
6949
  /**
6907
6950
  * Wheel Manager.
@@ -7107,7 +7150,7 @@ PointerManager._tempHitResult = new HitResult();
7107
7150
  this._pointerManager._onFocus();
7108
7151
  this._keyboardManager._onFocus();
7109
7152
  };
7110
- _createClass(InputManager, [
7153
+ _create_class(InputManager, [
7111
7154
  {
7112
7155
  key: "pointers",
7113
7156
  get: /**
@@ -7294,8 +7337,12 @@ PointerManager._tempHitResult = new HitResult();
7294
7337
  }
7295
7338
  this._nameId = nameID;
7296
7339
  };
7297
- /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7298
- ShaderMacro._macroNameCounter = 0;
7340
+ (function() {
7341
+ /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7342
+ })();
7343
+ (function() {
7344
+ ShaderMacro._macroNameCounter = 0;
7345
+ })();
7299
7346
 
7300
7347
  /**
7301
7348
  * Shader macro collection.
@@ -7447,26 +7494,17 @@ ShaderMacro._macroNameCounter = 0;
7447
7494
  return ShaderMacroCollection;
7448
7495
  }();
7449
7496
 
7450
- function extends_() {
7451
- extends_ = Object.assign || function (target) {
7452
- for (var i = 1; i < arguments.length; i++) {
7453
- var source = arguments[i];
7454
-
7455
- for (var key in source) {
7456
- if (Object.prototype.hasOwnProperty.call(source, key)) {
7457
- target[key] = source[key];
7497
+ function _extends() {
7498
+ _extends = Object.assign || function assign(target) {
7499
+ for (var i = 1; i < arguments.length; i++) {
7500
+ var source = arguments[i];
7501
+ for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
7458
7502
  }
7459
- }
7460
- }
7461
-
7462
- return target;
7463
- };
7464
7503
 
7465
- return extends_.apply(this, arguments);
7466
- }
7504
+ return target;
7505
+ };
7467
7506
 
7468
- function _extends() {
7469
- return extends_.apply(this, arguments);
7507
+ return _extends.apply(this, arguments);
7470
7508
  }
7471
7509
 
7472
7510
  var camera_declare = "#define GLSLIFY 1\nuniform vec3 u_cameraPos;"; // eslint-disable-line
@@ -7479,8 +7517,6 @@ var transform_declare = "#define GLSLIFY 1\nuniform mat4 u_localMat;uniform mat4
7479
7517
 
7480
7518
  var color_share = "#define GLSLIFY 1\n#ifdef O3_HAS_VERTEXCOLOR\nvarying vec4 v_color;\n#endif\n"; // eslint-disable-line
7481
7519
 
7482
- var RendererFragmentDeclaration = "#define GLSLIFY 1\nuniform highp ivec4 oasis_RendererLayer;"; // eslint-disable-line
7483
-
7484
7520
  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
7485
7521
 
7486
7522
  var FogVertexDeclaration = "#define GLSLIFY 1\n#if OASIS_FOG_MODE != 0\nvarying vec3 v_positionVS;\n#endif\n"; // eslint-disable-line
@@ -7515,7 +7551,7 @@ var worldpos_vert = "#define GLSLIFY 1\n#ifdef O3_NEED_WORLDPOS\nvec4 temp_pos=u
7515
7551
 
7516
7552
  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
7517
7553
 
7518
- 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
7554
+ 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
7519
7555
 
7520
7556
  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
7521
7557
 
@@ -7607,7 +7643,6 @@ var ShaderLib = _extends({
7607
7643
  normal_share: normal_share,
7608
7644
  uv_share: uv_share,
7609
7645
  worldpos_share: worldpos_share,
7610
- RendererFragmentDeclaration: RendererFragmentDeclaration,
7611
7646
  FogVertexDeclaration: FogVertexDeclaration,
7612
7647
  FogFragmentDeclaration: FogFragmentDeclaration,
7613
7648
  begin_normal_vert: begin_normal_vert,
@@ -8311,7 +8346,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8311
8346
  return prefix + line;
8312
8347
  }).join("\n");
8313
8348
  };
8314
- _createClass(ShaderProgram, [
8349
+ _create_class(ShaderProgram, [
8315
8350
  {
8316
8351
  key: "isValid",
8317
8352
  get: /**
@@ -8323,7 +8358,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
8323
8358
  ]);
8324
8359
  return ShaderProgram;
8325
8360
  }();
8326
- ShaderProgram._counter = 0;
8361
+ (function() {
8362
+ ShaderProgram._counter = 0;
8363
+ })();
8327
8364
 
8328
8365
  /**
8329
8366
  * Shader pass containing vertex and fragment source.
@@ -8368,7 +8405,9 @@ ShaderProgram._counter = 0;
8368
8405
  };
8369
8406
  return ShaderPass;
8370
8407
  }();
8371
- ShaderPass._shaderPassCounter = 0;
8408
+ (function() {
8409
+ ShaderPass._shaderPassCounter = 0;
8410
+ })();
8372
8411
 
8373
8412
  /**
8374
8413
  * Shader property.
@@ -8377,7 +8416,7 @@ ShaderPass._shaderPassCounter = 0;
8377
8416
  this.name = name;
8378
8417
  this._uniqueId = ShaderProperty._propertyNameCounter++;
8379
8418
  }
8380
- _createClass(ShaderProperty, [
8419
+ _create_class(ShaderProperty, [
8381
8420
  {
8382
8421
  key: "type",
8383
8422
  get: /**
@@ -8389,7 +8428,9 @@ ShaderPass._shaderPassCounter = 0;
8389
8428
  ]);
8390
8429
  return ShaderProperty;
8391
8430
  }();
8392
- ShaderProperty._propertyNameCounter = 0;
8431
+ (function() {
8432
+ ShaderProperty._propertyNameCounter = 0;
8433
+ })();
8393
8434
 
8394
8435
  /**
8395
8436
  * Shader for rendering.
@@ -8502,7 +8543,7 @@ ShaderProperty._propertyNameCounter = 0;
8502
8543
  }
8503
8544
  }
8504
8545
  };
8505
- _createClass(Shader, [
8546
+ _create_class(Shader, [
8506
8547
  {
8507
8548
  key: "passes",
8508
8549
  get: /**
@@ -8514,18 +8555,34 @@ ShaderProperty._propertyNameCounter = 0;
8514
8555
  ]);
8515
8556
  return Shader;
8516
8557
  }();
8517
- /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8518
- /** @internal */ Shader._shaderExtension = [
8519
- "GL_EXT_shader_texture_lod",
8520
- "GL_OES_standard_derivatives",
8521
- "GL_EXT_draw_buffers"
8522
- ];
8523
- /** @internal */ Shader._propertyIdMap = Object.create(null);
8524
- Shader._shaderMap = Object.create(null);
8525
- Shader._propertyNameMap = Object.create(null);
8526
- Shader._macroMaskMap = [];
8527
- Shader._macroCounter = 0;
8528
- Shader._macroMap = Object.create(null);
8558
+ (function() {
8559
+ /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8560
+ })();
8561
+ (function() {
8562
+ /** @internal */ Shader._shaderExtension = [
8563
+ "GL_EXT_shader_texture_lod",
8564
+ "GL_OES_standard_derivatives",
8565
+ "GL_EXT_draw_buffers"
8566
+ ];
8567
+ })();
8568
+ (function() {
8569
+ /** @internal */ Shader._propertyIdMap = Object.create(null);
8570
+ })();
8571
+ (function() {
8572
+ Shader._shaderMap = Object.create(null);
8573
+ })();
8574
+ (function() {
8575
+ Shader._propertyNameMap = Object.create(null);
8576
+ })();
8577
+ (function() {
8578
+ Shader._macroMaskMap = [];
8579
+ })();
8580
+ (function() {
8581
+ Shader._macroCounter = 0;
8582
+ })();
8583
+ (function() {
8584
+ Shader._macroMap = Object.create(null);
8585
+ })();
8529
8586
 
8530
8587
  /**
8531
8588
  * Shader data collection,Correspondence includes shader properties data and macros data.
@@ -8783,9 +8840,9 @@ Shader._macroMap = Object.create(null);
8783
8840
  /** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
8784
8841
  /** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
8785
8842
  /** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
8843
+ /** @internal */ _this._lightIndex = -1;
8786
8844
  _this._color = new Color$1(1, 1, 1, 1);
8787
8845
  _this._lightColor = new Color$1();
8788
- /** @internal */ _this._lightIndex = -1;
8789
8846
  return _this;
8790
8847
  }
8791
8848
  var _proto = Light.prototype;
@@ -8796,7 +8853,7 @@ Shader._macroMap = Object.create(null);
8796
8853
  this._lightColor.a = this.color.a * this.intensity;
8797
8854
  return this._lightColor;
8798
8855
  };
8799
- _createClass(Light, [
8856
+ _create_class(Light, [
8800
8857
  {
8801
8858
  key: "color",
8802
8859
  get: /**
@@ -8833,9 +8890,11 @@ Shader._macroMap = Object.create(null);
8833
8890
  ]);
8834
8891
  return Light;
8835
8892
  }(Component);
8836
- /**
8893
+ (function() {
8894
+ /**
8837
8895
  * Each type of light source is at most 10, beyond which it will not take effect.
8838
8896
  * */ Light._maxLight = 10;
8897
+ })();
8839
8898
  __decorate([
8840
8899
  ignoreClone
8841
8900
  ], Light.prototype, "_lightIndex", void 0);
@@ -8893,7 +8952,7 @@ __decorate([
8893
8952
  shaderData.setFloatArray(DirectLight._colorProperty, data.color);
8894
8953
  shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
8895
8954
  };
8896
- _createClass(DirectLight, [
8955
+ _create_class(DirectLight, [
8897
8956
  {
8898
8957
  key: "direction",
8899
8958
  get: /**
@@ -8924,14 +8983,22 @@ __decorate([
8924
8983
  ]);
8925
8984
  return DirectLight;
8926
8985
  }(Light);
8927
- DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8928
- DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8929
- DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8930
- DirectLight._combinedData = {
8931
- cullingMask: new Int32Array(Light._maxLight * 2),
8932
- color: new Float32Array(Light._maxLight * 3),
8933
- direction: new Float32Array(Light._maxLight * 3)
8934
- };
8986
+ (function() {
8987
+ DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8988
+ })();
8989
+ (function() {
8990
+ DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8991
+ })();
8992
+ (function() {
8993
+ DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8994
+ })();
8995
+ (function() {
8996
+ DirectLight._combinedData = {
8997
+ cullingMask: new Int32Array(Light._maxLight * 2),
8998
+ color: new Float32Array(Light._maxLight * 3),
8999
+ direction: new Float32Array(Light._maxLight * 3)
9000
+ };
9001
+ })();
8935
9002
 
8936
9003
  /**
8937
9004
  * Point light.
@@ -8988,7 +9055,7 @@ DirectLight._combinedData = {
8988
9055
  shaderData.setFloatArray(PointLight._positionProperty, data.position);
8989
9056
  shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
8990
9057
  };
8991
- _createClass(PointLight, [
9058
+ _create_class(PointLight, [
8992
9059
  {
8993
9060
  key: "position",
8994
9061
  get: /**
@@ -9009,16 +9076,26 @@ DirectLight._combinedData = {
9009
9076
  ]);
9010
9077
  return PointLight;
9011
9078
  }(Light);
9012
- PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
9013
- PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
9014
- PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9015
- PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9016
- PointLight._combinedData = {
9017
- cullingMask: new Int32Array(Light._maxLight * 2),
9018
- color: new Float32Array(Light._maxLight * 3),
9019
- position: new Float32Array(Light._maxLight * 3),
9020
- distance: new Float32Array(Light._maxLight)
9021
- };
9079
+ (function() {
9080
+ PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
9081
+ })();
9082
+ (function() {
9083
+ PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
9084
+ })();
9085
+ (function() {
9086
+ PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9087
+ })();
9088
+ (function() {
9089
+ PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9090
+ })();
9091
+ (function() {
9092
+ PointLight._combinedData = {
9093
+ cullingMask: new Int32Array(Light._maxLight * 2),
9094
+ color: new Float32Array(Light._maxLight * 3),
9095
+ position: new Float32Array(Light._maxLight * 3),
9096
+ distance: new Float32Array(Light._maxLight)
9097
+ };
9098
+ })();
9022
9099
 
9023
9100
  /**
9024
9101
  * Spot light.
@@ -9092,7 +9169,7 @@ PointLight._combinedData = {
9092
9169
  shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
9093
9170
  shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
9094
9171
  };
9095
- _createClass(SpotLight, [
9172
+ _create_class(SpotLight, [
9096
9173
  {
9097
9174
  key: "position",
9098
9175
  get: /**
@@ -9134,22 +9211,38 @@ PointLight._combinedData = {
9134
9211
  ]);
9135
9212
  return SpotLight;
9136
9213
  }(Light);
9137
- SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9138
- SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9139
- SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9140
- SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9141
- SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9142
- SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9143
- SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9144
- SpotLight._combinedData = {
9145
- cullingMask: new Int32Array(Light._maxLight * 2),
9146
- color: new Float32Array(Light._maxLight * 3),
9147
- position: new Float32Array(Light._maxLight * 3),
9148
- direction: new Float32Array(Light._maxLight * 3),
9149
- distance: new Float32Array(Light._maxLight),
9150
- angleCos: new Float32Array(Light._maxLight),
9151
- penumbraCos: new Float32Array(Light._maxLight)
9152
- };
9214
+ (function() {
9215
+ SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9216
+ })();
9217
+ (function() {
9218
+ SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9219
+ })();
9220
+ (function() {
9221
+ SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9222
+ })();
9223
+ (function() {
9224
+ SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9225
+ })();
9226
+ (function() {
9227
+ SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9228
+ })();
9229
+ (function() {
9230
+ SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9231
+ })();
9232
+ (function() {
9233
+ SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9234
+ })();
9235
+ (function() {
9236
+ SpotLight._combinedData = {
9237
+ cullingMask: new Int32Array(Light._maxLight * 2),
9238
+ color: new Float32Array(Light._maxLight * 3),
9239
+ position: new Float32Array(Light._maxLight * 3),
9240
+ direction: new Float32Array(Light._maxLight * 3),
9241
+ distance: new Float32Array(Light._maxLight),
9242
+ angleCos: new Float32Array(Light._maxLight),
9243
+ penumbraCos: new Float32Array(Light._maxLight)
9244
+ };
9245
+ })();
9153
9246
 
9154
9247
  /**
9155
9248
  * Light manager.
@@ -9710,7 +9803,7 @@ SpotLight._combinedData = {
9710
9803
  /**
9711
9804
  * @override
9712
9805
  */ _proto._onDestroy = function _onDestroy() {};
9713
- _createClass(Material, [
9806
+ _create_class(Material, [
9714
9807
  {
9715
9808
  key: "shader",
9716
9809
  get: /**
@@ -9819,9 +9912,15 @@ var RenderElement = function RenderElement() {
9819
9912
  };
9820
9913
  return RenderContext;
9821
9914
  }();
9822
- /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9823
- RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9824
- RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9915
+ (function() {
9916
+ /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9917
+ })();
9918
+ (function() {
9919
+ RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9920
+ })();
9921
+ (function() {
9922
+ RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9923
+ })();
9825
9924
 
9826
9925
  var SpriteElement = /*#__PURE__*/ function(RenderElement) {
9827
9926
  _inherits(SpriteElement, RenderElement);
@@ -9876,7 +9975,6 @@ var Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9876
9975
  function Renderer1(entity) {
9877
9976
  var _this;
9878
9977
  _this = Component.call(this, entity) || this;
9879
- /** Whether cast shadow. */ _this.castShadows = true;
9880
9978
  /** ShaderData related to renderer. */ _this.shaderData = new ShaderData(ShaderDataGroup.Renderer);
9881
9979
  /** @internal */ _this._onUpdateIndex = -1;
9882
9980
  /** @internal */ _this._rendererIndex = -1;
@@ -9893,11 +9991,12 @@ var Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9893
9991
  _this._priority = 0;
9894
9992
  _this._receiveShadows = true;
9895
9993
  _this._rendererLayer = new Vector4();
9994
+ /** Whether cast shadow. */ _this.castShadows = true;
9896
9995
  var prototype = Renderer.prototype;
9897
9996
  var shaderData = _this.shaderData;
9898
9997
  _this._overrideUpdate = _this.update !== prototype.update;
9899
9998
  shaderData._addRefCount(1);
9900
- _this._onTransformChanged = _this._onTransformChanged.bind(_assertThisInitialized(_this));
9999
+ _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
9901
10000
  _this._registerEntityTransformListener();
9902
10001
  shaderData.enableMacro(Renderer._receiveShadowMacro);
9903
10002
  shaderData.setVector4(Renderer._rendererLayerProperty, _this._rendererLayer);
@@ -10082,7 +10181,7 @@ var Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10082
10181
  _proto._onTransformChanged = function _onTransformChanged(type) {
10083
10182
  this._dirtyUpdateFlag |= 0x1;
10084
10183
  };
10085
- _createClass(Renderer1, [
10184
+ _create_class(Renderer1, [
10086
10185
  {
10087
10186
  key: "isCulled",
10088
10187
  get: /**
@@ -10148,7 +10247,25 @@ var Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10148
10247
  }
10149
10248
  ]);
10150
10249
  return Renderer1;
10151
- }(Component), _Renderer._tempVector0 = new 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);
10250
+ }(Component), function() {
10251
+ _Renderer._tempVector0 = new Vector3();
10252
+ }(), function() {
10253
+ _Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS");
10254
+ }(), function() {
10255
+ _Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat");
10256
+ }(), function() {
10257
+ _Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat");
10258
+ }(), function() {
10259
+ _Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat");
10260
+ }(), function() {
10261
+ _Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat");
10262
+ }(), function() {
10263
+ _Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat");
10264
+ }(), function() {
10265
+ _Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat");
10266
+ }(), function() {
10267
+ _Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
10268
+ }(), _Renderer);
10152
10269
  __decorate([
10153
10270
  deepClone
10154
10271
  ], Renderer.prototype, "shaderData", void 0);
@@ -10278,14 +10395,18 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
10278
10395
  renderUVs[3].set(right, top);
10279
10396
  };
10280
10397
  return SimpleSpriteAssembler1;
10281
- }(), _SimpleSpriteAssembler._rectangleTriangles = [
10282
- 0,
10283
- 1,
10284
- 2,
10285
- 2,
10286
- 1,
10287
- 3
10288
- ], _SimpleSpriteAssembler._worldMatrix = new Matrix(), _SimpleSpriteAssembler);
10398
+ }(), function() {
10399
+ _SimpleSpriteAssembler._rectangleTriangles = [
10400
+ 0,
10401
+ 1,
10402
+ 2,
10403
+ 2,
10404
+ 1,
10405
+ 3
10406
+ ];
10407
+ }(), function() {
10408
+ _SimpleSpriteAssembler._worldMatrix = new Matrix();
10409
+ }(), _SimpleSpriteAssembler);
10289
10410
  SimpleSpriteAssembler = __decorate([
10290
10411
  StaticInterfaceImplement()
10291
10412
  ], SimpleSpriteAssembler);
@@ -10370,10 +10491,10 @@ SimpleSpriteAssembler = __decorate([
10370
10491
  _this._flipY = false;
10371
10492
  _this._alphaCutoff = 0.5;
10372
10493
  _this._renderData = new RenderData2D(4, [], []);
10373
- SimpleSpriteAssembler.resetData(_assertThisInitialized(_this));
10494
+ SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
10374
10495
  _this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
10375
10496
  _this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
10376
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
10497
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
10377
10498
  return _this;
10378
10499
  }
10379
10500
  var _proto = SpriteMask.prototype;
@@ -10441,7 +10562,7 @@ SimpleSpriteAssembler = __decorate([
10441
10562
  break;
10442
10563
  }
10443
10564
  };
10444
- _createClass(SpriteMask, [
10565
+ _create_class(SpriteMask, [
10445
10566
  {
10446
10567
  key: "width",
10447
10568
  get: /**
@@ -10543,8 +10664,12 @@ SimpleSpriteAssembler = __decorate([
10543
10664
  ]);
10544
10665
  return SpriteMask;
10545
10666
  }(Renderer);
10546
- /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10547
- /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10667
+ (function() {
10668
+ /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10669
+ })();
10670
+ (function() {
10671
+ /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10672
+ })();
10548
10673
  __decorate([
10549
10674
  assignmentClone
10550
10675
  ], SpriteMask.prototype, "influenceLayers", void 0);
@@ -10750,7 +10875,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10750
10875
  this._glElementInfo = BufferUtil._getElementInfo(this.format);
10751
10876
  this._instanceStepRate = Math.floor(instanceStepRate);
10752
10877
  }
10753
- _createClass(VertexElement, [
10878
+ _create_class(VertexElement, [
10754
10879
  {
10755
10880
  key: "semantic",
10756
10881
  get: /**
@@ -10910,7 +11035,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10910
11035
  gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
10911
11036
  this._byteLength = dataLength;
10912
11037
  };
10913
- _createClass(Buffer, [
11038
+ _create_class(Buffer, [
10914
11039
  {
10915
11040
  key: "type",
10916
11041
  get: /**
@@ -10959,7 +11084,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10959
11084
  this._buffer = buffer;
10960
11085
  this._format = format;
10961
11086
  }
10962
- _createClass(IndexBufferBinding, [
11087
+ _create_class(IndexBufferBinding, [
10963
11088
  {
10964
11089
  key: "buffer",
10965
11090
  get: /**
@@ -11008,8 +11133,8 @@ var BufferUtil = /*#__PURE__*/ function() {
11008
11133
  _this._bounds = new BoundingBox();
11009
11134
  _this._subMeshes = [];
11010
11135
  _this.name = name;
11011
- _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assertThisInitialized(_this));
11012
- _this._onBoundsChanged = _this._onBoundsChanged.bind(_assertThisInitialized(_this));
11136
+ _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized(_this));
11137
+ _this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized(_this));
11013
11138
  var bounds = _this._bounds;
11014
11139
  // @ts-ignore
11015
11140
  bounds.min._onValueChanged = _this._onBoundsChanged;
@@ -11126,7 +11251,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11126
11251
  _proto._onBoundsChanged = function _onBoundsChanged() {
11127
11252
  this._updateFlagManager.dispatch(0x1);
11128
11253
  };
11129
- _createClass(Mesh, [
11254
+ _create_class(Mesh, [
11130
11255
  {
11131
11256
  key: "bounds",
11132
11257
  get: /**
@@ -11172,7 +11297,7 @@ var MeshModifyFlags;
11172
11297
  this._buffer = buffer;
11173
11298
  this._stride = stride;
11174
11299
  }
11175
- _createClass(VertexBufferBinding, [
11300
+ _create_class(VertexBufferBinding, [
11176
11301
  {
11177
11302
  key: "buffer",
11178
11303
  get: /**
@@ -11618,13 +11743,27 @@ var MeshModifyFlags;
11618
11743
  };
11619
11744
  return BlendShapeManager;
11620
11745
  }();
11621
- BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11622
- BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11623
- BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11624
- BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11625
- BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11626
- BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11627
- BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11746
+ (function() {
11747
+ BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11748
+ })();
11749
+ (function() {
11750
+ BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11751
+ })();
11752
+ (function() {
11753
+ BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11754
+ })();
11755
+ (function() {
11756
+ BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11757
+ })();
11758
+ (function() {
11759
+ BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11760
+ })();
11761
+ (function() {
11762
+ BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11763
+ })();
11764
+ (function() {
11765
+ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11766
+ })();
11628
11767
 
11629
11768
  /**
11630
11769
  * Vertex attribute types of a vertex in a ModelMesh.
@@ -11681,7 +11820,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
11681
11820
  _this._customVertexElements = [];
11682
11821
  _this._vertexCountChanged = false;
11683
11822
  _this.name = name;
11684
- _this._blendShapeManager = new BlendShapeManager(engine, _assertThisInitialized(_this));
11823
+ _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
11685
11824
  return _this;
11686
11825
  }
11687
11826
  var _proto = ModelMesh.prototype;
@@ -12631,7 +12770,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12631
12770
  this._uv7 = null;
12632
12771
  this._blendShapeManager._releaseMemoryCache();
12633
12772
  };
12634
- _createClass(ModelMesh, [
12773
+ _create_class(ModelMesh, [
12635
12774
  {
12636
12775
  key: "accessible",
12637
12776
  get: /**
@@ -12699,11 +12838,21 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12699
12838
  ]);
12700
12839
  return ModelMesh;
12701
12840
  }(Mesh);
12702
- ModelMesh._tempVec0 = new Vector3();
12703
- ModelMesh._tempVec1 = new Vector3();
12704
- ModelMesh._tempVec2 = new Vector3();
12705
- ModelMesh._tempVec3 = new Vector3();
12706
- ModelMesh._tempVec4 = new Vector3();
12841
+ (function() {
12842
+ ModelMesh._tempVec0 = new Vector3();
12843
+ })();
12844
+ (function() {
12845
+ ModelMesh._tempVec1 = new Vector3();
12846
+ })();
12847
+ (function() {
12848
+ ModelMesh._tempVec2 = new Vector3();
12849
+ })();
12850
+ (function() {
12851
+ ModelMesh._tempVec3 = new Vector3();
12852
+ })();
12853
+ (function() {
12854
+ ModelMesh._tempVec4 = new Vector3();
12855
+ })();
12707
12856
  var VertexChangedFlags;
12708
12857
  (function(VertexChangedFlags) {
12709
12858
  VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
@@ -12746,7 +12895,7 @@ var VertexChangedFlags;
12746
12895
  function MeshRenderer(entity) {
12747
12896
  var _this;
12748
12897
  _this = Renderer.call(this, entity) || this;
12749
- _this._onMeshChanged = _this._onMeshChanged.bind(_assertThisInitialized(_this));
12898
+ _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
12750
12899
  return _this;
12751
12900
  }
12752
12901
  var _proto = MeshRenderer.prototype;
@@ -12849,7 +12998,7 @@ var VertexChangedFlags;
12849
12998
  type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
12850
12999
  type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
12851
13000
  };
12852
- _createClass(MeshRenderer, [
13001
+ _create_class(MeshRenderer, [
12853
13002
  {
12854
13003
  key: "mesh",
12855
13004
  get: /**
@@ -12866,11 +13015,21 @@ var VertexChangedFlags;
12866
13015
  ]);
12867
13016
  return MeshRenderer;
12868
13017
  }(Renderer);
12869
- MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
12870
- MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
12871
- MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
12872
- MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
12873
- MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
13018
+ (function() {
13019
+ MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
13020
+ })();
13021
+ (function() {
13022
+ MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
13023
+ })();
13024
+ (function() {
13025
+ MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
13026
+ })();
13027
+ (function() {
13028
+ MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
13029
+ })();
13030
+ (function() {
13031
+ MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
13032
+ })();
12874
13033
  __decorate([
12875
13034
  ignoreClone
12876
13035
  ], MeshRenderer.prototype, "_mesh", void 0);
@@ -12973,7 +13132,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
12973
13132
  // 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.
12974
13133
  maxVertexUniformVectors = Math.min(maxVertexUniformVectors, 256);
12975
13134
  _this._maxVertexUniformVectors = maxVertexUniformVectors;
12976
- _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assertThisInitialized(_this));
13135
+ _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
12977
13136
  var localBounds = _this._localBounds;
12978
13137
  // @ts-ignore
12979
13138
  localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
@@ -13171,7 +13330,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13171
13330
  _proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
13172
13331
  this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
13173
13332
  };
13174
- _createClass(SkinnedMeshRenderer, [
13333
+ _create_class(SkinnedMeshRenderer, [
13175
13334
  {
13176
13335
  key: "blendShapeWeights",
13177
13336
  get: /**
@@ -13236,10 +13395,18 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13236
13395
  ]);
13237
13396
  return SkinnedMeshRenderer;
13238
13397
  }(MeshRenderer);
13239
- SkinnedMeshRenderer._tempMatrix = new Matrix();
13240
- SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13241
- SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13242
- SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13398
+ (function() {
13399
+ SkinnedMeshRenderer._tempMatrix = new Matrix();
13400
+ })();
13401
+ (function() {
13402
+ SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13403
+ })();
13404
+ (function() {
13405
+ SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13406
+ })();
13407
+ (function() {
13408
+ SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13409
+ })();
13243
13410
  __decorate([
13244
13411
  ignoreClone
13245
13412
  ], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
@@ -14005,7 +14172,7 @@ __decorate([
14005
14172
  }
14006
14173
  this._setIndexBufferBinding(binding);
14007
14174
  };
14008
- _createClass(BufferMesh, [
14175
+ _create_class(BufferMesh, [
14009
14176
  {
14010
14177
  key: "instanceCount",
14011
14178
  get: /**
@@ -14119,7 +14286,7 @@ __decorate([
14119
14286
  this._layoutChangeManager.dispatch(0, this);
14120
14287
  }
14121
14288
  };
14122
- _createClass(BlendShape, [
14289
+ _create_class(BlendShape, [
14123
14290
  {
14124
14291
  key: "frames",
14125
14292
  get: /**
@@ -14277,8 +14444,12 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
14277
14444
  };
14278
14445
  return Basic2DBatcher;
14279
14446
  }();
14280
- /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14281
- Basic2DBatcher._canUploadSameBuffer = true;
14447
+ (function() {
14448
+ /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14449
+ })();
14450
+ (function() {
14451
+ Basic2DBatcher._canUploadSameBuffer = true;
14452
+ })();
14282
14453
 
14283
14454
  var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
14284
14455
  _inherits(SpriteMaskBatcher, Basic2DBatcher);
@@ -14493,9 +14664,15 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14493
14664
  };
14494
14665
  return Sky;
14495
14666
  }();
14496
- Sky._epsilon = 1e-6;
14497
- Sky._viewProjMatrix = new Matrix();
14498
- Sky._projectionMatrix = new Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14667
+ (function() {
14668
+ Sky._epsilon = 1e-6;
14669
+ })();
14670
+ (function() {
14671
+ Sky._viewProjMatrix = new Matrix();
14672
+ })();
14673
+ (function() {
14674
+ Sky._projectionMatrix = new Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14675
+ })();
14499
14676
 
14500
14677
  /**
14501
14678
  * Background of scene.
@@ -14577,7 +14754,7 @@ Sky._projectionMatrix = new Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon -
14577
14754
  mesh.addSubMesh(0, indices.length);
14578
14755
  return mesh;
14579
14756
  };
14580
- _createClass(Background, [
14757
+ _create_class(Background, [
14581
14758
  {
14582
14759
  key: "texture",
14583
14760
  get: /**
@@ -14745,7 +14922,7 @@ Sky._projectionMatrix = new Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon -
14745
14922
  out[25] = src[25] * 0.429042;
14746
14923
  out[26] = src[26] * 0.429042;
14747
14924
  };
14748
- _createClass(AmbientLight, [
14925
+ _create_class(AmbientLight, [
14749
14926
  {
14750
14927
  key: "specularTextureDecodeRGBM",
14751
14928
  get: /**
@@ -14856,15 +15033,33 @@ Sky._projectionMatrix = new Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon -
14856
15033
  ]);
14857
15034
  return AmbientLight;
14858
15035
  }();
14859
- AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
14860
- AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
14861
- AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
14862
- AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
14863
- AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
14864
- AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
14865
- AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
14866
- AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
14867
- AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15036
+ (function() {
15037
+ AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
15038
+ })();
15039
+ (function() {
15040
+ AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
15041
+ })();
15042
+ (function() {
15043
+ AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
15044
+ })();
15045
+ (function() {
15046
+ AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
15047
+ })();
15048
+ (function() {
15049
+ AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
15050
+ })();
15051
+ (function() {
15052
+ AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
15053
+ })();
15054
+ (function() {
15055
+ AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
15056
+ })();
15057
+ (function() {
15058
+ AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
15059
+ })();
15060
+ (function() {
15061
+ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15062
+ })();
14868
15063
 
14869
15064
  /**
14870
15065
  * Scene.
@@ -14895,7 +15090,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
14895
15090
  var shaderData = _this.shaderData;
14896
15091
  shaderData._addRefCount(1);
14897
15092
  _this.ambientLight = new AmbientLight();
14898
- engine.sceneManager._allScenes.push(_assertThisInitialized(_this));
15093
+ engine.sceneManager._allScenes.push(_assert_this_initialized(_this));
14899
15094
  shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
14900
15095
  shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
14901
15096
  shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
@@ -15102,7 +15297,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15102
15297
  this._fogParams.z = density / Math.LN2;
15103
15298
  this._fogParams.w = density / Math.sqrt(Math.LN2);
15104
15299
  };
15105
- _createClass(Scene, [
15300
+ _create_class(Scene, [
15106
15301
  {
15107
15302
  key: "shadowCascades",
15108
15303
  get: /**
@@ -15230,8 +15425,12 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15230
15425
  ]);
15231
15426
  return Scene;
15232
15427
  }(EngineObject);
15233
- Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15234
- Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15428
+ (function() {
15429
+ Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15430
+ })();
15431
+ (function() {
15432
+ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15433
+ })();
15235
15434
 
15236
15435
  /**
15237
15436
  * Scene manager.
@@ -15279,7 +15478,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15279
15478
  }
15280
15479
  allScenes.length = 0;
15281
15480
  };
15282
- _createClass(SceneManager, [
15481
+ _create_class(SceneManager, [
15283
15482
  {
15284
15483
  key: "activeScene",
15285
15484
  get: /**
@@ -15300,7 +15499,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15300
15499
  return SceneManager;
15301
15500
  }();
15302
15501
 
15303
- 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
15502
+ 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
15304
15503
 
15305
15504
  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
15306
15505
 
@@ -15308,7 +15507,7 @@ var particleFs = "#define GLSLIFY 1\nvarying vec4 v_color;varying float v_lifeLe
15308
15507
 
15309
15508
  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
15310
15509
 
15311
- 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
15510
+ 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
15312
15511
 
15313
15512
  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
15314
15513
 
@@ -15450,8 +15649,8 @@ ShaderPool.init();
15450
15649
  /** @internal */ _this._canSpriteBatch = true;
15451
15650
  /** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
15452
15651
  _this._settings = {};
15453
- _this._resourceManager = new ResourceManager(_assertThisInitialized(_this));
15454
- _this._sceneManager = new SceneManager(_assertThisInitialized(_this));
15652
+ _this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
15653
+ _this._sceneManager = new SceneManager(_assert_this_initialized(_this));
15455
15654
  _this._vSyncCount = 1;
15456
15655
  _this._targetFrameRate = 60;
15457
15656
  _this._time = new Time();
@@ -15475,25 +15674,25 @@ ShaderPool.init();
15475
15674
  };
15476
15675
  _this._hardwareRenderer = hardwareRenderer;
15477
15676
  _this._hardwareRenderer.init(canvas);
15478
- _this.physicsManager = new PhysicsManager(_assertThisInitialized(_this));
15677
+ _this.physicsManager = new PhysicsManager(_assert_this_initialized(_this));
15479
15678
  _this._canvas = canvas;
15480
- _this._sceneManager.activeScene = new Scene(_assertThisInitialized(_this), "DefaultScene");
15481
- _this._spriteMaskManager = new SpriteMaskManager(_assertThisInitialized(_this));
15679
+ _this._sceneManager.activeScene = new Scene(_assert_this_initialized(_this), "DefaultScene");
15680
+ _this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized(_this));
15482
15681
  _this._spriteDefaultMaterial = _this._createSpriteMaterial();
15483
15682
  _this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
15484
- _this._textDefaultFont = Font.createFromOS(_assertThisInitialized(_this), "Arial");
15683
+ _this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
15485
15684
  _this._textDefaultFont.isGCIgnored = false;
15486
- _this.inputManager = new InputManager(_assertThisInitialized(_this));
15685
+ _this.inputManager = new InputManager(_assert_this_initialized(_this));
15487
15686
  var magentaPixel = new Uint8Array([
15488
15687
  255,
15489
15688
  0,
15490
15689
  255,
15491
15690
  255
15492
15691
  ]);
15493
- var magentaTexture2D = new Texture2D(_assertThisInitialized(_this), 1, 1, TextureFormat.R8G8B8A8, false);
15692
+ var magentaTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, TextureFormat.R8G8B8A8, false);
15494
15693
  magentaTexture2D.setPixelBuffer(magentaPixel);
15495
15694
  magentaTexture2D.isGCIgnored = true;
15496
- var magentaTextureCube = new TextureCube(_assertThisInitialized(_this), 1, TextureFormat.R8G8B8A8, false);
15695
+ var magentaTextureCube = new TextureCube(_assert_this_initialized(_this), 1, TextureFormat.R8G8B8A8, false);
15497
15696
  magentaTextureCube.setPixelBuffer(TextureCubeFace.PositiveX, magentaPixel);
15498
15697
  magentaTextureCube.setPixelBuffer(TextureCubeFace.NegativeX, magentaPixel);
15499
15698
  magentaTextureCube.setPixelBuffer(TextureCubeFace.PositiveY, magentaPixel);
@@ -15504,22 +15703,22 @@ ShaderPool.init();
15504
15703
  if (!hardwareRenderer.canIUse(GLCapabilityType.depthTexture)) {
15505
15704
  _this._macroCollection.enable(Engine._noDepthTextureMacro);
15506
15705
  } else {
15507
- var depthTexture2D = new Texture2D(_assertThisInitialized(_this), 1, 1, TextureFormat.Depth16, false);
15706
+ var depthTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, TextureFormat.Depth16, false);
15508
15707
  depthTexture2D.isGCIgnored = true;
15509
15708
  _this._depthTexture2D = depthTexture2D;
15510
15709
  }
15511
15710
  _this._magentaTexture2D = magentaTexture2D;
15512
15711
  _this._magentaTextureCube = magentaTextureCube;
15513
15712
  if (hardwareRenderer.isWebGL2) {
15514
- var magentaTexture2DArray = new Texture2DArray(_assertThisInitialized(_this), 1, 1, 1, TextureFormat.R8G8B8A8, false);
15713
+ var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized(_this), 1, 1, 1, TextureFormat.R8G8B8A8, false);
15515
15714
  magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
15516
15715
  magentaTexture2DArray.isGCIgnored = true;
15517
15716
  _this._magentaTexture2DArray = magentaTexture2DArray;
15518
15717
  }
15519
- var magentaMaterial = new Material(_assertThisInitialized(_this), Shader.find("unlit"));
15718
+ var magentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
15520
15719
  magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
15521
15720
  _this._magentaMaterial = magentaMaterial;
15522
- var backgroundTextureMaterial = new Material(_assertThisInitialized(_this), Shader.find("background-texture"));
15721
+ var backgroundTextureMaterial = new Material(_assert_this_initialized(_this), Shader.find("background-texture"));
15523
15722
  backgroundTextureMaterial.isGCIgnored = true;
15524
15723
  backgroundTextureMaterial.renderState.depthState.compareFunction = CompareFunction.LessEqual;
15525
15724
  _this._backgroundTextureMaterial = backgroundTextureMaterial;
@@ -15690,7 +15889,7 @@ ShaderPool.init();
15690
15889
  material.isGCIgnored = true;
15691
15890
  return material;
15692
15891
  };
15693
- _createClass(Engine, [
15892
+ _create_class(Engine, [
15694
15893
  {
15695
15894
  key: "settings",
15696
15895
  get: /**
@@ -15778,9 +15977,15 @@ ShaderPool.init();
15778
15977
  ]);
15779
15978
  return Engine;
15780
15979
  }(EventDispatcher);
15781
- /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15782
- /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15783
- /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
15980
+ (function() {
15981
+ /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15982
+ })();
15983
+ (function() {
15984
+ /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15985
+ })();
15986
+ (function() {
15987
+ /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
15988
+ })();
15784
15989
 
15785
15990
  /**
15786
15991
  * Script class, used for logic writing.
@@ -16095,7 +16300,9 @@ __decorate([
16095
16300
  };
16096
16301
  return SpriteBatcher;
16097
16302
  }(Basic2DBatcher);
16098
- SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16303
+ (function() {
16304
+ SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16305
+ })();
16099
16306
 
16100
16307
  /**
16101
16308
  * Render queue.
@@ -16593,227 +16800,247 @@ var /**
16593
16800
  };
16594
16801
  return ShadowUtils;
16595
16802
  }();
16596
- ShadowUtils._tempMatrix0 = new Matrix();
16597
- // prettier-ignore
16598
- /** @internal */ ShadowUtils._shadowMapCoordMatrix = new 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);
16599
- ShadowUtils._frustumCorners = [
16600
- new Vector3(),
16601
- new Vector3(),
16602
- new Vector3(),
16603
- new Vector3(),
16604
- new Vector3(),
16605
- new Vector3(),
16606
- new Vector3(),
16607
- new Vector3()
16608
- ];
16609
- ShadowUtils._adjustNearPlane = new Plane(new Vector3());
16610
- ShadowUtils._adjustFarPlane = new Plane(new Vector3());
16611
- ShadowUtils._backPlaneFaces = new Array(5);
16612
- ShadowUtils._edgePlanePoint2 = new Vector3();
16613
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16614
- [
16615
- FrustumFace.Left,
16616
- FrustumFace.Right,
16617
- FrustumFace.Top,
16618
- FrustumFace.Bottom
16619
- ],
16620
- [
16621
- FrustumFace.Left,
16622
- FrustumFace.Right,
16623
- FrustumFace.Top,
16624
- FrustumFace.Bottom
16625
- ],
16626
- [
16627
- FrustumFace.Near,
16628
- FrustumFace.Far,
16629
- FrustumFace.Top,
16630
- FrustumFace.Bottom
16631
- ],
16632
- [
16633
- FrustumFace.Near,
16634
- FrustumFace.Far,
16635
- FrustumFace.Top,
16636
- FrustumFace.Bottom
16637
- ],
16638
- [
16639
- FrustumFace.Near,
16640
- FrustumFace.Far,
16641
- FrustumFace.Left,
16642
- FrustumFace.Right
16643
- ],
16644
- [
16645
- FrustumFace.Near,
16646
- FrustumFace.Far,
16647
- FrustumFace.Left,
16648
- FrustumFace.Right
16649
- ]
16650
- ];
16651
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16652
- [
16653
- // near, far, left, right, bottom, top
16654
- [
16655
- 8,
16656
- 8
16657
- ],
16658
- [
16659
- 8,
16660
- 8
16661
- ],
16662
- [
16663
- 4,
16664
- 5
16665
- ],
16666
- [
16667
- 6,
16668
- 7
16669
- ],
16670
- [
16671
- 7,
16672
- 4
16673
- ],
16674
- [
16675
- 5,
16676
- 6
16677
- ]
16678
- ],
16679
- [
16680
- // near, far, left, right, bottom, top
16681
- [
16682
- 8,
16683
- 8
16684
- ],
16685
- [
16686
- 8,
16687
- 8
16688
- ],
16689
- [
16690
- 1,
16691
- 0
16692
- ],
16693
- [
16694
- 3,
16695
- 2
16696
- ],
16697
- [
16698
- 0,
16699
- 3
16700
- ],
16701
- [
16702
- 2,
16703
- 1
16704
- ]
16705
- ],
16706
- [
16707
- // near, far, left, right, bottom, top
16708
- [
16709
- 5,
16710
- 4
16711
- ],
16712
- [
16713
- 0,
16714
- 1
16715
- ],
16716
- [
16717
- 8,
16718
- 8
16719
- ],
16720
- [
16721
- 8,
16722
- 8
16723
- ],
16724
- [
16725
- 4,
16726
- 0
16727
- ],
16728
- [
16729
- 1,
16730
- 5
16731
- ]
16732
- ],
16733
- [
16734
- // near, far, left, right, bottom, top
16735
- [
16736
- 7,
16737
- 6
16738
- ],
16739
- [
16740
- 2,
16741
- 3
16742
- ],
16743
- [
16744
- 8,
16745
- 8
16746
- ],
16747
- [
16748
- 8,
16749
- 8
16750
- ],
16751
- [
16752
- 3,
16753
- 7
16754
- ],
16755
- [
16756
- 6,
16757
- 2
16758
- ]
16759
- ],
16760
- [
16761
- // near, far, left, right, bottom, top
16803
+ (function() {
16804
+ ShadowUtils._tempMatrix0 = new Matrix();
16805
+ })();
16806
+ (function() {
16807
+ // prettier-ignore
16808
+ /** @internal */ ShadowUtils._shadowMapCoordMatrix = new 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);
16809
+ })();
16810
+ (function() {
16811
+ ShadowUtils._frustumCorners = [
16812
+ new Vector3(),
16813
+ new Vector3(),
16814
+ new Vector3(),
16815
+ new Vector3(),
16816
+ new Vector3(),
16817
+ new Vector3(),
16818
+ new Vector3(),
16819
+ new Vector3()
16820
+ ];
16821
+ })();
16822
+ (function() {
16823
+ ShadowUtils._adjustNearPlane = new Plane(new Vector3());
16824
+ })();
16825
+ (function() {
16826
+ ShadowUtils._adjustFarPlane = new Plane(new Vector3());
16827
+ })();
16828
+ (function() {
16829
+ ShadowUtils._backPlaneFaces = new Array(5);
16830
+ })();
16831
+ (function() {
16832
+ ShadowUtils._edgePlanePoint2 = new Vector3();
16833
+ })();
16834
+ (function() {
16835
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16762
16836
  [
16763
- 4,
16764
- 7
16837
+ FrustumFace.Left,
16838
+ FrustumFace.Right,
16839
+ FrustumFace.Top,
16840
+ FrustumFace.Bottom
16765
16841
  ],
16766
16842
  [
16767
- 3,
16768
- 0
16843
+ FrustumFace.Left,
16844
+ FrustumFace.Right,
16845
+ FrustumFace.Top,
16846
+ FrustumFace.Bottom
16769
16847
  ],
16770
16848
  [
16771
- 0,
16772
- 4
16849
+ FrustumFace.Near,
16850
+ FrustumFace.Far,
16851
+ FrustumFace.Top,
16852
+ FrustumFace.Bottom
16773
16853
  ],
16774
16854
  [
16775
- 7,
16776
- 3
16855
+ FrustumFace.Near,
16856
+ FrustumFace.Far,
16857
+ FrustumFace.Top,
16858
+ FrustumFace.Bottom
16777
16859
  ],
16778
16860
  [
16779
- 8,
16780
- 8
16861
+ FrustumFace.Near,
16862
+ FrustumFace.Far,
16863
+ FrustumFace.Left,
16864
+ FrustumFace.Right
16781
16865
  ],
16782
16866
  [
16783
- 8,
16784
- 8
16867
+ FrustumFace.Near,
16868
+ FrustumFace.Far,
16869
+ FrustumFace.Left,
16870
+ FrustumFace.Right
16785
16871
  ]
16786
- ],
16787
- [
16788
- // near, far, left, right, bottom, top
16872
+ ];
16873
+ })();
16874
+ (function() {
16875
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16789
16876
  [
16790
- 6,
16791
- 5
16877
+ // near, far, left, right, bottom, top
16878
+ [
16879
+ 8,
16880
+ 8
16881
+ ],
16882
+ [
16883
+ 8,
16884
+ 8
16885
+ ],
16886
+ [
16887
+ 4,
16888
+ 5
16889
+ ],
16890
+ [
16891
+ 6,
16892
+ 7
16893
+ ],
16894
+ [
16895
+ 7,
16896
+ 4
16897
+ ],
16898
+ [
16899
+ 5,
16900
+ 6
16901
+ ]
16792
16902
  ],
16793
16903
  [
16794
- 1,
16795
- 2
16904
+ // near, far, left, right, bottom, top
16905
+ [
16906
+ 8,
16907
+ 8
16908
+ ],
16909
+ [
16910
+ 8,
16911
+ 8
16912
+ ],
16913
+ [
16914
+ 1,
16915
+ 0
16916
+ ],
16917
+ [
16918
+ 3,
16919
+ 2
16920
+ ],
16921
+ [
16922
+ 0,
16923
+ 3
16924
+ ],
16925
+ [
16926
+ 2,
16927
+ 1
16928
+ ]
16796
16929
  ],
16797
16930
  [
16798
- 5,
16799
- 1
16931
+ // near, far, left, right, bottom, top
16932
+ [
16933
+ 5,
16934
+ 4
16935
+ ],
16936
+ [
16937
+ 0,
16938
+ 1
16939
+ ],
16940
+ [
16941
+ 8,
16942
+ 8
16943
+ ],
16944
+ [
16945
+ 8,
16946
+ 8
16947
+ ],
16948
+ [
16949
+ 4,
16950
+ 0
16951
+ ],
16952
+ [
16953
+ 1,
16954
+ 5
16955
+ ]
16800
16956
  ],
16801
16957
  [
16802
- 2,
16803
- 6
16958
+ // near, far, left, right, bottom, top
16959
+ [
16960
+ 7,
16961
+ 6
16962
+ ],
16963
+ [
16964
+ 2,
16965
+ 3
16966
+ ],
16967
+ [
16968
+ 8,
16969
+ 8
16970
+ ],
16971
+ [
16972
+ 8,
16973
+ 8
16974
+ ],
16975
+ [
16976
+ 3,
16977
+ 7
16978
+ ],
16979
+ [
16980
+ 6,
16981
+ 2
16982
+ ]
16804
16983
  ],
16805
16984
  [
16806
- 8,
16807
- 8
16985
+ // near, far, left, right, bottom, top
16986
+ [
16987
+ 4,
16988
+ 7
16989
+ ],
16990
+ [
16991
+ 3,
16992
+ 0
16993
+ ],
16994
+ [
16995
+ 0,
16996
+ 4
16997
+ ],
16998
+ [
16999
+ 7,
17000
+ 3
17001
+ ],
17002
+ [
17003
+ 8,
17004
+ 8
17005
+ ],
17006
+ [
17007
+ 8,
17008
+ 8
17009
+ ]
16808
17010
  ],
16809
17011
  [
16810
- 8,
16811
- 8
17012
+ // near, far, left, right, bottom, top
17013
+ [
17014
+ 6,
17015
+ 5
17016
+ ],
17017
+ [
17018
+ 1,
17019
+ 2
17020
+ ],
17021
+ [
17022
+ 5,
17023
+ 1
17024
+ ],
17025
+ [
17026
+ 2,
17027
+ 6
17028
+ ],
17029
+ [
17030
+ 8,
17031
+ 8
17032
+ ],
17033
+ [
17034
+ 8,
17035
+ 8
17036
+ ]
16812
17037
  ]
16813
- ]
16814
- ];
16815
- //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.
16816
- ShadowUtils.atlasBorderSize = 4.0;
17038
+ ];
17039
+ })();
17040
+ (function() {
17041
+ //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.
17042
+ ShadowUtils.atlasBorderSize = 4.0;
17043
+ })();
16817
17044
 
16818
17045
  /**
16819
17046
  * Cascade shadow caster.
@@ -17050,18 +17277,42 @@ ShadowUtils.atlasBorderSize = 4.0;
17050
17277
  };
17051
17278
  return CascadedShadowCasterPass;
17052
17279
  }();
17053
- CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17054
- CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17055
- CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17056
- CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17057
- CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17058
- CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17059
- CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17060
- CascadedShadowCasterPass._maxCascades = 4;
17061
- CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17062
- CascadedShadowCasterPass._clearColor = new Color$1(1, 1, 1, 1);
17063
- CascadedShadowCasterPass._tempVector = new Vector3();
17064
- CascadedShadowCasterPass._tempMatrix0 = new Matrix();
17280
+ (function() {
17281
+ CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17282
+ })();
17283
+ (function() {
17284
+ CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17285
+ })();
17286
+ (function() {
17287
+ CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17288
+ })();
17289
+ (function() {
17290
+ CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17291
+ })();
17292
+ (function() {
17293
+ CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17294
+ })();
17295
+ (function() {
17296
+ CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17297
+ })();
17298
+ (function() {
17299
+ CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17300
+ })();
17301
+ (function() {
17302
+ CascadedShadowCasterPass._maxCascades = 4;
17303
+ })();
17304
+ (function() {
17305
+ CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17306
+ })();
17307
+ (function() {
17308
+ CascadedShadowCasterPass._clearColor = new Color$1(1, 1, 1, 1);
17309
+ })();
17310
+ (function() {
17311
+ CascadedShadowCasterPass._tempVector = new Vector3();
17312
+ })();
17313
+ (function() {
17314
+ CascadedShadowCasterPass._tempMatrix0 = new Matrix();
17315
+ })();
17065
17316
 
17066
17317
  var passNum = 0;
17067
17318
  /**
@@ -17294,7 +17545,7 @@ var passNum = 0;
17294
17545
  renderer._prepareRender(context);
17295
17546
  }
17296
17547
  };
17297
- _createClass(BasicRenderPipeline, [
17548
+ _create_class(BasicRenderPipeline, [
17298
17549
  {
17299
17550
  key: "defaultRenderPass",
17300
17551
  get: /**
@@ -17306,15 +17557,25 @@ var passNum = 0;
17306
17557
  ]);
17307
17558
  return BasicRenderPipeline;
17308
17559
  }();
17309
- BasicRenderPipeline._tempVector0 = new Vector3();
17310
- BasicRenderPipeline._tempVector1 = new Vector3();
17560
+ (function() {
17561
+ BasicRenderPipeline._tempVector0 = new Vector3();
17562
+ })();
17563
+ (function() {
17564
+ BasicRenderPipeline._tempVector1 = new Vector3();
17565
+ })();
17311
17566
 
17312
17567
  var _Camera;
17313
17568
  var MathTemp = function MathTemp() {
17314
17569
  };
17315
- MathTemp.tempVec4 = new Vector4();
17316
- MathTemp.tempVec3 = new Vector3();
17317
- MathTemp.tempVec2 = new Vector2();
17570
+ (function() {
17571
+ MathTemp.tempVec4 = new Vector4();
17572
+ })();
17573
+ (function() {
17574
+ MathTemp.tempVec3 = new Vector3();
17575
+ })();
17576
+ (function() {
17577
+ MathTemp.tempVec2 = new Vector2();
17578
+ })();
17318
17579
  var Camera = (_Camera = /*#__PURE__*/ function(Component) {
17319
17580
  _inherits(Camera1, Component);
17320
17581
  function Camera1(entity) {
@@ -17332,6 +17593,8 @@ var Camera = (_Camera = /*#__PURE__*/ function(Component) {
17332
17593
  * @remarks Support bit manipulation, corresponding to `Layer`.
17333
17594
  */ _this.cullingMask = Layer.Everything;
17334
17595
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
17596
+ /** @internal */ _this._frustum = new BoundingFrustum();
17597
+ /** @internal */ _this._virtualCamera = new VirtualCamera();
17335
17598
  _this._isProjMatSetting = false;
17336
17599
  _this._nearClipPlane = 0.1;
17337
17600
  _this._farClipPlane = 100;
@@ -17342,8 +17605,6 @@ var Camera = (_Camera = /*#__PURE__*/ function(Component) {
17342
17605
  _this._isFrustumProjectDirty = true;
17343
17606
  _this._customAspectRatio = undefined;
17344
17607
  _this._renderTarget = null;
17345
- /** @internal */ _this._frustum = new BoundingFrustum();
17346
- /** @internal */ _this._virtualCamera = new VirtualCamera();
17347
17608
  _this._viewport = new Vector4(0, 0, 1, 1);
17348
17609
  _this._inverseProjectionMatrix = new Matrix();
17349
17610
  _this._lastAspectSize = new Vector2(0, 0);
@@ -17353,7 +17614,7 @@ var Camera = (_Camera = /*#__PURE__*/ function(Component) {
17353
17614
  _this._isViewMatrixDirty = transform.registerWorldChangeFlag();
17354
17615
  _this._isInvViewProjDirty = transform.registerWorldChangeFlag();
17355
17616
  _this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
17356
- _this._renderPipeline = new BasicRenderPipeline(_assertThisInitialized(_this));
17617
+ _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
17357
17618
  _this.shaderData._addRefCount(1);
17358
17619
  return _this;
17359
17620
  }
@@ -17570,7 +17831,7 @@ var Camera = (_Camera = /*#__PURE__*/ function(Component) {
17570
17831
  }
17571
17832
  return this._inverseProjectionMatrix;
17572
17833
  };
17573
- _createClass(Camera1, [
17834
+ _create_class(Camera1, [
17574
17835
  {
17575
17836
  key: "nearClipPlane",
17576
17837
  get: /**
@@ -17734,7 +17995,11 @@ var Camera = (_Camera = /*#__PURE__*/ function(Component) {
17734
17995
  }
17735
17996
  ]);
17736
17997
  return Camera1;
17737
- }(Component), /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat"), /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos"), _Camera);
17998
+ }(Component), function() {
17999
+ /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat");
18000
+ }(), function() {
18001
+ /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
18002
+ }(), _Camera);
17738
18003
  __decorate([
17739
18004
  deepClone
17740
18005
  ], Camera.prototype, "_frustum", void 0);
@@ -17945,7 +18210,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
17945
18210
  };
17946
18211
  return Loader;
17947
18212
  }();
17948
- Loader._engineObjects = {};
18213
+ (function() {
18214
+ Loader._engineObjects = {};
18215
+ })();
17949
18216
 
17950
18217
  /**
17951
18218
  * Asset Type.
@@ -18098,7 +18365,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18098
18365
  target._isTransparent = this._isTransparent;
18099
18366
  target._blendMode = this._blendMode;
18100
18367
  };
18101
- _createClass(BaseMaterial, [
18368
+ _create_class(BaseMaterial, [
18102
18369
  {
18103
18370
  key: "shader",
18104
18371
  get: /**
@@ -18198,19 +18465,45 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18198
18465
  ]);
18199
18466
  return BaseMaterial;
18200
18467
  }(Material);
18201
- BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18202
- BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18203
- BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18204
- BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18205
- BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18206
- BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18207
- BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18208
- BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18209
- BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18210
- BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18211
- BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18212
- BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18213
- BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18468
+ (function() {
18469
+ BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18470
+ })();
18471
+ (function() {
18472
+ BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18473
+ })();
18474
+ (function() {
18475
+ BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18476
+ })();
18477
+ (function() {
18478
+ BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18479
+ })();
18480
+ (function() {
18481
+ BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18482
+ })();
18483
+ (function() {
18484
+ BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18485
+ })();
18486
+ (function() {
18487
+ BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18488
+ })();
18489
+ (function() {
18490
+ BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18491
+ })();
18492
+ (function() {
18493
+ BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18494
+ })();
18495
+ (function() {
18496
+ BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18497
+ })();
18498
+ (function() {
18499
+ BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18500
+ })();
18501
+ (function() {
18502
+ BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18503
+ })();
18504
+ (function() {
18505
+ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18506
+ })();
18214
18507
 
18215
18508
  /**
18216
18509
  * Blinn-phong Material.
@@ -18238,7 +18531,7 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18238
18531
  this.cloneTo(dest);
18239
18532
  return dest;
18240
18533
  };
18241
- _createClass(BlinnPhongMaterial, [
18534
+ _create_class(BlinnPhongMaterial, [
18242
18535
  {
18243
18536
  key: "baseColor",
18244
18537
  get: /**
@@ -18384,9 +18677,15 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18384
18677
  ]);
18385
18678
  return BlinnPhongMaterial;
18386
18679
  }(BaseMaterial);
18387
- BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18388
- BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18389
- BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
18680
+ (function() {
18681
+ BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18682
+ })();
18683
+ (function() {
18684
+ BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18685
+ })();
18686
+ (function() {
18687
+ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
18688
+ })();
18390
18689
 
18391
18690
  /**
18392
18691
  * Texture UV coordinate.
@@ -18422,7 +18721,7 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18422
18721
  shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
18423
18722
  return _this;
18424
18723
  }
18425
- _createClass(PBRBaseMaterial, [
18724
+ _create_class(PBRBaseMaterial, [
18426
18725
  {
18427
18726
  key: "baseColor",
18428
18727
  get: /**
@@ -18646,14 +18945,30 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18646
18945
  ]);
18647
18946
  return PBRBaseMaterial;
18648
18947
  }(BaseMaterial);
18649
- PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18650
- PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18651
- PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18652
- PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18653
- PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18654
- PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18655
- PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18656
- PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
18948
+ (function() {
18949
+ PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18950
+ })();
18951
+ (function() {
18952
+ PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18953
+ })();
18954
+ (function() {
18955
+ PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18956
+ })();
18957
+ (function() {
18958
+ PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18959
+ })();
18960
+ (function() {
18961
+ PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18962
+ })();
18963
+ (function() {
18964
+ PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18965
+ })();
18966
+ (function() {
18967
+ PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18968
+ })();
18969
+ (function() {
18970
+ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
18971
+ })();
18657
18972
 
18658
18973
  /**
18659
18974
  * PBR (Metallic-Roughness Workflow) Material.
@@ -18674,7 +18989,7 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18674
18989
  this.cloneTo(dest);
18675
18990
  return dest;
18676
18991
  };
18677
- _createClass(PBRMaterial, [
18992
+ _create_class(PBRMaterial, [
18678
18993
  {
18679
18994
  key: "metallic",
18680
18995
  get: /**
@@ -18717,9 +19032,15 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18717
19032
  ]);
18718
19033
  return PBRMaterial;
18719
19034
  }(PBRBaseMaterial);
18720
- PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
18721
- PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
18722
- PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
19035
+ (function() {
19036
+ PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
19037
+ })();
19038
+ (function() {
19039
+ PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
19040
+ })();
19041
+ (function() {
19042
+ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
19043
+ })();
18723
19044
 
18724
19045
  /**
18725
19046
  * PBR (Specular-Glossiness Workflow) Material.
@@ -18740,7 +19061,7 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18740
19061
  this.cloneTo(dest);
18741
19062
  return dest;
18742
19063
  };
18743
- _createClass(PBRSpecularMaterial, [
19064
+ _create_class(PBRSpecularMaterial, [
18744
19065
  {
18745
19066
  key: "specularColor",
18746
19067
  get: /**
@@ -18786,10 +19107,18 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18786
19107
  ]);
18787
19108
  return PBRSpecularMaterial;
18788
19109
  }(PBRBaseMaterial);
18789
- PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
18790
- PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
18791
- PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
18792
- PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19110
+ (function() {
19111
+ PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
19112
+ })();
19113
+ (function() {
19114
+ PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
19115
+ })();
19116
+ (function() {
19117
+ PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
19118
+ })();
19119
+ (function() {
19120
+ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19121
+ })();
18793
19122
 
18794
19123
  /**
18795
19124
  * Unlit Material.
@@ -18813,7 +19142,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
18813
19142
  this.cloneTo(dest);
18814
19143
  return dest;
18815
19144
  };
18816
- _createClass(UnlitMaterial, [
19145
+ _create_class(UnlitMaterial, [
18817
19146
  {
18818
19147
  key: "baseColor",
18819
19148
  get: /**
@@ -18947,7 +19276,7 @@ var TextVerticalAlignment;
18947
19276
  this._sprites = null;
18948
19277
  this._spriteNamesToIndex = null;
18949
19278
  };
18950
- _createClass(SpriteAtlas, [
19279
+ _create_class(SpriteAtlas, [
18951
19280
  {
18952
19281
  key: "sprites",
18953
19282
  get: /**
@@ -19118,7 +19447,7 @@ var TextVerticalAlignment;
19118
19447
  }
19119
19448
  this._updateFlagManager.dispatch(type);
19120
19449
  };
19121
- _createClass(Sprite, [
19450
+ _create_class(Sprite, [
19122
19451
  {
19123
19452
  key: "texture",
19124
19453
  get: /**
@@ -19407,7 +19736,9 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
19407
19736
  };
19408
19737
  SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
19409
19738
  return SlicedSpriteAssembler1;
19410
- }(), _SlicedSpriteAssembler._worldMatrix = new Matrix(), _SlicedSpriteAssembler);
19739
+ }(), function() {
19740
+ _SlicedSpriteAssembler._worldMatrix = new Matrix();
19741
+ }(), _SlicedSpriteAssembler);
19411
19742
  SlicedSpriteAssembler = __decorate([
19412
19743
  StaticInterfaceImplement()
19413
19744
  ], SlicedSpriteAssembler);
@@ -19430,7 +19761,7 @@ SlicedSpriteAssembler = __decorate([
19430
19761
  _this._renderData = new RenderData2D(4, [], [], null, _this._color);
19431
19762
  _this.drawMode = SpriteDrawMode.Simple;
19432
19763
  _this.setMaterial(_this._engine._spriteDefaultMaterial);
19433
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
19764
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
19434
19765
  return _this;
19435
19766
  }
19436
19767
  var _proto = SpriteRenderer.prototype;
@@ -19535,7 +19866,7 @@ SlicedSpriteAssembler = __decorate([
19535
19866
  break;
19536
19867
  }
19537
19868
  };
19538
- _createClass(SpriteRenderer, [
19869
+ _create_class(SpriteRenderer, [
19539
19870
  {
19540
19871
  key: "drawMode",
19541
19872
  get: /**
@@ -19684,7 +20015,9 @@ SlicedSpriteAssembler = __decorate([
19684
20015
  ]);
19685
20016
  return SpriteRenderer;
19686
20017
  }(Renderer);
19687
- /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20018
+ (function() {
20019
+ /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20020
+ })();
19688
20021
  __decorate([
19689
20022
  ignoreClone
19690
20023
  ], SpriteRenderer.prototype, "_renderData", void 0);
@@ -19741,14 +20074,16 @@ var /**
19741
20074
  ];
19742
20075
  this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
19743
20076
  };
19744
- CharRenderData.triangles = [
19745
- 0,
19746
- 2,
19747
- 1,
19748
- 2,
19749
- 0,
19750
- 3
19751
- ];
20077
+ (function() {
20078
+ CharRenderData.triangles = [
20079
+ 0,
20080
+ 2,
20081
+ 1,
20082
+ 2,
20083
+ 0,
20084
+ 3
20085
+ ];
20086
+ })();
19752
20087
 
19753
20088
  /**
19754
20089
  * @internal
@@ -20072,23 +20407,37 @@ CharRenderData.triangles = [
20072
20407
  };
20073
20408
  return TextUtils;
20074
20409
  }();
20075
- /** @internal */ TextUtils._genericFontFamilies = [
20076
- "serif",
20077
- "sans-serif",
20078
- "monospace",
20079
- "cursive",
20080
- "fantasy",
20081
- "system-ui",
20082
- "math",
20083
- "emoji",
20084
- "fangsong"
20085
- ];
20086
- /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20087
- TextUtils._measureBaseline = "M";
20088
- TextUtils._heightMultiplier = 2;
20089
- TextUtils._baselineMultiplier = 1.4;
20090
- TextUtils._fontSizeInfoCache = {};
20091
- TextUtils._textContext = null;
20410
+ (function() {
20411
+ /** @internal */ TextUtils._genericFontFamilies = [
20412
+ "serif",
20413
+ "sans-serif",
20414
+ "monospace",
20415
+ "cursive",
20416
+ "fantasy",
20417
+ "system-ui",
20418
+ "math",
20419
+ "emoji",
20420
+ "fangsong"
20421
+ ];
20422
+ })();
20423
+ (function() {
20424
+ /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20425
+ })();
20426
+ (function() {
20427
+ TextUtils._measureBaseline = "M";
20428
+ })();
20429
+ (function() {
20430
+ TextUtils._heightMultiplier = 2;
20431
+ })();
20432
+ (function() {
20433
+ TextUtils._baselineMultiplier = 1.4;
20434
+ })();
20435
+ (function() {
20436
+ TextUtils._fontSizeInfoCache = {};
20437
+ })();
20438
+ (function() {
20439
+ TextUtils._textContext = null;
20440
+ })();
20092
20441
 
20093
20442
  /**
20094
20443
  * Renders a text for 2D graphics.
@@ -20115,7 +20464,7 @@ TextUtils._textContext = null;
20115
20464
  _this._overflowMode = OverflowMode.Overflow;
20116
20465
  _this._maskInteraction = SpriteMaskInteraction.None;
20117
20466
  _this._maskLayer = SpriteMaskLayer.Layer0;
20118
- var engine = _assertThisInitialized(_this).engine;
20467
+ var engine = _assert_this_initialized(_this).engine;
20119
20468
  _this._font = engine._textDefaultFont;
20120
20469
  _this._font._addRefCount(1);
20121
20470
  _this.setMaterial(engine._spriteDefaultMaterial);
@@ -20354,7 +20703,7 @@ TextUtils._textContext = null;
20354
20703
  Renderer.prototype._onTransformChanged.call(this, bit);
20355
20704
  this._setDirtyFlagTrue(0x4 | 0x8);
20356
20705
  };
20357
- _createClass(TextRenderer, [
20706
+ _create_class(TextRenderer, [
20358
20707
  {
20359
20708
  key: "color",
20360
20709
  get: /**
@@ -20567,9 +20916,15 @@ TextUtils._textContext = null;
20567
20916
  ]);
20568
20917
  return TextRenderer;
20569
20918
  }(Renderer);
20570
- TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20571
- TextRenderer._tempVec30 = new Vector3();
20572
- TextRenderer._tempVec31 = new Vector3();
20919
+ (function() {
20920
+ TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20921
+ })();
20922
+ (function() {
20923
+ TextRenderer._tempVec30 = new Vector3();
20924
+ })();
20925
+ (function() {
20926
+ TextRenderer._tempVec31 = new Vector3();
20927
+ })();
20573
20928
  __decorate([
20574
20929
  assignmentClone
20575
20930
  ], TextRenderer.prototype, "_subFont", void 0);
@@ -20786,7 +21141,9 @@ var DirtyFlag;
20786
21141
  };
20787
21142
  return AnimationCurveOwner;
20788
21143
  }();
20789
- AnimationCurveOwner._assemblerMap = new Map();
21144
+ (function() {
21145
+ AnimationCurveOwner._assemblerMap = new Map();
21146
+ })();
20790
21147
 
20791
21148
  /**
20792
21149
  * @internal
@@ -20960,7 +21317,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
20960
21317
  }
20961
21318
  }
20962
21319
  };
20963
- _createClass(AnimationClip, [
21320
+ _create_class(AnimationClip, [
20964
21321
  {
20965
21322
  key: "events",
20966
21323
  get: /**
@@ -21108,7 +21465,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21108
21465
  var result = this._evaluate(time, evaluateData);
21109
21466
  return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
21110
21467
  };
21111
- _createClass(AnimationCurve, [
21468
+ _create_class(AnimationCurve, [
21112
21469
  {
21113
21470
  key: "interpolation",
21114
21471
  get: /**
@@ -21218,7 +21575,11 @@ var AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Animati
21218
21575
  return out;
21219
21576
  };
21220
21577
  return AnimationArrayCurve;
21221
- }(AnimationCurve), /** @internal */ _AnimationArrayCurve._isReferenceType = true, /** @internal */ _AnimationArrayCurve._isInterpolationType = true, _AnimationArrayCurve);
21578
+ }(AnimationCurve), function() {
21579
+ /** @internal */ _AnimationArrayCurve._isReferenceType = true;
21580
+ }(), function() {
21581
+ /** @internal */ _AnimationArrayCurve._isInterpolationType = true;
21582
+ }(), _AnimationArrayCurve);
21222
21583
  AnimationArrayCurve = __decorate([
21223
21584
  StaticInterfaceImplement()
21224
21585
  ], AnimationArrayCurve);
@@ -21271,7 +21632,11 @@ var AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Animation
21271
21632
  return frame.value;
21272
21633
  };
21273
21634
  return AnimationBoolCurve;
21274
- }(AnimationCurve), /** @internal */ _AnimationBoolCurve._isReferenceType = false, /** @internal */ _AnimationBoolCurve._isInterpolationType = false, _AnimationBoolCurve);
21635
+ }(AnimationCurve), function() {
21636
+ /** @internal */ _AnimationBoolCurve._isReferenceType = false;
21637
+ }(), function() {
21638
+ /** @internal */ _AnimationBoolCurve._isInterpolationType = false;
21639
+ }(), _AnimationBoolCurve);
21275
21640
  AnimationBoolCurve = __decorate([
21276
21641
  StaticInterfaceImplement()
21277
21642
  ], AnimationBoolCurve);
@@ -21364,7 +21729,11 @@ var AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Animati
21364
21729
  return out;
21365
21730
  };
21366
21731
  return AnimationColorCurve;
21367
- }(AnimationCurve), /** @internal */ _AnimationColorCurve._isReferenceType = true, /** @internal */ _AnimationColorCurve._isInterpolationType = true, _AnimationColorCurve);
21732
+ }(AnimationCurve), function() {
21733
+ /** @internal */ _AnimationColorCurve._isReferenceType = true;
21734
+ }(), function() {
21735
+ /** @internal */ _AnimationColorCurve._isInterpolationType = true;
21736
+ }(), _AnimationColorCurve);
21368
21737
  AnimationColorCurve = __decorate([
21369
21738
  StaticInterfaceImplement()
21370
21739
  ], AnimationColorCurve);
@@ -21460,7 +21829,11 @@ var AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ functi
21460
21829
  return out;
21461
21830
  };
21462
21831
  return AnimationFloatArrayCurve;
21463
- }(AnimationCurve), /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true, /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true, _AnimationFloatArrayCurve);
21832
+ }(AnimationCurve), function() {
21833
+ /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true;
21834
+ }(), function() {
21835
+ /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
21836
+ }(), _AnimationFloatArrayCurve);
21464
21837
  AnimationFloatArrayCurve = __decorate([
21465
21838
  StaticInterfaceImplement()
21466
21839
  ], AnimationFloatArrayCurve);
@@ -21525,7 +21898,11 @@ var AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Animati
21525
21898
  }
21526
21899
  };
21527
21900
  return AnimationFloatCurve;
21528
- }(AnimationCurve), /** @internal */ _AnimationFloatCurve._isReferenceType = false, /** @internal */ _AnimationFloatCurve._isInterpolationType = true, _AnimationFloatCurve);
21901
+ }(AnimationCurve), function() {
21902
+ /** @internal */ _AnimationFloatCurve._isReferenceType = false;
21903
+ }(), function() {
21904
+ /** @internal */ _AnimationFloatCurve._isInterpolationType = true;
21905
+ }(), _AnimationFloatCurve);
21529
21906
  AnimationFloatCurve = __decorate([
21530
21907
  StaticInterfaceImplement()
21531
21908
  ], AnimationFloatCurve);
@@ -21623,7 +22000,13 @@ var AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ functi
21623
22000
  return out;
21624
22001
  };
21625
22002
  return AnimationQuaternionCurve1;
21626
- }(AnimationCurve), /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true, /** @internal */ _AnimationQuaternionCurve._isReferenceType = true, /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new Quaternion(), _AnimationQuaternionCurve);
22003
+ }(AnimationCurve), function() {
22004
+ /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true;
22005
+ }(), function() {
22006
+ /** @internal */ _AnimationQuaternionCurve._isReferenceType = true;
22007
+ }(), function() {
22008
+ /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new Quaternion();
22009
+ }(), _AnimationQuaternionCurve);
21627
22010
  AnimationQuaternionCurve = __decorate([
21628
22011
  StaticInterfaceImplement()
21629
22012
  ], AnimationQuaternionCurve);
@@ -21704,7 +22087,11 @@ var AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function(Ani
21704
22087
  return out;
21705
22088
  };
21706
22089
  return AnimationVector2Curve;
21707
- }(AnimationCurve), /** @internal */ _AnimationVector2Curve._isReferenceType = true, /** @internal */ _AnimationVector2Curve._isInterpolationType = true, _AnimationVector2Curve);
22090
+ }(AnimationCurve), function() {
22091
+ /** @internal */ _AnimationVector2Curve._isReferenceType = true;
22092
+ }(), function() {
22093
+ /** @internal */ _AnimationVector2Curve._isInterpolationType = true;
22094
+ }(), _AnimationVector2Curve);
21708
22095
  AnimationVector2Curve = __decorate([
21709
22096
  StaticInterfaceImplement()
21710
22097
  ], AnimationVector2Curve);
@@ -21797,7 +22184,11 @@ var AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function(Ani
21797
22184
  return out;
21798
22185
  };
21799
22186
  return AnimationVector3Curve;
21800
- }(AnimationCurve), /** @internal */ _AnimationVector3Curve._isReferenceType = true, /** @internal */ _AnimationVector3Curve._isInterpolationType = true, _AnimationVector3Curve);
22187
+ }(AnimationCurve), function() {
22188
+ /** @internal */ _AnimationVector3Curve._isReferenceType = true;
22189
+ }(), function() {
22190
+ /** @internal */ _AnimationVector3Curve._isInterpolationType = true;
22191
+ }(), _AnimationVector3Curve);
21801
22192
  AnimationVector3Curve = __decorate([
21802
22193
  StaticInterfaceImplement()
21803
22194
  ], AnimationVector3Curve);
@@ -21890,7 +22281,11 @@ var AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function(Ani
21890
22281
  return out;
21891
22282
  };
21892
22283
  return AnimationVector4Curve;
21893
- }(AnimationCurve), /** @internal */ _AnimationVector4Curve._isReferenceType = true, /** @internal */ _AnimationVector4Curve._isInterpolationType = true, _AnimationVector4Curve);
22284
+ }(AnimationCurve), function() {
22285
+ /** @internal */ _AnimationVector4Curve._isReferenceType = true;
22286
+ }(), function() {
22287
+ /** @internal */ _AnimationVector4Curve._isInterpolationType = true;
22288
+ }(), _AnimationVector4Curve);
21894
22289
  AnimationVector4Curve = __decorate([
21895
22290
  StaticInterfaceImplement()
21896
22291
  ], AnimationVector4Curve);
@@ -22606,7 +23001,7 @@ var AnimatorLayerBlendingMode;
22606
23001
  }
22607
23002
  }
22608
23003
  };
22609
- _createClass(Animator, [
23004
+ _create_class(Animator, [
22610
23005
  {
22611
23006
  key: "animatorController",
22612
23007
  get: /**
@@ -22697,7 +23092,7 @@ __decorate([
22697
23092
  */ _proto._registerChangeFlag = function _registerChangeFlag() {
22698
23093
  return this._updateFlagManager.createFlag(BoolUpdateFlag);
22699
23094
  };
22700
- _createClass(AnimatorController, [
23095
+ _create_class(AnimatorController, [
22701
23096
  {
22702
23097
  key: "layers",
22703
23098
  get: /**
@@ -22831,7 +23226,7 @@ __decorate([
22831
23226
  index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
22832
23227
  }
22833
23228
  };
22834
- _createClass(AnimatorState, [
23229
+ _create_class(AnimatorState, [
22835
23230
  {
22836
23231
  key: "transitions",
22837
23232
  get: /**
@@ -22963,7 +23358,7 @@ var AnimatorConditionMode;
22963
23358
  _this.shaderData.setVector4("u_cubeDecodeParam", _this._decodeParam);
22964
23359
  return _this;
22965
23360
  }
22966
- _createClass(SkyBoxMaterial, [
23361
+ _create_class(SkyBoxMaterial, [
22967
23362
  {
22968
23363
  key: "textureDecodeRGBM",
22969
23364
  get: /**
@@ -23062,7 +23457,7 @@ var ParticleRendererBlendMode;
23062
23457
  _this._isFadeOut = false;
23063
23458
  _this._playOnEnable = true;
23064
23459
  _this._blendMode = 0;
23065
- _this._onColorChanged = _this._onColorChanged.bind(_assertThisInitialized(_this));
23460
+ _this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
23066
23461
  //@ts-ignore
23067
23462
  _this._color._onValueChanged = _this._onColorChanged;
23068
23463
  _this.setMaterial(_this._createMaterial());
@@ -23339,7 +23734,7 @@ var ParticleRendererBlendMode;
23339
23734
  ParticleRenderer._getRandom = function _getRandom() {
23340
23735
  return Math.random() - 0.5;
23341
23736
  };
23342
- _createClass(ParticleRenderer, [
23737
+ _create_class(ParticleRenderer, [
23343
23738
  {
23344
23739
  key: "texture",
23345
23740
  get: /**
@@ -23770,7 +24165,9 @@ var ParticleRendererBlendMode;
23770
24165
  ]);
23771
24166
  return ParticleRenderer;
23772
24167
  }(MeshRenderer);
23773
- /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24168
+ (function() {
24169
+ /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24170
+ })();
23774
24171
  __decorate([
23775
24172
  ignoreClone
23776
24173
  ], ParticleRenderer.prototype, "_onColorChanged", null);
@@ -24040,7 +24437,7 @@ var _tempVector3 = new Vector3();
24040
24437
  this._camera.renderTarget = this._oriCameraRenderTarget;
24041
24438
  this._camera.cullingMask = this._oriCameraCullingMask;
24042
24439
  };
24043
- _createClass(Probe, [
24440
+ _create_class(Probe, [
24044
24441
  {
24045
24442
  key: "_texture",
24046
24443
  get: function get() {