@galacean/engine-physics-physx 0.9.0-beta.82 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,11 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var engineMiniprogramAdapter$3 = require('@galacean/engine-miniprogram-adapter');
6
6
 
7
7
  function _instanceof(left, right) {
8
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
9
- return !!right[Symbol.hasInstance](left);
10
- } else {
11
- return left instanceof right;
12
- }
8
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
9
+ return !!right[Symbol.hasInstance](left);
10
+ } else return left instanceof right;
13
11
  }
14
12
 
15
13
  /******************************************************************************
@@ -43,32 +41,24 @@ function __decorate$2(decorators, target, key, desc) {
43
41
  PhysXRuntimeMode[PhysXRuntimeMode[/** JavaScript mode. */ "JavaScript"] = 2] = "JavaScript";
44
42
  })(exports.PhysXRuntimeMode || (exports.PhysXRuntimeMode = {}));
45
43
 
46
- function setPrototypeOf$3(o, p) {
47
- setPrototypeOf$3 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
48
- o.__proto__ = p;
49
- return o;
50
- };
44
+ function _set_prototype_of$3(o, p) {
45
+ _set_prototype_of$3 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
46
+ o.__proto__ = p;
51
47
 
52
- return setPrototypeOf$3(o, p);
53
- }
48
+ return o;
49
+ };
54
50
 
55
- function _setPrototypeOf$3(o, p) {
56
- return setPrototypeOf$3(o, p);
51
+ return _set_prototype_of$3(o, p);
57
52
  }
58
53
 
59
54
  function _inherits$3(subClass, superClass) {
60
- if (typeof superClass !== "function" && superClass !== null) {
61
- throw new TypeError("Super expression must either be null or a function");
62
- }
63
-
64
- subClass.prototype = Object.create(superClass && superClass.prototype, {
65
- constructor: {
66
- value: subClass,
67
- writable: true,
68
- configurable: true
55
+ if (typeof superClass !== "function" && superClass !== null) {
56
+ throw new TypeError("Super expression must either be null or a function");
69
57
  }
70
- });
71
- if (superClass) _setPrototypeOf$3(subClass, superClass);
58
+
59
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
60
+
61
+ if (superClass) _set_prototype_of$3(subClass, superClass);
72
62
  }
73
63
 
74
64
  function getAugmentedNamespace(n) {
@@ -106,10 +96,8 @@ var miniprogram$7 = require("@galacean/engine-math/dist/miniprogram");
106
96
  Platform[Platform[/** Mac platform. */ "Mac"] = 3] = "Mac";
107
97
  Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
108
98
  })(exports.Platform || (exports.Platform = {}));
109
- function _assertThisInitialized(self) {
110
- if (self === void 0) {
111
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
112
- }
99
+ function _assert_this_initialized(self) {
100
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
113
101
  return self;
114
102
  }
115
103
  function _defineProperties$2(target, props) {
@@ -121,20 +109,17 @@ function _defineProperties$2(target, props) {
121
109
  Object.defineProperty(target, descriptor.key, descriptor);
122
110
  }
123
111
  }
124
- function _createClass$2(Constructor, protoProps, staticProps) {
112
+ function _create_class$2(Constructor, protoProps, staticProps) {
125
113
  if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
126
114
  if (staticProps) _defineProperties$2(Constructor, staticProps);
127
115
  return Constructor;
128
116
  }
129
- function setPrototypeOf$2(o, p) {
130
- setPrototypeOf$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
117
+ function _set_prototype_of$2(o, p) {
118
+ _set_prototype_of$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
131
119
  o.__proto__ = p;
132
120
  return o;
133
121
  };
134
- return setPrototypeOf$2(o, p);
135
- }
136
- function _setPrototypeOf$2(o, p) {
137
- return setPrototypeOf$2(o, p);
122
+ return _set_prototype_of$2(o, p);
138
123
  }
139
124
  function _inherits$2(subClass, superClass) {
140
125
  if (typeof superClass !== "function" && superClass !== null) {
@@ -147,7 +132,7 @@ function _inherits$2(subClass, superClass) {
147
132
  configurable: true
148
133
  }
149
134
  });
150
- if (superClass) _setPrototypeOf$2(subClass, superClass);
135
+ if (superClass) _set_prototype_of$2(subClass, superClass);
151
136
  }
152
137
  /**
153
138
  * Common utility methods for math operations.
@@ -194,9 +179,15 @@ function _inherits$2(subClass, superClass) {
194
179
  };
195
180
  return MathUtil;
196
181
  }();
197
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
198
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
199
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
182
+ (function() {
183
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
184
+ })();
185
+ (function() {
186
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
187
+ })();
188
+ (function() {
189
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
190
+ })();
200
191
  /**
201
192
  * Describes a color in the from of RGBA (in order: R, G, B, A).
202
193
  */ var Color = /*#__PURE__*/ function() {
@@ -405,7 +396,7 @@ function _inherits$2(subClass, superClass) {
405
396
  out._onValueChanged && out._onValueChanged();
406
397
  return out;
407
398
  };
408
- _createClass$2(Color, [
399
+ _create_class$2(Color, [
409
400
  {
410
401
  key: "r",
411
402
  get: /**
@@ -479,9 +470,7 @@ PERFORMANCE OF THIS SOFTWARE.
479
470
  function _instanceof1$2(left, right) {
480
471
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
481
472
  return !!right[Symbol.hasInstance](left);
482
- } else {
483
- return _instanceof(left, right);
484
- }
473
+ } else return _instanceof(left, right);
485
474
  }
486
475
  /**
487
476
  * Clone mode.
@@ -660,15 +649,21 @@ function _instanceof1$2(left, right) {
660
649
  };
661
650
  return CloneManager;
662
651
  }();
663
- /** @internal */ CloneManager._subCloneModeMap = new Map();
664
- /** @internal */ CloneManager._cloneModeMap = new Map();
665
- CloneManager._objectType = Object.getPrototypeOf(Object);
652
+ (function() {
653
+ /** @internal */ CloneManager._subCloneModeMap = new Map();
654
+ })();
655
+ (function() {
656
+ /** @internal */ CloneManager._cloneModeMap = new Map();
657
+ })();
658
+ (function() {
659
+ CloneManager._objectType = Object.getPrototypeOf(Object);
660
+ })();
666
661
  /**
667
662
  * EngineObject.
668
663
  */ var EngineObject = /*#__PURE__*/ function() {
669
664
  function EngineObject(engine) {
670
- this._destroyed = false;
671
665
  /** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
666
+ this._destroyed = false;
672
667
  this._engine = engine;
673
668
  }
674
669
  var _proto = EngineObject.prototype;
@@ -680,7 +675,7 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
680
675
  (_this__engine_resourceManager = this._engine.resourceManager) == null ? void 0 : _this__engine_resourceManager._deleteAsset(this);
681
676
  this._destroyed = true;
682
677
  };
683
- _createClass$2(EngineObject, [
678
+ _create_class$2(EngineObject, [
684
679
  {
685
680
  key: "engine",
686
681
  get: /**
@@ -700,7 +695,9 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
700
695
  ]);
701
696
  return EngineObject;
702
697
  }();
703
- EngineObject._instanceIdCounter = 0;
698
+ (function() {
699
+ EngineObject._instanceIdCounter = 0;
700
+ })();
704
701
  __decorate$1([
705
702
  ignoreClone
706
703
  ], EngineObject.prototype, "instanceId", void 0);
@@ -715,7 +712,7 @@ __decorate$1([
715
712
  _this = EngineObject.call(this, engine) || this;
716
713
  /** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */ _this.isGCIgnored = false;
717
714
  _this._refCount = 0;
718
- engine.resourceManager._addRefObject(_this.instanceId, _assertThisInitialized(_this));
715
+ engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized(_this));
719
716
  return _this;
720
717
  };
721
718
  _inherits$2(RefObject, EngineObject);
@@ -758,7 +755,7 @@ __decorate$1([
758
755
  */ _proto._addToResourceManager = function _addToResourceManager(path) {
759
756
  this._engine.resourceManager._addAsset(path, this);
760
757
  };
761
- _createClass$2(RefObject, [
758
+ _create_class$2(RefObject, [
762
759
  {
763
760
  key: "refCount",
764
761
  get: /**
@@ -877,7 +874,7 @@ __decorate$1([
877
874
  _proto.stopPropagation = function stopPropagation() {
878
875
  this._propagationStopped = true;
879
876
  };
880
- _createClass$2(Event, [
877
+ _create_class$2(Event, [
881
878
  {
882
879
  key: "propagationStopped",
883
880
  get: function get() {
@@ -1150,7 +1147,7 @@ var Time = /*#__PURE__*/ function() {
1150
1147
  this._lastTickTime = now;
1151
1148
  this._frameCount++;
1152
1149
  };
1153
- _createClass$2(Time, [
1150
+ _create_class$2(Time, [
1154
1151
  {
1155
1152
  key: "frameCount",
1156
1153
  get: /*
@@ -1385,7 +1382,7 @@ exports.GLCapabilityType = void 0;
1385
1382
  _proto._getMipmapCount = function _getMipmapCount() {
1386
1383
  return this._mipmap ? Math.floor(Math.log2(Math.max(this._width, this._height))) + 1 : 1;
1387
1384
  };
1388
- _createClass$2(Texture, [
1385
+ _create_class$2(Texture, [
1389
1386
  {
1390
1387
  key: "format",
1391
1388
  get: /**
@@ -1533,7 +1530,7 @@ exports.GLCapabilityType = void 0;
1533
1530
  }
1534
1531
  _this._depthTexture = depth;
1535
1532
  }
1536
- _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assertThisInitialized(_this));
1533
+ _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized(_this));
1537
1534
  return _this;
1538
1535
  };
1539
1536
  _inherits$2(RenderTarget, EngineObject);
@@ -1576,7 +1573,7 @@ exports.GLCapabilityType = void 0;
1576
1573
  */ _proto._blitRenderTarget = function _blitRenderTarget() {
1577
1574
  this._platformRenderTarget.blitRenderTarget();
1578
1575
  };
1579
- _createClass$2(RenderTarget, [
1576
+ _create_class$2(RenderTarget, [
1580
1577
  {
1581
1578
  key: "autoGenerateMipmaps",
1582
1579
  get: /**
@@ -1646,7 +1643,7 @@ exports.GLCapabilityType = void 0;
1646
1643
  _this._format = format;
1647
1644
  _this._mipmapCount = _this._getMipmapCount();
1648
1645
  _this._isDepthTexture = format == exports.TextureFormat.Depth || format == exports.TextureFormat.DepthStencil || format == exports.TextureFormat.Depth16 || format == exports.TextureFormat.Depth24 || format == exports.TextureFormat.Depth32 || format == exports.TextureFormat.Depth24Stencil8 || format == exports.TextureFormat.Depth32Stencil8;
1649
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assertThisInitialized(_this));
1646
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized(_this));
1650
1647
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1651
1648
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1652
1649
  return _this;
@@ -1712,7 +1709,7 @@ exports.GLCapabilityType = void 0;
1712
1709
  _this._length = length1;
1713
1710
  _this._format = format;
1714
1711
  _this._mipmapCount = _this._getMipmapCount();
1715
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assertThisInitialized(_this));
1712
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized(_this));
1716
1713
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1717
1714
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1718
1715
  return _this;
@@ -1765,7 +1762,7 @@ exports.GLCapabilityType = void 0;
1765
1762
  this._platformTexture.getPixelBuffer(elementIndex, xOrMipLevelOrOut, yOrMipLevel, width, height, mipLevelOrOut, out);
1766
1763
  }
1767
1764
  };
1768
- _createClass$2(Texture2DArray, [
1765
+ _create_class$2(Texture2DArray, [
1769
1766
  {
1770
1767
  key: "length",
1771
1768
  get: /**
@@ -1790,7 +1787,7 @@ exports.GLCapabilityType = void 0;
1790
1787
  _this._height = size;
1791
1788
  _this._format = format;
1792
1789
  _this._mipmapCount = _this._getMipmapCount();
1793
- _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assertThisInitialized(_this));
1790
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized(_this));
1794
1791
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1795
1792
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Clamp;
1796
1793
  return _this;
@@ -1917,7 +1914,7 @@ exports.GLCapabilityType = void 0;
1917
1914
  _proto.getCharInfo = function getCharInfo(char) {
1918
1915
  return this._charInfoMap[char.charCodeAt(0)];
1919
1916
  };
1920
- _createClass$2(FontAtlas, [
1917
+ _create_class$2(FontAtlas, [
1921
1918
  {
1922
1919
  key: "texture",
1923
1920
  get: function get() {
@@ -2063,7 +2060,7 @@ exports.GLCapabilityType = void 0;
2063
2060
  }
2064
2061
  return null;
2065
2062
  };
2066
- _createClass$2(Font, [
2063
+ _create_class$2(Font, [
2067
2064
  {
2068
2065
  key: "name",
2069
2066
  get: /**
@@ -2075,8 +2072,9 @@ exports.GLCapabilityType = void 0;
2075
2072
  ]);
2076
2073
  return Font;
2077
2074
  }(RefObject);
2078
- Font._fontMap = {};
2079
- var _Symbol_toStringTag = Symbol.toStringTag;
2075
+ (function() {
2076
+ Font._fontMap = {};
2077
+ })();
2080
2078
  var AssetPromise = /*#__PURE__*/ function() {
2081
2079
  var AssetPromise = function AssetPromise(executor) {
2082
2080
  var _this = this;
@@ -2195,9 +2193,9 @@ var AssetPromise = /*#__PURE__*/ function() {
2195
2193
  }
2196
2194
  });
2197
2195
  };
2198
- _createClass$2(AssetPromise, [
2196
+ _create_class$2(AssetPromise, [
2199
2197
  {
2200
- key: _Symbol_toStringTag,
2198
+ key: Symbol.toStringTag,
2201
2199
  get: /** compatible with Promise */ function get() {
2202
2200
  return "AssetPromise";
2203
2201
  }
@@ -2508,8 +2506,12 @@ var /** @internal */ PromiseState;
2508
2506
  };
2509
2507
  return ResourceManager;
2510
2508
  }();
2511
- /** Loader collection. */ ResourceManager._loaders = {};
2512
- ResourceManager._extTypeMapping = {};
2509
+ (function() {
2510
+ /** Loader collection. */ ResourceManager._loaders = {};
2511
+ })();
2512
+ (function() {
2513
+ ResourceManager._extTypeMapping = {};
2514
+ })();
2513
2515
  /**
2514
2516
  * Declare ResourceLoader's decorator.
2515
2517
  * @param assetType - Type of asset
@@ -2862,10 +2864,14 @@ var ComponentCloner = /*#__PURE__*/ function() {
2862
2864
  };
2863
2865
  return ComponentsDependencies;
2864
2866
  }();
2865
- /**
2867
+ (function() {
2868
+ /**
2866
2869
  * @internal
2867
2870
  */ ComponentsDependencies._dependenciesMap = new Map();
2868
- ComponentsDependencies._invDependenciesMap = new Map();
2871
+ })();
2872
+ (function() {
2873
+ ComponentsDependencies._invDependenciesMap = new Map();
2874
+ })();
2869
2875
  /**
2870
2876
  * Dependent components, automatically added if they do not exist.
2871
2877
  * @param components - Dependent components
@@ -3027,7 +3033,7 @@ ComponentsDependencies._invDependenciesMap = new Map();
3027
3033
  }
3028
3034
  }
3029
3035
  };
3030
- _createClass$2(Component, [
3036
+ _create_class$2(Component, [
3031
3037
  {
3032
3038
  key: "enabled",
3033
3039
  get: /**
@@ -3158,7 +3164,6 @@ __decorate$1([
3158
3164
  var Transform = function Transform(entity) {
3159
3165
  var _this;
3160
3166
  _this = Component.call(this, entity) || this;
3161
- _this._dirtyFlag = 0xbc;
3162
3167
  _this._position = new miniprogram$7.Vector3();
3163
3168
  _this._rotation = new miniprogram$7.Vector3();
3164
3169
  _this._rotationQuaternion = new miniprogram$7.Quaternion();
@@ -3171,14 +3176,15 @@ __decorate$1([
3171
3176
  _this._worldMatrix = new miniprogram$7.Matrix();
3172
3177
  _this._isParentDirty = true;
3173
3178
  _this._parentTransformCache = null;
3179
+ _this._dirtyFlag = 0xbc;
3174
3180
  /** @internal */ _this._updateFlagManager = new UpdateFlagManager();
3175
- _this._onPositionChanged = _this._onPositionChanged.bind(_assertThisInitialized(_this));
3176
- _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assertThisInitialized(_this));
3177
- _this._onRotationChanged = _this._onRotationChanged.bind(_assertThisInitialized(_this));
3178
- _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assertThisInitialized(_this));
3179
- _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assertThisInitialized(_this));
3180
- _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assertThisInitialized(_this));
3181
- _this._onScaleChanged = _this._onScaleChanged.bind(_assertThisInitialized(_this));
3181
+ _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized(_this));
3182
+ _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized(_this));
3183
+ _this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized(_this));
3184
+ _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized(_this));
3185
+ _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3186
+ _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3187
+ _this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized(_this));
3182
3188
  //@ts-ignore
3183
3189
  _this._position._onValueChanged = _this._onPositionChanged;
3184
3190
  //@ts-ignore
@@ -3571,7 +3577,7 @@ __decorate$1([
3571
3577
  this._setDirtyFlagTrue(0x40);
3572
3578
  this._updateWorldScaleFlag();
3573
3579
  };
3574
- _createClass$2(Transform, [
3580
+ _create_class$2(Transform, [
3575
3581
  {
3576
3582
  key: "position",
3577
3583
  get: /**
@@ -3817,15 +3823,33 @@ __decorate$1([
3817
3823
  ]);
3818
3824
  return Transform;
3819
3825
  }(Component);
3820
- Transform._tempQuat0 = new miniprogram$7.Quaternion();
3821
- Transform._tempVec30 = new miniprogram$7.Vector3();
3822
- Transform._tempVec31 = new miniprogram$7.Vector3();
3823
- Transform._tempVec32 = new miniprogram$7.Vector3();
3824
- Transform._tempMat30 = new miniprogram$7.Matrix3x3();
3825
- Transform._tempMat31 = new miniprogram$7.Matrix3x3();
3826
- Transform._tempMat32 = new miniprogram$7.Matrix3x3();
3827
- Transform._tempMat41 = new miniprogram$7.Matrix();
3828
- Transform._tempMat42 = new miniprogram$7.Matrix();
3826
+ (function() {
3827
+ Transform._tempQuat0 = new miniprogram$7.Quaternion();
3828
+ })();
3829
+ (function() {
3830
+ Transform._tempVec30 = new miniprogram$7.Vector3();
3831
+ })();
3832
+ (function() {
3833
+ Transform._tempVec31 = new miniprogram$7.Vector3();
3834
+ })();
3835
+ (function() {
3836
+ Transform._tempVec32 = new miniprogram$7.Vector3();
3837
+ })();
3838
+ (function() {
3839
+ Transform._tempMat30 = new miniprogram$7.Matrix3x3();
3840
+ })();
3841
+ (function() {
3842
+ Transform._tempMat31 = new miniprogram$7.Matrix3x3();
3843
+ })();
3844
+ (function() {
3845
+ Transform._tempMat32 = new miniprogram$7.Matrix3x3();
3846
+ })();
3847
+ (function() {
3848
+ Transform._tempMat41 = new miniprogram$7.Matrix();
3849
+ })();
3850
+ (function() {
3851
+ Transform._tempMat42 = new miniprogram$7.Matrix();
3852
+ })();
3829
3853
  __decorate$1([
3830
3854
  deepClone
3831
3855
  ], Transform.prototype, "_position", void 0);
@@ -4324,7 +4348,7 @@ var TransformModifyFlags;
4324
4348
  this._traverseSetOwnerScene(children[i], scene);
4325
4349
  }
4326
4350
  };
4327
- _createClass$2(Entity, [
4351
+ _create_class$2(Entity, [
4328
4352
  {
4329
4353
  key: "isActive",
4330
4354
  get: /**
@@ -4538,7 +4562,7 @@ var TransformModifyFlags;
4538
4562
  }
4539
4563
  }
4540
4564
  };
4541
- _createClass$2(SystemInfo, null, [
4565
+ _create_class$2(SystemInfo, null, [
4542
4566
  {
4543
4567
  key: "devicePixelRatio",
4544
4568
  get: /**
@@ -4550,8 +4574,12 @@ var TransformModifyFlags;
4550
4574
  ]);
4551
4575
  return SystemInfo;
4552
4576
  }();
4553
- /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4554
- /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4577
+ (function() {
4578
+ /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4579
+ })();
4580
+ (function() {
4581
+ /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4582
+ })();
4555
4583
  SystemInfo._initialize();
4556
4584
  /**
4557
4585
  * The keys of the keyboard.
@@ -5163,7 +5191,7 @@ SystemInfo._initialize();
5163
5191
  _proto._setGravity = function _setGravity() {
5164
5192
  this._nativePhysicsManager.setGravity(this._gravity);
5165
5193
  };
5166
- _createClass$2(PhysicsManager, [
5194
+ _create_class$2(PhysicsManager, [
5167
5195
  {
5168
5196
  key: "gravity",
5169
5197
  get: /**
@@ -5219,7 +5247,7 @@ SystemInfo._initialize();
5219
5247
  */ _proto._destroy = function _destroy() {
5220
5248
  this._nativeMaterial.destroy();
5221
5249
  };
5222
- _createClass$2(PhysicsMaterial, [
5250
+ _create_class$2(PhysicsMaterial, [
5223
5251
  {
5224
5252
  key: "bounciness",
5225
5253
  get: /**
@@ -5297,8 +5325,8 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5297
5325
  var Collider = function Collider(entity) {
5298
5326
  var _this;
5299
5327
  _this = Component.call(this, entity) || this;
5300
- _this._shapes = [];
5301
5328
  /** @internal */ _this._index = -1;
5329
+ _this._shapes = [];
5302
5330
  _this._updateFlag = _this.entity.transform.registerWorldChangeFlag();
5303
5331
  return _this;
5304
5332
  };
@@ -5378,7 +5406,7 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5378
5406
  this.clearShapes();
5379
5407
  this._nativeCollider.destroy();
5380
5408
  };
5381
- _createClass$2(Collider, [
5409
+ _create_class$2(Collider, [
5382
5410
  {
5383
5411
  key: "shapes",
5384
5412
  get: /**
@@ -5415,7 +5443,7 @@ exports.Collider = __decorate$1([
5415
5443
  _this._upDirection = new miniprogram$7.Vector3(0, 1, 0);
5416
5444
  _this._slopeLimit = 0.707;
5417
5445
  _this._nativeCollider = PhysicsManager._nativePhysics.createCharacterController();
5418
- _this._setUpDirection = _this._setUpDirection.bind(_assertThisInitialized(_this));
5446
+ _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
5419
5447
  //@ts-ignore
5420
5448
  _this._upDirection._onValueChanged = _this._setUpDirection;
5421
5449
  return _this;
@@ -5489,7 +5517,7 @@ exports.Collider = __decorate$1([
5489
5517
  _proto._setUpDirection = function _setUpDirection() {
5490
5518
  this._nativeCollider.setUpDirection(this._upDirection);
5491
5519
  };
5492
- _createClass$2(CharacterController, [
5520
+ _create_class$2(CharacterController, [
5493
5521
  {
5494
5522
  key: "stepOffset",
5495
5523
  get: /**
@@ -5583,7 +5611,7 @@ exports.Collider = __decorate$1([
5583
5611
  _proto._setRotation = function _setRotation() {
5584
5612
  this._nativeShape.setRotation(this._rotation);
5585
5613
  };
5586
- _createClass$2(ColliderShape, [
5614
+ _create_class$2(ColliderShape, [
5587
5615
  {
5588
5616
  key: "collider",
5589
5617
  get: /**
@@ -5671,7 +5699,9 @@ exports.Collider = __decorate$1([
5671
5699
  ]);
5672
5700
  return ColliderShape;
5673
5701
  }();
5674
- ColliderShape._idGenerator = 0;
5702
+ (function() {
5703
+ ColliderShape._idGenerator = 0;
5704
+ })();
5675
5705
  /**
5676
5706
  * Physical collider shape for box.
5677
5707
  */ var BoxColliderShape = /*#__PURE__*/ function(ColliderShape) {
@@ -5680,7 +5710,7 @@ ColliderShape._idGenerator = 0;
5680
5710
  _this = ColliderShape.call(this) || this;
5681
5711
  _this._size = new miniprogram$7.Vector3(1, 1, 1);
5682
5712
  _this._nativeShape = PhysicsManager._nativePhysics.createBoxColliderShape(_this._id, _this._size, _this._material._nativeMaterial);
5683
- _this._setSize = _this._setSize.bind(_assertThisInitialized(_this));
5713
+ _this._setSize = _this._setSize.bind(_assert_this_initialized(_this));
5684
5714
  //@ts-ignore
5685
5715
  _this._size._onValueChanged = _this._setSize;
5686
5716
  return _this;
@@ -5690,7 +5720,7 @@ ColliderShape._idGenerator = 0;
5690
5720
  _proto._setSize = function _setSize() {
5691
5721
  this._nativeShape.setSize(this._size);
5692
5722
  };
5693
- _createClass$2(BoxColliderShape, [
5723
+ _create_class$2(BoxColliderShape, [
5694
5724
  {
5695
5725
  key: "size",
5696
5726
  get: /**
@@ -5718,7 +5748,7 @@ ColliderShape._idGenerator = 0;
5718
5748
  return _this;
5719
5749
  };
5720
5750
  _inherits$2(SphereColliderShape, ColliderShape);
5721
- _createClass$2(SphereColliderShape, [
5751
+ _create_class$2(SphereColliderShape, [
5722
5752
  {
5723
5753
  key: "radius",
5724
5754
  get: /**
@@ -5769,7 +5799,7 @@ ColliderShape._idGenerator = 0;
5769
5799
  return _this;
5770
5800
  };
5771
5801
  _inherits$2(CapsuleColliderShape, ColliderShape);
5772
- _createClass$2(CapsuleColliderShape, [
5802
+ _create_class$2(CapsuleColliderShape, [
5773
5803
  {
5774
5804
  key: "radius",
5775
5805
  get: /**
@@ -5827,7 +5857,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
5827
5857
  return _this;
5828
5858
  };
5829
5859
  _inherits$2(Joint, Component);
5830
- _createClass$2(Joint, [
5860
+ _create_class$2(Joint, [
5831
5861
  {
5832
5862
  key: "connectedCollider",
5833
5863
  get: /**
@@ -6004,7 +6034,7 @@ exports.Joint = __decorate$1([
6004
6034
  collider.collider = this.entity.getComponent(exports.Collider);
6005
6035
  this._nativeJoint = PhysicsManager._nativePhysics.createHingeJoint(collider.collider._nativeCollider);
6006
6036
  };
6007
- _createClass$2(HingeJoint, [
6037
+ _create_class$2(HingeJoint, [
6008
6038
  {
6009
6039
  key: "axis",
6010
6040
  get: /**
@@ -6155,7 +6185,7 @@ exports.Joint = __decorate$1([
6155
6185
  collider.collider = this.entity.getComponent(exports.Collider);
6156
6186
  this._nativeJoint = PhysicsManager._nativePhysics.createSpringJoint(collider.collider._nativeCollider);
6157
6187
  };
6158
- _createClass$2(SpringJoint, [
6188
+ _create_class$2(SpringJoint, [
6159
6189
  {
6160
6190
  key: "swingOffset",
6161
6191
  get: /**
@@ -6305,10 +6335,10 @@ exports.Joint = __decorate$1([
6305
6335
  _this._sleepThreshold = 5e-3;
6306
6336
  var transform = _this.entity.transform;
6307
6337
  _this._nativeCollider = PhysicsManager._nativePhysics.createDynamicCollider(transform.worldPosition, transform.worldRotationQuaternion);
6308
- _this._setLinearVelocity = _this._setLinearVelocity.bind(_assertThisInitialized(_this));
6309
- _this._setAngularVelocity = _this._setAngularVelocity.bind(_assertThisInitialized(_this));
6310
- _this._setCenterOfMass = _this._setCenterOfMass.bind(_assertThisInitialized(_this));
6311
- _this._setInertiaTensor = _this._setInertiaTensor.bind(_assertThisInitialized(_this));
6338
+ _this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized(_this));
6339
+ _this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized(_this));
6340
+ _this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized(_this));
6341
+ _this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized(_this));
6312
6342
  //@ts-ignore
6313
6343
  _this._linearVelocity._onValueChanged = _this._setLinearVelocity;
6314
6344
  //@ts-ignore
@@ -6367,7 +6397,7 @@ exports.Joint = __decorate$1([
6367
6397
  _proto._setInertiaTensor = function _setInertiaTensor() {
6368
6398
  this._nativeCollider.setInertiaTensor(this._inertiaTensor);
6369
6399
  };
6370
- _createClass$2(DynamicCollider, [
6400
+ _create_class$2(DynamicCollider, [
6371
6401
  {
6372
6402
  key: "linearDamping",
6373
6403
  get: /**
@@ -6909,9 +6939,15 @@ exports.DynamicColliderConstraints = void 0;
6909
6939
  };
6910
6940
  return PointerManager;
6911
6941
  }();
6912
- PointerManager._tempRay = new miniprogram$7.Ray();
6913
- PointerManager._tempPoint = new miniprogram$7.Vector2();
6914
- PointerManager._tempHitResult = new HitResult();
6942
+ (function() {
6943
+ PointerManager._tempRay = new miniprogram$7.Ray();
6944
+ })();
6945
+ (function() {
6946
+ PointerManager._tempPoint = new miniprogram$7.Vector2();
6947
+ })();
6948
+ (function() {
6949
+ PointerManager._tempHitResult = new HitResult();
6950
+ })();
6915
6951
  /**
6916
6952
  * Wheel Manager.
6917
6953
  * @internal
@@ -7115,7 +7151,7 @@ PointerManager._tempHitResult = new HitResult();
7115
7151
  this._pointerManager._onFocus();
7116
7152
  this._keyboardManager._onFocus();
7117
7153
  };
7118
- _createClass$2(InputManager, [
7154
+ _create_class$2(InputManager, [
7119
7155
  {
7120
7156
  key: "pointers",
7121
7157
  get: /**
@@ -7290,8 +7326,12 @@ PointerManager._tempHitResult = new HitResult();
7290
7326
  }
7291
7327
  this._nameId = nameID;
7292
7328
  };
7293
- /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7294
- ShaderMacro._macroNameCounter = 0;
7329
+ (function() {
7330
+ /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7331
+ })();
7332
+ (function() {
7333
+ ShaderMacro._macroNameCounter = 0;
7334
+ })();
7295
7335
  /**
7296
7336
  * Shader macro collection.
7297
7337
  * @internal
@@ -7441,22 +7481,15 @@ ShaderMacro._macroNameCounter = 0;
7441
7481
  };
7442
7482
  return ShaderMacroCollection;
7443
7483
  }();
7444
- function extends_$2() {
7445
- extends_$2 = Object.assign || function(target) {
7484
+ function _extends$2() {
7485
+ _extends$2 = Object.assign || function assign(target) {
7446
7486
  for(var i = 1; i < arguments.length; i++){
7447
7487
  var source = arguments[i];
7448
- for(var key in source){
7449
- if (Object.prototype.hasOwnProperty.call(source, key)) {
7450
- target[key] = source[key];
7451
- }
7452
- }
7488
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
7453
7489
  }
7454
7490
  return target;
7455
7491
  };
7456
- return extends_$2.apply(this, arguments);
7457
- }
7458
- function _extends$2() {
7459
- return extends_$2.apply(this, arguments);
7492
+ return _extends$2.apply(this, arguments);
7460
7493
  }
7461
7494
  var camera_declare = "#define GLSLIFY 1\nuniform vec3 u_cameraPos;"; // eslint-disable-line
7462
7495
  var common = "#define GLSLIFY 1\n#define PI 3.14159265359\n#define RECIPROCAL_PI 0.31830988618\n#define EPSILON 1e-6\n#define LOG2 1.442695\n#define saturate( a ) clamp( a, 0.0, 1.0 )\nfloat pow2(float x){return x*x;}vec4 RGBMToLinear(vec4 value,float maxRange){return vec4(value.rgb*value.a*maxRange,1.0);}vec4 gammaToLinear(vec4 srgbIn){return vec4(pow(srgbIn.rgb,vec3(2.2)),srgbIn.a);}vec4 linearToGamma(vec4 linearIn){return vec4(pow(linearIn.rgb,vec3(1.0/2.2)),linearIn.a);}\n#ifdef GRAPHICS_API_WEBGL2\n#define INVERSE_MAT(mat) inverse(mat)\n#else\nmat2 inverseMat(mat2 m){return mat2(m[1][1],-m[0][1],-m[1][0],m[0][0])/(m[0][0]*m[1][1]-m[0][1]*m[1][0]);}mat3 inverseMat(mat3 m){float a00=m[0][0],a01=m[0][1],a02=m[0][2];float a10=m[1][0],a11=m[1][1],a12=m[1][2];float a20=m[2][0],a21=m[2][1],a22=m[2][2];float b01=a22*a11-a12*a21;float b11=-a22*a10+a12*a20;float b21=a21*a10-a11*a20;float det=a00*b01+a01*b11+a02*b21;return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11),b11,(a22*a00-a02*a20),(-a12*a00+a02*a10),b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det;}mat4 inverseMat(mat4 m){float a00=m[0][0],a01=m[0][1],a02=m[0][2],a03=m[0][3],a10=m[1][0],a11=m[1][1],a12=m[1][2],a13=m[1][3],a20=m[2][0],a21=m[2][1],a22=m[2][2],a23=m[2][3],a30=m[3][0],a31=m[3][1],a32=m[3][2],a33=m[3][3],b00=a00*a11-a01*a10,b01=a00*a12-a02*a10,b02=a00*a13-a03*a10,b03=a01*a12-a02*a11,b04=a01*a13-a03*a11,b05=a02*a13-a03*a12,b06=a20*a31-a21*a30,b07=a20*a32-a22*a30,b08=a20*a33-a23*a30,b09=a21*a32-a22*a31,b10=a21*a33-a23*a31,b11=a22*a33-a23*a32,det=b00*b11-b01*b10+b02*b09+b03*b08-b04*b07+b05*b06;return mat4(a11*b11-a12*b10+a13*b09,a02*b10-a01*b11-a03*b09,a31*b05-a32*b04+a33*b03,a22*b04-a21*b05-a23*b03,a12*b08-a10*b11-a13*b07,a00*b11-a02*b08+a03*b07,a32*b02-a30*b05-a33*b01,a20*b05-a22*b02+a23*b01,a10*b10-a11*b08+a13*b06,a01*b08-a00*b10-a03*b06,a30*b04-a31*b02+a33*b00,a21*b02-a20*b04-a23*b00,a11*b07-a10*b09-a12*b06,a00*b09-a01*b07+a02*b06,a31*b01-a30*b03-a32*b00,a20*b03-a21*b01+a22*b00)/det;}\n#define INVERSE_MAT(mat) inverseMat(mat)\n#endif\n"; // eslint-disable-line
@@ -8235,7 +8268,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8235
8268
  return prefix + line;
8236
8269
  }).join("\n");
8237
8270
  };
8238
- _createClass$2(ShaderProgram, [
8271
+ _create_class$2(ShaderProgram, [
8239
8272
  {
8240
8273
  key: "isValid",
8241
8274
  get: /**
@@ -8247,7 +8280,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
8247
8280
  ]);
8248
8281
  return ShaderProgram;
8249
8282
  }();
8250
- ShaderProgram._counter = 0;
8283
+ (function() {
8284
+ ShaderProgram._counter = 0;
8285
+ })();
8251
8286
  /**
8252
8287
  * Shader pass containing vertex and fragment source.
8253
8288
  */ var ShaderPass = /*#__PURE__*/ function() {
@@ -8291,7 +8326,9 @@ ShaderProgram._counter = 0;
8291
8326
  };
8292
8327
  return ShaderPass;
8293
8328
  }();
8294
- ShaderPass._shaderPassCounter = 0;
8329
+ (function() {
8330
+ ShaderPass._shaderPassCounter = 0;
8331
+ })();
8295
8332
  /**
8296
8333
  * Shader property.
8297
8334
  */ var ShaderProperty = /*#__PURE__*/ function() {
@@ -8299,7 +8336,7 @@ ShaderPass._shaderPassCounter = 0;
8299
8336
  this.name = name;
8300
8337
  this._uniqueId = ShaderProperty._propertyNameCounter++;
8301
8338
  }
8302
- _createClass$2(ShaderProperty, [
8339
+ _create_class$2(ShaderProperty, [
8303
8340
  {
8304
8341
  key: "type",
8305
8342
  get: /**
@@ -8311,7 +8348,9 @@ ShaderPass._shaderPassCounter = 0;
8311
8348
  ]);
8312
8349
  return ShaderProperty;
8313
8350
  }();
8314
- ShaderProperty._propertyNameCounter = 0;
8351
+ (function() {
8352
+ ShaderProperty._propertyNameCounter = 0;
8353
+ })();
8315
8354
  /**
8316
8355
  * Shader for rendering.
8317
8356
  */ var Shader = /*#__PURE__*/ function() {
@@ -8423,7 +8462,7 @@ ShaderProperty._propertyNameCounter = 0;
8423
8462
  }
8424
8463
  }
8425
8464
  };
8426
- _createClass$2(Shader, [
8465
+ _create_class$2(Shader, [
8427
8466
  {
8428
8467
  key: "passes",
8429
8468
  get: /**
@@ -8435,18 +8474,34 @@ ShaderProperty._propertyNameCounter = 0;
8435
8474
  ]);
8436
8475
  return Shader;
8437
8476
  }();
8438
- /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8439
- /** @internal */ Shader._shaderExtension = [
8440
- "GL_EXT_shader_texture_lod",
8441
- "GL_OES_standard_derivatives",
8442
- "GL_EXT_draw_buffers"
8443
- ];
8444
- /** @internal */ Shader._propertyIdMap = Object.create(null);
8445
- Shader._shaderMap = Object.create(null);
8446
- Shader._propertyNameMap = Object.create(null);
8447
- Shader._macroMaskMap = [];
8448
- Shader._macroCounter = 0;
8449
- Shader._macroMap = Object.create(null);
8477
+ (function() {
8478
+ /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8479
+ })();
8480
+ (function() {
8481
+ /** @internal */ Shader._shaderExtension = [
8482
+ "GL_EXT_shader_texture_lod",
8483
+ "GL_OES_standard_derivatives",
8484
+ "GL_EXT_draw_buffers"
8485
+ ];
8486
+ })();
8487
+ (function() {
8488
+ /** @internal */ Shader._propertyIdMap = Object.create(null);
8489
+ })();
8490
+ (function() {
8491
+ Shader._shaderMap = Object.create(null);
8492
+ })();
8493
+ (function() {
8494
+ Shader._propertyNameMap = Object.create(null);
8495
+ })();
8496
+ (function() {
8497
+ Shader._macroMaskMap = [];
8498
+ })();
8499
+ (function() {
8500
+ Shader._macroCounter = 0;
8501
+ })();
8502
+ (function() {
8503
+ Shader._macroMap = Object.create(null);
8504
+ })();
8450
8505
  /**
8451
8506
  * Shader data collection,Correspondence includes shader properties data and macros data.
8452
8507
  */ var ShaderData = /*#__PURE__*/ function() {
@@ -8701,9 +8756,9 @@ Shader._macroMap = Object.create(null);
8701
8756
  /** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
8702
8757
  /** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
8703
8758
  /** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
8759
+ /** @internal */ _this._lightIndex = -1;
8704
8760
  _this._color = new miniprogram$7.Color(1, 1, 1, 1);
8705
8761
  _this._lightColor = new miniprogram$7.Color();
8706
- /** @internal */ _this._lightIndex = -1;
8707
8762
  return _this;
8708
8763
  };
8709
8764
  _inherits$2(Light, Component);
@@ -8715,7 +8770,7 @@ Shader._macroMap = Object.create(null);
8715
8770
  this._lightColor.a = this.color.a * this.intensity;
8716
8771
  return this._lightColor;
8717
8772
  };
8718
- _createClass$2(Light, [
8773
+ _create_class$2(Light, [
8719
8774
  {
8720
8775
  key: "color",
8721
8776
  get: /**
@@ -8752,9 +8807,11 @@ Shader._macroMap = Object.create(null);
8752
8807
  ]);
8753
8808
  return Light;
8754
8809
  }(Component);
8755
- /**
8810
+ (function() {
8811
+ /**
8756
8812
  * Each type of light source is at most 10, beyond which it will not take effect.
8757
8813
  * */ Light._maxLight = 10;
8814
+ })();
8758
8815
  __decorate$1([
8759
8816
  ignoreClone
8760
8817
  ], Light.prototype, "_lightIndex", void 0);
@@ -8811,7 +8868,7 @@ __decorate$1([
8811
8868
  shaderData.setFloatArray(DirectLight._colorProperty, data.color);
8812
8869
  shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
8813
8870
  };
8814
- _createClass$2(DirectLight, [
8871
+ _create_class$2(DirectLight, [
8815
8872
  {
8816
8873
  key: "direction",
8817
8874
  get: /**
@@ -8842,14 +8899,22 @@ __decorate$1([
8842
8899
  ]);
8843
8900
  return DirectLight;
8844
8901
  }(Light);
8845
- DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8846
- DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8847
- DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8848
- DirectLight._combinedData = {
8849
- cullingMask: new Int32Array(Light._maxLight * 2),
8850
- color: new Float32Array(Light._maxLight * 3),
8851
- direction: new Float32Array(Light._maxLight * 3)
8852
- };
8902
+ (function() {
8903
+ DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8904
+ })();
8905
+ (function() {
8906
+ DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8907
+ })();
8908
+ (function() {
8909
+ DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8910
+ })();
8911
+ (function() {
8912
+ DirectLight._combinedData = {
8913
+ cullingMask: new Int32Array(Light._maxLight * 2),
8914
+ color: new Float32Array(Light._maxLight * 3),
8915
+ direction: new Float32Array(Light._maxLight * 3)
8916
+ };
8917
+ })();
8853
8918
  /**
8854
8919
  * Point light.
8855
8920
  */ var PointLight = /*#__PURE__*/ function(Light) {
@@ -8905,7 +8970,7 @@ DirectLight._combinedData = {
8905
8970
  shaderData.setFloatArray(PointLight._positionProperty, data.position);
8906
8971
  shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
8907
8972
  };
8908
- _createClass$2(PointLight, [
8973
+ _create_class$2(PointLight, [
8909
8974
  {
8910
8975
  key: "position",
8911
8976
  get: /**
@@ -8926,16 +8991,26 @@ DirectLight._combinedData = {
8926
8991
  ]);
8927
8992
  return PointLight;
8928
8993
  }(Light);
8929
- PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
8930
- PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
8931
- PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
8932
- PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
8933
- PointLight._combinedData = {
8934
- cullingMask: new Int32Array(Light._maxLight * 2),
8935
- color: new Float32Array(Light._maxLight * 3),
8936
- position: new Float32Array(Light._maxLight * 3),
8937
- distance: new Float32Array(Light._maxLight)
8938
- };
8994
+ (function() {
8995
+ PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
8996
+ })();
8997
+ (function() {
8998
+ PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
8999
+ })();
9000
+ (function() {
9001
+ PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9002
+ })();
9003
+ (function() {
9004
+ PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9005
+ })();
9006
+ (function() {
9007
+ PointLight._combinedData = {
9008
+ cullingMask: new Int32Array(Light._maxLight * 2),
9009
+ color: new Float32Array(Light._maxLight * 3),
9010
+ position: new Float32Array(Light._maxLight * 3),
9011
+ distance: new Float32Array(Light._maxLight)
9012
+ };
9013
+ })();
8939
9014
  /**
8940
9015
  * Spot light.
8941
9016
  */ var SpotLight = /*#__PURE__*/ function(Light) {
@@ -9008,7 +9083,7 @@ PointLight._combinedData = {
9008
9083
  shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
9009
9084
  shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
9010
9085
  };
9011
- _createClass$2(SpotLight, [
9086
+ _create_class$2(SpotLight, [
9012
9087
  {
9013
9088
  key: "position",
9014
9089
  get: /**
@@ -9050,22 +9125,38 @@ PointLight._combinedData = {
9050
9125
  ]);
9051
9126
  return SpotLight;
9052
9127
  }(Light);
9053
- SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9054
- SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9055
- SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9056
- SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9057
- SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9058
- SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9059
- SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9060
- SpotLight._combinedData = {
9061
- cullingMask: new Int32Array(Light._maxLight * 2),
9062
- color: new Float32Array(Light._maxLight * 3),
9063
- position: new Float32Array(Light._maxLight * 3),
9064
- direction: new Float32Array(Light._maxLight * 3),
9065
- distance: new Float32Array(Light._maxLight),
9066
- angleCos: new Float32Array(Light._maxLight),
9067
- penumbraCos: new Float32Array(Light._maxLight)
9068
- };
9128
+ (function() {
9129
+ SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9130
+ })();
9131
+ (function() {
9132
+ SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9133
+ })();
9134
+ (function() {
9135
+ SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9136
+ })();
9137
+ (function() {
9138
+ SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9139
+ })();
9140
+ (function() {
9141
+ SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9142
+ })();
9143
+ (function() {
9144
+ SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9145
+ })();
9146
+ (function() {
9147
+ SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9148
+ })();
9149
+ (function() {
9150
+ SpotLight._combinedData = {
9151
+ cullingMask: new Int32Array(Light._maxLight * 2),
9152
+ color: new Float32Array(Light._maxLight * 3),
9153
+ position: new Float32Array(Light._maxLight * 3),
9154
+ direction: new Float32Array(Light._maxLight * 3),
9155
+ distance: new Float32Array(Light._maxLight),
9156
+ angleCos: new Float32Array(Light._maxLight),
9157
+ penumbraCos: new Float32Array(Light._maxLight)
9158
+ };
9159
+ })();
9069
9160
  /**
9070
9161
  * Light manager.
9071
9162
  */ var LightManager = /*#__PURE__*/ function() {
@@ -9618,7 +9709,7 @@ SpotLight._combinedData = {
9618
9709
  /**
9619
9710
  * @override
9620
9711
  */ _proto._onDestroy = function _onDestroy() {};
9621
- _createClass$2(Material, [
9712
+ _create_class$2(Material, [
9622
9713
  {
9623
9714
  key: "shader",
9624
9715
  get: /**
@@ -9722,9 +9813,15 @@ var RenderElement = function RenderElement() {};
9722
9813
  };
9723
9814
  return RenderContext;
9724
9815
  }();
9725
- /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9726
- RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9727
- RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9816
+ (function() {
9817
+ /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9818
+ })();
9819
+ (function() {
9820
+ RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9821
+ })();
9822
+ (function() {
9823
+ RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9824
+ })();
9728
9825
  var SpriteElement = /*#__PURE__*/ function(RenderElement) {
9729
9826
  var SpriteElement = function SpriteElement() {
9730
9827
  var _this;
@@ -9774,7 +9871,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9774
9871
  var Renderer1 = function Renderer1(entity) {
9775
9872
  var _this;
9776
9873
  _this = Component.call(this, entity) || this;
9777
- /** Whether cast shadow. */ _this.castShadows = true;
9778
9874
  /** ShaderData related to renderer. */ _this.shaderData = new ShaderData(ShaderDataGroup.Renderer);
9779
9875
  /** @internal */ _this._onUpdateIndex = -1;
9780
9876
  /** @internal */ _this._rendererIndex = -1;
@@ -9791,11 +9887,12 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9791
9887
  _this._priority = 0;
9792
9888
  _this._receiveShadows = true;
9793
9889
  _this._rendererLayer = new miniprogram$7.Vector4();
9890
+ /** Whether cast shadow. */ _this.castShadows = true;
9794
9891
  var prototype = exports.Renderer.prototype;
9795
9892
  var shaderData = _this.shaderData;
9796
9893
  _this._overrideUpdate = _this.update !== prototype.update;
9797
9894
  shaderData._addRefCount(1);
9798
- _this._onTransformChanged = _this._onTransformChanged.bind(_assertThisInitialized(_this));
9895
+ _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
9799
9896
  _this._registerEntityTransformListener();
9800
9897
  shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
9801
9898
  shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
@@ -9981,7 +10078,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9981
10078
  _proto._onTransformChanged = function _onTransformChanged(type) {
9982
10079
  this._dirtyUpdateFlag |= 0x1;
9983
10080
  };
9984
- _createClass$2(Renderer1, [
10081
+ _create_class$2(Renderer1, [
9985
10082
  {
9986
10083
  key: "isCulled",
9987
10084
  get: /**
@@ -10047,7 +10144,25 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10047
10144
  }
10048
10145
  ]);
10049
10146
  return Renderer1;
10050
- }(Component), _Renderer._tempVector0 = new miniprogram$7.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);
10147
+ }(Component), function() {
10148
+ _Renderer._tempVector0 = new miniprogram$7.Vector3();
10149
+ }(), function() {
10150
+ _Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS");
10151
+ }(), function() {
10152
+ _Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat");
10153
+ }(), function() {
10154
+ _Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat");
10155
+ }(), function() {
10156
+ _Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat");
10157
+ }(), function() {
10158
+ _Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat");
10159
+ }(), function() {
10160
+ _Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat");
10161
+ }(), function() {
10162
+ _Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat");
10163
+ }(), function() {
10164
+ _Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
10165
+ }(), _Renderer);
10051
10166
  __decorate$1([
10052
10167
  deepClone
10053
10168
  ], exports.Renderer.prototype, "shaderData", void 0);
@@ -10174,14 +10289,18 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
10174
10289
  renderUVs[3].set(right, top);
10175
10290
  };
10176
10291
  return SimpleSpriteAssembler1;
10177
- }(), _SimpleSpriteAssembler._rectangleTriangles = [
10178
- 0,
10179
- 1,
10180
- 2,
10181
- 2,
10182
- 1,
10183
- 3
10184
- ], _SimpleSpriteAssembler._worldMatrix = new miniprogram$7.Matrix(), _SimpleSpriteAssembler);
10292
+ }(), function() {
10293
+ _SimpleSpriteAssembler._rectangleTriangles = [
10294
+ 0,
10295
+ 1,
10296
+ 2,
10297
+ 2,
10298
+ 1,
10299
+ 3
10300
+ ];
10301
+ }(), function() {
10302
+ _SimpleSpriteAssembler._worldMatrix = new miniprogram$7.Matrix();
10303
+ }(), _SimpleSpriteAssembler);
10185
10304
  SimpleSpriteAssembler = __decorate$1([
10186
10305
  StaticInterfaceImplement$1()
10187
10306
  ], SimpleSpriteAssembler);
@@ -10262,10 +10381,10 @@ SimpleSpriteAssembler = __decorate$1([
10262
10381
  _this._flipY = false;
10263
10382
  _this._alphaCutoff = 0.5;
10264
10383
  _this._renderData = new RenderData2D(4, [], []);
10265
- SimpleSpriteAssembler.resetData(_assertThisInitialized(_this));
10384
+ SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
10266
10385
  _this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
10267
10386
  _this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
10268
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
10387
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
10269
10388
  return _this;
10270
10389
  }
10271
10390
  var _proto = SpriteMask.prototype;
@@ -10333,7 +10452,7 @@ SimpleSpriteAssembler = __decorate$1([
10333
10452
  break;
10334
10453
  }
10335
10454
  };
10336
- _createClass$2(SpriteMask, [
10455
+ _create_class$2(SpriteMask, [
10337
10456
  {
10338
10457
  key: "width",
10339
10458
  get: /**
@@ -10435,8 +10554,12 @@ SimpleSpriteAssembler = __decorate$1([
10435
10554
  ]);
10436
10555
  return SpriteMask;
10437
10556
  }(exports.Renderer);
10438
- /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10439
- /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10557
+ (function() {
10558
+ /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10559
+ })();
10560
+ (function() {
10561
+ /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10562
+ })();
10440
10563
  __decorate$1([
10441
10564
  assignmentClone
10442
10565
  ], SpriteMask.prototype, "influenceLayers", void 0);
@@ -10637,7 +10760,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10637
10760
  this._glElementInfo = BufferUtil._getElementInfo(this.format);
10638
10761
  this._instanceStepRate = Math.floor(instanceStepRate);
10639
10762
  };
10640
- _createClass$2(VertexElement, [
10763
+ _create_class$2(VertexElement, [
10641
10764
  {
10642
10765
  key: "semantic",
10643
10766
  get: /**
@@ -10794,7 +10917,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10794
10917
  gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
10795
10918
  this._byteLength = dataLength;
10796
10919
  };
10797
- _createClass$2(Buffer, [
10920
+ _create_class$2(Buffer, [
10798
10921
  {
10799
10922
  key: "type",
10800
10923
  get: /**
@@ -10841,7 +10964,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10841
10964
  this._buffer = buffer;
10842
10965
  this._format = format;
10843
10966
  };
10844
- _createClass$2(IndexBufferBinding, [
10967
+ _create_class$2(IndexBufferBinding, [
10845
10968
  {
10846
10969
  key: "buffer",
10847
10970
  get: /**
@@ -10887,8 +11010,8 @@ var BufferUtil = /*#__PURE__*/ function() {
10887
11010
  _this._bounds = new miniprogram$7.BoundingBox();
10888
11011
  _this._subMeshes = [];
10889
11012
  _this.name = name;
10890
- _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assertThisInitialized(_this));
10891
- _this._onBoundsChanged = _this._onBoundsChanged.bind(_assertThisInitialized(_this));
11013
+ _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized(_this));
11014
+ _this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized(_this));
10892
11015
  var bounds = _this._bounds;
10893
11016
  // @ts-ignore
10894
11017
  bounds.min._onValueChanged = _this._onBoundsChanged;
@@ -11006,7 +11129,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11006
11129
  _proto._onBoundsChanged = function _onBoundsChanged() {
11007
11130
  this._updateFlagManager.dispatch(0x1);
11008
11131
  };
11009
- _createClass$2(Mesh, [
11132
+ _create_class$2(Mesh, [
11010
11133
  {
11011
11134
  key: "bounds",
11012
11135
  get: /**
@@ -11051,7 +11174,7 @@ var MeshModifyFlags;
11051
11174
  this._buffer = buffer;
11052
11175
  this._stride = stride;
11053
11176
  };
11054
- _createClass$2(VertexBufferBinding, [
11177
+ _create_class$2(VertexBufferBinding, [
11055
11178
  {
11056
11179
  key: "buffer",
11057
11180
  get: /**
@@ -11496,13 +11619,27 @@ var MeshModifyFlags;
11496
11619
  };
11497
11620
  return BlendShapeManager;
11498
11621
  }();
11499
- BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11500
- BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11501
- BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11502
- BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11503
- BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11504
- BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11505
- BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11622
+ (function() {
11623
+ BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11624
+ })();
11625
+ (function() {
11626
+ BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11627
+ })();
11628
+ (function() {
11629
+ BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11630
+ })();
11631
+ (function() {
11632
+ BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11633
+ })();
11634
+ (function() {
11635
+ BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11636
+ })();
11637
+ (function() {
11638
+ BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11639
+ })();
11640
+ (function() {
11641
+ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11642
+ })();
11506
11643
  /**
11507
11644
  * Vertex attribute types of a vertex in a ModelMesh.
11508
11645
  */ var VertexAttribute;
@@ -11556,7 +11693,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
11556
11693
  _this._customVertexElements = [];
11557
11694
  _this._vertexCountChanged = false;
11558
11695
  _this.name = name;
11559
- _this._blendShapeManager = new BlendShapeManager(engine, _assertThisInitialized(_this));
11696
+ _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
11560
11697
  return _this;
11561
11698
  };
11562
11699
  _inherits$2(ModelMesh, Mesh);
@@ -12507,7 +12644,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12507
12644
  this._uv7 = null;
12508
12645
  this._blendShapeManager._releaseMemoryCache();
12509
12646
  };
12510
- _createClass$2(ModelMesh, [
12647
+ _create_class$2(ModelMesh, [
12511
12648
  {
12512
12649
  key: "accessible",
12513
12650
  get: /**
@@ -12575,11 +12712,21 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12575
12712
  ]);
12576
12713
  return ModelMesh;
12577
12714
  }(Mesh);
12578
- ModelMesh._tempVec0 = new miniprogram$7.Vector3();
12579
- ModelMesh._tempVec1 = new miniprogram$7.Vector3();
12580
- ModelMesh._tempVec2 = new miniprogram$7.Vector3();
12581
- ModelMesh._tempVec3 = new miniprogram$7.Vector3();
12582
- ModelMesh._tempVec4 = new miniprogram$7.Vector3();
12715
+ (function() {
12716
+ ModelMesh._tempVec0 = new miniprogram$7.Vector3();
12717
+ })();
12718
+ (function() {
12719
+ ModelMesh._tempVec1 = new miniprogram$7.Vector3();
12720
+ })();
12721
+ (function() {
12722
+ ModelMesh._tempVec2 = new miniprogram$7.Vector3();
12723
+ })();
12724
+ (function() {
12725
+ ModelMesh._tempVec3 = new miniprogram$7.Vector3();
12726
+ })();
12727
+ (function() {
12728
+ ModelMesh._tempVec4 = new miniprogram$7.Vector3();
12729
+ })();
12583
12730
  var VertexChangedFlags;
12584
12731
  (function(VertexChangedFlags) {
12585
12732
  VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
@@ -12619,7 +12766,7 @@ var VertexChangedFlags;
12619
12766
  var MeshRenderer = function MeshRenderer(entity) {
12620
12767
  var _this;
12621
12768
  _this = Renderer.call(this, entity) || this;
12622
- _this._onMeshChanged = _this._onMeshChanged.bind(_assertThisInitialized(_this));
12769
+ _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
12623
12770
  return _this;
12624
12771
  };
12625
12772
  _inherits$2(MeshRenderer, Renderer);
@@ -12723,7 +12870,7 @@ var VertexChangedFlags;
12723
12870
  type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
12724
12871
  type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
12725
12872
  };
12726
- _createClass$2(MeshRenderer, [
12873
+ _create_class$2(MeshRenderer, [
12727
12874
  {
12728
12875
  key: "mesh",
12729
12876
  get: /**
@@ -12740,11 +12887,21 @@ var VertexChangedFlags;
12740
12887
  ]);
12741
12888
  return MeshRenderer;
12742
12889
  }(exports.Renderer);
12743
- MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
12744
- MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
12745
- MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
12746
- MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
12747
- MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
12890
+ (function() {
12891
+ MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
12892
+ })();
12893
+ (function() {
12894
+ MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
12895
+ })();
12896
+ (function() {
12897
+ MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
12898
+ })();
12899
+ (function() {
12900
+ MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
12901
+ })();
12902
+ (function() {
12903
+ MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
12904
+ })();
12748
12905
  __decorate$1([
12749
12906
  ignoreClone
12750
12907
  ], MeshRenderer.prototype, "_mesh", void 0);
@@ -12843,7 +13000,7 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
12843
13000
  // 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.
12844
13001
  maxVertexUniformVectors = Math.min(maxVertexUniformVectors, 256);
12845
13002
  _this._maxVertexUniformVectors = maxVertexUniformVectors;
12846
- _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assertThisInitialized(_this));
13003
+ _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
12847
13004
  var localBounds = _this._localBounds;
12848
13005
  // @ts-ignore
12849
13006
  localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
@@ -13042,7 +13199,7 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
13042
13199
  _proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
13043
13200
  this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
13044
13201
  };
13045
- _createClass$2(SkinnedMeshRenderer, [
13202
+ _create_class$2(SkinnedMeshRenderer, [
13046
13203
  {
13047
13204
  key: "blendShapeWeights",
13048
13205
  get: /**
@@ -13107,10 +13264,18 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
13107
13264
  ]);
13108
13265
  return SkinnedMeshRenderer;
13109
13266
  }(MeshRenderer);
13110
- SkinnedMeshRenderer._tempMatrix = new miniprogram$7.Matrix();
13111
- SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13112
- SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13113
- SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13267
+ (function() {
13268
+ SkinnedMeshRenderer._tempMatrix = new miniprogram$7.Matrix();
13269
+ })();
13270
+ (function() {
13271
+ SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13272
+ })();
13273
+ (function() {
13274
+ SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13275
+ })();
13276
+ (function() {
13277
+ SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13278
+ })();
13114
13279
  __decorate$1([
13115
13280
  ignoreClone
13116
13281
  ], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
@@ -13869,7 +14034,7 @@ __decorate$1([
13869
14034
  }
13870
14035
  this._setIndexBufferBinding(binding);
13871
14036
  };
13872
- _createClass$2(BufferMesh, [
14037
+ _create_class$2(BufferMesh, [
13873
14038
  {
13874
14039
  key: "instanceCount",
13875
14040
  get: /**
@@ -13981,7 +14146,7 @@ __decorate$1([
13981
14146
  this._layoutChangeManager.dispatch(0, this);
13982
14147
  }
13983
14148
  };
13984
- _createClass$2(BlendShape, [
14149
+ _create_class$2(BlendShape, [
13985
14150
  {
13986
14151
  key: "frames",
13987
14152
  get: /**
@@ -14138,8 +14303,12 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
14138
14303
  };
14139
14304
  return Basic2DBatcher;
14140
14305
  }();
14141
- /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14142
- Basic2DBatcher._canUploadSameBuffer = true;
14306
+ (function() {
14307
+ /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14308
+ })();
14309
+ (function() {
14310
+ Basic2DBatcher._canUploadSameBuffer = true;
14311
+ })();
14143
14312
  var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
14144
14313
  var SpriteMaskBatcher = function SpriteMaskBatcher() {
14145
14314
  return Basic2DBatcher.apply(this, arguments);
@@ -14348,9 +14517,15 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14348
14517
  };
14349
14518
  return Sky;
14350
14519
  }();
14351
- Sky._epsilon = 1e-6;
14352
- Sky._viewProjMatrix = new miniprogram$7.Matrix();
14353
- Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14520
+ (function() {
14521
+ Sky._epsilon = 1e-6;
14522
+ })();
14523
+ (function() {
14524
+ Sky._viewProjMatrix = new miniprogram$7.Matrix();
14525
+ })();
14526
+ (function() {
14527
+ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14528
+ })();
14354
14529
  /**
14355
14530
  * Background of scene.
14356
14531
  */ var Background = /*#__PURE__*/ function() {
@@ -14431,7 +14606,7 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
14431
14606
  mesh.addSubMesh(0, indices.length);
14432
14607
  return mesh;
14433
14608
  };
14434
- _createClass$2(Background, [
14609
+ _create_class$2(Background, [
14435
14610
  {
14436
14611
  key: "texture",
14437
14612
  get: /**
@@ -14596,7 +14771,7 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
14596
14771
  out[25] = src[25] * 0.429042;
14597
14772
  out[26] = src[26] * 0.429042;
14598
14773
  };
14599
- _createClass$2(AmbientLight, [
14774
+ _create_class$2(AmbientLight, [
14600
14775
  {
14601
14776
  key: "specularTextureDecodeRGBM",
14602
14777
  get: /**
@@ -14707,15 +14882,33 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
14707
14882
  ]);
14708
14883
  return AmbientLight;
14709
14884
  }();
14710
- AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
14711
- AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
14712
- AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
14713
- AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
14714
- AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
14715
- AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
14716
- AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
14717
- AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
14718
- AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
14885
+ (function() {
14886
+ AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
14887
+ })();
14888
+ (function() {
14889
+ AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
14890
+ })();
14891
+ (function() {
14892
+ AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
14893
+ })();
14894
+ (function() {
14895
+ AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
14896
+ })();
14897
+ (function() {
14898
+ AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
14899
+ })();
14900
+ (function() {
14901
+ AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
14902
+ })();
14903
+ (function() {
14904
+ AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
14905
+ })();
14906
+ (function() {
14907
+ AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
14908
+ })();
14909
+ (function() {
14910
+ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
14911
+ })();
14719
14912
  /**
14720
14913
  * Scene.
14721
14914
  */ var Scene = /*#__PURE__*/ function(EngineObject) {
@@ -14745,7 +14938,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
14745
14938
  var shaderData = _this.shaderData;
14746
14939
  shaderData._addRefCount(1);
14747
14940
  _this.ambientLight = new AmbientLight();
14748
- engine.sceneManager._allScenes.push(_assertThisInitialized(_this));
14941
+ engine.sceneManager._allScenes.push(_assert_this_initialized(_this));
14749
14942
  shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
14750
14943
  shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
14751
14944
  shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
@@ -14952,7 +15145,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
14952
15145
  this._fogParams.z = density / Math.LN2;
14953
15146
  this._fogParams.w = density / Math.sqrt(Math.LN2);
14954
15147
  };
14955
- _createClass$2(Scene, [
15148
+ _create_class$2(Scene, [
14956
15149
  {
14957
15150
  key: "shadowCascades",
14958
15151
  get: /**
@@ -15080,8 +15273,12 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15080
15273
  ]);
15081
15274
  return Scene;
15082
15275
  }(EngineObject);
15083
- Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15084
- Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15276
+ (function() {
15277
+ Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15278
+ })();
15279
+ (function() {
15280
+ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15281
+ })();
15085
15282
  /**
15086
15283
  * Scene manager.
15087
15284
  */ var SceneManager = /*#__PURE__*/ function() {
@@ -15128,7 +15325,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15128
15325
  }
15129
15326
  allScenes.length = 0;
15130
15327
  };
15131
- _createClass$2(SceneManager, [
15328
+ _create_class$2(SceneManager, [
15132
15329
  {
15133
15330
  key: "activeScene",
15134
15331
  get: /**
@@ -15277,8 +15474,8 @@ ShaderPool.init();
15277
15474
  /** @internal */ _this._canSpriteBatch = true;
15278
15475
  /** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
15279
15476
  _this._settings = {};
15280
- _this._resourceManager = new ResourceManager(_assertThisInitialized(_this));
15281
- _this._sceneManager = new SceneManager(_assertThisInitialized(_this));
15477
+ _this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
15478
+ _this._sceneManager = new SceneManager(_assert_this_initialized(_this));
15282
15479
  _this._vSyncCount = 1;
15283
15480
  _this._targetFrameRate = 60;
15284
15481
  _this._time = new Time();
@@ -15302,25 +15499,25 @@ ShaderPool.init();
15302
15499
  };
15303
15500
  _this._hardwareRenderer = hardwareRenderer;
15304
15501
  _this._hardwareRenderer.init(canvas);
15305
- _this.physicsManager = new PhysicsManager(_assertThisInitialized(_this));
15502
+ _this.physicsManager = new PhysicsManager(_assert_this_initialized(_this));
15306
15503
  _this._canvas = canvas;
15307
- _this._sceneManager.activeScene = new Scene(_assertThisInitialized(_this), "DefaultScene");
15308
- _this._spriteMaskManager = new SpriteMaskManager(_assertThisInitialized(_this));
15504
+ _this._sceneManager.activeScene = new Scene(_assert_this_initialized(_this), "DefaultScene");
15505
+ _this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized(_this));
15309
15506
  _this._spriteDefaultMaterial = _this._createSpriteMaterial();
15310
15507
  _this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
15311
- _this._textDefaultFont = Font.createFromOS(_assertThisInitialized(_this), "Arial");
15508
+ _this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
15312
15509
  _this._textDefaultFont.isGCIgnored = false;
15313
- _this.inputManager = new InputManager(_assertThisInitialized(_this));
15510
+ _this.inputManager = new InputManager(_assert_this_initialized(_this));
15314
15511
  var magentaPixel = new Uint8Array([
15315
15512
  255,
15316
15513
  0,
15317
15514
  255,
15318
15515
  255
15319
15516
  ]);
15320
- var magentaTexture2D = new Texture2D(_assertThisInitialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15517
+ var magentaTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15321
15518
  magentaTexture2D.setPixelBuffer(magentaPixel);
15322
15519
  magentaTexture2D.isGCIgnored = true;
15323
- var magentaTextureCube = new TextureCube(_assertThisInitialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
15520
+ var magentaTextureCube = new TextureCube(_assert_this_initialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
15324
15521
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveX, magentaPixel);
15325
15522
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.NegativeX, magentaPixel);
15326
15523
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveY, magentaPixel);
@@ -15331,22 +15528,22 @@ ShaderPool.init();
15331
15528
  if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
15332
15529
  _this._macroCollection.enable(Engine._noDepthTextureMacro);
15333
15530
  } else {
15334
- var depthTexture2D = new Texture2D(_assertThisInitialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
15531
+ var depthTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
15335
15532
  depthTexture2D.isGCIgnored = true;
15336
15533
  _this._depthTexture2D = depthTexture2D;
15337
15534
  }
15338
15535
  _this._magentaTexture2D = magentaTexture2D;
15339
15536
  _this._magentaTextureCube = magentaTextureCube;
15340
15537
  if (hardwareRenderer.isWebGL2) {
15341
- var magentaTexture2DArray = new Texture2DArray(_assertThisInitialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
15538
+ var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
15342
15539
  magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
15343
15540
  magentaTexture2DArray.isGCIgnored = true;
15344
15541
  _this._magentaTexture2DArray = magentaTexture2DArray;
15345
15542
  }
15346
- var magentaMaterial = new Material(_assertThisInitialized(_this), Shader.find("unlit"));
15543
+ var magentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
15347
15544
  magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
15348
15545
  _this._magentaMaterial = magentaMaterial;
15349
- var backgroundTextureMaterial = new Material(_assertThisInitialized(_this), Shader.find("background-texture"));
15546
+ var backgroundTextureMaterial = new Material(_assert_this_initialized(_this), Shader.find("background-texture"));
15350
15547
  backgroundTextureMaterial.isGCIgnored = true;
15351
15548
  backgroundTextureMaterial.renderState.depthState.compareFunction = exports.CompareFunction.LessEqual;
15352
15549
  _this._backgroundTextureMaterial = backgroundTextureMaterial;
@@ -15517,7 +15714,7 @@ ShaderPool.init();
15517
15714
  material.isGCIgnored = true;
15518
15715
  return material;
15519
15716
  };
15520
- _createClass$2(Engine, [
15717
+ _create_class$2(Engine, [
15521
15718
  {
15522
15719
  key: "settings",
15523
15720
  get: /**
@@ -15605,9 +15802,15 @@ ShaderPool.init();
15605
15802
  ]);
15606
15803
  return Engine;
15607
15804
  }(EventDispatcher);
15608
- /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15609
- /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15610
- /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
15805
+ (function() {
15806
+ /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15807
+ })();
15808
+ (function() {
15809
+ /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15810
+ })();
15811
+ (function() {
15812
+ /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
15813
+ })();
15611
15814
  /**
15612
15815
  * Script class, used for logic writing.
15613
15816
  */ var Script = /*#__PURE__*/ function(Component) {
@@ -15920,7 +16123,9 @@ __decorate$1([
15920
16123
  };
15921
16124
  return SpriteBatcher;
15922
16125
  }(Basic2DBatcher);
15923
- SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16126
+ (function() {
16127
+ SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16128
+ })();
15924
16129
  /**
15925
16130
  * Render queue.
15926
16131
  */ var RenderQueue = /*#__PURE__*/ function() {
@@ -16414,227 +16619,247 @@ var /**
16414
16619
  };
16415
16620
  return ShadowUtils;
16416
16621
  }();
16417
- ShadowUtils._tempMatrix0 = new miniprogram$7.Matrix();
16418
- // prettier-ignore
16419
- /** @internal */ ShadowUtils._shadowMapCoordMatrix = new miniprogram$7.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);
16420
- ShadowUtils._frustumCorners = [
16421
- new miniprogram$7.Vector3(),
16422
- new miniprogram$7.Vector3(),
16423
- new miniprogram$7.Vector3(),
16424
- new miniprogram$7.Vector3(),
16425
- new miniprogram$7.Vector3(),
16426
- new miniprogram$7.Vector3(),
16427
- new miniprogram$7.Vector3(),
16428
- new miniprogram$7.Vector3()
16429
- ];
16430
- ShadowUtils._adjustNearPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
16431
- ShadowUtils._adjustFarPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
16432
- ShadowUtils._backPlaneFaces = new Array(5);
16433
- ShadowUtils._edgePlanePoint2 = new miniprogram$7.Vector3();
16434
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16435
- [
16436
- miniprogram$7.FrustumFace.Left,
16437
- miniprogram$7.FrustumFace.Right,
16438
- miniprogram$7.FrustumFace.Top,
16439
- miniprogram$7.FrustumFace.Bottom
16440
- ],
16441
- [
16442
- miniprogram$7.FrustumFace.Left,
16443
- miniprogram$7.FrustumFace.Right,
16444
- miniprogram$7.FrustumFace.Top,
16445
- miniprogram$7.FrustumFace.Bottom
16446
- ],
16447
- [
16448
- miniprogram$7.FrustumFace.Near,
16449
- miniprogram$7.FrustumFace.Far,
16450
- miniprogram$7.FrustumFace.Top,
16451
- miniprogram$7.FrustumFace.Bottom
16452
- ],
16453
- [
16454
- miniprogram$7.FrustumFace.Near,
16455
- miniprogram$7.FrustumFace.Far,
16456
- miniprogram$7.FrustumFace.Top,
16457
- miniprogram$7.FrustumFace.Bottom
16458
- ],
16459
- [
16460
- miniprogram$7.FrustumFace.Near,
16461
- miniprogram$7.FrustumFace.Far,
16462
- miniprogram$7.FrustumFace.Left,
16463
- miniprogram$7.FrustumFace.Right
16464
- ],
16465
- [
16466
- miniprogram$7.FrustumFace.Near,
16467
- miniprogram$7.FrustumFace.Far,
16468
- miniprogram$7.FrustumFace.Left,
16469
- miniprogram$7.FrustumFace.Right
16470
- ]
16471
- ];
16472
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16473
- [
16474
- // near, far, left, right, bottom, top
16475
- [
16476
- 8,
16477
- 8
16478
- ],
16479
- [
16480
- 8,
16481
- 8
16482
- ],
16483
- [
16484
- 4,
16485
- 5
16486
- ],
16487
- [
16488
- 6,
16489
- 7
16490
- ],
16491
- [
16492
- 7,
16493
- 4
16494
- ],
16495
- [
16496
- 5,
16497
- 6
16498
- ]
16499
- ],
16500
- [
16501
- // near, far, left, right, bottom, top
16502
- [
16503
- 8,
16504
- 8
16505
- ],
16506
- [
16507
- 8,
16508
- 8
16509
- ],
16510
- [
16511
- 1,
16512
- 0
16513
- ],
16514
- [
16515
- 3,
16516
- 2
16517
- ],
16518
- [
16519
- 0,
16520
- 3
16521
- ],
16522
- [
16523
- 2,
16524
- 1
16525
- ]
16526
- ],
16527
- [
16528
- // near, far, left, right, bottom, top
16529
- [
16530
- 5,
16531
- 4
16532
- ],
16533
- [
16534
- 0,
16535
- 1
16536
- ],
16537
- [
16538
- 8,
16539
- 8
16540
- ],
16541
- [
16542
- 8,
16543
- 8
16544
- ],
16545
- [
16546
- 4,
16547
- 0
16548
- ],
16549
- [
16550
- 1,
16551
- 5
16552
- ]
16553
- ],
16554
- [
16555
- // near, far, left, right, bottom, top
16556
- [
16557
- 7,
16558
- 6
16559
- ],
16560
- [
16561
- 2,
16562
- 3
16563
- ],
16564
- [
16565
- 8,
16566
- 8
16567
- ],
16568
- [
16569
- 8,
16570
- 8
16571
- ],
16572
- [
16573
- 3,
16574
- 7
16575
- ],
16576
- [
16577
- 6,
16578
- 2
16579
- ]
16580
- ],
16581
- [
16582
- // near, far, left, right, bottom, top
16622
+ (function() {
16623
+ ShadowUtils._tempMatrix0 = new miniprogram$7.Matrix();
16624
+ })();
16625
+ (function() {
16626
+ // prettier-ignore
16627
+ /** @internal */ ShadowUtils._shadowMapCoordMatrix = new miniprogram$7.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);
16628
+ })();
16629
+ (function() {
16630
+ ShadowUtils._frustumCorners = [
16631
+ new miniprogram$7.Vector3(),
16632
+ new miniprogram$7.Vector3(),
16633
+ new miniprogram$7.Vector3(),
16634
+ new miniprogram$7.Vector3(),
16635
+ new miniprogram$7.Vector3(),
16636
+ new miniprogram$7.Vector3(),
16637
+ new miniprogram$7.Vector3(),
16638
+ new miniprogram$7.Vector3()
16639
+ ];
16640
+ })();
16641
+ (function() {
16642
+ ShadowUtils._adjustNearPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
16643
+ })();
16644
+ (function() {
16645
+ ShadowUtils._adjustFarPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
16646
+ })();
16647
+ (function() {
16648
+ ShadowUtils._backPlaneFaces = new Array(5);
16649
+ })();
16650
+ (function() {
16651
+ ShadowUtils._edgePlanePoint2 = new miniprogram$7.Vector3();
16652
+ })();
16653
+ (function() {
16654
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16583
16655
  [
16584
- 4,
16585
- 7
16656
+ miniprogram$7.FrustumFace.Left,
16657
+ miniprogram$7.FrustumFace.Right,
16658
+ miniprogram$7.FrustumFace.Top,
16659
+ miniprogram$7.FrustumFace.Bottom
16586
16660
  ],
16587
16661
  [
16588
- 3,
16589
- 0
16662
+ miniprogram$7.FrustumFace.Left,
16663
+ miniprogram$7.FrustumFace.Right,
16664
+ miniprogram$7.FrustumFace.Top,
16665
+ miniprogram$7.FrustumFace.Bottom
16590
16666
  ],
16591
16667
  [
16592
- 0,
16593
- 4
16668
+ miniprogram$7.FrustumFace.Near,
16669
+ miniprogram$7.FrustumFace.Far,
16670
+ miniprogram$7.FrustumFace.Top,
16671
+ miniprogram$7.FrustumFace.Bottom
16594
16672
  ],
16595
16673
  [
16596
- 7,
16597
- 3
16674
+ miniprogram$7.FrustumFace.Near,
16675
+ miniprogram$7.FrustumFace.Far,
16676
+ miniprogram$7.FrustumFace.Top,
16677
+ miniprogram$7.FrustumFace.Bottom
16598
16678
  ],
16599
16679
  [
16600
- 8,
16601
- 8
16680
+ miniprogram$7.FrustumFace.Near,
16681
+ miniprogram$7.FrustumFace.Far,
16682
+ miniprogram$7.FrustumFace.Left,
16683
+ miniprogram$7.FrustumFace.Right
16602
16684
  ],
16603
16685
  [
16604
- 8,
16605
- 8
16686
+ miniprogram$7.FrustumFace.Near,
16687
+ miniprogram$7.FrustumFace.Far,
16688
+ miniprogram$7.FrustumFace.Left,
16689
+ miniprogram$7.FrustumFace.Right
16606
16690
  ]
16607
- ],
16608
- [
16609
- // near, far, left, right, bottom, top
16691
+ ];
16692
+ })();
16693
+ (function() {
16694
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16610
16695
  [
16611
- 6,
16612
- 5
16696
+ // near, far, left, right, bottom, top
16697
+ [
16698
+ 8,
16699
+ 8
16700
+ ],
16701
+ [
16702
+ 8,
16703
+ 8
16704
+ ],
16705
+ [
16706
+ 4,
16707
+ 5
16708
+ ],
16709
+ [
16710
+ 6,
16711
+ 7
16712
+ ],
16713
+ [
16714
+ 7,
16715
+ 4
16716
+ ],
16717
+ [
16718
+ 5,
16719
+ 6
16720
+ ]
16613
16721
  ],
16614
16722
  [
16615
- 1,
16616
- 2
16723
+ // near, far, left, right, bottom, top
16724
+ [
16725
+ 8,
16726
+ 8
16727
+ ],
16728
+ [
16729
+ 8,
16730
+ 8
16731
+ ],
16732
+ [
16733
+ 1,
16734
+ 0
16735
+ ],
16736
+ [
16737
+ 3,
16738
+ 2
16739
+ ],
16740
+ [
16741
+ 0,
16742
+ 3
16743
+ ],
16744
+ [
16745
+ 2,
16746
+ 1
16747
+ ]
16617
16748
  ],
16618
16749
  [
16619
- 5,
16620
- 1
16750
+ // near, far, left, right, bottom, top
16751
+ [
16752
+ 5,
16753
+ 4
16754
+ ],
16755
+ [
16756
+ 0,
16757
+ 1
16758
+ ],
16759
+ [
16760
+ 8,
16761
+ 8
16762
+ ],
16763
+ [
16764
+ 8,
16765
+ 8
16766
+ ],
16767
+ [
16768
+ 4,
16769
+ 0
16770
+ ],
16771
+ [
16772
+ 1,
16773
+ 5
16774
+ ]
16621
16775
  ],
16622
16776
  [
16623
- 2,
16624
- 6
16777
+ // near, far, left, right, bottom, top
16778
+ [
16779
+ 7,
16780
+ 6
16781
+ ],
16782
+ [
16783
+ 2,
16784
+ 3
16785
+ ],
16786
+ [
16787
+ 8,
16788
+ 8
16789
+ ],
16790
+ [
16791
+ 8,
16792
+ 8
16793
+ ],
16794
+ [
16795
+ 3,
16796
+ 7
16797
+ ],
16798
+ [
16799
+ 6,
16800
+ 2
16801
+ ]
16625
16802
  ],
16626
16803
  [
16627
- 8,
16628
- 8
16804
+ // near, far, left, right, bottom, top
16805
+ [
16806
+ 4,
16807
+ 7
16808
+ ],
16809
+ [
16810
+ 3,
16811
+ 0
16812
+ ],
16813
+ [
16814
+ 0,
16815
+ 4
16816
+ ],
16817
+ [
16818
+ 7,
16819
+ 3
16820
+ ],
16821
+ [
16822
+ 8,
16823
+ 8
16824
+ ],
16825
+ [
16826
+ 8,
16827
+ 8
16828
+ ]
16629
16829
  ],
16630
16830
  [
16631
- 8,
16632
- 8
16831
+ // near, far, left, right, bottom, top
16832
+ [
16833
+ 6,
16834
+ 5
16835
+ ],
16836
+ [
16837
+ 1,
16838
+ 2
16839
+ ],
16840
+ [
16841
+ 5,
16842
+ 1
16843
+ ],
16844
+ [
16845
+ 2,
16846
+ 6
16847
+ ],
16848
+ [
16849
+ 8,
16850
+ 8
16851
+ ],
16852
+ [
16853
+ 8,
16854
+ 8
16855
+ ]
16633
16856
  ]
16634
- ]
16635
- ];
16636
- //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.
16637
- ShadowUtils.atlasBorderSize = 4.0;
16857
+ ];
16858
+ })();
16859
+ (function() {
16860
+ //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.
16861
+ ShadowUtils.atlasBorderSize = 4.0;
16862
+ })();
16638
16863
  /**
16639
16864
  * Cascade shadow caster.
16640
16865
  */ var CascadedShadowCasterPass = /*#__PURE__*/ function() {
@@ -16870,18 +17095,42 @@ ShadowUtils.atlasBorderSize = 4.0;
16870
17095
  };
16871
17096
  return CascadedShadowCasterPass;
16872
17097
  }();
16873
- CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
16874
- CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
16875
- CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
16876
- CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
16877
- CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
16878
- CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
16879
- CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
16880
- CascadedShadowCasterPass._maxCascades = 4;
16881
- CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
16882
- CascadedShadowCasterPass._clearColor = new miniprogram$7.Color(1, 1, 1, 1);
16883
- CascadedShadowCasterPass._tempVector = new miniprogram$7.Vector3();
16884
- CascadedShadowCasterPass._tempMatrix0 = new miniprogram$7.Matrix();
17098
+ (function() {
17099
+ CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17100
+ })();
17101
+ (function() {
17102
+ CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17103
+ })();
17104
+ (function() {
17105
+ CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17106
+ })();
17107
+ (function() {
17108
+ CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17109
+ })();
17110
+ (function() {
17111
+ CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17112
+ })();
17113
+ (function() {
17114
+ CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17115
+ })();
17116
+ (function() {
17117
+ CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17118
+ })();
17119
+ (function() {
17120
+ CascadedShadowCasterPass._maxCascades = 4;
17121
+ })();
17122
+ (function() {
17123
+ CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17124
+ })();
17125
+ (function() {
17126
+ CascadedShadowCasterPass._clearColor = new miniprogram$7.Color(1, 1, 1, 1);
17127
+ })();
17128
+ (function() {
17129
+ CascadedShadowCasterPass._tempVector = new miniprogram$7.Vector3();
17130
+ })();
17131
+ (function() {
17132
+ CascadedShadowCasterPass._tempMatrix0 = new miniprogram$7.Matrix();
17133
+ })();
16885
17134
  var passNum = 0;
16886
17135
  /**
16887
17136
  * RenderPass.
@@ -17112,7 +17361,7 @@ var passNum = 0;
17112
17361
  renderer._prepareRender(context);
17113
17362
  }
17114
17363
  };
17115
- _createClass$2(BasicRenderPipeline, [
17364
+ _create_class$2(BasicRenderPipeline, [
17116
17365
  {
17117
17366
  key: "defaultRenderPass",
17118
17367
  get: /**
@@ -17124,13 +17373,23 @@ var passNum = 0;
17124
17373
  ]);
17125
17374
  return BasicRenderPipeline;
17126
17375
  }();
17127
- BasicRenderPipeline._tempVector0 = new miniprogram$7.Vector3();
17128
- BasicRenderPipeline._tempVector1 = new miniprogram$7.Vector3();
17376
+ (function() {
17377
+ BasicRenderPipeline._tempVector0 = new miniprogram$7.Vector3();
17378
+ })();
17379
+ (function() {
17380
+ BasicRenderPipeline._tempVector1 = new miniprogram$7.Vector3();
17381
+ })();
17129
17382
  var _Camera;
17130
17383
  var MathTemp = function MathTemp() {};
17131
- MathTemp.tempVec4 = new miniprogram$7.Vector4();
17132
- MathTemp.tempVec3 = new miniprogram$7.Vector3();
17133
- MathTemp.tempVec2 = new miniprogram$7.Vector2();
17384
+ (function() {
17385
+ MathTemp.tempVec4 = new miniprogram$7.Vector4();
17386
+ })();
17387
+ (function() {
17388
+ MathTemp.tempVec3 = new miniprogram$7.Vector3();
17389
+ })();
17390
+ (function() {
17391
+ MathTemp.tempVec2 = new miniprogram$7.Vector2();
17392
+ })();
17134
17393
  exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17135
17394
  var Camera1 = function Camera1(entity) {
17136
17395
  var _this;
@@ -17147,6 +17406,8 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17147
17406
  * @remarks Support bit manipulation, corresponding to `Layer`.
17148
17407
  */ _this.cullingMask = exports.Layer.Everything;
17149
17408
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
17409
+ /** @internal */ _this._frustum = new miniprogram$7.BoundingFrustum();
17410
+ /** @internal */ _this._virtualCamera = new VirtualCamera();
17150
17411
  _this._isProjMatSetting = false;
17151
17412
  _this._nearClipPlane = 0.1;
17152
17413
  _this._farClipPlane = 100;
@@ -17157,8 +17418,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17157
17418
  _this._isFrustumProjectDirty = true;
17158
17419
  _this._customAspectRatio = undefined;
17159
17420
  _this._renderTarget = null;
17160
- /** @internal */ _this._frustum = new miniprogram$7.BoundingFrustum();
17161
- /** @internal */ _this._virtualCamera = new VirtualCamera();
17162
17421
  _this._viewport = new miniprogram$7.Vector4(0, 0, 1, 1);
17163
17422
  _this._inverseProjectionMatrix = new miniprogram$7.Matrix();
17164
17423
  _this._lastAspectSize = new miniprogram$7.Vector2(0, 0);
@@ -17168,7 +17427,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17168
17427
  _this._isViewMatrixDirty = transform.registerWorldChangeFlag();
17169
17428
  _this._isInvViewProjDirty = transform.registerWorldChangeFlag();
17170
17429
  _this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
17171
- _this._renderPipeline = new BasicRenderPipeline(_assertThisInitialized(_this));
17430
+ _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
17172
17431
  _this.shaderData._addRefCount(1);
17173
17432
  return _this;
17174
17433
  };
@@ -17386,7 +17645,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17386
17645
  }
17387
17646
  return this._inverseProjectionMatrix;
17388
17647
  };
17389
- _createClass$2(Camera1, [
17648
+ _create_class$2(Camera1, [
17390
17649
  {
17391
17650
  key: "nearClipPlane",
17392
17651
  get: /**
@@ -17550,7 +17809,11 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17550
17809
  }
17551
17810
  ]);
17552
17811
  return Camera1;
17553
- }(Component), /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat"), /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos"), _Camera);
17812
+ }(Component), function() {
17813
+ /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat");
17814
+ }(), function() {
17815
+ /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
17816
+ }(), _Camera);
17554
17817
  __decorate$1([
17555
17818
  deepClone
17556
17819
  ], exports.Camera.prototype, "_frustum", void 0);
@@ -17759,7 +18022,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
17759
18022
  };
17760
18023
  return Loader;
17761
18024
  }();
17762
- Loader._engineObjects = {};
18025
+ (function() {
18026
+ Loader._engineObjects = {};
18027
+ })();
17763
18028
  /**
17764
18029
  * Asset Type.
17765
18030
  */ exports.AssetType = void 0;
@@ -17908,7 +18173,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
17908
18173
  target._isTransparent = this._isTransparent;
17909
18174
  target._blendMode = this._blendMode;
17910
18175
  };
17911
- _createClass$2(BaseMaterial, [
18176
+ _create_class$2(BaseMaterial, [
17912
18177
  {
17913
18178
  key: "shader",
17914
18179
  get: /**
@@ -18008,19 +18273,45 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18008
18273
  ]);
18009
18274
  return BaseMaterial;
18010
18275
  }(Material);
18011
- BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18012
- BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18013
- BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18014
- BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18015
- BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18016
- BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18017
- BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18018
- BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18019
- BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18020
- BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18021
- BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18022
- BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18023
- BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18276
+ (function() {
18277
+ BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18278
+ })();
18279
+ (function() {
18280
+ BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18281
+ })();
18282
+ (function() {
18283
+ BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18284
+ })();
18285
+ (function() {
18286
+ BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18287
+ })();
18288
+ (function() {
18289
+ BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18290
+ })();
18291
+ (function() {
18292
+ BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18293
+ })();
18294
+ (function() {
18295
+ BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18296
+ })();
18297
+ (function() {
18298
+ BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18299
+ })();
18300
+ (function() {
18301
+ BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18302
+ })();
18303
+ (function() {
18304
+ BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18305
+ })();
18306
+ (function() {
18307
+ BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18308
+ })();
18309
+ (function() {
18310
+ BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18311
+ })();
18312
+ (function() {
18313
+ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18314
+ })();
18024
18315
  /**
18025
18316
  * Blinn-phong Material.
18026
18317
  */ var BlinnPhongMaterial = /*#__PURE__*/ function(BaseMaterial) {
@@ -18047,7 +18338,7 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18047
18338
  this.cloneTo(dest);
18048
18339
  return dest;
18049
18340
  };
18050
- _createClass$2(BlinnPhongMaterial, [
18341
+ _create_class$2(BlinnPhongMaterial, [
18051
18342
  {
18052
18343
  key: "baseColor",
18053
18344
  get: /**
@@ -18193,9 +18484,15 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18193
18484
  ]);
18194
18485
  return BlinnPhongMaterial;
18195
18486
  }(BaseMaterial);
18196
- BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18197
- BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18198
- BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
18487
+ (function() {
18488
+ BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18489
+ })();
18490
+ (function() {
18491
+ BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18492
+ })();
18493
+ (function() {
18494
+ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
18495
+ })();
18199
18496
  /**
18200
18497
  * Texture UV coordinate.
18201
18498
  */ exports.TextureCoordinate = void 0;
@@ -18229,7 +18526,7 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18229
18526
  shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
18230
18527
  return _this;
18231
18528
  }
18232
- _createClass$2(PBRBaseMaterial, [
18529
+ _create_class$2(PBRBaseMaterial, [
18233
18530
  {
18234
18531
  key: "baseColor",
18235
18532
  get: /**
@@ -18453,14 +18750,30 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18453
18750
  ]);
18454
18751
  return PBRBaseMaterial;
18455
18752
  }(BaseMaterial);
18456
- PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18457
- PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18458
- PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18459
- PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18460
- PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18461
- PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18462
- PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18463
- PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
18753
+ (function() {
18754
+ PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18755
+ })();
18756
+ (function() {
18757
+ PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18758
+ })();
18759
+ (function() {
18760
+ PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18761
+ })();
18762
+ (function() {
18763
+ PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18764
+ })();
18765
+ (function() {
18766
+ PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18767
+ })();
18768
+ (function() {
18769
+ PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18770
+ })();
18771
+ (function() {
18772
+ PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18773
+ })();
18774
+ (function() {
18775
+ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
18776
+ })();
18464
18777
  /**
18465
18778
  * PBR (Metallic-Roughness Workflow) Material.
18466
18779
  */ var PBRMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
@@ -18480,7 +18793,7 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18480
18793
  this.cloneTo(dest);
18481
18794
  return dest;
18482
18795
  };
18483
- _createClass$2(PBRMaterial, [
18796
+ _create_class$2(PBRMaterial, [
18484
18797
  {
18485
18798
  key: "metallic",
18486
18799
  get: /**
@@ -18523,9 +18836,15 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18523
18836
  ]);
18524
18837
  return PBRMaterial;
18525
18838
  }(PBRBaseMaterial);
18526
- PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
18527
- PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
18528
- PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
18839
+ (function() {
18840
+ PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
18841
+ })();
18842
+ (function() {
18843
+ PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
18844
+ })();
18845
+ (function() {
18846
+ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
18847
+ })();
18529
18848
  /**
18530
18849
  * PBR (Specular-Glossiness Workflow) Material.
18531
18850
  */ var PBRSpecularMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
@@ -18545,7 +18864,7 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18545
18864
  this.cloneTo(dest);
18546
18865
  return dest;
18547
18866
  };
18548
- _createClass$2(PBRSpecularMaterial, [
18867
+ _create_class$2(PBRSpecularMaterial, [
18549
18868
  {
18550
18869
  key: "specularColor",
18551
18870
  get: /**
@@ -18591,10 +18910,18 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18591
18910
  ]);
18592
18911
  return PBRSpecularMaterial;
18593
18912
  }(PBRBaseMaterial);
18594
- PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
18595
- PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
18596
- PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
18597
- PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
18913
+ (function() {
18914
+ PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
18915
+ })();
18916
+ (function() {
18917
+ PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
18918
+ })();
18919
+ (function() {
18920
+ PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
18921
+ })();
18922
+ (function() {
18923
+ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
18924
+ })();
18598
18925
  /**
18599
18926
  * Unlit Material.
18600
18927
  */ var UnlitMaterial = /*#__PURE__*/ function(BaseMaterial) {
@@ -18617,7 +18944,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
18617
18944
  this.cloneTo(dest);
18618
18945
  return dest;
18619
18946
  };
18620
- _createClass$2(UnlitMaterial, [
18947
+ _create_class$2(UnlitMaterial, [
18621
18948
  {
18622
18949
  key: "baseColor",
18623
18950
  get: /**
@@ -18747,7 +19074,7 @@ exports.TextVerticalAlignment = void 0;
18747
19074
  this._sprites = null;
18748
19075
  this._spriteNamesToIndex = null;
18749
19076
  };
18750
- _createClass$2(SpriteAtlas, [
19077
+ _create_class$2(SpriteAtlas, [
18751
19078
  {
18752
19079
  key: "sprites",
18753
19080
  get: /**
@@ -18916,7 +19243,7 @@ exports.TextVerticalAlignment = void 0;
18916
19243
  }
18917
19244
  this._updateFlagManager.dispatch(type);
18918
19245
  };
18919
- _createClass$2(Sprite, [
19246
+ _create_class$2(Sprite, [
18920
19247
  {
18921
19248
  key: "texture",
18922
19249
  get: /**
@@ -19204,7 +19531,9 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
19204
19531
  };
19205
19532
  SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
19206
19533
  return SlicedSpriteAssembler1;
19207
- }(), _SlicedSpriteAssembler._worldMatrix = new miniprogram$7.Matrix(), _SlicedSpriteAssembler);
19534
+ }(), function() {
19535
+ _SlicedSpriteAssembler._worldMatrix = new miniprogram$7.Matrix();
19536
+ }(), _SlicedSpriteAssembler);
19208
19537
  SlicedSpriteAssembler = __decorate$1([
19209
19538
  StaticInterfaceImplement$1()
19210
19539
  ], SlicedSpriteAssembler);
@@ -19225,7 +19554,7 @@ SlicedSpriteAssembler = __decorate$1([
19225
19554
  _this._renderData = new RenderData2D(4, [], [], null, _this._color);
19226
19555
  _this.drawMode = exports.SpriteDrawMode.Simple;
19227
19556
  _this.setMaterial(_this._engine._spriteDefaultMaterial);
19228
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
19557
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
19229
19558
  return _this;
19230
19559
  };
19231
19560
  _inherits$2(SpriteRenderer, Renderer);
@@ -19331,7 +19660,7 @@ SlicedSpriteAssembler = __decorate$1([
19331
19660
  break;
19332
19661
  }
19333
19662
  };
19334
- _createClass$2(SpriteRenderer, [
19663
+ _create_class$2(SpriteRenderer, [
19335
19664
  {
19336
19665
  key: "drawMode",
19337
19666
  get: /**
@@ -19480,7 +19809,9 @@ SlicedSpriteAssembler = __decorate$1([
19480
19809
  ]);
19481
19810
  return SpriteRenderer;
19482
19811
  }(exports.Renderer);
19483
- /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
19812
+ (function() {
19813
+ /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
19814
+ })();
19484
19815
  __decorate$1([
19485
19816
  ignoreClone
19486
19817
  ], SpriteRenderer.prototype, "_renderData", void 0);
@@ -19536,14 +19867,16 @@ var /**
19536
19867
  ];
19537
19868
  this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
19538
19869
  };
19539
- CharRenderData.triangles = [
19540
- 0,
19541
- 2,
19542
- 1,
19543
- 2,
19544
- 0,
19545
- 3
19546
- ];
19870
+ (function() {
19871
+ CharRenderData.triangles = [
19872
+ 0,
19873
+ 2,
19874
+ 1,
19875
+ 2,
19876
+ 0,
19877
+ 3
19878
+ ];
19879
+ })();
19547
19880
  /**
19548
19881
  * @internal
19549
19882
  */ var CharRenderDataPool = /*#__PURE__*/ function() {
@@ -19865,23 +20198,37 @@ CharRenderData.triangles = [
19865
20198
  };
19866
20199
  return TextUtils;
19867
20200
  }();
19868
- /** @internal */ TextUtils._genericFontFamilies = [
19869
- "serif",
19870
- "sans-serif",
19871
- "monospace",
19872
- "cursive",
19873
- "fantasy",
19874
- "system-ui",
19875
- "math",
19876
- "emoji",
19877
- "fangsong"
19878
- ];
19879
- /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
19880
- TextUtils._measureBaseline = "M";
19881
- TextUtils._heightMultiplier = 2;
19882
- TextUtils._baselineMultiplier = 1.4;
19883
- TextUtils._fontSizeInfoCache = {};
19884
- TextUtils._textContext = null;
20201
+ (function() {
20202
+ /** @internal */ TextUtils._genericFontFamilies = [
20203
+ "serif",
20204
+ "sans-serif",
20205
+ "monospace",
20206
+ "cursive",
20207
+ "fantasy",
20208
+ "system-ui",
20209
+ "math",
20210
+ "emoji",
20211
+ "fangsong"
20212
+ ];
20213
+ })();
20214
+ (function() {
20215
+ /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20216
+ })();
20217
+ (function() {
20218
+ TextUtils._measureBaseline = "M";
20219
+ })();
20220
+ (function() {
20221
+ TextUtils._heightMultiplier = 2;
20222
+ })();
20223
+ (function() {
20224
+ TextUtils._baselineMultiplier = 1.4;
20225
+ })();
20226
+ (function() {
20227
+ TextUtils._fontSizeInfoCache = {};
20228
+ })();
20229
+ (function() {
20230
+ TextUtils._textContext = null;
20231
+ })();
19885
20232
  /**
19886
20233
  * Renders a text for 2D graphics.
19887
20234
  */ var TextRenderer = /*#__PURE__*/ function(Renderer) {
@@ -19906,7 +20253,7 @@ TextUtils._textContext = null;
19906
20253
  _this._overflowMode = exports.OverflowMode.Overflow;
19907
20254
  _this._maskInteraction = exports.SpriteMaskInteraction.None;
19908
20255
  _this._maskLayer = exports.SpriteMaskLayer.Layer0;
19909
- var engine = _assertThisInitialized(_this).engine;
20256
+ var engine = _assert_this_initialized(_this).engine;
19910
20257
  _this._font = engine._textDefaultFont;
19911
20258
  _this._font._addRefCount(1);
19912
20259
  _this.setMaterial(engine._spriteDefaultMaterial);
@@ -20146,7 +20493,7 @@ TextUtils._textContext = null;
20146
20493
  Renderer.prototype._onTransformChanged.call(this, bit);
20147
20494
  this._setDirtyFlagTrue(0x4 | 0x8);
20148
20495
  };
20149
- _createClass$2(TextRenderer, [
20496
+ _create_class$2(TextRenderer, [
20150
20497
  {
20151
20498
  key: "color",
20152
20499
  get: /**
@@ -20359,9 +20706,15 @@ TextUtils._textContext = null;
20359
20706
  ]);
20360
20707
  return TextRenderer;
20361
20708
  }(exports.Renderer);
20362
- TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20363
- TextRenderer._tempVec30 = new miniprogram$7.Vector3();
20364
- TextRenderer._tempVec31 = new miniprogram$7.Vector3();
20709
+ (function() {
20710
+ TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20711
+ })();
20712
+ (function() {
20713
+ TextRenderer._tempVec30 = new miniprogram$7.Vector3();
20714
+ })();
20715
+ (function() {
20716
+ TextRenderer._tempVec31 = new miniprogram$7.Vector3();
20717
+ })();
20365
20718
  __decorate$1([
20366
20719
  assignmentClone
20367
20720
  ], TextRenderer.prototype, "_subFont", void 0);
@@ -20576,7 +20929,9 @@ var DirtyFlag;
20576
20929
  };
20577
20930
  return AnimationCurveOwner;
20578
20931
  }();
20579
- AnimationCurveOwner._assemblerMap = new Map();
20932
+ (function() {
20933
+ AnimationCurveOwner._assemblerMap = new Map();
20934
+ })();
20580
20935
  /**
20581
20936
  * @internal
20582
20937
  */ var PositionAnimationCurveOwnerAssembler = /*#__PURE__*/ function() {
@@ -20742,7 +21097,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
20742
21097
  }
20743
21098
  }
20744
21099
  };
20745
- _createClass$2(AnimationClip, [
21100
+ _create_class$2(AnimationClip, [
20746
21101
  {
20747
21102
  key: "events",
20748
21103
  get: /**
@@ -20888,7 +21243,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
20888
21243
  var result = this._evaluate(time, evaluateData);
20889
21244
  return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
20890
21245
  };
20891
- _createClass$2(AnimationCurve, [
21246
+ _create_class$2(AnimationCurve, [
20892
21247
  {
20893
21248
  key: "interpolation",
20894
21249
  get: /**
@@ -20997,7 +21352,11 @@ exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Ani
20997
21352
  return out;
20998
21353
  };
20999
21354
  return AnimationArrayCurve;
21000
- }(AnimationCurve), /** @internal */ _AnimationArrayCurve._isReferenceType = true, /** @internal */ _AnimationArrayCurve._isInterpolationType = true, _AnimationArrayCurve);
21355
+ }(AnimationCurve), function() {
21356
+ /** @internal */ _AnimationArrayCurve._isReferenceType = true;
21357
+ }(), function() {
21358
+ /** @internal */ _AnimationArrayCurve._isInterpolationType = true;
21359
+ }(), _AnimationArrayCurve);
21001
21360
  exports.AnimationArrayCurve = __decorate$1([
21002
21361
  StaticInterfaceImplement$1()
21003
21362
  ], exports.AnimationArrayCurve);
@@ -21049,7 +21408,11 @@ exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Anima
21049
21408
  return frame.value;
21050
21409
  };
21051
21410
  return AnimationBoolCurve;
21052
- }(AnimationCurve), /** @internal */ _AnimationBoolCurve._isReferenceType = false, /** @internal */ _AnimationBoolCurve._isInterpolationType = false, _AnimationBoolCurve);
21411
+ }(AnimationCurve), function() {
21412
+ /** @internal */ _AnimationBoolCurve._isReferenceType = false;
21413
+ }(), function() {
21414
+ /** @internal */ _AnimationBoolCurve._isInterpolationType = false;
21415
+ }(), _AnimationBoolCurve);
21053
21416
  exports.AnimationBoolCurve = __decorate$1([
21054
21417
  StaticInterfaceImplement$1()
21055
21418
  ], exports.AnimationBoolCurve);
@@ -21141,7 +21504,11 @@ exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Ani
21141
21504
  return out;
21142
21505
  };
21143
21506
  return AnimationColorCurve;
21144
- }(AnimationCurve), /** @internal */ _AnimationColorCurve._isReferenceType = true, /** @internal */ _AnimationColorCurve._isInterpolationType = true, _AnimationColorCurve);
21507
+ }(AnimationCurve), function() {
21508
+ /** @internal */ _AnimationColorCurve._isReferenceType = true;
21509
+ }(), function() {
21510
+ /** @internal */ _AnimationColorCurve._isInterpolationType = true;
21511
+ }(), _AnimationColorCurve);
21145
21512
  exports.AnimationColorCurve = __decorate$1([
21146
21513
  StaticInterfaceImplement$1()
21147
21514
  ], exports.AnimationColorCurve);
@@ -21236,7 +21603,11 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
21236
21603
  return out;
21237
21604
  };
21238
21605
  return AnimationFloatArrayCurve;
21239
- }(AnimationCurve), /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true, /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true, _AnimationFloatArrayCurve);
21606
+ }(AnimationCurve), function() {
21607
+ /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true;
21608
+ }(), function() {
21609
+ /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
21610
+ }(), _AnimationFloatArrayCurve);
21240
21611
  exports.AnimationFloatArrayCurve = __decorate$1([
21241
21612
  StaticInterfaceImplement$1()
21242
21613
  ], exports.AnimationFloatArrayCurve);
@@ -21300,7 +21671,11 @@ exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Ani
21300
21671
  }
21301
21672
  };
21302
21673
  return AnimationFloatCurve;
21303
- }(AnimationCurve), /** @internal */ _AnimationFloatCurve._isReferenceType = false, /** @internal */ _AnimationFloatCurve._isInterpolationType = true, _AnimationFloatCurve);
21674
+ }(AnimationCurve), function() {
21675
+ /** @internal */ _AnimationFloatCurve._isReferenceType = false;
21676
+ }(), function() {
21677
+ /** @internal */ _AnimationFloatCurve._isInterpolationType = true;
21678
+ }(), _AnimationFloatCurve);
21304
21679
  exports.AnimationFloatCurve = __decorate$1([
21305
21680
  StaticInterfaceImplement$1()
21306
21681
  ], exports.AnimationFloatCurve);
@@ -21397,7 +21772,13 @@ exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ fu
21397
21772
  return out;
21398
21773
  };
21399
21774
  return AnimationQuaternionCurve1;
21400
- }(AnimationCurve), /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true, /** @internal */ _AnimationQuaternionCurve._isReferenceType = true, /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram$7.Quaternion(), _AnimationQuaternionCurve);
21775
+ }(AnimationCurve), function() {
21776
+ /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true;
21777
+ }(), function() {
21778
+ /** @internal */ _AnimationQuaternionCurve._isReferenceType = true;
21779
+ }(), function() {
21780
+ /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram$7.Quaternion();
21781
+ }(), _AnimationQuaternionCurve);
21401
21782
  exports.AnimationQuaternionCurve = __decorate$1([
21402
21783
  StaticInterfaceImplement$1()
21403
21784
  ], exports.AnimationQuaternionCurve);
@@ -21477,7 +21858,11 @@ exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function
21477
21858
  return out;
21478
21859
  };
21479
21860
  return AnimationVector2Curve;
21480
- }(AnimationCurve), /** @internal */ _AnimationVector2Curve._isReferenceType = true, /** @internal */ _AnimationVector2Curve._isInterpolationType = true, _AnimationVector2Curve);
21861
+ }(AnimationCurve), function() {
21862
+ /** @internal */ _AnimationVector2Curve._isReferenceType = true;
21863
+ }(), function() {
21864
+ /** @internal */ _AnimationVector2Curve._isInterpolationType = true;
21865
+ }(), _AnimationVector2Curve);
21481
21866
  exports.AnimationVector2Curve = __decorate$1([
21482
21867
  StaticInterfaceImplement$1()
21483
21868
  ], exports.AnimationVector2Curve);
@@ -21569,7 +21954,11 @@ exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function
21569
21954
  return out;
21570
21955
  };
21571
21956
  return AnimationVector3Curve;
21572
- }(AnimationCurve), /** @internal */ _AnimationVector3Curve._isReferenceType = true, /** @internal */ _AnimationVector3Curve._isInterpolationType = true, _AnimationVector3Curve);
21957
+ }(AnimationCurve), function() {
21958
+ /** @internal */ _AnimationVector3Curve._isReferenceType = true;
21959
+ }(), function() {
21960
+ /** @internal */ _AnimationVector3Curve._isInterpolationType = true;
21961
+ }(), _AnimationVector3Curve);
21573
21962
  exports.AnimationVector3Curve = __decorate$1([
21574
21963
  StaticInterfaceImplement$1()
21575
21964
  ], exports.AnimationVector3Curve);
@@ -21661,7 +22050,11 @@ exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function
21661
22050
  return out;
21662
22051
  };
21663
22052
  return AnimationVector4Curve;
21664
- }(AnimationCurve), /** @internal */ _AnimationVector4Curve._isReferenceType = true, /** @internal */ _AnimationVector4Curve._isInterpolationType = true, _AnimationVector4Curve);
22053
+ }(AnimationCurve), function() {
22054
+ /** @internal */ _AnimationVector4Curve._isReferenceType = true;
22055
+ }(), function() {
22056
+ /** @internal */ _AnimationVector4Curve._isInterpolationType = true;
22057
+ }(), _AnimationVector4Curve);
21665
22058
  exports.AnimationVector4Curve = __decorate$1([
21666
22059
  StaticInterfaceImplement$1()
21667
22060
  ], exports.AnimationVector4Curve);
@@ -22366,7 +22759,7 @@ exports.AnimatorLayerBlendingMode = void 0;
22366
22759
  }
22367
22760
  }
22368
22761
  };
22369
- _createClass$2(Animator, [
22762
+ _create_class$2(Animator, [
22370
22763
  {
22371
22764
  key: "animatorController",
22372
22765
  get: /**
@@ -22456,7 +22849,7 @@ __decorate$1([
22456
22849
  */ _proto._registerChangeFlag = function _registerChangeFlag() {
22457
22850
  return this._updateFlagManager.createFlag(BoolUpdateFlag);
22458
22851
  };
22459
- _createClass$2(AnimatorController, [
22852
+ _create_class$2(AnimatorController, [
22460
22853
  {
22461
22854
  key: "layers",
22462
22855
  get: /**
@@ -22587,7 +22980,7 @@ __decorate$1([
22587
22980
  index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
22588
22981
  }
22589
22982
  };
22590
- _createClass$2(AnimatorState, [
22983
+ _create_class$2(AnimatorState, [
22591
22984
  {
22592
22985
  key: "transitions",
22593
22986
  get: /**
@@ -22714,7 +23107,7 @@ exports.AnimatorConditionMode = void 0;
22714
23107
  return _this;
22715
23108
  };
22716
23109
  _inherits$2(SkyBoxMaterial, Material);
22717
- _createClass$2(SkyBoxMaterial, [
23110
+ _create_class$2(SkyBoxMaterial, [
22718
23111
  {
22719
23112
  key: "textureDecodeRGBM",
22720
23113
  get: /**
@@ -22811,7 +23204,7 @@ exports.ParticleRendererBlendMode = void 0;
22811
23204
  _this._isFadeOut = false;
22812
23205
  _this._playOnEnable = true;
22813
23206
  _this._blendMode = 0;
22814
- _this._onColorChanged = _this._onColorChanged.bind(_assertThisInitialized(_this));
23207
+ _this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
22815
23208
  //@ts-ignore
22816
23209
  _this._color._onValueChanged = _this._onColorChanged;
22817
23210
  _this.setMaterial(_this._createMaterial());
@@ -23089,7 +23482,7 @@ exports.ParticleRendererBlendMode = void 0;
23089
23482
  ParticleRenderer._getRandom = function _getRandom() {
23090
23483
  return Math.random() - 0.5;
23091
23484
  };
23092
- _createClass$2(ParticleRenderer, [
23485
+ _create_class$2(ParticleRenderer, [
23093
23486
  {
23094
23487
  key: "texture",
23095
23488
  get: /**
@@ -23520,7 +23913,9 @@ exports.ParticleRendererBlendMode = void 0;
23520
23913
  ]);
23521
23914
  return ParticleRenderer;
23522
23915
  }(MeshRenderer);
23523
- /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
23916
+ (function() {
23917
+ /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
23918
+ })();
23524
23919
  __decorate$1([
23525
23920
  ignoreClone
23526
23921
  ], ParticleRenderer.prototype, "_onColorChanged", null);
@@ -23785,7 +24180,7 @@ var _tempVector3 = new miniprogram$7.Vector3();
23785
24180
  this._camera.renderTarget = this._oriCameraRenderTarget;
23786
24181
  this._camera.cullingMask = this._oriCameraCullingMask;
23787
24182
  };
23788
- _createClass$2(Probe, [
24183
+ _create_class$2(Probe, [
23789
24184
  {
23790
24185
  key: "_texture",
23791
24186
  get: function get() {
@@ -24000,7 +24395,7 @@ exports.resourceLoader = resourceLoader;
24000
24395
  exports.shallowClone = shallowClone;
24001
24396
 
24002
24397
  var miniprogram$8 = /*#__PURE__*/Object.freeze({
24003
- __proto__: null
24398
+ __proto__: null
24004
24399
  });
24005
24400
 
24006
24401
  Object.defineProperty(exports, "__esModule", {
@@ -24011,32 +24406,22 @@ var engineMiniprogramAdapter$1 = require("@galacean/engine-miniprogram-adapter")
24011
24406
  var miniprogram$1$2 = require("@galacean/engine-math/dist/miniprogram");
24012
24407
  var miniprogram$2$1 = require("@galacean/engine-draco/dist/miniprogram");
24013
24408
  var miniprogram$3$1 = require("@galacean/engine-rhi-webgl/dist/miniprogram");
24014
- function extends_$1() {
24015
- extends_$1 = Object.assign || function(target) {
24409
+ function _extends$1() {
24410
+ _extends$1 = Object.assign || function assign(target) {
24016
24411
  for(var i = 1; i < arguments.length; i++){
24017
24412
  var source = arguments[i];
24018
- for(var key in source){
24019
- if (Object.prototype.hasOwnProperty.call(source, key)) {
24020
- target[key] = source[key];
24021
- }
24022
- }
24413
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
24023
24414
  }
24024
24415
  return target;
24025
24416
  };
24026
- return extends_$1.apply(this, arguments);
24417
+ return _extends$1.apply(this, arguments);
24027
24418
  }
24028
- function _extends$1() {
24029
- return extends_$1.apply(this, arguments);
24030
- }
24031
- function setPrototypeOf$1(o, p) {
24032
- setPrototypeOf$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
24419
+ function _set_prototype_of$1(o, p) {
24420
+ _set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
24033
24421
  o.__proto__ = p;
24034
24422
  return o;
24035
24423
  };
24036
- return setPrototypeOf$1(o, p);
24037
- }
24038
- function _setPrototypeOf$1(o, p) {
24039
- return setPrototypeOf$1(o, p);
24424
+ return _set_prototype_of$1(o, p);
24040
24425
  }
24041
24426
  function _inherits$1(subClass, superClass) {
24042
24427
  if (typeof superClass !== "function" && superClass !== null) {
@@ -24049,7 +24434,7 @@ function _inherits$1(subClass, superClass) {
24049
24434
  configurable: true
24050
24435
  }
24051
24436
  });
24052
- if (superClass) _setPrototypeOf$1(subClass, superClass);
24437
+ if (superClass) _set_prototype_of$1(subClass, superClass);
24053
24438
  }
24054
24439
  /******************************************************************************
24055
24440
  Copyright (c) Microsoft Corporation.
@@ -24332,13 +24717,10 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
24332
24717
  reject(error);
24333
24718
  return;
24334
24719
  }
24335
- if (info.done) {
24336
- resolve(value);
24337
- } else {
24338
- Promise.resolve(value).then(_next, _throw);
24339
- }
24720
+ if (info.done) resolve(value);
24721
+ else Promise.resolve(value).then(_next, _throw);
24340
24722
  }
24341
- function _asyncToGenerator(fn) {
24723
+ function _async_to_generator(fn) {
24342
24724
  return function() {
24343
24725
  var self = this, args = arguments;
24344
24726
  return new Promise(function(resolve, reject) {
@@ -24383,7 +24765,7 @@ var FontLoader = /*#__PURE__*/ function(Loader) {
24383
24765
  });
24384
24766
  };
24385
24767
  _proto._registerFont = function _registerFont(fontName, fontUrl) {
24386
- return _asyncToGenerator(function() {
24768
+ return _async_to_generator(function() {
24387
24769
  var fontFace;
24388
24770
  return __generator(this, function(_state) {
24389
24771
  switch(_state.label){
@@ -24991,30 +25373,32 @@ var TextureWrapMode;
24991
25373
  };
24992
25374
  return GLTFUtil;
24993
25375
  }();
24994
- function _arrayLikeToArray(arr, len) {
25376
+ function _array_like_to_array(arr, len) {
24995
25377
  if (len == null || len > arr.length) len = arr.length;
24996
25378
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
24997
25379
  return arr2;
24998
25380
  }
24999
- function _arrayWithoutHoles(arr) {
25000
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
25381
+ function _array_without_holes(arr) {
25382
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
25001
25383
  }
25002
- function _iterableToArray(iter) {
25003
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
25384
+ function _iterable_to_array(iter) {
25385
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
25386
+ return Array.from(iter);
25387
+ }
25004
25388
  }
25005
- function _nonIterableSpread() {
25006
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25389
+ function _non_iterable_spread() {
25390
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25007
25391
  }
25008
- function _unsupportedIterableToArray(o, minLen) {
25392
+ function _unsupported_iterable_to_array(o, minLen) {
25009
25393
  if (!o) return;
25010
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
25394
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
25011
25395
  var n = Object.prototype.toString.call(o).slice(8, -1);
25012
25396
  if (n === "Object" && o.constructor) n = o.constructor.name;
25013
25397
  if (n === "Map" || n === "Set") return Array.from(n);
25014
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
25398
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
25015
25399
  }
25016
- function _toConsumableArray(arr) {
25017
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
25400
+ function _to_consumable_array(arr) {
25401
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
25018
25402
  }
25019
25403
  var Parser = /*#__PURE__*/ function() {
25020
25404
  var Parser = function Parser() {};
@@ -25030,7 +25414,7 @@ var Parser = /*#__PURE__*/ function() {
25030
25414
  extensionSchema,
25031
25415
  parseResource,
25032
25416
  context
25033
- ].concat(_toConsumableArray(extra)));
25417
+ ].concat(_to_consumable_array(extra)));
25034
25418
  }
25035
25419
  }
25036
25420
  };
@@ -25044,7 +25428,7 @@ var Parser = /*#__PURE__*/ function() {
25044
25428
  return (_parsers_ = parsers[0]).createEngineResource.apply(_parsers_, [
25045
25429
  extensionSchema,
25046
25430
  context
25047
- ].concat(_toConsumableArray(extra)));
25431
+ ].concat(_to_consumable_array(extra)));
25048
25432
  }
25049
25433
  };
25050
25434
  Parser.hasExtensionParser = function hasExtensionParser(extensionName) {
@@ -25069,7 +25453,9 @@ var Parser = /*#__PURE__*/ function() {
25069
25453
  };
25070
25454
  return Parser;
25071
25455
  }();
25072
- Parser._extensionParsers = {};
25456
+ (function() {
25457
+ Parser._extensionParsers = {};
25458
+ })();
25073
25459
  /**
25074
25460
  * Declare ExtensionParser's decorator.
25075
25461
  * @param extensionName - Extension name
@@ -25143,9 +25529,7 @@ KHR_draco_mesh_compression = __decorate([
25143
25529
  function _instanceof1$1(left, right) {
25144
25530
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
25145
25531
  return !!right[Symbol.hasInstance](left);
25146
- } else {
25147
- return _instanceof(left, right);
25148
- }
25532
+ } else return _instanceof(left, right);
25149
25533
  }
25150
25534
  var KHR_lights_punctual = /*#__PURE__*/ function(ExtensionParser) {
25151
25535
  var KHR_lights_punctual = function KHR_lights_punctual() {
@@ -25458,11 +25842,11 @@ var GalaceanMaterialsRemap = /*#__PURE__*/ function(ExtensionParser) {
25458
25842
  GalaceanMaterialsRemap = __decorate([
25459
25843
  registerExtension("OASIS_materials_remap")
25460
25844
  ], GalaceanMaterialsRemap);
25461
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
25845
+ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
25462
25846
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
25463
25847
  if (it) return (it = it.call(o)).next.bind(it);
25464
25848
  // Fallback for engines without symbol support
25465
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
25849
+ if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike && o && typeof o.length === "number") {
25466
25850
  if (it) o = it;
25467
25851
  var i = 0;
25468
25852
  return function() {
@@ -25475,7 +25859,7 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
25475
25859
  };
25476
25860
  };
25477
25861
  }
25478
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25862
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25479
25863
  }
25480
25864
  var AnimationParser = /*#__PURE__*/ function(Parser) {
25481
25865
  var AnimationParser = function AnimationParser() {
@@ -25767,7 +26151,9 @@ var EntityParser = /*#__PURE__*/ function(Parser) {
25767
26151
  };
25768
26152
  return EntityParser;
25769
26153
  }(Parser);
25770
- /** @internal */ EntityParser._defaultName = "_GLTF_ENTITY_";
26154
+ (function() {
26155
+ /** @internal */ EntityParser._defaultName = "_GLTF_ENTITY_";
26156
+ })();
25771
26157
  var MeshParser = /*#__PURE__*/ function(Parser1) {
25772
26158
  var MeshParser = function MeshParser() {
25773
26159
  return Parser1.apply(this, arguments);
@@ -26048,7 +26434,9 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
26048
26434
  };
26049
26435
  return MeshParser;
26050
26436
  }(Parser);
26051
- MeshParser._tempVector3 = new miniprogram$1$2.Vector3();
26437
+ (function() {
26438
+ MeshParser._tempVector3 = new miniprogram$1$2.Vector3();
26439
+ })();
26052
26440
  var SceneParser$1 = /*#__PURE__*/ function(Parser1) {
26053
26441
  var SceneParser = function SceneParser() {
26054
26442
  return Parser1.apply(this, arguments);
@@ -26256,7 +26644,7 @@ var SkinParser = /*#__PURE__*/ function(Parser) {
26256
26644
  };
26257
26645
  _proto._findSkeletonRootBone = function _findSkeletonRootBone(joints, entities) {
26258
26646
  var paths = {};
26259
- for(var _iterator = _createForOfIteratorHelperLoose(joints), _step; !(_step = _iterator()).done;){
26647
+ for(var _iterator = _create_for_of_iterator_helper_loose(joints), _step; !(_step = _iterator()).done;){
26260
26648
  var index = _step.value;
26261
26649
  var path = new Array();
26262
26650
  var entity = entities[index];
@@ -26357,8 +26745,10 @@ var TextureParser = /*#__PURE__*/ function(Parser) {
26357
26745
  };
26358
26746
  return TextureParser;
26359
26747
  }(Parser);
26360
- var _obj;
26361
- TextureParser._wrapMap = (_obj = {}, _obj[TextureWrapMode.CLAMP_TO_EDGE] = miniprogram$5.TextureWrapMode.Clamp, _obj[TextureWrapMode.MIRRORED_REPEAT] = miniprogram$5.TextureWrapMode.Mirror, _obj[TextureWrapMode.REPEAT] = miniprogram$5.TextureWrapMode.Repeat, _obj);
26748
+ (function() {
26749
+ var _obj;
26750
+ TextureParser._wrapMap = (_obj = {}, _obj[TextureWrapMode.CLAMP_TO_EDGE] = miniprogram$5.TextureWrapMode.Clamp, _obj[TextureWrapMode.MIRRORED_REPEAT] = miniprogram$5.TextureWrapMode.Mirror, _obj[TextureWrapMode.REPEAT] = miniprogram$5.TextureWrapMode.Repeat, _obj);
26751
+ })();
26362
26752
  var Validator = /*#__PURE__*/ function(Parser1) {
26363
26753
  var Validator = function Validator() {
26364
26754
  return Parser1.apply(this, arguments);
@@ -26428,17 +26818,19 @@ var GLTFParser = /*#__PURE__*/ function() {
26428
26818
  };
26429
26819
  return GLTFParser;
26430
26820
  }();
26431
- GLTFParser.defaultPipeline = new GLTFParser([
26432
- BufferParser,
26433
- Validator,
26434
- TextureParser,
26435
- MaterialParser,
26436
- MeshParser,
26437
- EntityParser,
26438
- SkinParser,
26439
- AnimationParser,
26440
- SceneParser$1
26441
- ]);
26821
+ (function() {
26822
+ GLTFParser.defaultPipeline = new GLTFParser([
26823
+ BufferParser,
26824
+ Validator,
26825
+ TextureParser,
26826
+ MaterialParser,
26827
+ MeshParser,
26828
+ EntityParser,
26829
+ SkinParser,
26830
+ AnimationParser,
26831
+ SceneParser$1
26832
+ ]);
26833
+ })();
26442
26834
  /**
26443
26835
  * Product after GLTF parser, usually, `defaultSceneRoot` is only needed to use.
26444
26836
  */ var GLTFResource = /*#__PURE__*/ function(EngineObject) {
@@ -26488,7 +26880,7 @@ var GLTFLoader = /*#__PURE__*/ function(Loader) {
26488
26880
  context.keepMeshData = (_item_params_keepMeshData = (_item_params = item.params) == null ? void 0 : _item_params.keepMeshData) != null ? _item_params_keepMeshData : false;
26489
26881
  masterPromiseInfo.onCancel(function() {
26490
26882
  var chainPromises = context.chainPromises;
26491
- for(var _iterator = _createForOfIteratorHelperLoose(chainPromises), _step; !(_step = _iterator()).done;){
26883
+ for(var _iterator = _create_for_of_iterator_helper_loose(chainPromises), _step; !(_step = _iterator()).done;){
26492
26884
  var promise = _step.value;
26493
26885
  promise.cancel();
26494
26886
  }
@@ -26748,37 +27140,75 @@ var HDRLoader = (_HDRLoader = /*#__PURE__*/ function(Loader) {
26748
27140
  color.a *= M;
26749
27141
  };
26750
27142
  return HDRLoader1;
26751
- }(miniprogram$5.Loader), _HDRLoader._rightBottomBack = new miniprogram$1$2.Vector3(1.0, -1.0, -1.0), _HDRLoader._rightBottomFront = new miniprogram$1$2.Vector3(1.0, -1.0, 1.0), _HDRLoader._rightUpBack = new miniprogram$1$2.Vector3(1.0, 1.0, -1.0), _HDRLoader._rightUpFront = new miniprogram$1$2.Vector3(1.0, 1.0, 1.0), _HDRLoader._leftBottomBack = new miniprogram$1$2.Vector3(-1.0, -1.0, -1.0), _HDRLoader._leftBottomFront = new miniprogram$1$2.Vector3(-1.0, -1.0, 1.0), _HDRLoader._leftUpBack = new miniprogram$1$2.Vector3(-1.0, 1.0, -1.0), _HDRLoader._leftUpFront = new miniprogram$1$2.Vector3(-1.0, 1.0, 1.0), _HDRLoader._faceRight = [
26752
- _HDRLoader._rightBottomBack,
26753
- _HDRLoader._rightBottomFront,
26754
- _HDRLoader._rightUpBack,
26755
- _HDRLoader._rightUpFront
26756
- ], _HDRLoader._faceLeft = [
26757
- _HDRLoader._leftBottomFront,
26758
- _HDRLoader._leftBottomBack,
26759
- _HDRLoader._leftUpFront,
26760
- _HDRLoader._leftUpBack
26761
- ], _HDRLoader._faceUp = [
26762
- _HDRLoader._leftBottomFront,
26763
- _HDRLoader._rightBottomFront,
26764
- _HDRLoader._leftBottomBack,
26765
- _HDRLoader._rightBottomBack
26766
- ], _HDRLoader._faceBottom = [
26767
- _HDRLoader._leftUpBack,
26768
- _HDRLoader._rightUpBack,
26769
- _HDRLoader._leftUpFront,
26770
- _HDRLoader._rightUpFront
26771
- ], _HDRLoader._faceFront = [
26772
- _HDRLoader._leftBottomBack,
26773
- _HDRLoader._rightBottomBack,
26774
- _HDRLoader._leftUpBack,
26775
- _HDRLoader._rightUpBack
26776
- ], _HDRLoader._faceBack = [
26777
- _HDRLoader._rightBottomFront,
26778
- _HDRLoader._leftBottomFront,
26779
- _HDRLoader._rightUpFront,
26780
- _HDRLoader._leftUpFront
26781
- ], _HDRLoader._tempVector3 = new miniprogram$1$2.Vector3(), _HDRLoader._temp2Vector3 = new miniprogram$1$2.Vector3(), _HDRLoader._temp3Vector3 = new miniprogram$1$2.Vector3(), _HDRLoader._temp4Vector3 = new miniprogram$1$2.Vector3(), _HDRLoader._temp5Vector3 = new miniprogram$1$2.Vector3(), _HDRLoader);
27143
+ }(miniprogram$5.Loader), function() {
27144
+ _HDRLoader._rightBottomBack = new miniprogram$1$2.Vector3(1.0, -1.0, -1.0);
27145
+ }(), function() {
27146
+ _HDRLoader._rightBottomFront = new miniprogram$1$2.Vector3(1.0, -1.0, 1.0);
27147
+ }(), function() {
27148
+ _HDRLoader._rightUpBack = new miniprogram$1$2.Vector3(1.0, 1.0, -1.0);
27149
+ }(), function() {
27150
+ _HDRLoader._rightUpFront = new miniprogram$1$2.Vector3(1.0, 1.0, 1.0);
27151
+ }(), function() {
27152
+ _HDRLoader._leftBottomBack = new miniprogram$1$2.Vector3(-1.0, -1.0, -1.0);
27153
+ }(), function() {
27154
+ _HDRLoader._leftBottomFront = new miniprogram$1$2.Vector3(-1.0, -1.0, 1.0);
27155
+ }(), function() {
27156
+ _HDRLoader._leftUpBack = new miniprogram$1$2.Vector3(-1.0, 1.0, -1.0);
27157
+ }(), function() {
27158
+ _HDRLoader._leftUpFront = new miniprogram$1$2.Vector3(-1.0, 1.0, 1.0);
27159
+ }(), function() {
27160
+ _HDRLoader._faceRight = [
27161
+ _HDRLoader._rightBottomBack,
27162
+ _HDRLoader._rightBottomFront,
27163
+ _HDRLoader._rightUpBack,
27164
+ _HDRLoader._rightUpFront
27165
+ ];
27166
+ }(), function() {
27167
+ _HDRLoader._faceLeft = [
27168
+ _HDRLoader._leftBottomFront,
27169
+ _HDRLoader._leftBottomBack,
27170
+ _HDRLoader._leftUpFront,
27171
+ _HDRLoader._leftUpBack
27172
+ ];
27173
+ }(), function() {
27174
+ _HDRLoader._faceUp = [
27175
+ _HDRLoader._leftBottomFront,
27176
+ _HDRLoader._rightBottomFront,
27177
+ _HDRLoader._leftBottomBack,
27178
+ _HDRLoader._rightBottomBack
27179
+ ];
27180
+ }(), function() {
27181
+ _HDRLoader._faceBottom = [
27182
+ _HDRLoader._leftUpBack,
27183
+ _HDRLoader._rightUpBack,
27184
+ _HDRLoader._leftUpFront,
27185
+ _HDRLoader._rightUpFront
27186
+ ];
27187
+ }(), function() {
27188
+ _HDRLoader._faceFront = [
27189
+ _HDRLoader._leftBottomBack,
27190
+ _HDRLoader._rightBottomBack,
27191
+ _HDRLoader._leftUpBack,
27192
+ _HDRLoader._rightUpBack
27193
+ ];
27194
+ }(), function() {
27195
+ _HDRLoader._faceBack = [
27196
+ _HDRLoader._rightBottomFront,
27197
+ _HDRLoader._leftBottomFront,
27198
+ _HDRLoader._rightUpFront,
27199
+ _HDRLoader._leftUpFront
27200
+ ];
27201
+ }(), function() {
27202
+ _HDRLoader._tempVector3 = new miniprogram$1$2.Vector3();
27203
+ }(), function() {
27204
+ _HDRLoader._temp2Vector3 = new miniprogram$1$2.Vector3();
27205
+ }(), function() {
27206
+ _HDRLoader._temp3Vector3 = new miniprogram$1$2.Vector3();
27207
+ }(), function() {
27208
+ _HDRLoader._temp4Vector3 = new miniprogram$1$2.Vector3();
27209
+ }(), function() {
27210
+ _HDRLoader._temp5Vector3 = new miniprogram$1$2.Vector3();
27211
+ }(), _HDRLoader);
26782
27212
  HDRLoader = __decorate([
26783
27213
  miniprogram$5.resourceLoader(miniprogram$5.AssetType.HDR, [
26784
27214
  "hdr"
@@ -27148,7 +27578,7 @@ function _defineProperties$1(target, props) {
27148
27578
  Object.defineProperty(target, descriptor.key, descriptor);
27149
27579
  }
27150
27580
  }
27151
- function _createClass$1(Constructor, protoProps, staticProps) {
27581
+ function _create_class$1(Constructor, protoProps, staticProps) {
27152
27582
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
27153
27583
  if (staticProps) _defineProperties$1(Constructor, staticProps);
27154
27584
  return Constructor;
@@ -27259,7 +27689,7 @@ var BufferReader = /*#__PURE__*/ function() {
27259
27689
  if (byteLength < maxByteLength) this._offset++;
27260
27690
  return new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + byteOffset, byteLength);
27261
27691
  };
27262
- _createClass$1(BufferReader, [
27692
+ _create_class$1(BufferReader, [
27263
27693
  {
27264
27694
  key: "offset",
27265
27695
  get: function get() {
@@ -27269,12 +27699,14 @@ var BufferReader = /*#__PURE__*/ function() {
27269
27699
  ]);
27270
27700
  return BufferReader;
27271
27701
  }();
27272
- BufferReader.imageMapping = {
27273
- 0: "image/png",
27274
- 1: "image/jpg",
27275
- 2: "image/webp",
27276
- 3: "ktx"
27277
- };
27702
+ (function() {
27703
+ BufferReader.imageMapping = {
27704
+ 0: "image/png",
27705
+ 1: "image/jpg",
27706
+ 2: "image/webp",
27707
+ 3: "ktx"
27708
+ };
27709
+ })();
27278
27710
  var decoderMap = {};
27279
27711
  /**
27280
27712
  * Decoder decorator generator.
@@ -27311,7 +27743,7 @@ var FileHeader = /*#__PURE__*/ function() {
27311
27743
  header.headerLength = nameUint8Array.byteLength + typeUint8Array.byteLength + 9;
27312
27744
  return header;
27313
27745
  };
27314
- _createClass$1(FileHeader, [
27746
+ _create_class$1(FileHeader, [
27315
27747
  {
27316
27748
  key: "dataLength",
27317
27749
  get: function get() {
@@ -27527,36 +27959,32 @@ exports.Texture2DDecoder = /*#__PURE__*/ function() {
27527
27959
  exports.Texture2DDecoder = __decorate([
27528
27960
  decoder("Texture2D")
27529
27961
  ], exports.Texture2DDecoder);
27530
- function isNativeReflectConstruct() {
27962
+ function _is_native_reflect_construct() {
27531
27963
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
27532
27964
  if (Reflect.construct.sham) return false;
27533
27965
  if (typeof Proxy === "function") return true;
27534
27966
  try {
27535
- Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
27967
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
27536
27968
  return true;
27537
27969
  } catch (e) {
27538
27970
  return false;
27539
27971
  }
27540
27972
  }
27541
- function construct(Parent, args, Class) {
27542
- if (isNativeReflectConstruct()) {
27543
- construct = Reflect.construct;
27544
- } else {
27545
- construct = function construct(Parent, args, Class) {
27973
+ function _construct(Parent, args, Class) {
27974
+ if (_is_native_reflect_construct()) _construct = Reflect.construct;
27975
+ else {
27976
+ _construct = function construct(Parent, args, Class) {
27546
27977
  var a = [
27547
27978
  null
27548
27979
  ];
27549
27980
  a.push.apply(a, args);
27550
27981
  var Constructor = Function.bind.apply(Parent, a);
27551
27982
  var instance = new Constructor();
27552
- if (Class) _setPrototypeOf$1(instance, Class.prototype);
27983
+ if (Class) _set_prototype_of$1(instance, Class.prototype);
27553
27984
  return instance;
27554
27985
  };
27555
27986
  }
27556
- return construct.apply(null, arguments);
27557
- }
27558
- function _construct(Parent, args, Class) {
27559
- return construct.apply(null, arguments);
27987
+ return _construct.apply(null, arguments);
27560
27988
  }
27561
27989
  var ReflectionParser = /*#__PURE__*/ function() {
27562
27990
  var ReflectionParser = function ReflectionParser() {};
@@ -27670,7 +28098,9 @@ var ReflectionParser = /*#__PURE__*/ function() {
27670
28098
  };
27671
28099
  return ReflectionParser;
27672
28100
  }();
27673
- ReflectionParser.customParseComponentHandles = new Map();
28101
+ (function() {
28102
+ ReflectionParser.customParseComponentHandles = new Map();
28103
+ })();
27674
28104
  var PrefabParser = /*#__PURE__*/ function() {
27675
28105
  var PrefabParser = function PrefabParser() {};
27676
28106
  PrefabParser.parseChildren = function parseChildren(entitiesConfig, entities, parentId) {
@@ -27919,7 +28349,7 @@ var SceneParserContext = /*#__PURE__*/ function() {
27919
28349
  };
27920
28350
  _proto._organizeEntities = function _organizeEntities() {
27921
28351
  var _this_context = this.context, entityConfigMap = _this_context.entityConfigMap, entityMap = _this_context.entityMap, scene = _this_context.scene, rootIds = _this_context.rootIds;
27922
- for(var _iterator = _createForOfIteratorHelperLoose(rootIds), _step; !(_step = _iterator()).done;){
28352
+ for(var _iterator = _create_for_of_iterator_helper_loose(rootIds), _step; !(_step = _iterator()).done;){
27923
28353
  var rootId = _step.value;
27924
28354
  PrefabParser.parseChildren(entityConfigMap, entityMap, rootId);
27925
28355
  }
@@ -28078,7 +28508,7 @@ var SourceFontLoader = /*#__PURE__*/ function(Loader) {
28078
28508
  });
28079
28509
  };
28080
28510
  _proto._registerFont = function _registerFont(fontName, fontUrl) {
28081
- return _asyncToGenerator(function() {
28511
+ return _async_to_generator(function() {
28082
28512
  var fontFace;
28083
28513
  return __generator(this, function(_state) {
28084
28514
  switch(_state.label){
@@ -28394,7 +28824,7 @@ SceneLoader = __decorate([
28394
28824
  "prefab"
28395
28825
  ], true)
28396
28826
  ], SceneLoader);
28397
- ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _asyncToGenerator(function(instance, item, engine) {
28827
+ ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _async_to_generator(function(instance, item, engine) {
28398
28828
  var props;
28399
28829
  return __generator(this, function(_state) {
28400
28830
  props = item.props;
@@ -28417,7 +28847,7 @@ exports.decode = decode;
28417
28847
  exports.parseSingleKTX = parseSingleKTX;
28418
28848
 
28419
28849
  var miniprogram$6 = /*#__PURE__*/Object.freeze({
28420
- __proto__: null
28850
+ __proto__: null
28421
28851
  });
28422
28852
 
28423
28853
  var miniprogram$4 = createCommonjsModule(function (module, exports) {
@@ -28460,7 +28890,7 @@ function _defineProperties(target, props) {
28460
28890
  Object.defineProperty(target, descriptor.key, descriptor);
28461
28891
  }
28462
28892
  }
28463
- function _createClass(Constructor, protoProps, staticProps) {
28893
+ function _create_class(Constructor, protoProps, staticProps) {
28464
28894
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
28465
28895
  if (staticProps) _defineProperties(Constructor, staticProps);
28466
28896
  return Constructor;
@@ -28510,9 +28940,15 @@ function _createClass(Constructor, protoProps, staticProps) {
28510
28940
  };
28511
28941
  return MathUtil;
28512
28942
  }();
28513
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
28514
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
28515
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
28943
+ (function() {
28944
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
28945
+ })();
28946
+ (function() {
28947
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
28948
+ })();
28949
+ (function() {
28950
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
28951
+ })();
28516
28952
  /**
28517
28953
  * Describes a 3D-vector.
28518
28954
  */ var Vector3 = /*#__PURE__*/ function() {
@@ -28970,7 +29406,7 @@ function _createClass(Constructor, protoProps, staticProps) {
28970
29406
  out._z = iz * qw - iw * qz - ix * qy + iy * qx;
28971
29407
  out._onValueChanged && out._onValueChanged();
28972
29408
  };
28973
- _createClass(Vector3, [
29409
+ _create_class(Vector3, [
28974
29410
  {
28975
29411
  key: "x",
28976
29412
  get: /**
@@ -29010,8 +29446,12 @@ function _createClass(Constructor, protoProps, staticProps) {
29010
29446
  ]);
29011
29447
  return Vector3;
29012
29448
  }();
29013
- /** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
29014
- /** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
29449
+ (function() {
29450
+ /** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
29451
+ })();
29452
+ (function() {
29453
+ /** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
29454
+ })();
29015
29455
  /**
29016
29456
  * A bounding sphere.
29017
29457
  * */ var BoundingSphere = /*#__PURE__*/ function() {
@@ -29079,7 +29519,9 @@ function _createClass(Constructor, protoProps, staticProps) {
29079
29519
  };
29080
29520
  return BoundingSphere;
29081
29521
  }();
29082
- BoundingSphere._tempVec30 = new Vector3();
29522
+ (function() {
29523
+ BoundingSphere._tempVec30 = new Vector3();
29524
+ })();
29083
29525
  /**
29084
29526
  * Axis Aligned Bound Box (AABB).
29085
29527
  */ var BoundingBox = /*#__PURE__*/ function() {
@@ -29237,8 +29679,12 @@ BoundingSphere._tempVec30 = new Vector3();
29237
29679
  };
29238
29680
  return BoundingBox;
29239
29681
  }();
29240
- BoundingBox._tempVec30 = new Vector3();
29241
- BoundingBox._tempVec31 = new Vector3();
29682
+ (function() {
29683
+ BoundingBox._tempVec30 = new Vector3();
29684
+ })();
29685
+ (function() {
29686
+ BoundingBox._tempVec31 = new Vector3();
29687
+ })();
29242
29688
  /**
29243
29689
  * Contains static methods to help in determining intersections, containment, etc.
29244
29690
  */ var CollisionUtil = /*#__PURE__*/ function() {
@@ -29586,9 +30032,15 @@ BoundingBox._tempVec31 = new Vector3();
29586
30032
  };
29587
30033
  return CollisionUtil;
29588
30034
  }();
29589
- CollisionUtil._tempVec30 = new Vector3();
29590
- CollisionUtil._tempVec31 = new Vector3();
29591
- CollisionUtil._tempVec32 = new Vector3();
30035
+ (function() {
30036
+ CollisionUtil._tempVec30 = new Vector3();
30037
+ })();
30038
+ (function() {
30039
+ CollisionUtil._tempVec31 = new Vector3();
30040
+ })();
30041
+ (function() {
30042
+ CollisionUtil._tempVec32 = new Vector3();
30043
+ })();
29592
30044
  /**
29593
30045
  * Represents a plane in three-dimensional space.
29594
30046
  */ var Plane = /*#__PURE__*/ function() {
@@ -30908,7 +31360,7 @@ CollisionUtil._tempVec32 = new Vector3();
30908
31360
  out._w = a._w * s;
30909
31361
  out._onValueChanged && out._onValueChanged();
30910
31362
  };
30911
- _createClass(Quaternion, [
31363
+ _create_class(Quaternion, [
30912
31364
  {
30913
31365
  key: "x",
30914
31366
  get: /**
@@ -30968,8 +31420,12 @@ CollisionUtil._tempVec32 = new Vector3();
30968
31420
  ]);
30969
31421
  return Quaternion;
30970
31422
  }();
30971
- /** @internal */ Quaternion._tempVector3 = new Vector3();
30972
- /** @internal */ Quaternion._tempQuat1 = new Quaternion();
31423
+ (function() {
31424
+ /** @internal */ Quaternion._tempVector3 = new Vector3();
31425
+ })();
31426
+ (function() {
31427
+ /** @internal */ Quaternion._tempQuat1 = new Quaternion();
31428
+ })();
30973
31429
  /**
30974
31430
  * Represents a 4x4 mathematical matrix.
30975
31431
  */ var Matrix = /*#__PURE__*/ function() {
@@ -31914,11 +32370,21 @@ CollisionUtil._tempVec32 = new Vector3();
31914
32370
  };
31915
32371
  return Matrix;
31916
32372
  }();
31917
- Matrix._tempVec30 = new Vector3();
31918
- Matrix._tempVec31 = new Vector3();
31919
- Matrix._tempVec32 = new Vector3();
31920
- Matrix._tempMat30 = new Matrix3x3();
31921
- /** @internal Identity matrix. */ Matrix._identity = new Matrix(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
32373
+ (function() {
32374
+ Matrix._tempVec30 = new Vector3();
32375
+ })();
32376
+ (function() {
32377
+ Matrix._tempVec31 = new Vector3();
32378
+ })();
32379
+ (function() {
32380
+ Matrix._tempVec32 = new Vector3();
32381
+ })();
32382
+ (function() {
32383
+ Matrix._tempMat30 = new Matrix3x3();
32384
+ })();
32385
+ (function() {
32386
+ /** @internal Identity matrix. */ Matrix._identity = new Matrix(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0);
32387
+ })();
31922
32388
  /**
31923
32389
  * Represents a ray with an origin and a direction in 3D space.
31924
32390
  */ var Ray = /*#__PURE__*/ function() {
@@ -32252,7 +32718,7 @@ Matrix._tempMat30 = new Matrix3x3();
32252
32718
  out._y = left._y * s;
32253
32719
  out._onValueChanged && out._onValueChanged();
32254
32720
  };
32255
- _createClass(Vector2, [
32721
+ _create_class(Vector2, [
32256
32722
  {
32257
32723
  key: "x",
32258
32724
  get: /**
@@ -32280,8 +32746,12 @@ Matrix._tempMat30 = new Matrix3x3();
32280
32746
  ]);
32281
32747
  return Vector2;
32282
32748
  }();
32283
- /** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
32284
- /** @internal */ Vector2._one = new Vector2(1.0, 1.0);
32749
+ (function() {
32750
+ /** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
32751
+ })();
32752
+ (function() {
32753
+ /** @internal */ Vector2._one = new Vector2(1.0, 1.0);
32754
+ })();
32285
32755
  /**
32286
32756
  * Describes a 4D-vector.
32287
32757
  */ var Vector4 = /*#__PURE__*/ function() {
@@ -32661,7 +33131,7 @@ Matrix._tempMat30 = new Matrix3x3();
32661
33131
  out._w = w;
32662
33132
  out._onValueChanged && out._onValueChanged();
32663
33133
  };
32664
- _createClass(Vector4, [
33134
+ _create_class(Vector4, [
32665
33135
  {
32666
33136
  key: "x",
32667
33137
  get: /**
@@ -32713,8 +33183,12 @@ Matrix._tempMat30 = new Matrix3x3();
32713
33183
  ]);
32714
33184
  return Vector4;
32715
33185
  }();
32716
- /** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
32717
- /** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
33186
+ (function() {
33187
+ /** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
33188
+ })();
33189
+ (function() {
33190
+ /** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
33191
+ })();
32718
33192
  /**
32719
33193
  * Describes a color in the from of RGBA (in order: R, G, B, A).
32720
33194
  */ var Color = /*#__PURE__*/ function() {
@@ -32923,7 +33397,7 @@ Matrix._tempMat30 = new Matrix3x3();
32923
33397
  out._onValueChanged && out._onValueChanged();
32924
33398
  return out;
32925
33399
  };
32926
- _createClass(Color, [
33400
+ _create_class(Color, [
32927
33401
  {
32928
33402
  key: "r",
32929
33403
  get: /**
@@ -33281,7 +33755,7 @@ function _defineProperties(target, props) {
33281
33755
  Object.defineProperty(target, descriptor.key, descriptor);
33282
33756
  }
33283
33757
  }
33284
- function _createClass(Constructor, protoProps, staticProps) {
33758
+ function _create_class(Constructor, protoProps, staticProps) {
33285
33759
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
33286
33760
  if (staticProps) _defineProperties(Constructor, staticProps);
33287
33761
  return Constructor;
@@ -33289,9 +33763,7 @@ function _createClass(Constructor, protoProps, staticProps) {
33289
33763
  function _instanceof1(left, right) {
33290
33764
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
33291
33765
  return !!right[Symbol.hasInstance](left);
33292
- } else {
33293
- return _instanceof(left, right);
33294
- }
33766
+ } else return _instanceof(left, right);
33295
33767
  }
33296
33768
  /**
33297
33769
  * The canvas used on the web, which can support HTMLCanvasElement and OffscreenCanvas.
@@ -33324,7 +33796,7 @@ function _instanceof1(left, right) {
33324
33796
  this._scale.set(x, y);
33325
33797
  this.scale = this._scale;
33326
33798
  };
33327
- _createClass(WebCanvas, [
33799
+ _create_class(WebCanvas, [
33328
33800
  {
33329
33801
  key: "width",
33330
33802
  get: /**
@@ -33376,15 +33848,12 @@ function _instanceof1(left, right) {
33376
33848
  ]);
33377
33849
  return WebCanvas;
33378
33850
  }();
33379
- function setPrototypeOf(o, p) {
33380
- setPrototypeOf = Object.setPrototypeOf || function setPrototypeOf(o, p) {
33851
+ function _set_prototype_of(o, p) {
33852
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
33381
33853
  o.__proto__ = p;
33382
33854
  return o;
33383
33855
  };
33384
- return setPrototypeOf(o, p);
33385
- }
33386
- function _setPrototypeOf(o, p) {
33387
- return setPrototypeOf(o, p);
33856
+ return _set_prototype_of(o, p);
33388
33857
  }
33389
33858
  function _inherits(subClass, superClass) {
33390
33859
  if (typeof superClass !== "function" && superClass !== null) {
@@ -33397,132 +33866,18 @@ function _inherits(subClass, superClass) {
33397
33866
  configurable: true
33398
33867
  }
33399
33868
  });
33400
- if (superClass) _setPrototypeOf(subClass, superClass);
33869
+ if (superClass) _set_prototype_of(subClass, superClass);
33401
33870
  }
33402
- /**
33403
- * WebGL platform engine,support includes WebGL1.0 and WebGL2.0.
33404
- */ var WebGLEngine = /*#__PURE__*/ function(Engine) {
33405
- var WebGLEngine = function WebGLEngine() {
33406
- return Engine.apply(this, arguments);
33407
- };
33408
- _inherits(WebGLEngine, Engine);
33409
- /**
33410
- * Create a WebGL engine.
33411
- * @param configuration - WebGL engine configuration
33412
- * @returns A promise that will resolve when the engine is created
33413
- */ WebGLEngine.create = function create(configuration) {
33414
- var canvas = configuration.canvas;
33415
- var webCanvas = new WebCanvas(typeof canvas === "string" ? engineMiniprogramAdapter.document.getElementById(canvas) : canvas);
33416
- var webGLRenderer = new WebGLGraphicDevice(configuration.graphicDeviceOptions);
33417
- var engine = new WebGLEngine(webCanvas, webGLRenderer, configuration);
33418
- return engine._initialize(configuration);
33419
- };
33420
- _createClass(WebGLEngine, [
33421
- {
33422
- key: "canvas",
33423
- get: /**
33424
- * Web canvas.
33425
- */ function get() {
33426
- return this._canvas;
33427
- }
33428
- }
33429
- ]);
33430
- return WebGLEngine;
33431
- }(miniprogram$1$1.Engine);
33432
- function extends_() {
33433
- extends_ = Object.assign || function(target) {
33871
+ function _extends() {
33872
+ _extends = Object.assign || function assign(target) {
33434
33873
  for(var i = 1; i < arguments.length; i++){
33435
33874
  var source = arguments[i];
33436
- for(var key in source){
33437
- if (Object.prototype.hasOwnProperty.call(source, key)) {
33438
- target[key] = source[key];
33439
- }
33440
- }
33875
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
33441
33876
  }
33442
33877
  return target;
33443
33878
  };
33444
- return extends_.apply(this, arguments);
33445
- }
33446
- function _extends() {
33447
- return extends_.apply(this, arguments);
33879
+ return _extends.apply(this, arguments);
33448
33880
  }
33449
- var GLBuffer = /*#__PURE__*/ function() {
33450
- var GLBuffer = function GLBuffer(rhi, type, byteLength, bufferUsage, data) {
33451
- if (bufferUsage === void 0) bufferUsage = miniprogram$1$1.BufferUsage.Static;
33452
- var gl = rhi.gl;
33453
- var glBuffer = gl.createBuffer();
33454
- var glBufferUsage = this._getGLBufferUsage(gl, bufferUsage);
33455
- var glBindTarget = type === miniprogram$1$1.BufferBindFlag.VertexBuffer ? gl.ARRAY_BUFFER : gl.ELEMENT_ARRAY_BUFFER;
33456
- this._gl = gl;
33457
- this._glBuffer = glBuffer;
33458
- this._glBufferUsage = glBufferUsage;
33459
- this._glBindTarget = glBindTarget;
33460
- this._isWebGL2 = rhi.isWebGL2;
33461
- this.bind();
33462
- if (data) {
33463
- gl.bufferData(glBindTarget, data, glBufferUsage);
33464
- } else {
33465
- gl.bufferData(glBindTarget, byteLength, glBufferUsage);
33466
- }
33467
- gl.bindBuffer(glBindTarget, null);
33468
- };
33469
- var _proto = GLBuffer.prototype;
33470
- _proto.bind = function bind() {
33471
- this._gl.bindBuffer(this._glBindTarget, this._glBuffer);
33472
- };
33473
- _proto.setData = function setData(byteLength, data, bufferByteOffset, dataOffset, dataLength, options) {
33474
- var gl = this._gl;
33475
- var glBindTarget = this._glBindTarget;
33476
- this.bind();
33477
- if (options === miniprogram$1$1.SetDataOptions.Discard) {
33478
- gl.bufferData(glBindTarget, byteLength, this._glBufferUsage);
33479
- }
33480
- // TypeArray is BYTES_PER_ELEMENT, unTypeArray is 1
33481
- var byteSize = data.BYTES_PER_ELEMENT || 1;
33482
- var dataByteLength = dataLength ? byteSize * dataLength : data.byteLength;
33483
- if (dataOffset !== 0 || dataByteLength < data.byteLength) {
33484
- var isArrayBufferView = data.byteOffset !== undefined;
33485
- if (this._isWebGL2 && isArrayBufferView) {
33486
- gl.bufferSubData(glBindTarget, bufferByteOffset, data, dataOffset, dataByteLength / byteSize);
33487
- } else {
33488
- var subData = new Uint8Array(isArrayBufferView ? data.buffer : data, dataOffset * byteSize, dataByteLength);
33489
- gl.bufferSubData(glBindTarget, bufferByteOffset, subData);
33490
- }
33491
- } else {
33492
- gl.bufferSubData(glBindTarget, bufferByteOffset, data);
33493
- }
33494
- gl.bindBuffer(glBindTarget, null);
33495
- };
33496
- _proto.getData = function getData(data, bufferByteOffset, dataOffset, dataLength) {
33497
- if (this._isWebGL2) {
33498
- var gl = this._gl;
33499
- this.bind();
33500
- gl.getBufferSubData(this._glBindTarget, bufferByteOffset, data, dataOffset, dataLength);
33501
- } else {
33502
- throw "Buffer is write-only on WebGL1.0 platforms.";
33503
- }
33504
- };
33505
- _proto.resize = function resize(byteLength) {
33506
- this.bind();
33507
- this._gl.bufferData(this._glBindTarget, byteLength, this._glBufferUsage);
33508
- };
33509
- _proto.destroy = function destroy() {
33510
- this._gl.deleteBuffer(this._glBuffer);
33511
- this._gl = null;
33512
- this._glBuffer = null;
33513
- };
33514
- _proto._getGLBufferUsage = function _getGLBufferUsage(gl, bufferUsage) {
33515
- switch(bufferUsage){
33516
- case miniprogram$1$1.BufferUsage.Static:
33517
- return gl.STATIC_DRAW;
33518
- case miniprogram$1$1.BufferUsage.Dynamic:
33519
- return gl.DYNAMIC_DRAW;
33520
- case miniprogram$1$1.BufferUsage.Stream:
33521
- return gl.STREAM_DRAW;
33522
- }
33523
- };
33524
- return GLBuffer;
33525
- }();
33526
33881
  /**
33527
33882
  * GL capability.
33528
33883
  */ var GLCapability = /*#__PURE__*/ function() {
@@ -33654,7 +34009,7 @@ var GLBuffer = /*#__PURE__*/ function() {
33654
34009
  TEXTURE_MAX_ANISOTROPY_EXT: "TEXTURE_MAX_ANISOTROPY_EXT"
33655
34010
  });
33656
34011
  };
33657
- _createClass(GLCapability, [
34012
+ _create_class(GLCapability, [
33658
34013
  {
33659
34014
  key: "maxTextureSize",
33660
34015
  get: function get() {
@@ -33785,8 +34140,8 @@ var GLBuffer = /*#__PURE__*/ function() {
33785
34140
  if (useVao) {
33786
34141
  gl.drawElements(topology, count, _glIndexType, start * _glIndexByteCount);
33787
34142
  } else {
33788
- var _glBuffer = _indexBufferBinding.buffer._platformBuffer._glBuffer;
33789
- gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _glBuffer);
34143
+ var _nativeBuffer = _indexBufferBinding.buffer._nativeBuffer;
34144
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _nativeBuffer);
33790
34145
  gl.drawElements(topology, count, _glIndexType, start * _glIndexByteCount);
33791
34146
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
33792
34147
  }
@@ -33799,8 +34154,8 @@ var GLBuffer = /*#__PURE__*/ function() {
33799
34154
  if (useVao) {
33800
34155
  gl.drawElementsInstanced(topology, count, _glIndexType, start * _glIndexByteCount, _instanceCount);
33801
34156
  } else {
33802
- var _glBuffer1 = _indexBufferBinding.buffer._platformBuffer._glBuffer;
33803
- gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _glBuffer1);
34157
+ var _nativeBuffer1 = _indexBufferBinding.buffer._nativeBuffer;
34158
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _nativeBuffer1);
33804
34159
  gl.drawElementsInstanced(topology, count, _glIndexType, start * _glIndexByteCount, _instanceCount);
33805
34160
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
33806
34161
  }
@@ -33840,7 +34195,7 @@ var GLBuffer = /*#__PURE__*/ function() {
33840
34195
  var element = attributes[name];
33841
34196
  if (element) {
33842
34197
  var _vertexBufferBindings_element_bindingIndex = vertexBufferBindings[element.bindingIndex], buffer = _vertexBufferBindings_element_bindingIndex.buffer, stride = _vertexBufferBindings_element_bindingIndex.stride;
33843
- vbo = buffer._platformBuffer._glBuffer;
34198
+ vbo = buffer._nativeBuffer;
33844
34199
  // prevent binding the vbo which already bound at the last loop, e.g. a buffer with multiple attributes.
33845
34200
  if (lastBoundVbo !== vbo) {
33846
34201
  lastBoundVbo = vbo;
@@ -33872,7 +34227,7 @@ var GLBuffer = /*#__PURE__*/ function() {
33872
34227
  // @ts-ignore
33873
34228
  var _indexBufferBinding = this._primitive._indexBufferBinding;
33874
34229
  if (_indexBufferBinding) {
33875
- gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _indexBufferBinding.buffer._platformBuffer._glBuffer);
34230
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _indexBufferBinding.buffer._nativeBuffer);
33876
34231
  }
33877
34232
  this._bindBufferAndAttrib(shaderProgram);
33878
34233
  /** unbind */ gl.bindVertexArray(null);
@@ -34404,7 +34759,7 @@ var GLBuffer = /*#__PURE__*/ function() {
34404
34759
  }
34405
34760
  return true;
34406
34761
  };
34407
- _createClass(GLTexture, [
34762
+ _create_class(GLTexture, [
34408
34763
  {
34409
34764
  key: "wrapModeU",
34410
34765
  set: /**
@@ -34929,19 +35284,20 @@ exports.WebGLMode = void 0;
34929
35284
  WebGLMode[WebGLMode[/** WebGL1.0, */ "WebGL1"] = 2] = "WebGL1";
34930
35285
  })(exports.WebGLMode || (exports.WebGLMode = {}));
34931
35286
  /**
34932
- * WebGL graphic device, including WebGL1.0 and WebGL2.0.
34933
- */ var WebGLGraphicDevice = /*#__PURE__*/ function() {
34934
- var WebGLGraphicDevice = function WebGLGraphicDevice(initializeOptions) {
35287
+ * WebGL renderer, including WebGL1.0 and WebGL2.0.
35288
+ */ var WebGLRenderer = /*#__PURE__*/ function() {
35289
+ var WebGLRenderer = function WebGLRenderer(initializeOptions) {
34935
35290
  if (initializeOptions === void 0) initializeOptions = {};
34936
- /** @internal */ this._readFrameBuffer = null;
34937
35291
  /** @internal */ this._enableGlobalDepthBias = false;
34938
35292
  this._activeTextures = new Array(32);
35293
+ // cache value
34939
35294
  this._lastViewport = new miniprogram$1.Vector4(null, null, null, null);
34940
35295
  this._lastScissor = new miniprogram$1.Vector4(null, null, null, null);
34941
35296
  this._lastClearColor = new miniprogram$1.Color(null, null, null, null);
34942
35297
  this._scissorEnable = false;
34943
35298
  var options = _extends({
34944
35299
  webGLMode: 0,
35300
+ alpha: false,
34945
35301
  stencil: true,
34946
35302
  _forceFlush: false
34947
35303
  }, initializeOptions);
@@ -34956,20 +35312,12 @@ exports.WebGLMode = void 0;
34956
35312
  }
34957
35313
  }
34958
35314
  this._options = options;
34959
- this._onWebGLContextLost = this._onWebGLContextLost.bind(this);
34960
- this._onWebGLContextRestored = this._onWebGLContextRestored.bind(this);
34961
35315
  };
34962
- var _proto = WebGLGraphicDevice.prototype;
34963
- _proto.init = function init(canvas, onDeviceLost, onDeviceRestored) {
35316
+ var _proto = WebGLRenderer.prototype;
35317
+ _proto.init = function init(canvas) {
34964
35318
  var options = this._options;
34965
- var webCanvas = canvas._webCanvas;
35319
+ var webCanvas = this._webCanvas = canvas._webCanvas;
34966
35320
  var webGLMode = options.webGLMode;
34967
- this._onDeviceLost = onDeviceLost;
34968
- this._onDeviceRestored = onDeviceRestored;
34969
- webCanvas.addEventListener("webglcontextlost", this._onWebGLContextLost, false);
34970
- webCanvas.addEventListener("webglcontextrestored", this._onWebGLContextRestored, false);
34971
- webCanvas.addEventListener("webglcontextcreationerror", this._onContextCreationError, false);
34972
- this._webCanvas = webCanvas;
34973
35321
  var gl;
34974
35322
  if (webGLMode == 0 || webGLMode == 1) {
34975
35323
  gl = webCanvas.getContext("webgl2", options);
@@ -34995,7 +35343,16 @@ exports.WebGLMode = void 0;
34995
35343
  throw new Error("Get GL Context FAILED.");
34996
35344
  }
34997
35345
  this._gl = gl;
34998
- this._initGLState(gl);
35346
+ this._activeTextureID = gl.TEXTURE0;
35347
+ this._renderStates = new GLRenderStates(gl);
35348
+ this._extensions = new GLExtensions(this);
35349
+ this._capability = new GLCapability(this);
35350
+ // Make sure the active texture in gl context is on default, because gl context may be used in other webgl renderer.
35351
+ gl.activeTexture(gl.TEXTURE0);
35352
+ var debugRenderInfo = gl.getExtension("WEBGL_debug_renderer_info");
35353
+ if (debugRenderInfo != null) {
35354
+ this._renderer = gl.getParameter(debugRenderInfo.UNMASKED_RENDERER_WEBGL);
35355
+ }
34999
35356
  };
35000
35357
  _proto.createPlatformPrimitive = function createPlatformPrimitive(primitive) {
35001
35358
  return new GLPrimitive(this, primitive);
@@ -35012,10 +35369,6 @@ exports.WebGLMode = void 0;
35012
35369
  _proto.createPlatformRenderTarget = function createPlatformRenderTarget(target) {
35013
35370
  return new GLRenderTarget(this, target);
35014
35371
  };
35015
- _proto.createPlatformBuffer = function createPlatformBuffer(type, byteLength, bufferUsage, data) {
35016
- if (bufferUsage === void 0) bufferUsage = miniprogram$1$1.BufferUsage.Static;
35017
- return new GLBuffer(this, type, byteLength, bufferUsage, data);
35018
- };
35019
35372
  _proto.requireExtension = function requireExtension(ext) {
35020
35373
  return this._extensions.requireExtension(ext);
35021
35374
  };
@@ -35143,57 +35496,8 @@ exports.WebGLMode = void 0;
35143
35496
  _proto.flush = function flush() {
35144
35497
  this._gl.flush();
35145
35498
  };
35146
- _proto.forceLoseDevice = function forceLoseDevice() {
35147
- var extension = this.requireExtension(miniprogram$1$1.GLCapabilityType.WEBGL_lose_context);
35148
- extension.loseContext();
35149
- };
35150
- _proto.forceRestoreDevice = function forceRestoreDevice() {
35151
- var extension = this.requireExtension(miniprogram$1$1.GLCapabilityType.WEBGL_lose_context);
35152
- extension.restoreContext();
35153
- };
35154
- _proto.resetState = function resetState() {
35155
- this._readFrameBuffer = null;
35156
- this._enableGlobalDepthBias = false;
35157
- this._currentBindShaderProgram = null;
35158
- var activeTextures = this._activeTextures;
35159
- for(var i = 0, n = activeTextures.length; i < n; i++){
35160
- activeTextures[i] = null;
35161
- }
35162
- this._lastViewport.set(null, null, null, null);
35163
- this._lastScissor.set(null, null, null, null);
35164
- this._lastClearColor.set(null, null, null, null);
35165
- this._scissorEnable = false;
35166
- this._initGLState(this._gl);
35167
- };
35168
- _proto._initGLState = function _initGLState(gl) {
35169
- this._activeTextureID = gl.TEXTURE0;
35170
- this._renderStates = new GLRenderStates(gl);
35171
- this._extensions = new GLExtensions(this);
35172
- this._capability = new GLCapability(this);
35173
- // Make sure the active texture in gl context is on default, because gl context may be used in other webgl renderer.
35174
- gl.activeTexture(gl.TEXTURE0);
35175
- var debugRenderInfo = gl.getExtension("WEBGL_debug_renderer_info");
35176
- if (debugRenderInfo != null) {
35177
- this._renderer = gl.getParameter(debugRenderInfo.UNMASKED_RENDERER_WEBGL);
35178
- }
35179
- };
35180
- _proto.destroy = function destroy() {
35181
- var webCanvas = this._webCanvas;
35182
- webCanvas.removeEventListener("webglcontextcreationerror", this._onContextCreationError, false);
35183
- webCanvas.removeEventListener("webglcontextlost", this._onWebGLContextLost, false);
35184
- webCanvas.removeEventListener("webglcontextrestored", this._onWebGLContextRestored, false);
35185
- };
35186
- _proto._onContextCreationError = function _onContextCreationError(event) {
35187
- console.error("WebGLRenderer: WebGL context could not be created. Reason: ", event.statusMessage);
35188
- };
35189
- _proto._onWebGLContextLost = function _onWebGLContextLost(event) {
35190
- event.preventDefault();
35191
- this._onDeviceLost();
35192
- };
35193
- _proto._onWebGLContextRestored = function _onWebGLContextRestored(event) {
35194
- this._onDeviceRestored();
35195
- };
35196
- _createClass(WebGLGraphicDevice, [
35499
+ _proto.destroy = function destroy() {};
35500
+ _create_class(WebGLRenderer, [
35197
35501
  {
35198
35502
  key: "isWebGL2",
35199
35503
  get: function get() {
@@ -35234,14 +35538,35 @@ exports.WebGLMode = void 0;
35234
35538
  }
35235
35539
  }
35236
35540
  ]);
35237
- return WebGLGraphicDevice;
35541
+ return WebGLRenderer;
35238
35542
  }();
35543
+ /**
35544
+ * WebGL platform engine,support includes WebGL1.0 and WebGL2.0.
35545
+ */ var WebGLEngine = /*#__PURE__*/ function(Engine) {
35546
+ var WebGLEngine = function WebGLEngine(canvas, webGLRendererOptions) {
35547
+ var webCanvas = new WebCanvas(typeof canvas === "string" ? engineMiniprogramAdapter.document.getElementById(canvas) : canvas);
35548
+ var hardwareRenderer = new WebGLRenderer(webGLRendererOptions);
35549
+ return Engine.call(this, webCanvas, hardwareRenderer);
35550
+ };
35551
+ _inherits(WebGLEngine, Engine);
35552
+ _create_class(WebGLEngine, [
35553
+ {
35554
+ key: "canvas",
35555
+ get: /**
35556
+ * Web canvas.
35557
+ */ function get() {
35558
+ return this._canvas;
35559
+ }
35560
+ }
35561
+ ]);
35562
+ return WebGLEngine;
35563
+ }(miniprogram$1$1.Engine);
35239
35564
  exports.WebCanvas = WebCanvas;
35240
35565
  exports.WebGLEngine = WebGLEngine;
35241
- exports.WebGLGraphicDevice = WebGLGraphicDevice;
35566
+ exports.WebGLRenderer = WebGLRenderer;
35242
35567
 
35243
35568
  var miniprogram$3 = /*#__PURE__*/Object.freeze({
35244
- __proto__: null
35569
+ __proto__: null
35245
35570
  });
35246
35571
 
35247
35572
  var CoreObjects = /*@__PURE__*/getAugmentedNamespace(miniprogram$8);
@@ -35279,7 +35604,7 @@ function _interopNamespace(e) {
35279
35604
  }
35280
35605
  var CoreObjects__namespace = /*#__PURE__*/ _interopNamespace(CoreObjects);
35281
35606
  //@ts-ignore
35282
- var version = "0.9.0-beta.82";
35607
+ var version = "0.9.0";
35283
35608
  console.log("Galacean engine version: " + version);
35284
35609
  for(var key in CoreObjects__namespace){
35285
35610
  CoreObjects.Loader.registerClass(key, CoreObjects__namespace[key]);
@@ -35382,9 +35707,15 @@ Object.keys(miniprogram$2).forEach(function(k) {
35382
35707
  };
35383
35708
  return PhysXJoint;
35384
35709
  }();
35385
- PhysXJoint._xAxis = new miniprogram_1.Vector3(1, 0, 0);
35386
- PhysXJoint._defaultVec = new miniprogram_1.Vector3();
35387
- PhysXJoint._defaultQuat = new miniprogram_1.Quaternion();
35710
+ (function() {
35711
+ PhysXJoint._xAxis = new miniprogram_1.Vector3(1, 0, 0);
35712
+ })();
35713
+ (function() {
35714
+ PhysXJoint._defaultVec = new miniprogram_1.Vector3();
35715
+ })();
35716
+ (function() {
35717
+ PhysXJoint._defaultQuat = new miniprogram_1.Quaternion();
35718
+ })();
35388
35719
 
35389
35720
  /**
35390
35721
  * A fixed joint permits no relative movement between two colliders. ie the bodies are glued together.
@@ -35662,11 +35993,15 @@ var ShapeFlag;
35662
35993
  };
35663
35994
  return PhysXColliderShape;
35664
35995
  }();
35665
- PhysXColliderShape.halfSqrt = 0.70710678118655;
35666
- PhysXColliderShape.transform = {
35667
- translation: new miniprogram_1.Vector3(),
35668
- rotation: null
35669
- };
35996
+ (function() {
35997
+ PhysXColliderShape.halfSqrt = 0.70710678118655;
35998
+ })();
35999
+ (function() {
36000
+ PhysXColliderShape.transform = {
36001
+ translation: new miniprogram_1.Vector3(),
36002
+ rotation: null
36003
+ };
36004
+ })();
35670
36005
 
35671
36006
  /**
35672
36007
  * Box collider shape in PhysX.
@@ -35709,7 +36044,9 @@ PhysXColliderShape.transform = {
35709
36044
  };
35710
36045
  return PhysXBoxColliderShape;
35711
36046
  }(PhysXColliderShape);
35712
- PhysXBoxColliderShape._tempHalfExtents = new miniprogram_1.Vector3();
36047
+ (function() {
36048
+ PhysXBoxColliderShape._tempHalfExtents = new miniprogram_1.Vector3();
36049
+ })();
35713
36050
 
35714
36051
  /**
35715
36052
  * Capsule collider shape in PhysX.
@@ -35960,10 +36297,12 @@ var /**
35960
36297
  };
35961
36298
  return PhysXCollider;
35962
36299
  }();
35963
- PhysXCollider._tempTransform = {
35964
- translation: null,
35965
- rotation: null
35966
- };
36300
+ (function() {
36301
+ PhysXCollider._tempTransform = {
36302
+ translation: null,
36303
+ rotation: null
36304
+ };
36305
+ })();
35967
36306
 
35968
36307
  var CollisionDetectionMode;
35969
36308
  (function(CollisionDetectionMode) {
@@ -36120,8 +36459,12 @@ var CollisionDetectionMode;
36120
36459
  };
36121
36460
  return PhysXDynamicCollider;
36122
36461
  }(PhysXCollider);
36123
- PhysXDynamicCollider._tempTranslation = new miniprogram_1.Vector3();
36124
- PhysXDynamicCollider._tempRotation = new miniprogram_1.Quaternion();
36462
+ (function() {
36463
+ PhysXDynamicCollider._tempTranslation = new miniprogram_1.Vector3();
36464
+ })();
36465
+ (function() {
36466
+ PhysXDynamicCollider._tempRotation = new miniprogram_1.Quaternion();
36467
+ })();
36125
36468
 
36126
36469
  /**
36127
36470
  * A manager is a collection of colliders and constraints which can interact.
@@ -36322,8 +36665,12 @@ PhysXDynamicCollider._tempRotation = new miniprogram_1.Quaternion();
36322
36665
  };
36323
36666
  return PhysXPhysicsManager;
36324
36667
  }();
36325
- PhysXPhysicsManager._tempPosition = new miniprogram_1.Vector3();
36326
- PhysXPhysicsManager._tempNormal = new miniprogram_1.Vector3();
36668
+ (function() {
36669
+ PhysXPhysicsManager._tempPosition = new miniprogram_1.Vector3();
36670
+ })();
36671
+ (function() {
36672
+ PhysXPhysicsManager._tempNormal = new miniprogram_1.Vector3();
36673
+ })();
36327
36674
  var /**
36328
36675
  * Filtering flags for scene queries.
36329
36676
  */ QueryFlag;