@galacean/engine-physics-lite 0.9.0-beta.82 → 0.9.1

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.
@@ -24,56 +24,48 @@ function __decorate$2(decorators, target, key, desc) {
24
24
  return c > 3 && r && Object.defineProperty(target, key, r), r;
25
25
  }
26
26
 
27
- function setPrototypeOf$3(o, p) {
28
- setPrototypeOf$3 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
29
- o.__proto__ = p;
30
- return o;
31
- };
27
+ function _set_prototype_of$3(o, p) {
28
+ _set_prototype_of$3 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
29
+ o.__proto__ = p;
32
30
 
33
- return setPrototypeOf$3(o, p);
34
- }
31
+ return o;
32
+ };
35
33
 
36
- function _setPrototypeOf$3(o, p) {
37
- return setPrototypeOf$3(o, p);
34
+ return _set_prototype_of$3(o, p);
38
35
  }
39
36
 
40
37
  function _inherits$3(subClass, superClass) {
41
- if (typeof superClass !== "function" && superClass !== null) {
42
- throw new TypeError("Super expression must either be null or a function");
43
- }
44
-
45
- subClass.prototype = Object.create(superClass && superClass.prototype, {
46
- constructor: {
47
- value: subClass,
48
- writable: true,
49
- configurable: true
38
+ if (typeof superClass !== "function" && superClass !== null) {
39
+ throw new TypeError("Super expression must either be null or a function");
50
40
  }
51
- });
52
- if (superClass) _setPrototypeOf$3(subClass, superClass);
41
+
42
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
43
+
44
+ if (superClass) _set_prototype_of$3(subClass, superClass);
53
45
  }
54
46
 
55
47
  function _defineProperties$3(target, props) {
56
- for (var i = 0; i < props.length; i++) {
57
- var descriptor = props[i];
58
- descriptor.enumerable = descriptor.enumerable || false;
59
- descriptor.configurable = true;
60
- if ("value" in descriptor) descriptor.writable = true;
61
- Object.defineProperty(target, descriptor.key, descriptor);
62
- }
48
+ for (var i = 0; i < props.length; i++) {
49
+ var descriptor = props[i];
50
+ descriptor.enumerable = descriptor.enumerable || false;
51
+ descriptor.configurable = true;
52
+
53
+ if ("value" in descriptor) descriptor.writable = true;
54
+
55
+ Object.defineProperty(target, descriptor.key, descriptor);
56
+ }
63
57
  }
58
+ function _create_class$3(Constructor, protoProps, staticProps) {
59
+ if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
60
+ if (staticProps) _defineProperties$3(Constructor, staticProps);
64
61
 
65
- function _createClass$3(Constructor, protoProps, staticProps) {
66
- if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
67
- if (staticProps) _defineProperties$3(Constructor, staticProps);
68
- return Constructor;
62
+ return Constructor;
69
63
  }
70
64
 
71
65
  function _instanceof(left, right) {
72
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
73
- return !!right[Symbol.hasInstance](left);
74
- } else {
75
- return left instanceof right;
76
- }
66
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
67
+ return !!right[Symbol.hasInstance](left);
68
+ } else return left instanceof right;
77
69
  }
78
70
 
79
71
  function getAugmentedNamespace(n) {
@@ -111,10 +103,8 @@ var miniprogram$7 = require("@galacean/engine-math/dist/miniprogram");
111
103
  Platform[Platform[/** Mac platform. */ "Mac"] = 3] = "Mac";
112
104
  Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
113
105
  })(exports.Platform || (exports.Platform = {}));
114
- function _assertThisInitialized(self) {
115
- if (self === void 0) {
116
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
117
- }
106
+ function _assert_this_initialized(self) {
107
+ if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
118
108
  return self;
119
109
  }
120
110
  function _defineProperties$2(target, props) {
@@ -126,20 +116,17 @@ function _defineProperties$2(target, props) {
126
116
  Object.defineProperty(target, descriptor.key, descriptor);
127
117
  }
128
118
  }
129
- function _createClass$2(Constructor, protoProps, staticProps) {
119
+ function _create_class$2(Constructor, protoProps, staticProps) {
130
120
  if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
131
121
  if (staticProps) _defineProperties$2(Constructor, staticProps);
132
122
  return Constructor;
133
123
  }
134
- function setPrototypeOf$2(o, p) {
135
- setPrototypeOf$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
124
+ function _set_prototype_of$2(o, p) {
125
+ _set_prototype_of$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
136
126
  o.__proto__ = p;
137
127
  return o;
138
128
  };
139
- return setPrototypeOf$2(o, p);
140
- }
141
- function _setPrototypeOf$2(o, p) {
142
- return setPrototypeOf$2(o, p);
129
+ return _set_prototype_of$2(o, p);
143
130
  }
144
131
  function _inherits$2(subClass, superClass) {
145
132
  if (typeof superClass !== "function" && superClass !== null) {
@@ -152,7 +139,7 @@ function _inherits$2(subClass, superClass) {
152
139
  configurable: true
153
140
  }
154
141
  });
155
- if (superClass) _setPrototypeOf$2(subClass, superClass);
142
+ if (superClass) _set_prototype_of$2(subClass, superClass);
156
143
  }
157
144
  /**
158
145
  * Common utility methods for math operations.
@@ -199,9 +186,15 @@ function _inherits$2(subClass, superClass) {
199
186
  };
200
187
  return MathUtil;
201
188
  }();
202
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
203
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
204
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
189
+ (function() {
190
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
191
+ })();
192
+ (function() {
193
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
194
+ })();
195
+ (function() {
196
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
197
+ })();
205
198
  /**
206
199
  * Describes a color in the from of RGBA (in order: R, G, B, A).
207
200
  */ var Color = /*#__PURE__*/ function() {
@@ -410,7 +403,7 @@ function _inherits$2(subClass, superClass) {
410
403
  out._onValueChanged && out._onValueChanged();
411
404
  return out;
412
405
  };
413
- _createClass$2(Color, [
406
+ _create_class$2(Color, [
414
407
  {
415
408
  key: "r",
416
409
  get: /**
@@ -484,9 +477,7 @@ PERFORMANCE OF THIS SOFTWARE.
484
477
  function _instanceof1$2(left, right) {
485
478
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
486
479
  return !!right[Symbol.hasInstance](left);
487
- } else {
488
- return _instanceof(left, right);
489
- }
480
+ } else return _instanceof(left, right);
490
481
  }
491
482
  /**
492
483
  * Clone mode.
@@ -665,15 +656,21 @@ function _instanceof1$2(left, right) {
665
656
  };
666
657
  return CloneManager;
667
658
  }();
668
- /** @internal */ CloneManager._subCloneModeMap = new Map();
669
- /** @internal */ CloneManager._cloneModeMap = new Map();
670
- CloneManager._objectType = Object.getPrototypeOf(Object);
659
+ (function() {
660
+ /** @internal */ CloneManager._subCloneModeMap = new Map();
661
+ })();
662
+ (function() {
663
+ /** @internal */ CloneManager._cloneModeMap = new Map();
664
+ })();
665
+ (function() {
666
+ CloneManager._objectType = Object.getPrototypeOf(Object);
667
+ })();
671
668
  /**
672
669
  * EngineObject.
673
670
  */ var EngineObject = /*#__PURE__*/ function() {
674
671
  function EngineObject(engine) {
675
- this._destroyed = false;
676
672
  /** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
673
+ this._destroyed = false;
677
674
  this._engine = engine;
678
675
  }
679
676
  var _proto = EngineObject.prototype;
@@ -685,7 +682,7 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
685
682
  (_this__engine_resourceManager = this._engine.resourceManager) == null ? void 0 : _this__engine_resourceManager._deleteAsset(this);
686
683
  this._destroyed = true;
687
684
  };
688
- _createClass$2(EngineObject, [
685
+ _create_class$2(EngineObject, [
689
686
  {
690
687
  key: "engine",
691
688
  get: /**
@@ -705,7 +702,9 @@ CloneManager._objectType = Object.getPrototypeOf(Object);
705
702
  ]);
706
703
  return EngineObject;
707
704
  }();
708
- EngineObject._instanceIdCounter = 0;
705
+ (function() {
706
+ EngineObject._instanceIdCounter = 0;
707
+ })();
709
708
  __decorate$1([
710
709
  ignoreClone
711
710
  ], EngineObject.prototype, "instanceId", void 0);
@@ -720,7 +719,7 @@ __decorate$1([
720
719
  _this = EngineObject.call(this, engine) || this;
721
720
  /** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */ _this.isGCIgnored = false;
722
721
  _this._refCount = 0;
723
- engine.resourceManager._addRefObject(_this.instanceId, _assertThisInitialized(_this));
722
+ engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized(_this));
724
723
  return _this;
725
724
  };
726
725
  _inherits$2(RefObject, EngineObject);
@@ -763,7 +762,7 @@ __decorate$1([
763
762
  */ _proto._addToResourceManager = function _addToResourceManager(path) {
764
763
  this._engine.resourceManager._addAsset(path, this);
765
764
  };
766
- _createClass$2(RefObject, [
765
+ _create_class$2(RefObject, [
767
766
  {
768
767
  key: "refCount",
769
768
  get: /**
@@ -882,7 +881,7 @@ __decorate$1([
882
881
  _proto.stopPropagation = function stopPropagation() {
883
882
  this._propagationStopped = true;
884
883
  };
885
- _createClass$2(Event, [
884
+ _create_class$2(Event, [
886
885
  {
887
886
  key: "propagationStopped",
888
887
  get: function get() {
@@ -1155,7 +1154,7 @@ var Time = /*#__PURE__*/ function() {
1155
1154
  this._lastTickTime = now;
1156
1155
  this._frameCount++;
1157
1156
  };
1158
- _createClass$2(Time, [
1157
+ _create_class$2(Time, [
1159
1158
  {
1160
1159
  key: "frameCount",
1161
1160
  get: /*
@@ -1390,7 +1389,7 @@ exports.GLCapabilityType = void 0;
1390
1389
  _proto._getMipmapCount = function _getMipmapCount() {
1391
1390
  return this._mipmap ? Math.floor(Math.log2(Math.max(this._width, this._height))) + 1 : 1;
1392
1391
  };
1393
- _createClass$2(Texture, [
1392
+ _create_class$2(Texture, [
1394
1393
  {
1395
1394
  key: "format",
1396
1395
  get: /**
@@ -1538,7 +1537,7 @@ exports.GLCapabilityType = void 0;
1538
1537
  }
1539
1538
  _this._depthTexture = depth;
1540
1539
  }
1541
- _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assertThisInitialized(_this));
1540
+ _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized(_this));
1542
1541
  return _this;
1543
1542
  };
1544
1543
  _inherits$2(RenderTarget, EngineObject);
@@ -1581,7 +1580,7 @@ exports.GLCapabilityType = void 0;
1581
1580
  */ _proto._blitRenderTarget = function _blitRenderTarget() {
1582
1581
  this._platformRenderTarget.blitRenderTarget();
1583
1582
  };
1584
- _createClass$2(RenderTarget, [
1583
+ _create_class$2(RenderTarget, [
1585
1584
  {
1586
1585
  key: "autoGenerateMipmaps",
1587
1586
  get: /**
@@ -1651,7 +1650,7 @@ exports.GLCapabilityType = void 0;
1651
1650
  _this._format = format;
1652
1651
  _this._mipmapCount = _this._getMipmapCount();
1653
1652
  _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;
1654
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assertThisInitialized(_this));
1653
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized(_this));
1655
1654
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1656
1655
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1657
1656
  return _this;
@@ -1717,7 +1716,7 @@ exports.GLCapabilityType = void 0;
1717
1716
  _this._length = length1;
1718
1717
  _this._format = format;
1719
1718
  _this._mipmapCount = _this._getMipmapCount();
1720
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assertThisInitialized(_this));
1719
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized(_this));
1721
1720
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1722
1721
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1723
1722
  return _this;
@@ -1770,7 +1769,7 @@ exports.GLCapabilityType = void 0;
1770
1769
  this._platformTexture.getPixelBuffer(elementIndex, xOrMipLevelOrOut, yOrMipLevel, width, height, mipLevelOrOut, out);
1771
1770
  }
1772
1771
  };
1773
- _createClass$2(Texture2DArray, [
1772
+ _create_class$2(Texture2DArray, [
1774
1773
  {
1775
1774
  key: "length",
1776
1775
  get: /**
@@ -1795,7 +1794,7 @@ exports.GLCapabilityType = void 0;
1795
1794
  _this._height = size;
1796
1795
  _this._format = format;
1797
1796
  _this._mipmapCount = _this._getMipmapCount();
1798
- _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assertThisInitialized(_this));
1797
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized(_this));
1799
1798
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1800
1799
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Clamp;
1801
1800
  return _this;
@@ -1922,7 +1921,7 @@ exports.GLCapabilityType = void 0;
1922
1921
  _proto.getCharInfo = function getCharInfo(char) {
1923
1922
  return this._charInfoMap[char.charCodeAt(0)];
1924
1923
  };
1925
- _createClass$2(FontAtlas, [
1924
+ _create_class$2(FontAtlas, [
1926
1925
  {
1927
1926
  key: "texture",
1928
1927
  get: function get() {
@@ -2068,7 +2067,7 @@ exports.GLCapabilityType = void 0;
2068
2067
  }
2069
2068
  return null;
2070
2069
  };
2071
- _createClass$2(Font, [
2070
+ _create_class$2(Font, [
2072
2071
  {
2073
2072
  key: "name",
2074
2073
  get: /**
@@ -2080,8 +2079,9 @@ exports.GLCapabilityType = void 0;
2080
2079
  ]);
2081
2080
  return Font;
2082
2081
  }(RefObject);
2083
- Font._fontMap = {};
2084
- var _Symbol_toStringTag = Symbol.toStringTag;
2082
+ (function() {
2083
+ Font._fontMap = {};
2084
+ })();
2085
2085
  var AssetPromise = /*#__PURE__*/ function() {
2086
2086
  var AssetPromise = function AssetPromise(executor) {
2087
2087
  var _this = this;
@@ -2200,9 +2200,9 @@ var AssetPromise = /*#__PURE__*/ function() {
2200
2200
  }
2201
2201
  });
2202
2202
  };
2203
- _createClass$2(AssetPromise, [
2203
+ _create_class$2(AssetPromise, [
2204
2204
  {
2205
- key: _Symbol_toStringTag,
2205
+ key: Symbol.toStringTag,
2206
2206
  get: /** compatible with Promise */ function get() {
2207
2207
  return "AssetPromise";
2208
2208
  }
@@ -2513,8 +2513,12 @@ var /** @internal */ PromiseState;
2513
2513
  };
2514
2514
  return ResourceManager;
2515
2515
  }();
2516
- /** Loader collection. */ ResourceManager._loaders = {};
2517
- ResourceManager._extTypeMapping = {};
2516
+ (function() {
2517
+ /** Loader collection. */ ResourceManager._loaders = {};
2518
+ })();
2519
+ (function() {
2520
+ ResourceManager._extTypeMapping = {};
2521
+ })();
2518
2522
  /**
2519
2523
  * Declare ResourceLoader's decorator.
2520
2524
  * @param assetType - Type of asset
@@ -2867,10 +2871,14 @@ var ComponentCloner = /*#__PURE__*/ function() {
2867
2871
  };
2868
2872
  return ComponentsDependencies;
2869
2873
  }();
2870
- /**
2874
+ (function() {
2875
+ /**
2871
2876
  * @internal
2872
2877
  */ ComponentsDependencies._dependenciesMap = new Map();
2873
- ComponentsDependencies._invDependenciesMap = new Map();
2878
+ })();
2879
+ (function() {
2880
+ ComponentsDependencies._invDependenciesMap = new Map();
2881
+ })();
2874
2882
  /**
2875
2883
  * Dependent components, automatically added if they do not exist.
2876
2884
  * @param components - Dependent components
@@ -3032,7 +3040,7 @@ ComponentsDependencies._invDependenciesMap = new Map();
3032
3040
  }
3033
3041
  }
3034
3042
  };
3035
- _createClass$2(Component, [
3043
+ _create_class$2(Component, [
3036
3044
  {
3037
3045
  key: "enabled",
3038
3046
  get: /**
@@ -3163,7 +3171,6 @@ __decorate$1([
3163
3171
  var Transform = function Transform(entity) {
3164
3172
  var _this;
3165
3173
  _this = Component.call(this, entity) || this;
3166
- _this._dirtyFlag = 0xbc;
3167
3174
  _this._position = new miniprogram$7.Vector3();
3168
3175
  _this._rotation = new miniprogram$7.Vector3();
3169
3176
  _this._rotationQuaternion = new miniprogram$7.Quaternion();
@@ -3176,14 +3183,15 @@ __decorate$1([
3176
3183
  _this._worldMatrix = new miniprogram$7.Matrix();
3177
3184
  _this._isParentDirty = true;
3178
3185
  _this._parentTransformCache = null;
3186
+ _this._dirtyFlag = 0xbc;
3179
3187
  /** @internal */ _this._updateFlagManager = new UpdateFlagManager();
3180
- _this._onPositionChanged = _this._onPositionChanged.bind(_assertThisInitialized(_this));
3181
- _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assertThisInitialized(_this));
3182
- _this._onRotationChanged = _this._onRotationChanged.bind(_assertThisInitialized(_this));
3183
- _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assertThisInitialized(_this));
3184
- _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assertThisInitialized(_this));
3185
- _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assertThisInitialized(_this));
3186
- _this._onScaleChanged = _this._onScaleChanged.bind(_assertThisInitialized(_this));
3188
+ _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized(_this));
3189
+ _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized(_this));
3190
+ _this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized(_this));
3191
+ _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized(_this));
3192
+ _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3193
+ _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3194
+ _this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized(_this));
3187
3195
  //@ts-ignore
3188
3196
  _this._position._onValueChanged = _this._onPositionChanged;
3189
3197
  //@ts-ignore
@@ -3576,7 +3584,7 @@ __decorate$1([
3576
3584
  this._setDirtyFlagTrue(0x40);
3577
3585
  this._updateWorldScaleFlag();
3578
3586
  };
3579
- _createClass$2(Transform, [
3587
+ _create_class$2(Transform, [
3580
3588
  {
3581
3589
  key: "position",
3582
3590
  get: /**
@@ -3822,15 +3830,33 @@ __decorate$1([
3822
3830
  ]);
3823
3831
  return Transform;
3824
3832
  }(Component);
3825
- Transform._tempQuat0 = new miniprogram$7.Quaternion();
3826
- Transform._tempVec30 = new miniprogram$7.Vector3();
3827
- Transform._tempVec31 = new miniprogram$7.Vector3();
3828
- Transform._tempVec32 = new miniprogram$7.Vector3();
3829
- Transform._tempMat30 = new miniprogram$7.Matrix3x3();
3830
- Transform._tempMat31 = new miniprogram$7.Matrix3x3();
3831
- Transform._tempMat32 = new miniprogram$7.Matrix3x3();
3832
- Transform._tempMat41 = new miniprogram$7.Matrix();
3833
- Transform._tempMat42 = new miniprogram$7.Matrix();
3833
+ (function() {
3834
+ Transform._tempQuat0 = new miniprogram$7.Quaternion();
3835
+ })();
3836
+ (function() {
3837
+ Transform._tempVec30 = new miniprogram$7.Vector3();
3838
+ })();
3839
+ (function() {
3840
+ Transform._tempVec31 = new miniprogram$7.Vector3();
3841
+ })();
3842
+ (function() {
3843
+ Transform._tempVec32 = new miniprogram$7.Vector3();
3844
+ })();
3845
+ (function() {
3846
+ Transform._tempMat30 = new miniprogram$7.Matrix3x3();
3847
+ })();
3848
+ (function() {
3849
+ Transform._tempMat31 = new miniprogram$7.Matrix3x3();
3850
+ })();
3851
+ (function() {
3852
+ Transform._tempMat32 = new miniprogram$7.Matrix3x3();
3853
+ })();
3854
+ (function() {
3855
+ Transform._tempMat41 = new miniprogram$7.Matrix();
3856
+ })();
3857
+ (function() {
3858
+ Transform._tempMat42 = new miniprogram$7.Matrix();
3859
+ })();
3834
3860
  __decorate$1([
3835
3861
  deepClone
3836
3862
  ], Transform.prototype, "_position", void 0);
@@ -4329,7 +4355,7 @@ var TransformModifyFlags;
4329
4355
  this._traverseSetOwnerScene(children[i], scene);
4330
4356
  }
4331
4357
  };
4332
- _createClass$2(Entity, [
4358
+ _create_class$2(Entity, [
4333
4359
  {
4334
4360
  key: "isActive",
4335
4361
  get: /**
@@ -4543,7 +4569,7 @@ var TransformModifyFlags;
4543
4569
  }
4544
4570
  }
4545
4571
  };
4546
- _createClass$2(SystemInfo, null, [
4572
+ _create_class$2(SystemInfo, null, [
4547
4573
  {
4548
4574
  key: "devicePixelRatio",
4549
4575
  get: /**
@@ -4555,8 +4581,12 @@ var TransformModifyFlags;
4555
4581
  ]);
4556
4582
  return SystemInfo;
4557
4583
  }();
4558
- /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4559
- /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4584
+ (function() {
4585
+ /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4586
+ })();
4587
+ (function() {
4588
+ /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4589
+ })();
4560
4590
  SystemInfo._initialize();
4561
4591
  /**
4562
4592
  * The keys of the keyboard.
@@ -5168,7 +5198,7 @@ SystemInfo._initialize();
5168
5198
  _proto._setGravity = function _setGravity() {
5169
5199
  this._nativePhysicsManager.setGravity(this._gravity);
5170
5200
  };
5171
- _createClass$2(PhysicsManager, [
5201
+ _create_class$2(PhysicsManager, [
5172
5202
  {
5173
5203
  key: "gravity",
5174
5204
  get: /**
@@ -5224,7 +5254,7 @@ SystemInfo._initialize();
5224
5254
  */ _proto._destroy = function _destroy() {
5225
5255
  this._nativeMaterial.destroy();
5226
5256
  };
5227
- _createClass$2(PhysicsMaterial, [
5257
+ _create_class$2(PhysicsMaterial, [
5228
5258
  {
5229
5259
  key: "bounciness",
5230
5260
  get: /**
@@ -5302,8 +5332,8 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5302
5332
  var Collider = function Collider(entity) {
5303
5333
  var _this;
5304
5334
  _this = Component.call(this, entity) || this;
5305
- _this._shapes = [];
5306
5335
  /** @internal */ _this._index = -1;
5336
+ _this._shapes = [];
5307
5337
  _this._updateFlag = _this.entity.transform.registerWorldChangeFlag();
5308
5338
  return _this;
5309
5339
  };
@@ -5383,7 +5413,7 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5383
5413
  this.clearShapes();
5384
5414
  this._nativeCollider.destroy();
5385
5415
  };
5386
- _createClass$2(Collider, [
5416
+ _create_class$2(Collider, [
5387
5417
  {
5388
5418
  key: "shapes",
5389
5419
  get: /**
@@ -5420,7 +5450,7 @@ exports.Collider = __decorate$1([
5420
5450
  _this._upDirection = new miniprogram$7.Vector3(0, 1, 0);
5421
5451
  _this._slopeLimit = 0.707;
5422
5452
  _this._nativeCollider = PhysicsManager._nativePhysics.createCharacterController();
5423
- _this._setUpDirection = _this._setUpDirection.bind(_assertThisInitialized(_this));
5453
+ _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
5424
5454
  //@ts-ignore
5425
5455
  _this._upDirection._onValueChanged = _this._setUpDirection;
5426
5456
  return _this;
@@ -5494,7 +5524,7 @@ exports.Collider = __decorate$1([
5494
5524
  _proto._setUpDirection = function _setUpDirection() {
5495
5525
  this._nativeCollider.setUpDirection(this._upDirection);
5496
5526
  };
5497
- _createClass$2(CharacterController, [
5527
+ _create_class$2(CharacterController, [
5498
5528
  {
5499
5529
  key: "stepOffset",
5500
5530
  get: /**
@@ -5588,7 +5618,7 @@ exports.Collider = __decorate$1([
5588
5618
  _proto._setRotation = function _setRotation() {
5589
5619
  this._nativeShape.setRotation(this._rotation);
5590
5620
  };
5591
- _createClass$2(ColliderShape, [
5621
+ _create_class$2(ColliderShape, [
5592
5622
  {
5593
5623
  key: "collider",
5594
5624
  get: /**
@@ -5676,7 +5706,9 @@ exports.Collider = __decorate$1([
5676
5706
  ]);
5677
5707
  return ColliderShape;
5678
5708
  }();
5679
- ColliderShape._idGenerator = 0;
5709
+ (function() {
5710
+ ColliderShape._idGenerator = 0;
5711
+ })();
5680
5712
  /**
5681
5713
  * Physical collider shape for box.
5682
5714
  */ var BoxColliderShape = /*#__PURE__*/ function(ColliderShape) {
@@ -5685,7 +5717,7 @@ ColliderShape._idGenerator = 0;
5685
5717
  _this = ColliderShape.call(this) || this;
5686
5718
  _this._size = new miniprogram$7.Vector3(1, 1, 1);
5687
5719
  _this._nativeShape = PhysicsManager._nativePhysics.createBoxColliderShape(_this._id, _this._size, _this._material._nativeMaterial);
5688
- _this._setSize = _this._setSize.bind(_assertThisInitialized(_this));
5720
+ _this._setSize = _this._setSize.bind(_assert_this_initialized(_this));
5689
5721
  //@ts-ignore
5690
5722
  _this._size._onValueChanged = _this._setSize;
5691
5723
  return _this;
@@ -5695,7 +5727,7 @@ ColliderShape._idGenerator = 0;
5695
5727
  _proto._setSize = function _setSize() {
5696
5728
  this._nativeShape.setSize(this._size);
5697
5729
  };
5698
- _createClass$2(BoxColliderShape, [
5730
+ _create_class$2(BoxColliderShape, [
5699
5731
  {
5700
5732
  key: "size",
5701
5733
  get: /**
@@ -5723,7 +5755,7 @@ ColliderShape._idGenerator = 0;
5723
5755
  return _this;
5724
5756
  };
5725
5757
  _inherits$2(SphereColliderShape, ColliderShape);
5726
- _createClass$2(SphereColliderShape, [
5758
+ _create_class$2(SphereColliderShape, [
5727
5759
  {
5728
5760
  key: "radius",
5729
5761
  get: /**
@@ -5774,7 +5806,7 @@ ColliderShape._idGenerator = 0;
5774
5806
  return _this;
5775
5807
  };
5776
5808
  _inherits$2(CapsuleColliderShape, ColliderShape);
5777
- _createClass$2(CapsuleColliderShape, [
5809
+ _create_class$2(CapsuleColliderShape, [
5778
5810
  {
5779
5811
  key: "radius",
5780
5812
  get: /**
@@ -5832,7 +5864,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
5832
5864
  return _this;
5833
5865
  };
5834
5866
  _inherits$2(Joint, Component);
5835
- _createClass$2(Joint, [
5867
+ _create_class$2(Joint, [
5836
5868
  {
5837
5869
  key: "connectedCollider",
5838
5870
  get: /**
@@ -6009,7 +6041,7 @@ exports.Joint = __decorate$1([
6009
6041
  collider.collider = this.entity.getComponent(exports.Collider);
6010
6042
  this._nativeJoint = PhysicsManager._nativePhysics.createHingeJoint(collider.collider._nativeCollider);
6011
6043
  };
6012
- _createClass$2(HingeJoint, [
6044
+ _create_class$2(HingeJoint, [
6013
6045
  {
6014
6046
  key: "axis",
6015
6047
  get: /**
@@ -6160,7 +6192,7 @@ exports.Joint = __decorate$1([
6160
6192
  collider.collider = this.entity.getComponent(exports.Collider);
6161
6193
  this._nativeJoint = PhysicsManager._nativePhysics.createSpringJoint(collider.collider._nativeCollider);
6162
6194
  };
6163
- _createClass$2(SpringJoint, [
6195
+ _create_class$2(SpringJoint, [
6164
6196
  {
6165
6197
  key: "swingOffset",
6166
6198
  get: /**
@@ -6310,10 +6342,10 @@ exports.Joint = __decorate$1([
6310
6342
  _this._sleepThreshold = 5e-3;
6311
6343
  var transform = _this.entity.transform;
6312
6344
  _this._nativeCollider = PhysicsManager._nativePhysics.createDynamicCollider(transform.worldPosition, transform.worldRotationQuaternion);
6313
- _this._setLinearVelocity = _this._setLinearVelocity.bind(_assertThisInitialized(_this));
6314
- _this._setAngularVelocity = _this._setAngularVelocity.bind(_assertThisInitialized(_this));
6315
- _this._setCenterOfMass = _this._setCenterOfMass.bind(_assertThisInitialized(_this));
6316
- _this._setInertiaTensor = _this._setInertiaTensor.bind(_assertThisInitialized(_this));
6345
+ _this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized(_this));
6346
+ _this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized(_this));
6347
+ _this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized(_this));
6348
+ _this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized(_this));
6317
6349
  //@ts-ignore
6318
6350
  _this._linearVelocity._onValueChanged = _this._setLinearVelocity;
6319
6351
  //@ts-ignore
@@ -6372,7 +6404,7 @@ exports.Joint = __decorate$1([
6372
6404
  _proto._setInertiaTensor = function _setInertiaTensor() {
6373
6405
  this._nativeCollider.setInertiaTensor(this._inertiaTensor);
6374
6406
  };
6375
- _createClass$2(DynamicCollider, [
6407
+ _create_class$2(DynamicCollider, [
6376
6408
  {
6377
6409
  key: "linearDamping",
6378
6410
  get: /**
@@ -6914,9 +6946,15 @@ exports.DynamicColliderConstraints = void 0;
6914
6946
  };
6915
6947
  return PointerManager;
6916
6948
  }();
6917
- PointerManager._tempRay = new miniprogram$7.Ray();
6918
- PointerManager._tempPoint = new miniprogram$7.Vector2();
6919
- PointerManager._tempHitResult = new HitResult();
6949
+ (function() {
6950
+ PointerManager._tempRay = new miniprogram$7.Ray();
6951
+ })();
6952
+ (function() {
6953
+ PointerManager._tempPoint = new miniprogram$7.Vector2();
6954
+ })();
6955
+ (function() {
6956
+ PointerManager._tempHitResult = new HitResult();
6957
+ })();
6920
6958
  /**
6921
6959
  * Wheel Manager.
6922
6960
  * @internal
@@ -7120,7 +7158,7 @@ PointerManager._tempHitResult = new HitResult();
7120
7158
  this._pointerManager._onFocus();
7121
7159
  this._keyboardManager._onFocus();
7122
7160
  };
7123
- _createClass$2(InputManager, [
7161
+ _create_class$2(InputManager, [
7124
7162
  {
7125
7163
  key: "pointers",
7126
7164
  get: /**
@@ -7295,8 +7333,12 @@ PointerManager._tempHitResult = new HitResult();
7295
7333
  }
7296
7334
  this._nameId = nameID;
7297
7335
  };
7298
- /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7299
- ShaderMacro._macroNameCounter = 0;
7336
+ (function() {
7337
+ /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7338
+ })();
7339
+ (function() {
7340
+ ShaderMacro._macroNameCounter = 0;
7341
+ })();
7300
7342
  /**
7301
7343
  * Shader macro collection.
7302
7344
  * @internal
@@ -7446,22 +7488,15 @@ ShaderMacro._macroNameCounter = 0;
7446
7488
  };
7447
7489
  return ShaderMacroCollection;
7448
7490
  }();
7449
- function extends_$2() {
7450
- extends_$2 = Object.assign || function(target) {
7491
+ function _extends$2() {
7492
+ _extends$2 = Object.assign || function assign(target) {
7451
7493
  for(var i = 1; i < arguments.length; i++){
7452
7494
  var source = arguments[i];
7453
- for(var key in source){
7454
- if (Object.prototype.hasOwnProperty.call(source, key)) {
7455
- target[key] = source[key];
7456
- }
7457
- }
7495
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
7458
7496
  }
7459
7497
  return target;
7460
7498
  };
7461
- return extends_$2.apply(this, arguments);
7462
- }
7463
- function _extends$2() {
7464
- return extends_$2.apply(this, arguments);
7499
+ return _extends$2.apply(this, arguments);
7465
7500
  }
7466
7501
  var camera_declare = "#define GLSLIFY 1\nuniform vec3 u_cameraPos;"; // eslint-disable-line
7467
7502
  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
@@ -8240,7 +8275,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8240
8275
  return prefix + line;
8241
8276
  }).join("\n");
8242
8277
  };
8243
- _createClass$2(ShaderProgram, [
8278
+ _create_class$2(ShaderProgram, [
8244
8279
  {
8245
8280
  key: "isValid",
8246
8281
  get: /**
@@ -8252,7 +8287,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
8252
8287
  ]);
8253
8288
  return ShaderProgram;
8254
8289
  }();
8255
- ShaderProgram._counter = 0;
8290
+ (function() {
8291
+ ShaderProgram._counter = 0;
8292
+ })();
8256
8293
  /**
8257
8294
  * Shader pass containing vertex and fragment source.
8258
8295
  */ var ShaderPass = /*#__PURE__*/ function() {
@@ -8296,7 +8333,9 @@ ShaderProgram._counter = 0;
8296
8333
  };
8297
8334
  return ShaderPass;
8298
8335
  }();
8299
- ShaderPass._shaderPassCounter = 0;
8336
+ (function() {
8337
+ ShaderPass._shaderPassCounter = 0;
8338
+ })();
8300
8339
  /**
8301
8340
  * Shader property.
8302
8341
  */ var ShaderProperty = /*#__PURE__*/ function() {
@@ -8304,7 +8343,7 @@ ShaderPass._shaderPassCounter = 0;
8304
8343
  this.name = name;
8305
8344
  this._uniqueId = ShaderProperty._propertyNameCounter++;
8306
8345
  }
8307
- _createClass$2(ShaderProperty, [
8346
+ _create_class$2(ShaderProperty, [
8308
8347
  {
8309
8348
  key: "type",
8310
8349
  get: /**
@@ -8316,7 +8355,9 @@ ShaderPass._shaderPassCounter = 0;
8316
8355
  ]);
8317
8356
  return ShaderProperty;
8318
8357
  }();
8319
- ShaderProperty._propertyNameCounter = 0;
8358
+ (function() {
8359
+ ShaderProperty._propertyNameCounter = 0;
8360
+ })();
8320
8361
  /**
8321
8362
  * Shader for rendering.
8322
8363
  */ var Shader = /*#__PURE__*/ function() {
@@ -8428,7 +8469,7 @@ ShaderProperty._propertyNameCounter = 0;
8428
8469
  }
8429
8470
  }
8430
8471
  };
8431
- _createClass$2(Shader, [
8472
+ _create_class$2(Shader, [
8432
8473
  {
8433
8474
  key: "passes",
8434
8475
  get: /**
@@ -8440,18 +8481,34 @@ ShaderProperty._propertyNameCounter = 0;
8440
8481
  ]);
8441
8482
  return Shader;
8442
8483
  }();
8443
- /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8444
- /** @internal */ Shader._shaderExtension = [
8445
- "GL_EXT_shader_texture_lod",
8446
- "GL_OES_standard_derivatives",
8447
- "GL_EXT_draw_buffers"
8448
- ];
8449
- /** @internal */ Shader._propertyIdMap = Object.create(null);
8450
- Shader._shaderMap = Object.create(null);
8451
- Shader._propertyNameMap = Object.create(null);
8452
- Shader._macroMaskMap = [];
8453
- Shader._macroCounter = 0;
8454
- Shader._macroMap = Object.create(null);
8484
+ (function() {
8485
+ /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8486
+ })();
8487
+ (function() {
8488
+ /** @internal */ Shader._shaderExtension = [
8489
+ "GL_EXT_shader_texture_lod",
8490
+ "GL_OES_standard_derivatives",
8491
+ "GL_EXT_draw_buffers"
8492
+ ];
8493
+ })();
8494
+ (function() {
8495
+ /** @internal */ Shader._propertyIdMap = Object.create(null);
8496
+ })();
8497
+ (function() {
8498
+ Shader._shaderMap = Object.create(null);
8499
+ })();
8500
+ (function() {
8501
+ Shader._propertyNameMap = Object.create(null);
8502
+ })();
8503
+ (function() {
8504
+ Shader._macroMaskMap = [];
8505
+ })();
8506
+ (function() {
8507
+ Shader._macroCounter = 0;
8508
+ })();
8509
+ (function() {
8510
+ Shader._macroMap = Object.create(null);
8511
+ })();
8455
8512
  /**
8456
8513
  * Shader data collection,Correspondence includes shader properties data and macros data.
8457
8514
  */ var ShaderData = /*#__PURE__*/ function() {
@@ -8706,9 +8763,9 @@ Shader._macroMap = Object.create(null);
8706
8763
  /** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
8707
8764
  /** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
8708
8765
  /** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
8766
+ /** @internal */ _this._lightIndex = -1;
8709
8767
  _this._color = new miniprogram$7.Color(1, 1, 1, 1);
8710
8768
  _this._lightColor = new miniprogram$7.Color();
8711
- /** @internal */ _this._lightIndex = -1;
8712
8769
  return _this;
8713
8770
  };
8714
8771
  _inherits$2(Light, Component);
@@ -8720,7 +8777,7 @@ Shader._macroMap = Object.create(null);
8720
8777
  this._lightColor.a = this.color.a * this.intensity;
8721
8778
  return this._lightColor;
8722
8779
  };
8723
- _createClass$2(Light, [
8780
+ _create_class$2(Light, [
8724
8781
  {
8725
8782
  key: "color",
8726
8783
  get: /**
@@ -8757,9 +8814,11 @@ Shader._macroMap = Object.create(null);
8757
8814
  ]);
8758
8815
  return Light;
8759
8816
  }(Component);
8760
- /**
8817
+ (function() {
8818
+ /**
8761
8819
  * Each type of light source is at most 10, beyond which it will not take effect.
8762
8820
  * */ Light._maxLight = 10;
8821
+ })();
8763
8822
  __decorate$1([
8764
8823
  ignoreClone
8765
8824
  ], Light.prototype, "_lightIndex", void 0);
@@ -8816,7 +8875,7 @@ __decorate$1([
8816
8875
  shaderData.setFloatArray(DirectLight._colorProperty, data.color);
8817
8876
  shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
8818
8877
  };
8819
- _createClass$2(DirectLight, [
8878
+ _create_class$2(DirectLight, [
8820
8879
  {
8821
8880
  key: "direction",
8822
8881
  get: /**
@@ -8847,14 +8906,22 @@ __decorate$1([
8847
8906
  ]);
8848
8907
  return DirectLight;
8849
8908
  }(Light);
8850
- DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8851
- DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8852
- DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8853
- DirectLight._combinedData = {
8854
- cullingMask: new Int32Array(Light._maxLight * 2),
8855
- color: new Float32Array(Light._maxLight * 3),
8856
- direction: new Float32Array(Light._maxLight * 3)
8857
- };
8909
+ (function() {
8910
+ DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8911
+ })();
8912
+ (function() {
8913
+ DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8914
+ })();
8915
+ (function() {
8916
+ DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8917
+ })();
8918
+ (function() {
8919
+ DirectLight._combinedData = {
8920
+ cullingMask: new Int32Array(Light._maxLight * 2),
8921
+ color: new Float32Array(Light._maxLight * 3),
8922
+ direction: new Float32Array(Light._maxLight * 3)
8923
+ };
8924
+ })();
8858
8925
  /**
8859
8926
  * Point light.
8860
8927
  */ var PointLight = /*#__PURE__*/ function(Light) {
@@ -8910,7 +8977,7 @@ DirectLight._combinedData = {
8910
8977
  shaderData.setFloatArray(PointLight._positionProperty, data.position);
8911
8978
  shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
8912
8979
  };
8913
- _createClass$2(PointLight, [
8980
+ _create_class$2(PointLight, [
8914
8981
  {
8915
8982
  key: "position",
8916
8983
  get: /**
@@ -8931,16 +8998,26 @@ DirectLight._combinedData = {
8931
8998
  ]);
8932
8999
  return PointLight;
8933
9000
  }(Light);
8934
- PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
8935
- PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
8936
- PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
8937
- PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
8938
- PointLight._combinedData = {
8939
- cullingMask: new Int32Array(Light._maxLight * 2),
8940
- color: new Float32Array(Light._maxLight * 3),
8941
- position: new Float32Array(Light._maxLight * 3),
8942
- distance: new Float32Array(Light._maxLight)
8943
- };
9001
+ (function() {
9002
+ PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
9003
+ })();
9004
+ (function() {
9005
+ PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
9006
+ })();
9007
+ (function() {
9008
+ PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9009
+ })();
9010
+ (function() {
9011
+ PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9012
+ })();
9013
+ (function() {
9014
+ PointLight._combinedData = {
9015
+ cullingMask: new Int32Array(Light._maxLight * 2),
9016
+ color: new Float32Array(Light._maxLight * 3),
9017
+ position: new Float32Array(Light._maxLight * 3),
9018
+ distance: new Float32Array(Light._maxLight)
9019
+ };
9020
+ })();
8944
9021
  /**
8945
9022
  * Spot light.
8946
9023
  */ var SpotLight = /*#__PURE__*/ function(Light) {
@@ -9013,7 +9090,7 @@ PointLight._combinedData = {
9013
9090
  shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
9014
9091
  shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
9015
9092
  };
9016
- _createClass$2(SpotLight, [
9093
+ _create_class$2(SpotLight, [
9017
9094
  {
9018
9095
  key: "position",
9019
9096
  get: /**
@@ -9055,22 +9132,38 @@ PointLight._combinedData = {
9055
9132
  ]);
9056
9133
  return SpotLight;
9057
9134
  }(Light);
9058
- SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9059
- SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9060
- SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9061
- SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9062
- SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9063
- SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9064
- SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9065
- SpotLight._combinedData = {
9066
- cullingMask: new Int32Array(Light._maxLight * 2),
9067
- color: new Float32Array(Light._maxLight * 3),
9068
- position: new Float32Array(Light._maxLight * 3),
9069
- direction: new Float32Array(Light._maxLight * 3),
9070
- distance: new Float32Array(Light._maxLight),
9071
- angleCos: new Float32Array(Light._maxLight),
9072
- penumbraCos: new Float32Array(Light._maxLight)
9073
- };
9135
+ (function() {
9136
+ SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9137
+ })();
9138
+ (function() {
9139
+ SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9140
+ })();
9141
+ (function() {
9142
+ SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9143
+ })();
9144
+ (function() {
9145
+ SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9146
+ })();
9147
+ (function() {
9148
+ SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9149
+ })();
9150
+ (function() {
9151
+ SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9152
+ })();
9153
+ (function() {
9154
+ SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9155
+ })();
9156
+ (function() {
9157
+ SpotLight._combinedData = {
9158
+ cullingMask: new Int32Array(Light._maxLight * 2),
9159
+ color: new Float32Array(Light._maxLight * 3),
9160
+ position: new Float32Array(Light._maxLight * 3),
9161
+ direction: new Float32Array(Light._maxLight * 3),
9162
+ distance: new Float32Array(Light._maxLight),
9163
+ angleCos: new Float32Array(Light._maxLight),
9164
+ penumbraCos: new Float32Array(Light._maxLight)
9165
+ };
9166
+ })();
9074
9167
  /**
9075
9168
  * Light manager.
9076
9169
  */ var LightManager = /*#__PURE__*/ function() {
@@ -9623,7 +9716,7 @@ SpotLight._combinedData = {
9623
9716
  /**
9624
9717
  * @override
9625
9718
  */ _proto._onDestroy = function _onDestroy() {};
9626
- _createClass$2(Material, [
9719
+ _create_class$2(Material, [
9627
9720
  {
9628
9721
  key: "shader",
9629
9722
  get: /**
@@ -9727,9 +9820,15 @@ var RenderElement = function RenderElement() {};
9727
9820
  };
9728
9821
  return RenderContext;
9729
9822
  }();
9730
- /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9731
- RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9732
- RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9823
+ (function() {
9824
+ /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9825
+ })();
9826
+ (function() {
9827
+ RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9828
+ })();
9829
+ (function() {
9830
+ RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9831
+ })();
9733
9832
  var SpriteElement = /*#__PURE__*/ function(RenderElement) {
9734
9833
  var SpriteElement = function SpriteElement() {
9735
9834
  var _this;
@@ -9779,7 +9878,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9779
9878
  var Renderer1 = function Renderer1(entity) {
9780
9879
  var _this;
9781
9880
  _this = Component.call(this, entity) || this;
9782
- /** Whether cast shadow. */ _this.castShadows = true;
9783
9881
  /** ShaderData related to renderer. */ _this.shaderData = new ShaderData(ShaderDataGroup.Renderer);
9784
9882
  /** @internal */ _this._onUpdateIndex = -1;
9785
9883
  /** @internal */ _this._rendererIndex = -1;
@@ -9796,11 +9894,12 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9796
9894
  _this._priority = 0;
9797
9895
  _this._receiveShadows = true;
9798
9896
  _this._rendererLayer = new miniprogram$7.Vector4();
9897
+ /** Whether cast shadow. */ _this.castShadows = true;
9799
9898
  var prototype = exports.Renderer.prototype;
9800
9899
  var shaderData = _this.shaderData;
9801
9900
  _this._overrideUpdate = _this.update !== prototype.update;
9802
9901
  shaderData._addRefCount(1);
9803
- _this._onTransformChanged = _this._onTransformChanged.bind(_assertThisInitialized(_this));
9902
+ _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
9804
9903
  _this._registerEntityTransformListener();
9805
9904
  shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
9806
9905
  shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
@@ -9986,7 +10085,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
9986
10085
  _proto._onTransformChanged = function _onTransformChanged(type) {
9987
10086
  this._dirtyUpdateFlag |= 0x1;
9988
10087
  };
9989
- _createClass$2(Renderer1, [
10088
+ _create_class$2(Renderer1, [
9990
10089
  {
9991
10090
  key: "isCulled",
9992
10091
  get: /**
@@ -10052,7 +10151,25 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10052
10151
  }
10053
10152
  ]);
10054
10153
  return Renderer1;
10055
- }(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);
10154
+ }(Component), function() {
10155
+ _Renderer._tempVector0 = new miniprogram$7.Vector3();
10156
+ }(), function() {
10157
+ _Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS");
10158
+ }(), function() {
10159
+ _Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat");
10160
+ }(), function() {
10161
+ _Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat");
10162
+ }(), function() {
10163
+ _Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat");
10164
+ }(), function() {
10165
+ _Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat");
10166
+ }(), function() {
10167
+ _Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat");
10168
+ }(), function() {
10169
+ _Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat");
10170
+ }(), function() {
10171
+ _Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
10172
+ }(), _Renderer);
10056
10173
  __decorate$1([
10057
10174
  deepClone
10058
10175
  ], exports.Renderer.prototype, "shaderData", void 0);
@@ -10179,14 +10296,18 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
10179
10296
  renderUVs[3].set(right, top);
10180
10297
  };
10181
10298
  return SimpleSpriteAssembler1;
10182
- }(), _SimpleSpriteAssembler._rectangleTriangles = [
10183
- 0,
10184
- 1,
10185
- 2,
10186
- 2,
10187
- 1,
10188
- 3
10189
- ], _SimpleSpriteAssembler._worldMatrix = new miniprogram$7.Matrix(), _SimpleSpriteAssembler);
10299
+ }(), function() {
10300
+ _SimpleSpriteAssembler._rectangleTriangles = [
10301
+ 0,
10302
+ 1,
10303
+ 2,
10304
+ 2,
10305
+ 1,
10306
+ 3
10307
+ ];
10308
+ }(), function() {
10309
+ _SimpleSpriteAssembler._worldMatrix = new miniprogram$7.Matrix();
10310
+ }(), _SimpleSpriteAssembler);
10190
10311
  SimpleSpriteAssembler = __decorate$1([
10191
10312
  StaticInterfaceImplement$1()
10192
10313
  ], SimpleSpriteAssembler);
@@ -10267,10 +10388,10 @@ SimpleSpriteAssembler = __decorate$1([
10267
10388
  _this._flipY = false;
10268
10389
  _this._alphaCutoff = 0.5;
10269
10390
  _this._renderData = new RenderData2D(4, [], []);
10270
- SimpleSpriteAssembler.resetData(_assertThisInitialized(_this));
10391
+ SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
10271
10392
  _this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
10272
10393
  _this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
10273
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
10394
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
10274
10395
  return _this;
10275
10396
  }
10276
10397
  var _proto = SpriteMask.prototype;
@@ -10338,7 +10459,7 @@ SimpleSpriteAssembler = __decorate$1([
10338
10459
  break;
10339
10460
  }
10340
10461
  };
10341
- _createClass$2(SpriteMask, [
10462
+ _create_class$2(SpriteMask, [
10342
10463
  {
10343
10464
  key: "width",
10344
10465
  get: /**
@@ -10440,8 +10561,12 @@ SimpleSpriteAssembler = __decorate$1([
10440
10561
  ]);
10441
10562
  return SpriteMask;
10442
10563
  }(exports.Renderer);
10443
- /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10444
- /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10564
+ (function() {
10565
+ /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10566
+ })();
10567
+ (function() {
10568
+ /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10569
+ })();
10445
10570
  __decorate$1([
10446
10571
  assignmentClone
10447
10572
  ], SpriteMask.prototype, "influenceLayers", void 0);
@@ -10642,7 +10767,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10642
10767
  this._glElementInfo = BufferUtil._getElementInfo(this.format);
10643
10768
  this._instanceStepRate = Math.floor(instanceStepRate);
10644
10769
  };
10645
- _createClass$2(VertexElement, [
10770
+ _create_class$2(VertexElement, [
10646
10771
  {
10647
10772
  key: "semantic",
10648
10773
  get: /**
@@ -10799,7 +10924,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10799
10924
  gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
10800
10925
  this._byteLength = dataLength;
10801
10926
  };
10802
- _createClass$2(Buffer, [
10927
+ _create_class$2(Buffer, [
10803
10928
  {
10804
10929
  key: "type",
10805
10930
  get: /**
@@ -10846,7 +10971,7 @@ var BufferUtil = /*#__PURE__*/ function() {
10846
10971
  this._buffer = buffer;
10847
10972
  this._format = format;
10848
10973
  };
10849
- _createClass$2(IndexBufferBinding, [
10974
+ _create_class$2(IndexBufferBinding, [
10850
10975
  {
10851
10976
  key: "buffer",
10852
10977
  get: /**
@@ -10892,8 +11017,8 @@ var BufferUtil = /*#__PURE__*/ function() {
10892
11017
  _this._bounds = new miniprogram$7.BoundingBox();
10893
11018
  _this._subMeshes = [];
10894
11019
  _this.name = name;
10895
- _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assertThisInitialized(_this));
10896
- _this._onBoundsChanged = _this._onBoundsChanged.bind(_assertThisInitialized(_this));
11020
+ _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized(_this));
11021
+ _this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized(_this));
10897
11022
  var bounds = _this._bounds;
10898
11023
  // @ts-ignore
10899
11024
  bounds.min._onValueChanged = _this._onBoundsChanged;
@@ -11011,7 +11136,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11011
11136
  _proto._onBoundsChanged = function _onBoundsChanged() {
11012
11137
  this._updateFlagManager.dispatch(0x1);
11013
11138
  };
11014
- _createClass$2(Mesh, [
11139
+ _create_class$2(Mesh, [
11015
11140
  {
11016
11141
  key: "bounds",
11017
11142
  get: /**
@@ -11056,7 +11181,7 @@ var MeshModifyFlags;
11056
11181
  this._buffer = buffer;
11057
11182
  this._stride = stride;
11058
11183
  };
11059
- _createClass$2(VertexBufferBinding, [
11184
+ _create_class$2(VertexBufferBinding, [
11060
11185
  {
11061
11186
  key: "buffer",
11062
11187
  get: /**
@@ -11501,13 +11626,27 @@ var MeshModifyFlags;
11501
11626
  };
11502
11627
  return BlendShapeManager;
11503
11628
  }();
11504
- BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11505
- BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11506
- BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11507
- BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11508
- BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11509
- BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11510
- BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11629
+ (function() {
11630
+ BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11631
+ })();
11632
+ (function() {
11633
+ BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11634
+ })();
11635
+ (function() {
11636
+ BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11637
+ })();
11638
+ (function() {
11639
+ BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11640
+ })();
11641
+ (function() {
11642
+ BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11643
+ })();
11644
+ (function() {
11645
+ BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11646
+ })();
11647
+ (function() {
11648
+ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11649
+ })();
11511
11650
  /**
11512
11651
  * Vertex attribute types of a vertex in a ModelMesh.
11513
11652
  */ var VertexAttribute;
@@ -11561,7 +11700,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
11561
11700
  _this._customVertexElements = [];
11562
11701
  _this._vertexCountChanged = false;
11563
11702
  _this.name = name;
11564
- _this._blendShapeManager = new BlendShapeManager(engine, _assertThisInitialized(_this));
11703
+ _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
11565
11704
  return _this;
11566
11705
  };
11567
11706
  _inherits$2(ModelMesh, Mesh);
@@ -12512,7 +12651,7 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12512
12651
  this._uv7 = null;
12513
12652
  this._blendShapeManager._releaseMemoryCache();
12514
12653
  };
12515
- _createClass$2(ModelMesh, [
12654
+ _create_class$2(ModelMesh, [
12516
12655
  {
12517
12656
  key: "accessible",
12518
12657
  get: /**
@@ -12580,11 +12719,21 @@ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_b
12580
12719
  ]);
12581
12720
  return ModelMesh;
12582
12721
  }(Mesh);
12583
- ModelMesh._tempVec0 = new miniprogram$7.Vector3();
12584
- ModelMesh._tempVec1 = new miniprogram$7.Vector3();
12585
- ModelMesh._tempVec2 = new miniprogram$7.Vector3();
12586
- ModelMesh._tempVec3 = new miniprogram$7.Vector3();
12587
- ModelMesh._tempVec4 = new miniprogram$7.Vector3();
12722
+ (function() {
12723
+ ModelMesh._tempVec0 = new miniprogram$7.Vector3();
12724
+ })();
12725
+ (function() {
12726
+ ModelMesh._tempVec1 = new miniprogram$7.Vector3();
12727
+ })();
12728
+ (function() {
12729
+ ModelMesh._tempVec2 = new miniprogram$7.Vector3();
12730
+ })();
12731
+ (function() {
12732
+ ModelMesh._tempVec3 = new miniprogram$7.Vector3();
12733
+ })();
12734
+ (function() {
12735
+ ModelMesh._tempVec4 = new miniprogram$7.Vector3();
12736
+ })();
12588
12737
  var VertexChangedFlags;
12589
12738
  (function(VertexChangedFlags) {
12590
12739
  VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
@@ -12624,7 +12773,7 @@ var VertexChangedFlags;
12624
12773
  var MeshRenderer = function MeshRenderer(entity) {
12625
12774
  var _this;
12626
12775
  _this = Renderer.call(this, entity) || this;
12627
- _this._onMeshChanged = _this._onMeshChanged.bind(_assertThisInitialized(_this));
12776
+ _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
12628
12777
  return _this;
12629
12778
  };
12630
12779
  _inherits$2(MeshRenderer, Renderer);
@@ -12728,7 +12877,7 @@ var VertexChangedFlags;
12728
12877
  type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
12729
12878
  type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
12730
12879
  };
12731
- _createClass$2(MeshRenderer, [
12880
+ _create_class$2(MeshRenderer, [
12732
12881
  {
12733
12882
  key: "mesh",
12734
12883
  get: /**
@@ -12745,11 +12894,21 @@ var VertexChangedFlags;
12745
12894
  ]);
12746
12895
  return MeshRenderer;
12747
12896
  }(exports.Renderer);
12748
- MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
12749
- MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
12750
- MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
12751
- MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
12752
- MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
12897
+ (function() {
12898
+ MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
12899
+ })();
12900
+ (function() {
12901
+ MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
12902
+ })();
12903
+ (function() {
12904
+ MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
12905
+ })();
12906
+ (function() {
12907
+ MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
12908
+ })();
12909
+ (function() {
12910
+ MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
12911
+ })();
12753
12912
  __decorate$1([
12754
12913
  ignoreClone
12755
12914
  ], MeshRenderer.prototype, "_mesh", void 0);
@@ -12848,7 +13007,7 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
12848
13007
  // 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.
12849
13008
  maxVertexUniformVectors = Math.min(maxVertexUniformVectors, 256);
12850
13009
  _this._maxVertexUniformVectors = maxVertexUniformVectors;
12851
- _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assertThisInitialized(_this));
13010
+ _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
12852
13011
  var localBounds = _this._localBounds;
12853
13012
  // @ts-ignore
12854
13013
  localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
@@ -13047,7 +13206,7 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
13047
13206
  _proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
13048
13207
  this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
13049
13208
  };
13050
- _createClass$2(SkinnedMeshRenderer, [
13209
+ _create_class$2(SkinnedMeshRenderer, [
13051
13210
  {
13052
13211
  key: "blendShapeWeights",
13053
13212
  get: /**
@@ -13112,10 +13271,18 @@ var rePropName = RegExp("[^.[\\]]+" + "|" + // Or match property names within br
13112
13271
  ]);
13113
13272
  return SkinnedMeshRenderer;
13114
13273
  }(MeshRenderer);
13115
- SkinnedMeshRenderer._tempMatrix = new miniprogram$7.Matrix();
13116
- SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13117
- SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13118
- SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13274
+ (function() {
13275
+ SkinnedMeshRenderer._tempMatrix = new miniprogram$7.Matrix();
13276
+ })();
13277
+ (function() {
13278
+ SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13279
+ })();
13280
+ (function() {
13281
+ SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13282
+ })();
13283
+ (function() {
13284
+ SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13285
+ })();
13119
13286
  __decorate$1([
13120
13287
  ignoreClone
13121
13288
  ], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
@@ -13874,7 +14041,7 @@ __decorate$1([
13874
14041
  }
13875
14042
  this._setIndexBufferBinding(binding);
13876
14043
  };
13877
- _createClass$2(BufferMesh, [
14044
+ _create_class$2(BufferMesh, [
13878
14045
  {
13879
14046
  key: "instanceCount",
13880
14047
  get: /**
@@ -13986,7 +14153,7 @@ __decorate$1([
13986
14153
  this._layoutChangeManager.dispatch(0, this);
13987
14154
  }
13988
14155
  };
13989
- _createClass$2(BlendShape, [
14156
+ _create_class$2(BlendShape, [
13990
14157
  {
13991
14158
  key: "frames",
13992
14159
  get: /**
@@ -14143,8 +14310,12 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
14143
14310
  };
14144
14311
  return Basic2DBatcher;
14145
14312
  }();
14146
- /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14147
- Basic2DBatcher._canUploadSameBuffer = true;
14313
+ (function() {
14314
+ /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14315
+ })();
14316
+ (function() {
14317
+ Basic2DBatcher._canUploadSameBuffer = true;
14318
+ })();
14148
14319
  var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
14149
14320
  var SpriteMaskBatcher = function SpriteMaskBatcher() {
14150
14321
  return Basic2DBatcher.apply(this, arguments);
@@ -14353,9 +14524,15 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14353
14524
  };
14354
14525
  return Sky;
14355
14526
  }();
14356
- Sky._epsilon = 1e-6;
14357
- Sky._viewProjMatrix = new miniprogram$7.Matrix();
14358
- Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14527
+ (function() {
14528
+ Sky._epsilon = 1e-6;
14529
+ })();
14530
+ (function() {
14531
+ Sky._viewProjMatrix = new miniprogram$7.Matrix();
14532
+ })();
14533
+ (function() {
14534
+ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14535
+ })();
14359
14536
  /**
14360
14537
  * Background of scene.
14361
14538
  */ var Background = /*#__PURE__*/ function() {
@@ -14436,7 +14613,7 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
14436
14613
  mesh.addSubMesh(0, indices.length);
14437
14614
  return mesh;
14438
14615
  };
14439
- _createClass$2(Background, [
14616
+ _create_class$2(Background, [
14440
14617
  {
14441
14618
  key: "texture",
14442
14619
  get: /**
@@ -14601,7 +14778,7 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
14601
14778
  out[25] = src[25] * 0.429042;
14602
14779
  out[26] = src[26] * 0.429042;
14603
14780
  };
14604
- _createClass$2(AmbientLight, [
14781
+ _create_class$2(AmbientLight, [
14605
14782
  {
14606
14783
  key: "specularTextureDecodeRGBM",
14607
14784
  get: /**
@@ -14712,15 +14889,33 @@ Sky._projectionMatrix = new miniprogram$7.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, S
14712
14889
  ]);
14713
14890
  return AmbientLight;
14714
14891
  }();
14715
- AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
14716
- AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
14717
- AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
14718
- AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
14719
- AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
14720
- AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
14721
- AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
14722
- AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
14723
- AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
14892
+ (function() {
14893
+ AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
14894
+ })();
14895
+ (function() {
14896
+ AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
14897
+ })();
14898
+ (function() {
14899
+ AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
14900
+ })();
14901
+ (function() {
14902
+ AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
14903
+ })();
14904
+ (function() {
14905
+ AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
14906
+ })();
14907
+ (function() {
14908
+ AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
14909
+ })();
14910
+ (function() {
14911
+ AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
14912
+ })();
14913
+ (function() {
14914
+ AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
14915
+ })();
14916
+ (function() {
14917
+ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
14918
+ })();
14724
14919
  /**
14725
14920
  * Scene.
14726
14921
  */ var Scene = /*#__PURE__*/ function(EngineObject) {
@@ -14750,7 +14945,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
14750
14945
  var shaderData = _this.shaderData;
14751
14946
  shaderData._addRefCount(1);
14752
14947
  _this.ambientLight = new AmbientLight();
14753
- engine.sceneManager._allScenes.push(_assertThisInitialized(_this));
14948
+ engine.sceneManager._allScenes.push(_assert_this_initialized(_this));
14754
14949
  shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
14755
14950
  shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
14756
14951
  shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
@@ -14957,7 +15152,7 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
14957
15152
  this._fogParams.z = density / Math.LN2;
14958
15153
  this._fogParams.w = density / Math.sqrt(Math.LN2);
14959
15154
  };
14960
- _createClass$2(Scene, [
15155
+ _create_class$2(Scene, [
14961
15156
  {
14962
15157
  key: "shadowCascades",
14963
15158
  get: /**
@@ -15085,8 +15280,12 @@ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapL
15085
15280
  ]);
15086
15281
  return Scene;
15087
15282
  }(EngineObject);
15088
- Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15089
- Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15283
+ (function() {
15284
+ Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15285
+ })();
15286
+ (function() {
15287
+ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15288
+ })();
15090
15289
  /**
15091
15290
  * Scene manager.
15092
15291
  */ var SceneManager = /*#__PURE__*/ function() {
@@ -15133,7 +15332,7 @@ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15133
15332
  }
15134
15333
  allScenes.length = 0;
15135
15334
  };
15136
- _createClass$2(SceneManager, [
15335
+ _create_class$2(SceneManager, [
15137
15336
  {
15138
15337
  key: "activeScene",
15139
15338
  get: /**
@@ -15282,8 +15481,8 @@ ShaderPool.init();
15282
15481
  /** @internal */ _this._canSpriteBatch = true;
15283
15482
  /** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
15284
15483
  _this._settings = {};
15285
- _this._resourceManager = new ResourceManager(_assertThisInitialized(_this));
15286
- _this._sceneManager = new SceneManager(_assertThisInitialized(_this));
15484
+ _this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
15485
+ _this._sceneManager = new SceneManager(_assert_this_initialized(_this));
15287
15486
  _this._vSyncCount = 1;
15288
15487
  _this._targetFrameRate = 60;
15289
15488
  _this._time = new Time();
@@ -15307,25 +15506,25 @@ ShaderPool.init();
15307
15506
  };
15308
15507
  _this._hardwareRenderer = hardwareRenderer;
15309
15508
  _this._hardwareRenderer.init(canvas);
15310
- _this.physicsManager = new PhysicsManager(_assertThisInitialized(_this));
15509
+ _this.physicsManager = new PhysicsManager(_assert_this_initialized(_this));
15311
15510
  _this._canvas = canvas;
15312
- _this._sceneManager.activeScene = new Scene(_assertThisInitialized(_this), "DefaultScene");
15313
- _this._spriteMaskManager = new SpriteMaskManager(_assertThisInitialized(_this));
15511
+ _this._sceneManager.activeScene = new Scene(_assert_this_initialized(_this), "DefaultScene");
15512
+ _this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized(_this));
15314
15513
  _this._spriteDefaultMaterial = _this._createSpriteMaterial();
15315
15514
  _this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
15316
- _this._textDefaultFont = Font.createFromOS(_assertThisInitialized(_this), "Arial");
15515
+ _this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
15317
15516
  _this._textDefaultFont.isGCIgnored = false;
15318
- _this.inputManager = new InputManager(_assertThisInitialized(_this));
15517
+ _this.inputManager = new InputManager(_assert_this_initialized(_this));
15319
15518
  var magentaPixel = new Uint8Array([
15320
15519
  255,
15321
15520
  0,
15322
15521
  255,
15323
15522
  255
15324
15523
  ]);
15325
- var magentaTexture2D = new Texture2D(_assertThisInitialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15524
+ var magentaTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15326
15525
  magentaTexture2D.setPixelBuffer(magentaPixel);
15327
15526
  magentaTexture2D.isGCIgnored = true;
15328
- var magentaTextureCube = new TextureCube(_assertThisInitialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
15527
+ var magentaTextureCube = new TextureCube(_assert_this_initialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
15329
15528
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveX, magentaPixel);
15330
15529
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.NegativeX, magentaPixel);
15331
15530
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveY, magentaPixel);
@@ -15336,22 +15535,22 @@ ShaderPool.init();
15336
15535
  if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
15337
15536
  _this._macroCollection.enable(Engine._noDepthTextureMacro);
15338
15537
  } else {
15339
- var depthTexture2D = new Texture2D(_assertThisInitialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
15538
+ var depthTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
15340
15539
  depthTexture2D.isGCIgnored = true;
15341
15540
  _this._depthTexture2D = depthTexture2D;
15342
15541
  }
15343
15542
  _this._magentaTexture2D = magentaTexture2D;
15344
15543
  _this._magentaTextureCube = magentaTextureCube;
15345
15544
  if (hardwareRenderer.isWebGL2) {
15346
- var magentaTexture2DArray = new Texture2DArray(_assertThisInitialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
15545
+ var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
15347
15546
  magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
15348
15547
  magentaTexture2DArray.isGCIgnored = true;
15349
15548
  _this._magentaTexture2DArray = magentaTexture2DArray;
15350
15549
  }
15351
- var magentaMaterial = new Material(_assertThisInitialized(_this), Shader.find("unlit"));
15550
+ var magentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
15352
15551
  magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
15353
15552
  _this._magentaMaterial = magentaMaterial;
15354
- var backgroundTextureMaterial = new Material(_assertThisInitialized(_this), Shader.find("background-texture"));
15553
+ var backgroundTextureMaterial = new Material(_assert_this_initialized(_this), Shader.find("background-texture"));
15355
15554
  backgroundTextureMaterial.isGCIgnored = true;
15356
15555
  backgroundTextureMaterial.renderState.depthState.compareFunction = exports.CompareFunction.LessEqual;
15357
15556
  _this._backgroundTextureMaterial = backgroundTextureMaterial;
@@ -15522,7 +15721,7 @@ ShaderPool.init();
15522
15721
  material.isGCIgnored = true;
15523
15722
  return material;
15524
15723
  };
15525
- _createClass$2(Engine, [
15724
+ _create_class$2(Engine, [
15526
15725
  {
15527
15726
  key: "settings",
15528
15727
  get: /**
@@ -15610,9 +15809,15 @@ ShaderPool.init();
15610
15809
  ]);
15611
15810
  return Engine;
15612
15811
  }(EventDispatcher);
15613
- /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15614
- /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15615
- /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
15812
+ (function() {
15813
+ /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15814
+ })();
15815
+ (function() {
15816
+ /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15817
+ })();
15818
+ (function() {
15819
+ /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
15820
+ })();
15616
15821
  /**
15617
15822
  * Script class, used for logic writing.
15618
15823
  */ var Script = /*#__PURE__*/ function(Component) {
@@ -15925,7 +16130,9 @@ __decorate$1([
15925
16130
  };
15926
16131
  return SpriteBatcher;
15927
16132
  }(Basic2DBatcher);
15928
- SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16133
+ (function() {
16134
+ SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16135
+ })();
15929
16136
  /**
15930
16137
  * Render queue.
15931
16138
  */ var RenderQueue = /*#__PURE__*/ function() {
@@ -16419,227 +16626,247 @@ var /**
16419
16626
  };
16420
16627
  return ShadowUtils;
16421
16628
  }();
16422
- ShadowUtils._tempMatrix0 = new miniprogram$7.Matrix();
16423
- // prettier-ignore
16424
- /** @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);
16425
- ShadowUtils._frustumCorners = [
16426
- new miniprogram$7.Vector3(),
16427
- new miniprogram$7.Vector3(),
16428
- new miniprogram$7.Vector3(),
16429
- new miniprogram$7.Vector3(),
16430
- new miniprogram$7.Vector3(),
16431
- new miniprogram$7.Vector3(),
16432
- new miniprogram$7.Vector3(),
16433
- new miniprogram$7.Vector3()
16434
- ];
16435
- ShadowUtils._adjustNearPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
16436
- ShadowUtils._adjustFarPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
16437
- ShadowUtils._backPlaneFaces = new Array(5);
16438
- ShadowUtils._edgePlanePoint2 = new miniprogram$7.Vector3();
16439
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16440
- [
16441
- miniprogram$7.FrustumFace.Left,
16442
- miniprogram$7.FrustumFace.Right,
16443
- miniprogram$7.FrustumFace.Top,
16444
- miniprogram$7.FrustumFace.Bottom
16445
- ],
16446
- [
16447
- miniprogram$7.FrustumFace.Left,
16448
- miniprogram$7.FrustumFace.Right,
16449
- miniprogram$7.FrustumFace.Top,
16450
- miniprogram$7.FrustumFace.Bottom
16451
- ],
16452
- [
16453
- miniprogram$7.FrustumFace.Near,
16454
- miniprogram$7.FrustumFace.Far,
16455
- miniprogram$7.FrustumFace.Top,
16456
- miniprogram$7.FrustumFace.Bottom
16457
- ],
16458
- [
16459
- miniprogram$7.FrustumFace.Near,
16460
- miniprogram$7.FrustumFace.Far,
16461
- miniprogram$7.FrustumFace.Top,
16462
- miniprogram$7.FrustumFace.Bottom
16463
- ],
16464
- [
16465
- miniprogram$7.FrustumFace.Near,
16466
- miniprogram$7.FrustumFace.Far,
16467
- miniprogram$7.FrustumFace.Left,
16468
- miniprogram$7.FrustumFace.Right
16469
- ],
16470
- [
16471
- miniprogram$7.FrustumFace.Near,
16472
- miniprogram$7.FrustumFace.Far,
16473
- miniprogram$7.FrustumFace.Left,
16474
- miniprogram$7.FrustumFace.Right
16475
- ]
16476
- ];
16477
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16478
- [
16479
- // near, far, left, right, bottom, top
16480
- [
16481
- 8,
16482
- 8
16483
- ],
16484
- [
16485
- 8,
16486
- 8
16487
- ],
16488
- [
16489
- 4,
16490
- 5
16491
- ],
16492
- [
16493
- 6,
16494
- 7
16495
- ],
16496
- [
16497
- 7,
16498
- 4
16499
- ],
16500
- [
16501
- 5,
16502
- 6
16503
- ]
16504
- ],
16505
- [
16506
- // near, far, left, right, bottom, top
16507
- [
16508
- 8,
16509
- 8
16510
- ],
16511
- [
16512
- 8,
16513
- 8
16514
- ],
16515
- [
16516
- 1,
16517
- 0
16518
- ],
16519
- [
16520
- 3,
16521
- 2
16522
- ],
16523
- [
16524
- 0,
16525
- 3
16526
- ],
16527
- [
16528
- 2,
16529
- 1
16530
- ]
16531
- ],
16532
- [
16533
- // near, far, left, right, bottom, top
16534
- [
16535
- 5,
16536
- 4
16537
- ],
16538
- [
16539
- 0,
16540
- 1
16541
- ],
16542
- [
16543
- 8,
16544
- 8
16545
- ],
16546
- [
16547
- 8,
16548
- 8
16549
- ],
16550
- [
16551
- 4,
16552
- 0
16553
- ],
16554
- [
16555
- 1,
16556
- 5
16557
- ]
16558
- ],
16559
- [
16560
- // near, far, left, right, bottom, top
16561
- [
16562
- 7,
16563
- 6
16564
- ],
16565
- [
16566
- 2,
16567
- 3
16568
- ],
16569
- [
16570
- 8,
16571
- 8
16572
- ],
16573
- [
16574
- 8,
16575
- 8
16576
- ],
16577
- [
16578
- 3,
16579
- 7
16580
- ],
16581
- [
16582
- 6,
16583
- 2
16584
- ]
16585
- ],
16586
- [
16587
- // near, far, left, right, bottom, top
16629
+ (function() {
16630
+ ShadowUtils._tempMatrix0 = new miniprogram$7.Matrix();
16631
+ })();
16632
+ (function() {
16633
+ // prettier-ignore
16634
+ /** @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);
16635
+ })();
16636
+ (function() {
16637
+ ShadowUtils._frustumCorners = [
16638
+ new miniprogram$7.Vector3(),
16639
+ new miniprogram$7.Vector3(),
16640
+ new miniprogram$7.Vector3(),
16641
+ new miniprogram$7.Vector3(),
16642
+ new miniprogram$7.Vector3(),
16643
+ new miniprogram$7.Vector3(),
16644
+ new miniprogram$7.Vector3(),
16645
+ new miniprogram$7.Vector3()
16646
+ ];
16647
+ })();
16648
+ (function() {
16649
+ ShadowUtils._adjustNearPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
16650
+ })();
16651
+ (function() {
16652
+ ShadowUtils._adjustFarPlane = new miniprogram$7.Plane(new miniprogram$7.Vector3());
16653
+ })();
16654
+ (function() {
16655
+ ShadowUtils._backPlaneFaces = new Array(5);
16656
+ })();
16657
+ (function() {
16658
+ ShadowUtils._edgePlanePoint2 = new miniprogram$7.Vector3();
16659
+ })();
16660
+ (function() {
16661
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16588
16662
  [
16589
- 4,
16590
- 7
16663
+ miniprogram$7.FrustumFace.Left,
16664
+ miniprogram$7.FrustumFace.Right,
16665
+ miniprogram$7.FrustumFace.Top,
16666
+ miniprogram$7.FrustumFace.Bottom
16591
16667
  ],
16592
16668
  [
16593
- 3,
16594
- 0
16669
+ miniprogram$7.FrustumFace.Left,
16670
+ miniprogram$7.FrustumFace.Right,
16671
+ miniprogram$7.FrustumFace.Top,
16672
+ miniprogram$7.FrustumFace.Bottom
16595
16673
  ],
16596
16674
  [
16597
- 0,
16598
- 4
16675
+ miniprogram$7.FrustumFace.Near,
16676
+ miniprogram$7.FrustumFace.Far,
16677
+ miniprogram$7.FrustumFace.Top,
16678
+ miniprogram$7.FrustumFace.Bottom
16599
16679
  ],
16600
16680
  [
16601
- 7,
16602
- 3
16681
+ miniprogram$7.FrustumFace.Near,
16682
+ miniprogram$7.FrustumFace.Far,
16683
+ miniprogram$7.FrustumFace.Top,
16684
+ miniprogram$7.FrustumFace.Bottom
16603
16685
  ],
16604
16686
  [
16605
- 8,
16606
- 8
16687
+ miniprogram$7.FrustumFace.Near,
16688
+ miniprogram$7.FrustumFace.Far,
16689
+ miniprogram$7.FrustumFace.Left,
16690
+ miniprogram$7.FrustumFace.Right
16607
16691
  ],
16608
16692
  [
16609
- 8,
16610
- 8
16693
+ miniprogram$7.FrustumFace.Near,
16694
+ miniprogram$7.FrustumFace.Far,
16695
+ miniprogram$7.FrustumFace.Left,
16696
+ miniprogram$7.FrustumFace.Right
16611
16697
  ]
16612
- ],
16613
- [
16614
- // near, far, left, right, bottom, top
16698
+ ];
16699
+ })();
16700
+ (function() {
16701
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16615
16702
  [
16616
- 6,
16617
- 5
16703
+ // near, far, left, right, bottom, top
16704
+ [
16705
+ 8,
16706
+ 8
16707
+ ],
16708
+ [
16709
+ 8,
16710
+ 8
16711
+ ],
16712
+ [
16713
+ 4,
16714
+ 5
16715
+ ],
16716
+ [
16717
+ 6,
16718
+ 7
16719
+ ],
16720
+ [
16721
+ 7,
16722
+ 4
16723
+ ],
16724
+ [
16725
+ 5,
16726
+ 6
16727
+ ]
16618
16728
  ],
16619
16729
  [
16620
- 1,
16621
- 2
16730
+ // near, far, left, right, bottom, top
16731
+ [
16732
+ 8,
16733
+ 8
16734
+ ],
16735
+ [
16736
+ 8,
16737
+ 8
16738
+ ],
16739
+ [
16740
+ 1,
16741
+ 0
16742
+ ],
16743
+ [
16744
+ 3,
16745
+ 2
16746
+ ],
16747
+ [
16748
+ 0,
16749
+ 3
16750
+ ],
16751
+ [
16752
+ 2,
16753
+ 1
16754
+ ]
16622
16755
  ],
16623
16756
  [
16624
- 5,
16625
- 1
16757
+ // near, far, left, right, bottom, top
16758
+ [
16759
+ 5,
16760
+ 4
16761
+ ],
16762
+ [
16763
+ 0,
16764
+ 1
16765
+ ],
16766
+ [
16767
+ 8,
16768
+ 8
16769
+ ],
16770
+ [
16771
+ 8,
16772
+ 8
16773
+ ],
16774
+ [
16775
+ 4,
16776
+ 0
16777
+ ],
16778
+ [
16779
+ 1,
16780
+ 5
16781
+ ]
16626
16782
  ],
16627
16783
  [
16628
- 2,
16629
- 6
16784
+ // near, far, left, right, bottom, top
16785
+ [
16786
+ 7,
16787
+ 6
16788
+ ],
16789
+ [
16790
+ 2,
16791
+ 3
16792
+ ],
16793
+ [
16794
+ 8,
16795
+ 8
16796
+ ],
16797
+ [
16798
+ 8,
16799
+ 8
16800
+ ],
16801
+ [
16802
+ 3,
16803
+ 7
16804
+ ],
16805
+ [
16806
+ 6,
16807
+ 2
16808
+ ]
16630
16809
  ],
16631
16810
  [
16632
- 8,
16633
- 8
16811
+ // near, far, left, right, bottom, top
16812
+ [
16813
+ 4,
16814
+ 7
16815
+ ],
16816
+ [
16817
+ 3,
16818
+ 0
16819
+ ],
16820
+ [
16821
+ 0,
16822
+ 4
16823
+ ],
16824
+ [
16825
+ 7,
16826
+ 3
16827
+ ],
16828
+ [
16829
+ 8,
16830
+ 8
16831
+ ],
16832
+ [
16833
+ 8,
16834
+ 8
16835
+ ]
16634
16836
  ],
16635
16837
  [
16636
- 8,
16637
- 8
16838
+ // near, far, left, right, bottom, top
16839
+ [
16840
+ 6,
16841
+ 5
16842
+ ],
16843
+ [
16844
+ 1,
16845
+ 2
16846
+ ],
16847
+ [
16848
+ 5,
16849
+ 1
16850
+ ],
16851
+ [
16852
+ 2,
16853
+ 6
16854
+ ],
16855
+ [
16856
+ 8,
16857
+ 8
16858
+ ],
16859
+ [
16860
+ 8,
16861
+ 8
16862
+ ]
16638
16863
  ]
16639
- ]
16640
- ];
16641
- //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.
16642
- ShadowUtils.atlasBorderSize = 4.0;
16864
+ ];
16865
+ })();
16866
+ (function() {
16867
+ //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.
16868
+ ShadowUtils.atlasBorderSize = 4.0;
16869
+ })();
16643
16870
  /**
16644
16871
  * Cascade shadow caster.
16645
16872
  */ var CascadedShadowCasterPass = /*#__PURE__*/ function() {
@@ -16875,18 +17102,42 @@ ShadowUtils.atlasBorderSize = 4.0;
16875
17102
  };
16876
17103
  return CascadedShadowCasterPass;
16877
17104
  }();
16878
- CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
16879
- CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
16880
- CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
16881
- CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
16882
- CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
16883
- CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
16884
- CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
16885
- CascadedShadowCasterPass._maxCascades = 4;
16886
- CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
16887
- CascadedShadowCasterPass._clearColor = new miniprogram$7.Color(1, 1, 1, 1);
16888
- CascadedShadowCasterPass._tempVector = new miniprogram$7.Vector3();
16889
- CascadedShadowCasterPass._tempMatrix0 = new miniprogram$7.Matrix();
17105
+ (function() {
17106
+ CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17107
+ })();
17108
+ (function() {
17109
+ CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17110
+ })();
17111
+ (function() {
17112
+ CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17113
+ })();
17114
+ (function() {
17115
+ CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17116
+ })();
17117
+ (function() {
17118
+ CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17119
+ })();
17120
+ (function() {
17121
+ CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17122
+ })();
17123
+ (function() {
17124
+ CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17125
+ })();
17126
+ (function() {
17127
+ CascadedShadowCasterPass._maxCascades = 4;
17128
+ })();
17129
+ (function() {
17130
+ CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17131
+ })();
17132
+ (function() {
17133
+ CascadedShadowCasterPass._clearColor = new miniprogram$7.Color(1, 1, 1, 1);
17134
+ })();
17135
+ (function() {
17136
+ CascadedShadowCasterPass._tempVector = new miniprogram$7.Vector3();
17137
+ })();
17138
+ (function() {
17139
+ CascadedShadowCasterPass._tempMatrix0 = new miniprogram$7.Matrix();
17140
+ })();
16890
17141
  var passNum = 0;
16891
17142
  /**
16892
17143
  * RenderPass.
@@ -17117,7 +17368,7 @@ var passNum = 0;
17117
17368
  renderer._prepareRender(context);
17118
17369
  }
17119
17370
  };
17120
- _createClass$2(BasicRenderPipeline, [
17371
+ _create_class$2(BasicRenderPipeline, [
17121
17372
  {
17122
17373
  key: "defaultRenderPass",
17123
17374
  get: /**
@@ -17129,13 +17380,23 @@ var passNum = 0;
17129
17380
  ]);
17130
17381
  return BasicRenderPipeline;
17131
17382
  }();
17132
- BasicRenderPipeline._tempVector0 = new miniprogram$7.Vector3();
17133
- BasicRenderPipeline._tempVector1 = new miniprogram$7.Vector3();
17383
+ (function() {
17384
+ BasicRenderPipeline._tempVector0 = new miniprogram$7.Vector3();
17385
+ })();
17386
+ (function() {
17387
+ BasicRenderPipeline._tempVector1 = new miniprogram$7.Vector3();
17388
+ })();
17134
17389
  var _Camera;
17135
17390
  var MathTemp = function MathTemp() {};
17136
- MathTemp.tempVec4 = new miniprogram$7.Vector4();
17137
- MathTemp.tempVec3 = new miniprogram$7.Vector3();
17138
- MathTemp.tempVec2 = new miniprogram$7.Vector2();
17391
+ (function() {
17392
+ MathTemp.tempVec4 = new miniprogram$7.Vector4();
17393
+ })();
17394
+ (function() {
17395
+ MathTemp.tempVec3 = new miniprogram$7.Vector3();
17396
+ })();
17397
+ (function() {
17398
+ MathTemp.tempVec2 = new miniprogram$7.Vector2();
17399
+ })();
17139
17400
  exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17140
17401
  var Camera1 = function Camera1(entity) {
17141
17402
  var _this;
@@ -17152,6 +17413,8 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17152
17413
  * @remarks Support bit manipulation, corresponding to `Layer`.
17153
17414
  */ _this.cullingMask = exports.Layer.Everything;
17154
17415
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
17416
+ /** @internal */ _this._frustum = new miniprogram$7.BoundingFrustum();
17417
+ /** @internal */ _this._virtualCamera = new VirtualCamera();
17155
17418
  _this._isProjMatSetting = false;
17156
17419
  _this._nearClipPlane = 0.1;
17157
17420
  _this._farClipPlane = 100;
@@ -17162,8 +17425,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17162
17425
  _this._isFrustumProjectDirty = true;
17163
17426
  _this._customAspectRatio = undefined;
17164
17427
  _this._renderTarget = null;
17165
- /** @internal */ _this._frustum = new miniprogram$7.BoundingFrustum();
17166
- /** @internal */ _this._virtualCamera = new VirtualCamera();
17167
17428
  _this._viewport = new miniprogram$7.Vector4(0, 0, 1, 1);
17168
17429
  _this._inverseProjectionMatrix = new miniprogram$7.Matrix();
17169
17430
  _this._lastAspectSize = new miniprogram$7.Vector2(0, 0);
@@ -17173,7 +17434,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17173
17434
  _this._isViewMatrixDirty = transform.registerWorldChangeFlag();
17174
17435
  _this._isInvViewProjDirty = transform.registerWorldChangeFlag();
17175
17436
  _this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
17176
- _this._renderPipeline = new BasicRenderPipeline(_assertThisInitialized(_this));
17437
+ _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
17177
17438
  _this.shaderData._addRefCount(1);
17178
17439
  return _this;
17179
17440
  };
@@ -17391,7 +17652,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17391
17652
  }
17392
17653
  return this._inverseProjectionMatrix;
17393
17654
  };
17394
- _createClass$2(Camera1, [
17655
+ _create_class$2(Camera1, [
17395
17656
  {
17396
17657
  key: "nearClipPlane",
17397
17658
  get: /**
@@ -17555,7 +17816,11 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17555
17816
  }
17556
17817
  ]);
17557
17818
  return Camera1;
17558
- }(Component), /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat"), /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos"), _Camera);
17819
+ }(Component), function() {
17820
+ /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat");
17821
+ }(), function() {
17822
+ /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
17823
+ }(), _Camera);
17559
17824
  __decorate$1([
17560
17825
  deepClone
17561
17826
  ], exports.Camera.prototype, "_frustum", void 0);
@@ -17764,7 +18029,9 @@ var MultiExecutor = /*#__PURE__*/ function() {
17764
18029
  };
17765
18030
  return Loader;
17766
18031
  }();
17767
- Loader._engineObjects = {};
18032
+ (function() {
18033
+ Loader._engineObjects = {};
18034
+ })();
17768
18035
  /**
17769
18036
  * Asset Type.
17770
18037
  */ exports.AssetType = void 0;
@@ -17913,7 +18180,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
17913
18180
  target._isTransparent = this._isTransparent;
17914
18181
  target._blendMode = this._blendMode;
17915
18182
  };
17916
- _createClass$2(BaseMaterial, [
18183
+ _create_class$2(BaseMaterial, [
17917
18184
  {
17918
18185
  key: "shader",
17919
18186
  get: /**
@@ -18013,19 +18280,45 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18013
18280
  ]);
18014
18281
  return BaseMaterial;
18015
18282
  }(Material);
18016
- BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18017
- BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18018
- BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18019
- BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18020
- BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18021
- BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18022
- BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18023
- BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18024
- BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18025
- BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18026
- BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18027
- BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18028
- BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18283
+ (function() {
18284
+ BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18285
+ })();
18286
+ (function() {
18287
+ BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18288
+ })();
18289
+ (function() {
18290
+ BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18291
+ })();
18292
+ (function() {
18293
+ BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18294
+ })();
18295
+ (function() {
18296
+ BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18297
+ })();
18298
+ (function() {
18299
+ BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18300
+ })();
18301
+ (function() {
18302
+ BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18303
+ })();
18304
+ (function() {
18305
+ BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18306
+ })();
18307
+ (function() {
18308
+ BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18309
+ })();
18310
+ (function() {
18311
+ BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18312
+ })();
18313
+ (function() {
18314
+ BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18315
+ })();
18316
+ (function() {
18317
+ BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18318
+ })();
18319
+ (function() {
18320
+ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18321
+ })();
18029
18322
  /**
18030
18323
  * Blinn-phong Material.
18031
18324
  */ var BlinnPhongMaterial = /*#__PURE__*/ function(BaseMaterial) {
@@ -18052,7 +18345,7 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18052
18345
  this.cloneTo(dest);
18053
18346
  return dest;
18054
18347
  };
18055
- _createClass$2(BlinnPhongMaterial, [
18348
+ _create_class$2(BlinnPhongMaterial, [
18056
18349
  {
18057
18350
  key: "baseColor",
18058
18351
  get: /**
@@ -18198,9 +18491,15 @@ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18198
18491
  ]);
18199
18492
  return BlinnPhongMaterial;
18200
18493
  }(BaseMaterial);
18201
- BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18202
- BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18203
- BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
18494
+ (function() {
18495
+ BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18496
+ })();
18497
+ (function() {
18498
+ BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18499
+ })();
18500
+ (function() {
18501
+ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
18502
+ })();
18204
18503
  /**
18205
18504
  * Texture UV coordinate.
18206
18505
  */ exports.TextureCoordinate = void 0;
@@ -18234,7 +18533,7 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18234
18533
  shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
18235
18534
  return _this;
18236
18535
  }
18237
- _createClass$2(PBRBaseMaterial, [
18536
+ _create_class$2(PBRBaseMaterial, [
18238
18537
  {
18239
18538
  key: "baseColor",
18240
18539
  get: /**
@@ -18458,14 +18757,30 @@ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTe
18458
18757
  ]);
18459
18758
  return PBRBaseMaterial;
18460
18759
  }(BaseMaterial);
18461
- PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18462
- PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18463
- PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18464
- PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18465
- PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18466
- PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18467
- PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18468
- PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
18760
+ (function() {
18761
+ PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18762
+ })();
18763
+ (function() {
18764
+ PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18765
+ })();
18766
+ (function() {
18767
+ PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18768
+ })();
18769
+ (function() {
18770
+ PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18771
+ })();
18772
+ (function() {
18773
+ PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18774
+ })();
18775
+ (function() {
18776
+ PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18777
+ })();
18778
+ (function() {
18779
+ PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18780
+ })();
18781
+ (function() {
18782
+ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
18783
+ })();
18469
18784
  /**
18470
18785
  * PBR (Metallic-Roughness Workflow) Material.
18471
18786
  */ var PBRMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
@@ -18485,7 +18800,7 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18485
18800
  this.cloneTo(dest);
18486
18801
  return dest;
18487
18802
  };
18488
- _createClass$2(PBRMaterial, [
18803
+ _create_class$2(PBRMaterial, [
18489
18804
  {
18490
18805
  key: "metallic",
18491
18806
  get: /**
@@ -18528,9 +18843,15 @@ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearC
18528
18843
  ]);
18529
18844
  return PBRMaterial;
18530
18845
  }(PBRBaseMaterial);
18531
- PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
18532
- PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
18533
- PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
18846
+ (function() {
18847
+ PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
18848
+ })();
18849
+ (function() {
18850
+ PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
18851
+ })();
18852
+ (function() {
18853
+ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
18854
+ })();
18534
18855
  /**
18535
18856
  * PBR (Specular-Glossiness Workflow) Material.
18536
18857
  */ var PBRSpecularMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
@@ -18550,7 +18871,7 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18550
18871
  this.cloneTo(dest);
18551
18872
  return dest;
18552
18873
  };
18553
- _createClass$2(PBRSpecularMaterial, [
18874
+ _create_class$2(PBRSpecularMaterial, [
18554
18875
  {
18555
18876
  key: "specularColor",
18556
18877
  get: /**
@@ -18596,10 +18917,18 @@ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnes
18596
18917
  ]);
18597
18918
  return PBRSpecularMaterial;
18598
18919
  }(PBRBaseMaterial);
18599
- PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
18600
- PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
18601
- PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
18602
- PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
18920
+ (function() {
18921
+ PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
18922
+ })();
18923
+ (function() {
18924
+ PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
18925
+ })();
18926
+ (function() {
18927
+ PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
18928
+ })();
18929
+ (function() {
18930
+ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
18931
+ })();
18603
18932
  /**
18604
18933
  * Unlit Material.
18605
18934
  */ var UnlitMaterial = /*#__PURE__*/ function(BaseMaterial) {
@@ -18622,7 +18951,7 @@ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPE
18622
18951
  this.cloneTo(dest);
18623
18952
  return dest;
18624
18953
  };
18625
- _createClass$2(UnlitMaterial, [
18954
+ _create_class$2(UnlitMaterial, [
18626
18955
  {
18627
18956
  key: "baseColor",
18628
18957
  get: /**
@@ -18752,7 +19081,7 @@ exports.TextVerticalAlignment = void 0;
18752
19081
  this._sprites = null;
18753
19082
  this._spriteNamesToIndex = null;
18754
19083
  };
18755
- _createClass$2(SpriteAtlas, [
19084
+ _create_class$2(SpriteAtlas, [
18756
19085
  {
18757
19086
  key: "sprites",
18758
19087
  get: /**
@@ -18921,7 +19250,7 @@ exports.TextVerticalAlignment = void 0;
18921
19250
  }
18922
19251
  this._updateFlagManager.dispatch(type);
18923
19252
  };
18924
- _createClass$2(Sprite, [
19253
+ _create_class$2(Sprite, [
18925
19254
  {
18926
19255
  key: "texture",
18927
19256
  get: /**
@@ -19209,7 +19538,9 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
19209
19538
  };
19210
19539
  SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
19211
19540
  return SlicedSpriteAssembler1;
19212
- }(), _SlicedSpriteAssembler._worldMatrix = new miniprogram$7.Matrix(), _SlicedSpriteAssembler);
19541
+ }(), function() {
19542
+ _SlicedSpriteAssembler._worldMatrix = new miniprogram$7.Matrix();
19543
+ }(), _SlicedSpriteAssembler);
19213
19544
  SlicedSpriteAssembler = __decorate$1([
19214
19545
  StaticInterfaceImplement$1()
19215
19546
  ], SlicedSpriteAssembler);
@@ -19230,7 +19561,7 @@ SlicedSpriteAssembler = __decorate$1([
19230
19561
  _this._renderData = new RenderData2D(4, [], [], null, _this._color);
19231
19562
  _this.drawMode = exports.SpriteDrawMode.Simple;
19232
19563
  _this.setMaterial(_this._engine._spriteDefaultMaterial);
19233
- _this._onSpriteChange = _this._onSpriteChange.bind(_assertThisInitialized(_this));
19564
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
19234
19565
  return _this;
19235
19566
  };
19236
19567
  _inherits$2(SpriteRenderer, Renderer);
@@ -19336,7 +19667,7 @@ SlicedSpriteAssembler = __decorate$1([
19336
19667
  break;
19337
19668
  }
19338
19669
  };
19339
- _createClass$2(SpriteRenderer, [
19670
+ _create_class$2(SpriteRenderer, [
19340
19671
  {
19341
19672
  key: "drawMode",
19342
19673
  get: /**
@@ -19485,7 +19816,9 @@ SlicedSpriteAssembler = __decorate$1([
19485
19816
  ]);
19486
19817
  return SpriteRenderer;
19487
19818
  }(exports.Renderer);
19488
- /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
19819
+ (function() {
19820
+ /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
19821
+ })();
19489
19822
  __decorate$1([
19490
19823
  ignoreClone
19491
19824
  ], SpriteRenderer.prototype, "_renderData", void 0);
@@ -19541,14 +19874,16 @@ var /**
19541
19874
  ];
19542
19875
  this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
19543
19876
  };
19544
- CharRenderData.triangles = [
19545
- 0,
19546
- 2,
19547
- 1,
19548
- 2,
19549
- 0,
19550
- 3
19551
- ];
19877
+ (function() {
19878
+ CharRenderData.triangles = [
19879
+ 0,
19880
+ 2,
19881
+ 1,
19882
+ 2,
19883
+ 0,
19884
+ 3
19885
+ ];
19886
+ })();
19552
19887
  /**
19553
19888
  * @internal
19554
19889
  */ var CharRenderDataPool = /*#__PURE__*/ function() {
@@ -19870,23 +20205,37 @@ CharRenderData.triangles = [
19870
20205
  };
19871
20206
  return TextUtils;
19872
20207
  }();
19873
- /** @internal */ TextUtils._genericFontFamilies = [
19874
- "serif",
19875
- "sans-serif",
19876
- "monospace",
19877
- "cursive",
19878
- "fantasy",
19879
- "system-ui",
19880
- "math",
19881
- "emoji",
19882
- "fangsong"
19883
- ];
19884
- /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
19885
- TextUtils._measureBaseline = "M";
19886
- TextUtils._heightMultiplier = 2;
19887
- TextUtils._baselineMultiplier = 1.4;
19888
- TextUtils._fontSizeInfoCache = {};
19889
- TextUtils._textContext = null;
20208
+ (function() {
20209
+ /** @internal */ TextUtils._genericFontFamilies = [
20210
+ "serif",
20211
+ "sans-serif",
20212
+ "monospace",
20213
+ "cursive",
20214
+ "fantasy",
20215
+ "system-ui",
20216
+ "math",
20217
+ "emoji",
20218
+ "fangsong"
20219
+ ];
20220
+ })();
20221
+ (function() {
20222
+ /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20223
+ })();
20224
+ (function() {
20225
+ TextUtils._measureBaseline = "M";
20226
+ })();
20227
+ (function() {
20228
+ TextUtils._heightMultiplier = 2;
20229
+ })();
20230
+ (function() {
20231
+ TextUtils._baselineMultiplier = 1.4;
20232
+ })();
20233
+ (function() {
20234
+ TextUtils._fontSizeInfoCache = {};
20235
+ })();
20236
+ (function() {
20237
+ TextUtils._textContext = null;
20238
+ })();
19890
20239
  /**
19891
20240
  * Renders a text for 2D graphics.
19892
20241
  */ var TextRenderer = /*#__PURE__*/ function(Renderer) {
@@ -19911,7 +20260,7 @@ TextUtils._textContext = null;
19911
20260
  _this._overflowMode = exports.OverflowMode.Overflow;
19912
20261
  _this._maskInteraction = exports.SpriteMaskInteraction.None;
19913
20262
  _this._maskLayer = exports.SpriteMaskLayer.Layer0;
19914
- var engine = _assertThisInitialized(_this).engine;
20263
+ var engine = _assert_this_initialized(_this).engine;
19915
20264
  _this._font = engine._textDefaultFont;
19916
20265
  _this._font._addRefCount(1);
19917
20266
  _this.setMaterial(engine._spriteDefaultMaterial);
@@ -20151,7 +20500,7 @@ TextUtils._textContext = null;
20151
20500
  Renderer.prototype._onTransformChanged.call(this, bit);
20152
20501
  this._setDirtyFlagTrue(0x4 | 0x8);
20153
20502
  };
20154
- _createClass$2(TextRenderer, [
20503
+ _create_class$2(TextRenderer, [
20155
20504
  {
20156
20505
  key: "color",
20157
20506
  get: /**
@@ -20364,9 +20713,15 @@ TextUtils._textContext = null;
20364
20713
  ]);
20365
20714
  return TextRenderer;
20366
20715
  }(exports.Renderer);
20367
- TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20368
- TextRenderer._tempVec30 = new miniprogram$7.Vector3();
20369
- TextRenderer._tempVec31 = new miniprogram$7.Vector3();
20716
+ (function() {
20717
+ TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20718
+ })();
20719
+ (function() {
20720
+ TextRenderer._tempVec30 = new miniprogram$7.Vector3();
20721
+ })();
20722
+ (function() {
20723
+ TextRenderer._tempVec31 = new miniprogram$7.Vector3();
20724
+ })();
20370
20725
  __decorate$1([
20371
20726
  assignmentClone
20372
20727
  ], TextRenderer.prototype, "_subFont", void 0);
@@ -20581,7 +20936,9 @@ var DirtyFlag;
20581
20936
  };
20582
20937
  return AnimationCurveOwner;
20583
20938
  }();
20584
- AnimationCurveOwner._assemblerMap = new Map();
20939
+ (function() {
20940
+ AnimationCurveOwner._assemblerMap = new Map();
20941
+ })();
20585
20942
  /**
20586
20943
  * @internal
20587
20944
  */ var PositionAnimationCurveOwnerAssembler = /*#__PURE__*/ function() {
@@ -20747,7 +21104,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
20747
21104
  }
20748
21105
  }
20749
21106
  };
20750
- _createClass$2(AnimationClip, [
21107
+ _create_class$2(AnimationClip, [
20751
21108
  {
20752
21109
  key: "events",
20753
21110
  get: /**
@@ -20893,7 +21250,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
20893
21250
  var result = this._evaluate(time, evaluateData);
20894
21251
  return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
20895
21252
  };
20896
- _createClass$2(AnimationCurve, [
21253
+ _create_class$2(AnimationCurve, [
20897
21254
  {
20898
21255
  key: "interpolation",
20899
21256
  get: /**
@@ -21002,7 +21359,11 @@ exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Ani
21002
21359
  return out;
21003
21360
  };
21004
21361
  return AnimationArrayCurve;
21005
- }(AnimationCurve), /** @internal */ _AnimationArrayCurve._isReferenceType = true, /** @internal */ _AnimationArrayCurve._isInterpolationType = true, _AnimationArrayCurve);
21362
+ }(AnimationCurve), function() {
21363
+ /** @internal */ _AnimationArrayCurve._isReferenceType = true;
21364
+ }(), function() {
21365
+ /** @internal */ _AnimationArrayCurve._isInterpolationType = true;
21366
+ }(), _AnimationArrayCurve);
21006
21367
  exports.AnimationArrayCurve = __decorate$1([
21007
21368
  StaticInterfaceImplement$1()
21008
21369
  ], exports.AnimationArrayCurve);
@@ -21054,7 +21415,11 @@ exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Anima
21054
21415
  return frame.value;
21055
21416
  };
21056
21417
  return AnimationBoolCurve;
21057
- }(AnimationCurve), /** @internal */ _AnimationBoolCurve._isReferenceType = false, /** @internal */ _AnimationBoolCurve._isInterpolationType = false, _AnimationBoolCurve);
21418
+ }(AnimationCurve), function() {
21419
+ /** @internal */ _AnimationBoolCurve._isReferenceType = false;
21420
+ }(), function() {
21421
+ /** @internal */ _AnimationBoolCurve._isInterpolationType = false;
21422
+ }(), _AnimationBoolCurve);
21058
21423
  exports.AnimationBoolCurve = __decorate$1([
21059
21424
  StaticInterfaceImplement$1()
21060
21425
  ], exports.AnimationBoolCurve);
@@ -21146,7 +21511,11 @@ exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Ani
21146
21511
  return out;
21147
21512
  };
21148
21513
  return AnimationColorCurve;
21149
- }(AnimationCurve), /** @internal */ _AnimationColorCurve._isReferenceType = true, /** @internal */ _AnimationColorCurve._isInterpolationType = true, _AnimationColorCurve);
21514
+ }(AnimationCurve), function() {
21515
+ /** @internal */ _AnimationColorCurve._isReferenceType = true;
21516
+ }(), function() {
21517
+ /** @internal */ _AnimationColorCurve._isInterpolationType = true;
21518
+ }(), _AnimationColorCurve);
21150
21519
  exports.AnimationColorCurve = __decorate$1([
21151
21520
  StaticInterfaceImplement$1()
21152
21521
  ], exports.AnimationColorCurve);
@@ -21241,7 +21610,11 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
21241
21610
  return out;
21242
21611
  };
21243
21612
  return AnimationFloatArrayCurve;
21244
- }(AnimationCurve), /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true, /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true, _AnimationFloatArrayCurve);
21613
+ }(AnimationCurve), function() {
21614
+ /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true;
21615
+ }(), function() {
21616
+ /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
21617
+ }(), _AnimationFloatArrayCurve);
21245
21618
  exports.AnimationFloatArrayCurve = __decorate$1([
21246
21619
  StaticInterfaceImplement$1()
21247
21620
  ], exports.AnimationFloatArrayCurve);
@@ -21305,7 +21678,11 @@ exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Ani
21305
21678
  }
21306
21679
  };
21307
21680
  return AnimationFloatCurve;
21308
- }(AnimationCurve), /** @internal */ _AnimationFloatCurve._isReferenceType = false, /** @internal */ _AnimationFloatCurve._isInterpolationType = true, _AnimationFloatCurve);
21681
+ }(AnimationCurve), function() {
21682
+ /** @internal */ _AnimationFloatCurve._isReferenceType = false;
21683
+ }(), function() {
21684
+ /** @internal */ _AnimationFloatCurve._isInterpolationType = true;
21685
+ }(), _AnimationFloatCurve);
21309
21686
  exports.AnimationFloatCurve = __decorate$1([
21310
21687
  StaticInterfaceImplement$1()
21311
21688
  ], exports.AnimationFloatCurve);
@@ -21402,7 +21779,13 @@ exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ fu
21402
21779
  return out;
21403
21780
  };
21404
21781
  return AnimationQuaternionCurve1;
21405
- }(AnimationCurve), /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true, /** @internal */ _AnimationQuaternionCurve._isReferenceType = true, /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram$7.Quaternion(), _AnimationQuaternionCurve);
21782
+ }(AnimationCurve), function() {
21783
+ /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true;
21784
+ }(), function() {
21785
+ /** @internal */ _AnimationQuaternionCurve._isReferenceType = true;
21786
+ }(), function() {
21787
+ /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram$7.Quaternion();
21788
+ }(), _AnimationQuaternionCurve);
21406
21789
  exports.AnimationQuaternionCurve = __decorate$1([
21407
21790
  StaticInterfaceImplement$1()
21408
21791
  ], exports.AnimationQuaternionCurve);
@@ -21482,7 +21865,11 @@ exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function
21482
21865
  return out;
21483
21866
  };
21484
21867
  return AnimationVector2Curve;
21485
- }(AnimationCurve), /** @internal */ _AnimationVector2Curve._isReferenceType = true, /** @internal */ _AnimationVector2Curve._isInterpolationType = true, _AnimationVector2Curve);
21868
+ }(AnimationCurve), function() {
21869
+ /** @internal */ _AnimationVector2Curve._isReferenceType = true;
21870
+ }(), function() {
21871
+ /** @internal */ _AnimationVector2Curve._isInterpolationType = true;
21872
+ }(), _AnimationVector2Curve);
21486
21873
  exports.AnimationVector2Curve = __decorate$1([
21487
21874
  StaticInterfaceImplement$1()
21488
21875
  ], exports.AnimationVector2Curve);
@@ -21574,7 +21961,11 @@ exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function
21574
21961
  return out;
21575
21962
  };
21576
21963
  return AnimationVector3Curve;
21577
- }(AnimationCurve), /** @internal */ _AnimationVector3Curve._isReferenceType = true, /** @internal */ _AnimationVector3Curve._isInterpolationType = true, _AnimationVector3Curve);
21964
+ }(AnimationCurve), function() {
21965
+ /** @internal */ _AnimationVector3Curve._isReferenceType = true;
21966
+ }(), function() {
21967
+ /** @internal */ _AnimationVector3Curve._isInterpolationType = true;
21968
+ }(), _AnimationVector3Curve);
21578
21969
  exports.AnimationVector3Curve = __decorate$1([
21579
21970
  StaticInterfaceImplement$1()
21580
21971
  ], exports.AnimationVector3Curve);
@@ -21666,7 +22057,11 @@ exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function
21666
22057
  return out;
21667
22058
  };
21668
22059
  return AnimationVector4Curve;
21669
- }(AnimationCurve), /** @internal */ _AnimationVector4Curve._isReferenceType = true, /** @internal */ _AnimationVector4Curve._isInterpolationType = true, _AnimationVector4Curve);
22060
+ }(AnimationCurve), function() {
22061
+ /** @internal */ _AnimationVector4Curve._isReferenceType = true;
22062
+ }(), function() {
22063
+ /** @internal */ _AnimationVector4Curve._isInterpolationType = true;
22064
+ }(), _AnimationVector4Curve);
21670
22065
  exports.AnimationVector4Curve = __decorate$1([
21671
22066
  StaticInterfaceImplement$1()
21672
22067
  ], exports.AnimationVector4Curve);
@@ -22371,7 +22766,7 @@ exports.AnimatorLayerBlendingMode = void 0;
22371
22766
  }
22372
22767
  }
22373
22768
  };
22374
- _createClass$2(Animator, [
22769
+ _create_class$2(Animator, [
22375
22770
  {
22376
22771
  key: "animatorController",
22377
22772
  get: /**
@@ -22461,7 +22856,7 @@ __decorate$1([
22461
22856
  */ _proto._registerChangeFlag = function _registerChangeFlag() {
22462
22857
  return this._updateFlagManager.createFlag(BoolUpdateFlag);
22463
22858
  };
22464
- _createClass$2(AnimatorController, [
22859
+ _create_class$2(AnimatorController, [
22465
22860
  {
22466
22861
  key: "layers",
22467
22862
  get: /**
@@ -22592,7 +22987,7 @@ __decorate$1([
22592
22987
  index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
22593
22988
  }
22594
22989
  };
22595
- _createClass$2(AnimatorState, [
22990
+ _create_class$2(AnimatorState, [
22596
22991
  {
22597
22992
  key: "transitions",
22598
22993
  get: /**
@@ -22719,7 +23114,7 @@ exports.AnimatorConditionMode = void 0;
22719
23114
  return _this;
22720
23115
  };
22721
23116
  _inherits$2(SkyBoxMaterial, Material);
22722
- _createClass$2(SkyBoxMaterial, [
23117
+ _create_class$2(SkyBoxMaterial, [
22723
23118
  {
22724
23119
  key: "textureDecodeRGBM",
22725
23120
  get: /**
@@ -22816,7 +23211,7 @@ exports.ParticleRendererBlendMode = void 0;
22816
23211
  _this._isFadeOut = false;
22817
23212
  _this._playOnEnable = true;
22818
23213
  _this._blendMode = 0;
22819
- _this._onColorChanged = _this._onColorChanged.bind(_assertThisInitialized(_this));
23214
+ _this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
22820
23215
  //@ts-ignore
22821
23216
  _this._color._onValueChanged = _this._onColorChanged;
22822
23217
  _this.setMaterial(_this._createMaterial());
@@ -23094,7 +23489,7 @@ exports.ParticleRendererBlendMode = void 0;
23094
23489
  ParticleRenderer._getRandom = function _getRandom() {
23095
23490
  return Math.random() - 0.5;
23096
23491
  };
23097
- _createClass$2(ParticleRenderer, [
23492
+ _create_class$2(ParticleRenderer, [
23098
23493
  {
23099
23494
  key: "texture",
23100
23495
  get: /**
@@ -23525,7 +23920,9 @@ exports.ParticleRendererBlendMode = void 0;
23525
23920
  ]);
23526
23921
  return ParticleRenderer;
23527
23922
  }(MeshRenderer);
23528
- /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
23923
+ (function() {
23924
+ /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
23925
+ })();
23529
23926
  __decorate$1([
23530
23927
  ignoreClone
23531
23928
  ], ParticleRenderer.prototype, "_onColorChanged", null);
@@ -23790,7 +24187,7 @@ var _tempVector3 = new miniprogram$7.Vector3();
23790
24187
  this._camera.renderTarget = this._oriCameraRenderTarget;
23791
24188
  this._camera.cullingMask = this._oriCameraCullingMask;
23792
24189
  };
23793
- _createClass$2(Probe, [
24190
+ _create_class$2(Probe, [
23794
24191
  {
23795
24192
  key: "_texture",
23796
24193
  get: function get() {
@@ -24016,32 +24413,22 @@ var engineMiniprogramAdapter$1 = require("@galacean/engine-miniprogram-adapter")
24016
24413
  var miniprogram$1$2 = require("@galacean/engine-math/dist/miniprogram");
24017
24414
  var miniprogram$2$1 = require("@galacean/engine-draco/dist/miniprogram");
24018
24415
  var miniprogram$3$1 = require("@galacean/engine-rhi-webgl/dist/miniprogram");
24019
- function extends_$1() {
24020
- extends_$1 = Object.assign || function(target) {
24416
+ function _extends$1() {
24417
+ _extends$1 = Object.assign || function assign(target) {
24021
24418
  for(var i = 1; i < arguments.length; i++){
24022
24419
  var source = arguments[i];
24023
- for(var key in source){
24024
- if (Object.prototype.hasOwnProperty.call(source, key)) {
24025
- target[key] = source[key];
24026
- }
24027
- }
24420
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
24028
24421
  }
24029
24422
  return target;
24030
24423
  };
24031
- return extends_$1.apply(this, arguments);
24424
+ return _extends$1.apply(this, arguments);
24032
24425
  }
24033
- function _extends$1() {
24034
- return extends_$1.apply(this, arguments);
24035
- }
24036
- function setPrototypeOf$1(o, p) {
24037
- setPrototypeOf$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
24426
+ function _set_prototype_of$1(o, p) {
24427
+ _set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
24038
24428
  o.__proto__ = p;
24039
24429
  return o;
24040
24430
  };
24041
- return setPrototypeOf$1(o, p);
24042
- }
24043
- function _setPrototypeOf$1(o, p) {
24044
- return setPrototypeOf$1(o, p);
24431
+ return _set_prototype_of$1(o, p);
24045
24432
  }
24046
24433
  function _inherits$1(subClass, superClass) {
24047
24434
  if (typeof superClass !== "function" && superClass !== null) {
@@ -24054,7 +24441,7 @@ function _inherits$1(subClass, superClass) {
24054
24441
  configurable: true
24055
24442
  }
24056
24443
  });
24057
- if (superClass) _setPrototypeOf$1(subClass, superClass);
24444
+ if (superClass) _set_prototype_of$1(subClass, superClass);
24058
24445
  }
24059
24446
  /******************************************************************************
24060
24447
  Copyright (c) Microsoft Corporation.
@@ -24337,13 +24724,10 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
24337
24724
  reject(error);
24338
24725
  return;
24339
24726
  }
24340
- if (info.done) {
24341
- resolve(value);
24342
- } else {
24343
- Promise.resolve(value).then(_next, _throw);
24344
- }
24727
+ if (info.done) resolve(value);
24728
+ else Promise.resolve(value).then(_next, _throw);
24345
24729
  }
24346
- function _asyncToGenerator(fn) {
24730
+ function _async_to_generator(fn) {
24347
24731
  return function() {
24348
24732
  var self = this, args = arguments;
24349
24733
  return new Promise(function(resolve, reject) {
@@ -24388,7 +24772,7 @@ var FontLoader = /*#__PURE__*/ function(Loader) {
24388
24772
  });
24389
24773
  };
24390
24774
  _proto._registerFont = function _registerFont(fontName, fontUrl) {
24391
- return _asyncToGenerator(function() {
24775
+ return _async_to_generator(function() {
24392
24776
  var fontFace;
24393
24777
  return __generator(this, function(_state) {
24394
24778
  switch(_state.label){
@@ -24996,30 +25380,32 @@ var TextureWrapMode;
24996
25380
  };
24997
25381
  return GLTFUtil;
24998
25382
  }();
24999
- function _arrayLikeToArray(arr, len) {
25383
+ function _array_like_to_array(arr, len) {
25000
25384
  if (len == null || len > arr.length) len = arr.length;
25001
25385
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
25002
25386
  return arr2;
25003
25387
  }
25004
- function _arrayWithoutHoles(arr) {
25005
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
25388
+ function _array_without_holes(arr) {
25389
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
25006
25390
  }
25007
- function _iterableToArray(iter) {
25008
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
25391
+ function _iterable_to_array(iter) {
25392
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
25393
+ return Array.from(iter);
25394
+ }
25009
25395
  }
25010
- function _nonIterableSpread() {
25011
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25396
+ function _non_iterable_spread() {
25397
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25012
25398
  }
25013
- function _unsupportedIterableToArray(o, minLen) {
25399
+ function _unsupported_iterable_to_array(o, minLen) {
25014
25400
  if (!o) return;
25015
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
25401
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
25016
25402
  var n = Object.prototype.toString.call(o).slice(8, -1);
25017
25403
  if (n === "Object" && o.constructor) n = o.constructor.name;
25018
25404
  if (n === "Map" || n === "Set") return Array.from(n);
25019
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
25405
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
25020
25406
  }
25021
- function _toConsumableArray(arr) {
25022
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
25407
+ function _to_consumable_array(arr) {
25408
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
25023
25409
  }
25024
25410
  var Parser = /*#__PURE__*/ function() {
25025
25411
  var Parser = function Parser() {};
@@ -25035,7 +25421,7 @@ var Parser = /*#__PURE__*/ function() {
25035
25421
  extensionSchema,
25036
25422
  parseResource,
25037
25423
  context
25038
- ].concat(_toConsumableArray(extra)));
25424
+ ].concat(_to_consumable_array(extra)));
25039
25425
  }
25040
25426
  }
25041
25427
  };
@@ -25049,7 +25435,7 @@ var Parser = /*#__PURE__*/ function() {
25049
25435
  return (_parsers_ = parsers[0]).createEngineResource.apply(_parsers_, [
25050
25436
  extensionSchema,
25051
25437
  context
25052
- ].concat(_toConsumableArray(extra)));
25438
+ ].concat(_to_consumable_array(extra)));
25053
25439
  }
25054
25440
  };
25055
25441
  Parser.hasExtensionParser = function hasExtensionParser(extensionName) {
@@ -25074,7 +25460,9 @@ var Parser = /*#__PURE__*/ function() {
25074
25460
  };
25075
25461
  return Parser;
25076
25462
  }();
25077
- Parser._extensionParsers = {};
25463
+ (function() {
25464
+ Parser._extensionParsers = {};
25465
+ })();
25078
25466
  /**
25079
25467
  * Declare ExtensionParser's decorator.
25080
25468
  * @param extensionName - Extension name
@@ -25148,9 +25536,7 @@ KHR_draco_mesh_compression = __decorate([
25148
25536
  function _instanceof1$1(left, right) {
25149
25537
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
25150
25538
  return !!right[Symbol.hasInstance](left);
25151
- } else {
25152
- return _instanceof(left, right);
25153
- }
25539
+ } else return _instanceof(left, right);
25154
25540
  }
25155
25541
  var KHR_lights_punctual = /*#__PURE__*/ function(ExtensionParser) {
25156
25542
  var KHR_lights_punctual = function KHR_lights_punctual() {
@@ -25463,11 +25849,11 @@ var GalaceanMaterialsRemap = /*#__PURE__*/ function(ExtensionParser) {
25463
25849
  GalaceanMaterialsRemap = __decorate([
25464
25850
  registerExtension("OASIS_materials_remap")
25465
25851
  ], GalaceanMaterialsRemap);
25466
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
25852
+ function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
25467
25853
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
25468
25854
  if (it) return (it = it.call(o)).next.bind(it);
25469
25855
  // Fallback for engines without symbol support
25470
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
25856
+ if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike && o && typeof o.length === "number") {
25471
25857
  if (it) o = it;
25472
25858
  var i = 0;
25473
25859
  return function() {
@@ -25480,7 +25866,7 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
25480
25866
  };
25481
25867
  };
25482
25868
  }
25483
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25869
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
25484
25870
  }
25485
25871
  var AnimationParser = /*#__PURE__*/ function(Parser) {
25486
25872
  var AnimationParser = function AnimationParser() {
@@ -25772,7 +26158,9 @@ var EntityParser = /*#__PURE__*/ function(Parser) {
25772
26158
  };
25773
26159
  return EntityParser;
25774
26160
  }(Parser);
25775
- /** @internal */ EntityParser._defaultName = "_GLTF_ENTITY_";
26161
+ (function() {
26162
+ /** @internal */ EntityParser._defaultName = "_GLTF_ENTITY_";
26163
+ })();
25776
26164
  var MeshParser = /*#__PURE__*/ function(Parser1) {
25777
26165
  var MeshParser = function MeshParser() {
25778
26166
  return Parser1.apply(this, arguments);
@@ -25848,21 +26236,31 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
25848
26236
  var vertexCount;
25849
26237
  var bufferBindIndex = 0;
25850
26238
  var positions;
25851
- keepMeshData && (positions = new Array(vertexCount));
26239
+ var boneIndices;
26240
+ var boneWeights;
26241
+ if (keepMeshData) {
26242
+ positions = new Array(vertexCount);
26243
+ boneIndices = new Array(vertexCount);
26244
+ boneWeights = new Array(vertexCount);
26245
+ }
25852
26246
  for(var attribute in attributes){
25853
26247
  var accessor = accessors[attributes[attribute]];
25854
26248
  var accessorBuffer = GLTFUtil.getAccessorBuffer(context, gltf, accessor);
25855
- var dataElmentSize = GLTFUtil.getAccessorTypeSize(accessor.type);
25856
- var attributeCount = accessor.count;
26249
+ var dataElementSize = GLTFUtil.getAccessorTypeSize(accessor.type);
26250
+ var accessorCount = accessor.count;
25857
26251
  var vertices = accessorBuffer.data;
25858
26252
  var vertexElement = void 0;
25859
26253
  var meshId = mesh.instanceId;
25860
26254
  var vertexBindingInfos = accessorBuffer.vertexBindingInfos;
25861
- var elementFormat = GLTFUtil.getElementFormat(accessor.componentType, dataElmentSize, accessor.normalized);
26255
+ var elementNormalized = accessor.normalized;
26256
+ var elementFormat = GLTFUtil.getElementFormat(accessor.componentType, dataElementSize, elementNormalized);
26257
+ var scaleFactor = void 0;
26258
+ elementNormalized && (scaleFactor = GLTFUtil.getNormalizedComponentScale(accessor.componentType));
26259
+ var elementOffset = void 0;
25862
26260
  if (accessorBuffer.interleaved) {
25863
26261
  var byteOffset = accessor.byteOffset || 0;
25864
26262
  var stride = accessorBuffer.stride;
25865
- var elementOffset = byteOffset % stride;
26263
+ elementOffset = byteOffset % stride;
25866
26264
  if (vertexBindingInfos[meshId] === undefined) {
25867
26265
  vertexElement = new miniprogram$5.VertexElement(attribute, elementOffset, elementFormat, bufferBindIndex);
25868
26266
  var vertexBuffer = accessorBuffer.vertexBuffer;
@@ -25877,7 +26275,8 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
25877
26275
  vertexElement = new miniprogram$5.VertexElement(attribute, elementOffset, elementFormat, vertexBindingInfos[meshId]);
25878
26276
  }
25879
26277
  } else {
25880
- vertexElement = new miniprogram$5.VertexElement(attribute, 0, elementFormat, bufferBindIndex);
26278
+ elementOffset = 0;
26279
+ vertexElement = new miniprogram$5.VertexElement(attribute, elementOffset, elementFormat, bufferBindIndex);
25881
26280
  var vertexBuffer1 = new miniprogram$5.Buffer(engine, miniprogram$5.BufferBindFlag.VertexBuffer, vertices.byteLength, miniprogram$5.BufferUsage.Static);
25882
26281
  vertexBuffer1.setData(vertices);
25883
26282
  mesh.setVertexBufferBinding(vertexBuffer1, accessorBuffer.stride, bufferBindIndex);
@@ -25885,35 +26284,60 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
25885
26284
  }
25886
26285
  vertexElements.push(vertexElement);
25887
26286
  if (attribute === "POSITION") {
25888
- vertexCount = attributeCount;
26287
+ vertexCount = accessorCount;
25889
26288
  var _mesh_bounds = mesh.bounds, min = _mesh_bounds.min, max = _mesh_bounds.max;
25890
26289
  if (accessor.min && accessor.max) {
25891
26290
  min.copyFromArray(accessor.min);
25892
26291
  max.copyFromArray(accessor.max);
25893
26292
  if (keepMeshData) {
25894
- var stride1 = vertices.length / attributeCount;
25895
- for(var j = 0; j < attributeCount; j++){
25896
- var offset = j * stride1;
25897
- positions[j] = new miniprogram$1$2.Vector3(vertices[offset], vertices[offset + 1], vertices[offset + 2]);
26293
+ var baseOffset = elementOffset / vertices.BYTES_PER_ELEMENT;
26294
+ var stride1 = vertices.length / accessorCount;
26295
+ for(var j = 0; j < accessorCount; j++){
26296
+ var offset = baseOffset + j * stride1;
26297
+ var position = new miniprogram$1$2.Vector3(vertices[offset], vertices[offset + 1], vertices[offset + 2]);
26298
+ elementNormalized && position.scale(scaleFactor);
26299
+ positions[j] = position;
25898
26300
  }
25899
26301
  }
25900
26302
  } else {
25901
- var position = MeshParser._tempVector3;
26303
+ var position1 = MeshParser._tempVector3;
25902
26304
  min.set(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);
25903
26305
  max.set(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);
25904
- var stride2 = vertices.length / attributeCount;
25905
- for(var j1 = 0; j1 < attributeCount; j1++){
25906
- var offset1 = j1 * stride2;
25907
- position.copyFromArray(vertices, offset1);
25908
- miniprogram$1$2.Vector3.min(min, position, min);
25909
- miniprogram$1$2.Vector3.max(max, position, max);
25910
- keepMeshData && (positions[j1] = position.clone());
26306
+ var baseOffset1 = elementOffset / vertices.BYTES_PER_ELEMENT;
26307
+ var stride2 = vertices.length / accessorCount;
26308
+ for(var j1 = 0; j1 < accessorCount; j1++){
26309
+ var offset1 = baseOffset1 + j1 * stride2;
26310
+ position1.copyFromArray(vertices, offset1);
26311
+ miniprogram$1$2.Vector3.min(min, position1, min);
26312
+ miniprogram$1$2.Vector3.max(max, position1, max);
26313
+ if (keepMeshData) {
26314
+ var clonePosition = position1.clone();
26315
+ elementNormalized && clonePosition.scale(scaleFactor);
26316
+ positions[j1] = clonePosition;
26317
+ }
25911
26318
  }
25912
26319
  }
25913
- if (accessor.normalized) {
25914
- var sacleFactor = GLTFUtil.getNormalizedComponentScale(accessor.componentType);
25915
- min.scale(sacleFactor);
25916
- max.scale(sacleFactor);
26320
+ if (elementNormalized) {
26321
+ min.scale(scaleFactor);
26322
+ max.scale(scaleFactor);
26323
+ }
26324
+ } else if (attribute === "JOINTS_0" && keepMeshData) {
26325
+ var baseOffset2 = elementOffset / vertices.BYTES_PER_ELEMENT;
26326
+ var stride3 = vertices.length / accessorCount;
26327
+ for(var j2 = 0; j2 < accessorCount; j2++){
26328
+ var offset2 = baseOffset2 + j2 * stride3;
26329
+ var boneIndex = new miniprogram$1$2.Vector4(vertices[offset2], vertices[offset2 + 1], vertices[offset2 + 2], vertices[offset2 + 3]);
26330
+ elementNormalized && boneIndex.scale(scaleFactor);
26331
+ boneIndices[j2] = boneIndex;
26332
+ }
26333
+ } else if (attribute === "WEIGHTS_0" && keepMeshData) {
26334
+ var baseOffset3 = elementOffset / vertices.BYTES_PER_ELEMENT;
26335
+ var stride4 = vertices.length / accessorCount;
26336
+ for(var j3 = 0; j3 < accessorCount; j3++){
26337
+ var offset3 = baseOffset3 + j3 * stride4;
26338
+ var boneWeight = new miniprogram$1$2.Vector4(vertices[offset3], vertices[offset3 + 1], vertices[offset3 + 2], vertices[offset3 + 3]);
26339
+ elementNormalized && boneWeight.scale(scaleFactor);
26340
+ boneWeights[j3] = boneWeight;
25917
26341
  }
25918
26342
  }
25919
26343
  }
@@ -25932,6 +26356,10 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
25932
26356
  mesh.uploadData(!keepMeshData);
25933
26357
  //@ts-ignore
25934
26358
  mesh._positions = positions;
26359
+ //@ts-ignore
26360
+ mesh._boneIndices = boneIndices;
26361
+ //@ts-ignore
26362
+ mesh._boneWeights = boneWeights;
25935
26363
  return Promise.resolve(mesh);
25936
26364
  };
25937
26365
  _proto._createBlendShape = function _createBlendShape(mesh, glTFMesh, glTFTargets, getBlendShapeData) {
@@ -26053,7 +26481,9 @@ var MeshParser = /*#__PURE__*/ function(Parser1) {
26053
26481
  };
26054
26482
  return MeshParser;
26055
26483
  }(Parser);
26056
- MeshParser._tempVector3 = new miniprogram$1$2.Vector3();
26484
+ (function() {
26485
+ MeshParser._tempVector3 = new miniprogram$1$2.Vector3();
26486
+ })();
26057
26487
  var SceneParser$1 = /*#__PURE__*/ function(Parser1) {
26058
26488
  var SceneParser = function SceneParser() {
26059
26489
  return Parser1.apply(this, arguments);
@@ -26261,7 +26691,7 @@ var SkinParser = /*#__PURE__*/ function(Parser) {
26261
26691
  };
26262
26692
  _proto._findSkeletonRootBone = function _findSkeletonRootBone(joints, entities) {
26263
26693
  var paths = {};
26264
- for(var _iterator = _createForOfIteratorHelperLoose(joints), _step; !(_step = _iterator()).done;){
26694
+ for(var _iterator = _create_for_of_iterator_helper_loose(joints), _step; !(_step = _iterator()).done;){
26265
26695
  var index = _step.value;
26266
26696
  var path = new Array();
26267
26697
  var entity = entities[index];
@@ -26362,8 +26792,10 @@ var TextureParser = /*#__PURE__*/ function(Parser) {
26362
26792
  };
26363
26793
  return TextureParser;
26364
26794
  }(Parser);
26365
- var _obj;
26366
- 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);
26795
+ (function() {
26796
+ var _obj;
26797
+ 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);
26798
+ })();
26367
26799
  var Validator = /*#__PURE__*/ function(Parser1) {
26368
26800
  var Validator = function Validator() {
26369
26801
  return Parser1.apply(this, arguments);
@@ -26433,17 +26865,19 @@ var GLTFParser = /*#__PURE__*/ function() {
26433
26865
  };
26434
26866
  return GLTFParser;
26435
26867
  }();
26436
- GLTFParser.defaultPipeline = new GLTFParser([
26437
- BufferParser,
26438
- Validator,
26439
- TextureParser,
26440
- MaterialParser,
26441
- MeshParser,
26442
- EntityParser,
26443
- SkinParser,
26444
- AnimationParser,
26445
- SceneParser$1
26446
- ]);
26868
+ (function() {
26869
+ GLTFParser.defaultPipeline = new GLTFParser([
26870
+ BufferParser,
26871
+ Validator,
26872
+ TextureParser,
26873
+ MaterialParser,
26874
+ MeshParser,
26875
+ EntityParser,
26876
+ SkinParser,
26877
+ AnimationParser,
26878
+ SceneParser$1
26879
+ ]);
26880
+ })();
26447
26881
  /**
26448
26882
  * Product after GLTF parser, usually, `defaultSceneRoot` is only needed to use.
26449
26883
  */ var GLTFResource = /*#__PURE__*/ function(EngineObject) {
@@ -26493,7 +26927,7 @@ var GLTFLoader = /*#__PURE__*/ function(Loader) {
26493
26927
  context.keepMeshData = (_item_params_keepMeshData = (_item_params = item.params) == null ? void 0 : _item_params.keepMeshData) != null ? _item_params_keepMeshData : false;
26494
26928
  masterPromiseInfo.onCancel(function() {
26495
26929
  var chainPromises = context.chainPromises;
26496
- for(var _iterator = _createForOfIteratorHelperLoose(chainPromises), _step; !(_step = _iterator()).done;){
26930
+ for(var _iterator = _create_for_of_iterator_helper_loose(chainPromises), _step; !(_step = _iterator()).done;){
26497
26931
  var promise = _step.value;
26498
26932
  promise.cancel();
26499
26933
  }
@@ -26753,37 +27187,75 @@ var HDRLoader = (_HDRLoader = /*#__PURE__*/ function(Loader) {
26753
27187
  color.a *= M;
26754
27188
  };
26755
27189
  return HDRLoader1;
26756
- }(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 = [
26757
- _HDRLoader._rightBottomBack,
26758
- _HDRLoader._rightBottomFront,
26759
- _HDRLoader._rightUpBack,
26760
- _HDRLoader._rightUpFront
26761
- ], _HDRLoader._faceLeft = [
26762
- _HDRLoader._leftBottomFront,
26763
- _HDRLoader._leftBottomBack,
26764
- _HDRLoader._leftUpFront,
26765
- _HDRLoader._leftUpBack
26766
- ], _HDRLoader._faceUp = [
26767
- _HDRLoader._leftBottomFront,
26768
- _HDRLoader._rightBottomFront,
26769
- _HDRLoader._leftBottomBack,
26770
- _HDRLoader._rightBottomBack
26771
- ], _HDRLoader._faceBottom = [
26772
- _HDRLoader._leftUpBack,
26773
- _HDRLoader._rightUpBack,
26774
- _HDRLoader._leftUpFront,
26775
- _HDRLoader._rightUpFront
26776
- ], _HDRLoader._faceFront = [
26777
- _HDRLoader._leftBottomBack,
26778
- _HDRLoader._rightBottomBack,
26779
- _HDRLoader._leftUpBack,
26780
- _HDRLoader._rightUpBack
26781
- ], _HDRLoader._faceBack = [
26782
- _HDRLoader._rightBottomFront,
26783
- _HDRLoader._leftBottomFront,
26784
- _HDRLoader._rightUpFront,
26785
- _HDRLoader._leftUpFront
26786
- ], _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);
27190
+ }(miniprogram$5.Loader), function() {
27191
+ _HDRLoader._rightBottomBack = new miniprogram$1$2.Vector3(1.0, -1.0, -1.0);
27192
+ }(), function() {
27193
+ _HDRLoader._rightBottomFront = new miniprogram$1$2.Vector3(1.0, -1.0, 1.0);
27194
+ }(), function() {
27195
+ _HDRLoader._rightUpBack = new miniprogram$1$2.Vector3(1.0, 1.0, -1.0);
27196
+ }(), function() {
27197
+ _HDRLoader._rightUpFront = new miniprogram$1$2.Vector3(1.0, 1.0, 1.0);
27198
+ }(), function() {
27199
+ _HDRLoader._leftBottomBack = new miniprogram$1$2.Vector3(-1.0, -1.0, -1.0);
27200
+ }(), function() {
27201
+ _HDRLoader._leftBottomFront = new miniprogram$1$2.Vector3(-1.0, -1.0, 1.0);
27202
+ }(), function() {
27203
+ _HDRLoader._leftUpBack = new miniprogram$1$2.Vector3(-1.0, 1.0, -1.0);
27204
+ }(), function() {
27205
+ _HDRLoader._leftUpFront = new miniprogram$1$2.Vector3(-1.0, 1.0, 1.0);
27206
+ }(), function() {
27207
+ _HDRLoader._faceRight = [
27208
+ _HDRLoader._rightBottomBack,
27209
+ _HDRLoader._rightBottomFront,
27210
+ _HDRLoader._rightUpBack,
27211
+ _HDRLoader._rightUpFront
27212
+ ];
27213
+ }(), function() {
27214
+ _HDRLoader._faceLeft = [
27215
+ _HDRLoader._leftBottomFront,
27216
+ _HDRLoader._leftBottomBack,
27217
+ _HDRLoader._leftUpFront,
27218
+ _HDRLoader._leftUpBack
27219
+ ];
27220
+ }(), function() {
27221
+ _HDRLoader._faceUp = [
27222
+ _HDRLoader._leftBottomFront,
27223
+ _HDRLoader._rightBottomFront,
27224
+ _HDRLoader._leftBottomBack,
27225
+ _HDRLoader._rightBottomBack
27226
+ ];
27227
+ }(), function() {
27228
+ _HDRLoader._faceBottom = [
27229
+ _HDRLoader._leftUpBack,
27230
+ _HDRLoader._rightUpBack,
27231
+ _HDRLoader._leftUpFront,
27232
+ _HDRLoader._rightUpFront
27233
+ ];
27234
+ }(), function() {
27235
+ _HDRLoader._faceFront = [
27236
+ _HDRLoader._leftBottomBack,
27237
+ _HDRLoader._rightBottomBack,
27238
+ _HDRLoader._leftUpBack,
27239
+ _HDRLoader._rightUpBack
27240
+ ];
27241
+ }(), function() {
27242
+ _HDRLoader._faceBack = [
27243
+ _HDRLoader._rightBottomFront,
27244
+ _HDRLoader._leftBottomFront,
27245
+ _HDRLoader._rightUpFront,
27246
+ _HDRLoader._leftUpFront
27247
+ ];
27248
+ }(), function() {
27249
+ _HDRLoader._tempVector3 = new miniprogram$1$2.Vector3();
27250
+ }(), function() {
27251
+ _HDRLoader._temp2Vector3 = new miniprogram$1$2.Vector3();
27252
+ }(), function() {
27253
+ _HDRLoader._temp3Vector3 = new miniprogram$1$2.Vector3();
27254
+ }(), function() {
27255
+ _HDRLoader._temp4Vector3 = new miniprogram$1$2.Vector3();
27256
+ }(), function() {
27257
+ _HDRLoader._temp5Vector3 = new miniprogram$1$2.Vector3();
27258
+ }(), _HDRLoader);
26787
27259
  HDRLoader = __decorate([
26788
27260
  miniprogram$5.resourceLoader(miniprogram$5.AssetType.HDR, [
26789
27261
  "hdr"
@@ -27153,7 +27625,7 @@ function _defineProperties$1(target, props) {
27153
27625
  Object.defineProperty(target, descriptor.key, descriptor);
27154
27626
  }
27155
27627
  }
27156
- function _createClass$1(Constructor, protoProps, staticProps) {
27628
+ function _create_class$1(Constructor, protoProps, staticProps) {
27157
27629
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
27158
27630
  if (staticProps) _defineProperties$1(Constructor, staticProps);
27159
27631
  return Constructor;
@@ -27264,7 +27736,7 @@ var BufferReader = /*#__PURE__*/ function() {
27264
27736
  if (byteLength < maxByteLength) this._offset++;
27265
27737
  return new Uint8Array(this._dataView.buffer, this._dataView.byteOffset + byteOffset, byteLength);
27266
27738
  };
27267
- _createClass$1(BufferReader, [
27739
+ _create_class$1(BufferReader, [
27268
27740
  {
27269
27741
  key: "offset",
27270
27742
  get: function get() {
@@ -27274,12 +27746,14 @@ var BufferReader = /*#__PURE__*/ function() {
27274
27746
  ]);
27275
27747
  return BufferReader;
27276
27748
  }();
27277
- BufferReader.imageMapping = {
27278
- 0: "image/png",
27279
- 1: "image/jpg",
27280
- 2: "image/webp",
27281
- 3: "ktx"
27282
- };
27749
+ (function() {
27750
+ BufferReader.imageMapping = {
27751
+ 0: "image/png",
27752
+ 1: "image/jpg",
27753
+ 2: "image/webp",
27754
+ 3: "ktx"
27755
+ };
27756
+ })();
27283
27757
  var decoderMap = {};
27284
27758
  /**
27285
27759
  * Decoder decorator generator.
@@ -27316,7 +27790,7 @@ var FileHeader = /*#__PURE__*/ function() {
27316
27790
  header.headerLength = nameUint8Array.byteLength + typeUint8Array.byteLength + 9;
27317
27791
  return header;
27318
27792
  };
27319
- _createClass$1(FileHeader, [
27793
+ _create_class$1(FileHeader, [
27320
27794
  {
27321
27795
  key: "dataLength",
27322
27796
  get: function get() {
@@ -27532,36 +28006,32 @@ exports.Texture2DDecoder = /*#__PURE__*/ function() {
27532
28006
  exports.Texture2DDecoder = __decorate([
27533
28007
  decoder("Texture2D")
27534
28008
  ], exports.Texture2DDecoder);
27535
- function isNativeReflectConstruct() {
28009
+ function _is_native_reflect_construct() {
27536
28010
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
27537
28011
  if (Reflect.construct.sham) return false;
27538
28012
  if (typeof Proxy === "function") return true;
27539
28013
  try {
27540
- Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
28014
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
27541
28015
  return true;
27542
28016
  } catch (e) {
27543
28017
  return false;
27544
28018
  }
27545
28019
  }
27546
- function construct(Parent, args, Class) {
27547
- if (isNativeReflectConstruct()) {
27548
- construct = Reflect.construct;
27549
- } else {
27550
- construct = function construct(Parent, args, Class) {
28020
+ function _construct(Parent, args, Class) {
28021
+ if (_is_native_reflect_construct()) _construct = Reflect.construct;
28022
+ else {
28023
+ _construct = function construct(Parent, args, Class) {
27551
28024
  var a = [
27552
28025
  null
27553
28026
  ];
27554
28027
  a.push.apply(a, args);
27555
28028
  var Constructor = Function.bind.apply(Parent, a);
27556
28029
  var instance = new Constructor();
27557
- if (Class) _setPrototypeOf$1(instance, Class.prototype);
28030
+ if (Class) _set_prototype_of$1(instance, Class.prototype);
27558
28031
  return instance;
27559
28032
  };
27560
28033
  }
27561
- return construct.apply(null, arguments);
27562
- }
27563
- function _construct(Parent, args, Class) {
27564
- return construct.apply(null, arguments);
28034
+ return _construct.apply(null, arguments);
27565
28035
  }
27566
28036
  var ReflectionParser = /*#__PURE__*/ function() {
27567
28037
  var ReflectionParser = function ReflectionParser() {};
@@ -27675,7 +28145,9 @@ var ReflectionParser = /*#__PURE__*/ function() {
27675
28145
  };
27676
28146
  return ReflectionParser;
27677
28147
  }();
27678
- ReflectionParser.customParseComponentHandles = new Map();
28148
+ (function() {
28149
+ ReflectionParser.customParseComponentHandles = new Map();
28150
+ })();
27679
28151
  var PrefabParser = /*#__PURE__*/ function() {
27680
28152
  var PrefabParser = function PrefabParser() {};
27681
28153
  PrefabParser.parseChildren = function parseChildren(entitiesConfig, entities, parentId) {
@@ -27924,7 +28396,7 @@ var SceneParserContext = /*#__PURE__*/ function() {
27924
28396
  };
27925
28397
  _proto._organizeEntities = function _organizeEntities() {
27926
28398
  var _this_context = this.context, entityConfigMap = _this_context.entityConfigMap, entityMap = _this_context.entityMap, scene = _this_context.scene, rootIds = _this_context.rootIds;
27927
- for(var _iterator = _createForOfIteratorHelperLoose(rootIds), _step; !(_step = _iterator()).done;){
28399
+ for(var _iterator = _create_for_of_iterator_helper_loose(rootIds), _step; !(_step = _iterator()).done;){
27928
28400
  var rootId = _step.value;
27929
28401
  PrefabParser.parseChildren(entityConfigMap, entityMap, rootId);
27930
28402
  }
@@ -28083,7 +28555,7 @@ var SourceFontLoader = /*#__PURE__*/ function(Loader) {
28083
28555
  });
28084
28556
  };
28085
28557
  _proto._registerFont = function _registerFont(fontName, fontUrl) {
28086
- return _asyncToGenerator(function() {
28558
+ return _async_to_generator(function() {
28087
28559
  var fontFace;
28088
28560
  return __generator(this, function(_state) {
28089
28561
  switch(_state.label){
@@ -28399,7 +28871,7 @@ SceneLoader = __decorate([
28399
28871
  "prefab"
28400
28872
  ], true)
28401
28873
  ], SceneLoader);
28402
- ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _asyncToGenerator(function(instance, item, engine) {
28874
+ ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _async_to_generator(function(instance, item, engine) {
28403
28875
  var props;
28404
28876
  return __generator(this, function(_state) {
28405
28877
  props = item.props;
@@ -28465,7 +28937,7 @@ function _defineProperties(target, props) {
28465
28937
  Object.defineProperty(target, descriptor.key, descriptor);
28466
28938
  }
28467
28939
  }
28468
- function _createClass(Constructor, protoProps, staticProps) {
28940
+ function _create_class(Constructor, protoProps, staticProps) {
28469
28941
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
28470
28942
  if (staticProps) _defineProperties(Constructor, staticProps);
28471
28943
  return Constructor;
@@ -28515,9 +28987,15 @@ function _createClass(Constructor, protoProps, staticProps) {
28515
28987
  };
28516
28988
  return MathUtil;
28517
28989
  }();
28518
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
28519
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
28520
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
28990
+ (function() {
28991
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
28992
+ })();
28993
+ (function() {
28994
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
28995
+ })();
28996
+ (function() {
28997
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
28998
+ })();
28521
28999
  /**
28522
29000
  * Describes a 3D-vector.
28523
29001
  */ var Vector3 = /*#__PURE__*/ function() {
@@ -28975,7 +29453,7 @@ function _createClass(Constructor, protoProps, staticProps) {
28975
29453
  out._z = iz * qw - iw * qz - ix * qy + iy * qx;
28976
29454
  out._onValueChanged && out._onValueChanged();
28977
29455
  };
28978
- _createClass(Vector3, [
29456
+ _create_class(Vector3, [
28979
29457
  {
28980
29458
  key: "x",
28981
29459
  get: /**
@@ -29015,8 +29493,12 @@ function _createClass(Constructor, protoProps, staticProps) {
29015
29493
  ]);
29016
29494
  return Vector3;
29017
29495
  }();
29018
- /** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
29019
- /** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
29496
+ (function() {
29497
+ /** @internal */ Vector3._zero = new Vector3(0.0, 0.0, 0.0);
29498
+ })();
29499
+ (function() {
29500
+ /** @internal */ Vector3._one = new Vector3(1.0, 1.0, 1.0);
29501
+ })();
29020
29502
  /**
29021
29503
  * A bounding sphere.
29022
29504
  * */ var BoundingSphere = /*#__PURE__*/ function() {
@@ -29084,7 +29566,9 @@ function _createClass(Constructor, protoProps, staticProps) {
29084
29566
  };
29085
29567
  return BoundingSphere;
29086
29568
  }();
29087
- BoundingSphere._tempVec30 = new Vector3();
29569
+ (function() {
29570
+ BoundingSphere._tempVec30 = new Vector3();
29571
+ })();
29088
29572
  /**
29089
29573
  * Axis Aligned Bound Box (AABB).
29090
29574
  */ var BoundingBox = /*#__PURE__*/ function() {
@@ -29242,8 +29726,12 @@ BoundingSphere._tempVec30 = new Vector3();
29242
29726
  };
29243
29727
  return BoundingBox;
29244
29728
  }();
29245
- BoundingBox._tempVec30 = new Vector3();
29246
- BoundingBox._tempVec31 = new Vector3();
29729
+ (function() {
29730
+ BoundingBox._tempVec30 = new Vector3();
29731
+ })();
29732
+ (function() {
29733
+ BoundingBox._tempVec31 = new Vector3();
29734
+ })();
29247
29735
  /**
29248
29736
  * Contains static methods to help in determining intersections, containment, etc.
29249
29737
  */ var CollisionUtil = /*#__PURE__*/ function() {
@@ -29591,9 +30079,15 @@ BoundingBox._tempVec31 = new Vector3();
29591
30079
  };
29592
30080
  return CollisionUtil;
29593
30081
  }();
29594
- CollisionUtil._tempVec30 = new Vector3();
29595
- CollisionUtil._tempVec31 = new Vector3();
29596
- CollisionUtil._tempVec32 = new Vector3();
30082
+ (function() {
30083
+ CollisionUtil._tempVec30 = new Vector3();
30084
+ })();
30085
+ (function() {
30086
+ CollisionUtil._tempVec31 = new Vector3();
30087
+ })();
30088
+ (function() {
30089
+ CollisionUtil._tempVec32 = new Vector3();
30090
+ })();
29597
30091
  /**
29598
30092
  * Represents a plane in three-dimensional space.
29599
30093
  */ var Plane = /*#__PURE__*/ function() {
@@ -30913,7 +31407,7 @@ CollisionUtil._tempVec32 = new Vector3();
30913
31407
  out._w = a._w * s;
30914
31408
  out._onValueChanged && out._onValueChanged();
30915
31409
  };
30916
- _createClass(Quaternion, [
31410
+ _create_class(Quaternion, [
30917
31411
  {
30918
31412
  key: "x",
30919
31413
  get: /**
@@ -30973,8 +31467,12 @@ CollisionUtil._tempVec32 = new Vector3();
30973
31467
  ]);
30974
31468
  return Quaternion;
30975
31469
  }();
30976
- /** @internal */ Quaternion._tempVector3 = new Vector3();
30977
- /** @internal */ Quaternion._tempQuat1 = new Quaternion();
31470
+ (function() {
31471
+ /** @internal */ Quaternion._tempVector3 = new Vector3();
31472
+ })();
31473
+ (function() {
31474
+ /** @internal */ Quaternion._tempQuat1 = new Quaternion();
31475
+ })();
30978
31476
  /**
30979
31477
  * Represents a 4x4 mathematical matrix.
30980
31478
  */ var Matrix = /*#__PURE__*/ function() {
@@ -31919,11 +32417,21 @@ CollisionUtil._tempVec32 = new Vector3();
31919
32417
  };
31920
32418
  return Matrix;
31921
32419
  }();
31922
- Matrix._tempVec30 = new Vector3();
31923
- Matrix._tempVec31 = new Vector3();
31924
- Matrix._tempVec32 = new Vector3();
31925
- Matrix._tempMat30 = new Matrix3x3();
31926
- /** @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);
32420
+ (function() {
32421
+ Matrix._tempVec30 = new Vector3();
32422
+ })();
32423
+ (function() {
32424
+ Matrix._tempVec31 = new Vector3();
32425
+ })();
32426
+ (function() {
32427
+ Matrix._tempVec32 = new Vector3();
32428
+ })();
32429
+ (function() {
32430
+ Matrix._tempMat30 = new Matrix3x3();
32431
+ })();
32432
+ (function() {
32433
+ /** @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);
32434
+ })();
31927
32435
  /**
31928
32436
  * Represents a ray with an origin and a direction in 3D space.
31929
32437
  */ var Ray = /*#__PURE__*/ function() {
@@ -32257,7 +32765,7 @@ Matrix._tempMat30 = new Matrix3x3();
32257
32765
  out._y = left._y * s;
32258
32766
  out._onValueChanged && out._onValueChanged();
32259
32767
  };
32260
- _createClass(Vector2, [
32768
+ _create_class(Vector2, [
32261
32769
  {
32262
32770
  key: "x",
32263
32771
  get: /**
@@ -32285,8 +32793,12 @@ Matrix._tempMat30 = new Matrix3x3();
32285
32793
  ]);
32286
32794
  return Vector2;
32287
32795
  }();
32288
- /** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
32289
- /** @internal */ Vector2._one = new Vector2(1.0, 1.0);
32796
+ (function() {
32797
+ /** @internal */ Vector2._zero = new Vector2(0.0, 0.0);
32798
+ })();
32799
+ (function() {
32800
+ /** @internal */ Vector2._one = new Vector2(1.0, 1.0);
32801
+ })();
32290
32802
  /**
32291
32803
  * Describes a 4D-vector.
32292
32804
  */ var Vector4 = /*#__PURE__*/ function() {
@@ -32666,7 +33178,7 @@ Matrix._tempMat30 = new Matrix3x3();
32666
33178
  out._w = w;
32667
33179
  out._onValueChanged && out._onValueChanged();
32668
33180
  };
32669
- _createClass(Vector4, [
33181
+ _create_class(Vector4, [
32670
33182
  {
32671
33183
  key: "x",
32672
33184
  get: /**
@@ -32718,8 +33230,12 @@ Matrix._tempMat30 = new Matrix3x3();
32718
33230
  ]);
32719
33231
  return Vector4;
32720
33232
  }();
32721
- /** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
32722
- /** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
33233
+ (function() {
33234
+ /** @internal */ Vector4._zero = new Vector4(0.0, 0.0, 0.0, 0.0);
33235
+ })();
33236
+ (function() {
33237
+ /** @internal */ Vector4._one = new Vector4(1.0, 1.0, 1.0, 1.0);
33238
+ })();
32723
33239
  /**
32724
33240
  * Describes a color in the from of RGBA (in order: R, G, B, A).
32725
33241
  */ var Color = /*#__PURE__*/ function() {
@@ -32928,7 +33444,7 @@ Matrix._tempMat30 = new Matrix3x3();
32928
33444
  out._onValueChanged && out._onValueChanged();
32929
33445
  return out;
32930
33446
  };
32931
- _createClass(Color, [
33447
+ _create_class(Color, [
32932
33448
  {
32933
33449
  key: "r",
32934
33450
  get: /**
@@ -33286,7 +33802,7 @@ function _defineProperties(target, props) {
33286
33802
  Object.defineProperty(target, descriptor.key, descriptor);
33287
33803
  }
33288
33804
  }
33289
- function _createClass(Constructor, protoProps, staticProps) {
33805
+ function _create_class(Constructor, protoProps, staticProps) {
33290
33806
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
33291
33807
  if (staticProps) _defineProperties(Constructor, staticProps);
33292
33808
  return Constructor;
@@ -33294,9 +33810,7 @@ function _createClass(Constructor, protoProps, staticProps) {
33294
33810
  function _instanceof1(left, right) {
33295
33811
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
33296
33812
  return !!right[Symbol.hasInstance](left);
33297
- } else {
33298
- return _instanceof(left, right);
33299
- }
33813
+ } else return _instanceof(left, right);
33300
33814
  }
33301
33815
  /**
33302
33816
  * The canvas used on the web, which can support HTMLCanvasElement and OffscreenCanvas.
@@ -33329,7 +33843,7 @@ function _instanceof1(left, right) {
33329
33843
  this._scale.set(x, y);
33330
33844
  this.scale = this._scale;
33331
33845
  };
33332
- _createClass(WebCanvas, [
33846
+ _create_class(WebCanvas, [
33333
33847
  {
33334
33848
  key: "width",
33335
33849
  get: /**
@@ -33381,15 +33895,12 @@ function _instanceof1(left, right) {
33381
33895
  ]);
33382
33896
  return WebCanvas;
33383
33897
  }();
33384
- function setPrototypeOf(o, p) {
33385
- setPrototypeOf = Object.setPrototypeOf || function setPrototypeOf(o, p) {
33898
+ function _set_prototype_of(o, p) {
33899
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
33386
33900
  o.__proto__ = p;
33387
33901
  return o;
33388
33902
  };
33389
- return setPrototypeOf(o, p);
33390
- }
33391
- function _setPrototypeOf(o, p) {
33392
- return setPrototypeOf(o, p);
33903
+ return _set_prototype_of(o, p);
33393
33904
  }
33394
33905
  function _inherits(subClass, superClass) {
33395
33906
  if (typeof superClass !== "function" && superClass !== null) {
@@ -33402,132 +33913,18 @@ function _inherits(subClass, superClass) {
33402
33913
  configurable: true
33403
33914
  }
33404
33915
  });
33405
- if (superClass) _setPrototypeOf(subClass, superClass);
33916
+ if (superClass) _set_prototype_of(subClass, superClass);
33406
33917
  }
33407
- /**
33408
- * WebGL platform engine,support includes WebGL1.0 and WebGL2.0.
33409
- */ var WebGLEngine = /*#__PURE__*/ function(Engine) {
33410
- var WebGLEngine = function WebGLEngine() {
33411
- return Engine.apply(this, arguments);
33412
- };
33413
- _inherits(WebGLEngine, Engine);
33414
- /**
33415
- * Create a WebGL engine.
33416
- * @param configuration - WebGL engine configuration
33417
- * @returns A promise that will resolve when the engine is created
33418
- */ WebGLEngine.create = function create(configuration) {
33419
- var canvas = configuration.canvas;
33420
- var webCanvas = new WebCanvas(typeof canvas === "string" ? engineMiniprogramAdapter.document.getElementById(canvas) : canvas);
33421
- var webGLRenderer = new WebGLGraphicDevice(configuration.graphicDeviceOptions);
33422
- var engine = new WebGLEngine(webCanvas, webGLRenderer, configuration);
33423
- return engine._initialize(configuration);
33424
- };
33425
- _createClass(WebGLEngine, [
33426
- {
33427
- key: "canvas",
33428
- get: /**
33429
- * Web canvas.
33430
- */ function get() {
33431
- return this._canvas;
33432
- }
33433
- }
33434
- ]);
33435
- return WebGLEngine;
33436
- }(miniprogram$1$1.Engine);
33437
- function extends_() {
33438
- extends_ = Object.assign || function(target) {
33918
+ function _extends() {
33919
+ _extends = Object.assign || function assign(target) {
33439
33920
  for(var i = 1; i < arguments.length; i++){
33440
33921
  var source = arguments[i];
33441
- for(var key in source){
33442
- if (Object.prototype.hasOwnProperty.call(source, key)) {
33443
- target[key] = source[key];
33444
- }
33445
- }
33922
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
33446
33923
  }
33447
33924
  return target;
33448
33925
  };
33449
- return extends_.apply(this, arguments);
33450
- }
33451
- function _extends() {
33452
- return extends_.apply(this, arguments);
33926
+ return _extends.apply(this, arguments);
33453
33927
  }
33454
- var GLBuffer = /*#__PURE__*/ function() {
33455
- var GLBuffer = function GLBuffer(rhi, type, byteLength, bufferUsage, data) {
33456
- if (bufferUsage === void 0) bufferUsage = miniprogram$1$1.BufferUsage.Static;
33457
- var gl = rhi.gl;
33458
- var glBuffer = gl.createBuffer();
33459
- var glBufferUsage = this._getGLBufferUsage(gl, bufferUsage);
33460
- var glBindTarget = type === miniprogram$1$1.BufferBindFlag.VertexBuffer ? gl.ARRAY_BUFFER : gl.ELEMENT_ARRAY_BUFFER;
33461
- this._gl = gl;
33462
- this._glBuffer = glBuffer;
33463
- this._glBufferUsage = glBufferUsage;
33464
- this._glBindTarget = glBindTarget;
33465
- this._isWebGL2 = rhi.isWebGL2;
33466
- this.bind();
33467
- if (data) {
33468
- gl.bufferData(glBindTarget, data, glBufferUsage);
33469
- } else {
33470
- gl.bufferData(glBindTarget, byteLength, glBufferUsage);
33471
- }
33472
- gl.bindBuffer(glBindTarget, null);
33473
- };
33474
- var _proto = GLBuffer.prototype;
33475
- _proto.bind = function bind() {
33476
- this._gl.bindBuffer(this._glBindTarget, this._glBuffer);
33477
- };
33478
- _proto.setData = function setData(byteLength, data, bufferByteOffset, dataOffset, dataLength, options) {
33479
- var gl = this._gl;
33480
- var glBindTarget = this._glBindTarget;
33481
- this.bind();
33482
- if (options === miniprogram$1$1.SetDataOptions.Discard) {
33483
- gl.bufferData(glBindTarget, byteLength, this._glBufferUsage);
33484
- }
33485
- // TypeArray is BYTES_PER_ELEMENT, unTypeArray is 1
33486
- var byteSize = data.BYTES_PER_ELEMENT || 1;
33487
- var dataByteLength = dataLength ? byteSize * dataLength : data.byteLength;
33488
- if (dataOffset !== 0 || dataByteLength < data.byteLength) {
33489
- var isArrayBufferView = data.byteOffset !== undefined;
33490
- if (this._isWebGL2 && isArrayBufferView) {
33491
- gl.bufferSubData(glBindTarget, bufferByteOffset, data, dataOffset, dataByteLength / byteSize);
33492
- } else {
33493
- var subData = new Uint8Array(isArrayBufferView ? data.buffer : data, dataOffset * byteSize, dataByteLength);
33494
- gl.bufferSubData(glBindTarget, bufferByteOffset, subData);
33495
- }
33496
- } else {
33497
- gl.bufferSubData(glBindTarget, bufferByteOffset, data);
33498
- }
33499
- gl.bindBuffer(glBindTarget, null);
33500
- };
33501
- _proto.getData = function getData(data, bufferByteOffset, dataOffset, dataLength) {
33502
- if (this._isWebGL2) {
33503
- var gl = this._gl;
33504
- this.bind();
33505
- gl.getBufferSubData(this._glBindTarget, bufferByteOffset, data, dataOffset, dataLength);
33506
- } else {
33507
- throw "Buffer is write-only on WebGL1.0 platforms.";
33508
- }
33509
- };
33510
- _proto.resize = function resize(byteLength) {
33511
- this.bind();
33512
- this._gl.bufferData(this._glBindTarget, byteLength, this._glBufferUsage);
33513
- };
33514
- _proto.destroy = function destroy() {
33515
- this._gl.deleteBuffer(this._glBuffer);
33516
- this._gl = null;
33517
- this._glBuffer = null;
33518
- };
33519
- _proto._getGLBufferUsage = function _getGLBufferUsage(gl, bufferUsage) {
33520
- switch(bufferUsage){
33521
- case miniprogram$1$1.BufferUsage.Static:
33522
- return gl.STATIC_DRAW;
33523
- case miniprogram$1$1.BufferUsage.Dynamic:
33524
- return gl.DYNAMIC_DRAW;
33525
- case miniprogram$1$1.BufferUsage.Stream:
33526
- return gl.STREAM_DRAW;
33527
- }
33528
- };
33529
- return GLBuffer;
33530
- }();
33531
33928
  /**
33532
33929
  * GL capability.
33533
33930
  */ var GLCapability = /*#__PURE__*/ function() {
@@ -33659,7 +34056,7 @@ var GLBuffer = /*#__PURE__*/ function() {
33659
34056
  TEXTURE_MAX_ANISOTROPY_EXT: "TEXTURE_MAX_ANISOTROPY_EXT"
33660
34057
  });
33661
34058
  };
33662
- _createClass(GLCapability, [
34059
+ _create_class(GLCapability, [
33663
34060
  {
33664
34061
  key: "maxTextureSize",
33665
34062
  get: function get() {
@@ -33790,8 +34187,8 @@ var GLBuffer = /*#__PURE__*/ function() {
33790
34187
  if (useVao) {
33791
34188
  gl.drawElements(topology, count, _glIndexType, start * _glIndexByteCount);
33792
34189
  } else {
33793
- var _glBuffer = _indexBufferBinding.buffer._platformBuffer._glBuffer;
33794
- gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _glBuffer);
34190
+ var _nativeBuffer = _indexBufferBinding.buffer._nativeBuffer;
34191
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _nativeBuffer);
33795
34192
  gl.drawElements(topology, count, _glIndexType, start * _glIndexByteCount);
33796
34193
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
33797
34194
  }
@@ -33804,8 +34201,8 @@ var GLBuffer = /*#__PURE__*/ function() {
33804
34201
  if (useVao) {
33805
34202
  gl.drawElementsInstanced(topology, count, _glIndexType, start * _glIndexByteCount, _instanceCount);
33806
34203
  } else {
33807
- var _glBuffer1 = _indexBufferBinding.buffer._platformBuffer._glBuffer;
33808
- gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _glBuffer1);
34204
+ var _nativeBuffer1 = _indexBufferBinding.buffer._nativeBuffer;
34205
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _nativeBuffer1);
33809
34206
  gl.drawElementsInstanced(topology, count, _glIndexType, start * _glIndexByteCount, _instanceCount);
33810
34207
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
33811
34208
  }
@@ -33845,7 +34242,7 @@ var GLBuffer = /*#__PURE__*/ function() {
33845
34242
  var element = attributes[name];
33846
34243
  if (element) {
33847
34244
  var _vertexBufferBindings_element_bindingIndex = vertexBufferBindings[element.bindingIndex], buffer = _vertexBufferBindings_element_bindingIndex.buffer, stride = _vertexBufferBindings_element_bindingIndex.stride;
33848
- vbo = buffer._platformBuffer._glBuffer;
34245
+ vbo = buffer._nativeBuffer;
33849
34246
  // prevent binding the vbo which already bound at the last loop, e.g. a buffer with multiple attributes.
33850
34247
  if (lastBoundVbo !== vbo) {
33851
34248
  lastBoundVbo = vbo;
@@ -33877,7 +34274,7 @@ var GLBuffer = /*#__PURE__*/ function() {
33877
34274
  // @ts-ignore
33878
34275
  var _indexBufferBinding = this._primitive._indexBufferBinding;
33879
34276
  if (_indexBufferBinding) {
33880
- gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _indexBufferBinding.buffer._platformBuffer._glBuffer);
34277
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, _indexBufferBinding.buffer._nativeBuffer);
33881
34278
  }
33882
34279
  this._bindBufferAndAttrib(shaderProgram);
33883
34280
  /** unbind */ gl.bindVertexArray(null);
@@ -34409,7 +34806,7 @@ var GLBuffer = /*#__PURE__*/ function() {
34409
34806
  }
34410
34807
  return true;
34411
34808
  };
34412
- _createClass(GLTexture, [
34809
+ _create_class(GLTexture, [
34413
34810
  {
34414
34811
  key: "wrapModeU",
34415
34812
  set: /**
@@ -34934,19 +35331,20 @@ exports.WebGLMode = void 0;
34934
35331
  WebGLMode[WebGLMode[/** WebGL1.0, */ "WebGL1"] = 2] = "WebGL1";
34935
35332
  })(exports.WebGLMode || (exports.WebGLMode = {}));
34936
35333
  /**
34937
- * WebGL graphic device, including WebGL1.0 and WebGL2.0.
34938
- */ var WebGLGraphicDevice = /*#__PURE__*/ function() {
34939
- var WebGLGraphicDevice = function WebGLGraphicDevice(initializeOptions) {
35334
+ * WebGL renderer, including WebGL1.0 and WebGL2.0.
35335
+ */ var WebGLRenderer = /*#__PURE__*/ function() {
35336
+ var WebGLRenderer = function WebGLRenderer(initializeOptions) {
34940
35337
  if (initializeOptions === void 0) initializeOptions = {};
34941
- /** @internal */ this._readFrameBuffer = null;
34942
35338
  /** @internal */ this._enableGlobalDepthBias = false;
34943
35339
  this._activeTextures = new Array(32);
35340
+ // cache value
34944
35341
  this._lastViewport = new miniprogram$1.Vector4(null, null, null, null);
34945
35342
  this._lastScissor = new miniprogram$1.Vector4(null, null, null, null);
34946
35343
  this._lastClearColor = new miniprogram$1.Color(null, null, null, null);
34947
35344
  this._scissorEnable = false;
34948
35345
  var options = _extends({
34949
35346
  webGLMode: 0,
35347
+ alpha: false,
34950
35348
  stencil: true,
34951
35349
  _forceFlush: false
34952
35350
  }, initializeOptions);
@@ -34961,20 +35359,12 @@ exports.WebGLMode = void 0;
34961
35359
  }
34962
35360
  }
34963
35361
  this._options = options;
34964
- this._onWebGLContextLost = this._onWebGLContextLost.bind(this);
34965
- this._onWebGLContextRestored = this._onWebGLContextRestored.bind(this);
34966
35362
  };
34967
- var _proto = WebGLGraphicDevice.prototype;
34968
- _proto.init = function init(canvas, onDeviceLost, onDeviceRestored) {
35363
+ var _proto = WebGLRenderer.prototype;
35364
+ _proto.init = function init(canvas) {
34969
35365
  var options = this._options;
34970
- var webCanvas = canvas._webCanvas;
35366
+ var webCanvas = this._webCanvas = canvas._webCanvas;
34971
35367
  var webGLMode = options.webGLMode;
34972
- this._onDeviceLost = onDeviceLost;
34973
- this._onDeviceRestored = onDeviceRestored;
34974
- webCanvas.addEventListener("webglcontextlost", this._onWebGLContextLost, false);
34975
- webCanvas.addEventListener("webglcontextrestored", this._onWebGLContextRestored, false);
34976
- webCanvas.addEventListener("webglcontextcreationerror", this._onContextCreationError, false);
34977
- this._webCanvas = webCanvas;
34978
35368
  var gl;
34979
35369
  if (webGLMode == 0 || webGLMode == 1) {
34980
35370
  gl = webCanvas.getContext("webgl2", options);
@@ -35000,7 +35390,16 @@ exports.WebGLMode = void 0;
35000
35390
  throw new Error("Get GL Context FAILED.");
35001
35391
  }
35002
35392
  this._gl = gl;
35003
- this._initGLState(gl);
35393
+ this._activeTextureID = gl.TEXTURE0;
35394
+ this._renderStates = new GLRenderStates(gl);
35395
+ this._extensions = new GLExtensions(this);
35396
+ this._capability = new GLCapability(this);
35397
+ // Make sure the active texture in gl context is on default, because gl context may be used in other webgl renderer.
35398
+ gl.activeTexture(gl.TEXTURE0);
35399
+ var debugRenderInfo = gl.getExtension("WEBGL_debug_renderer_info");
35400
+ if (debugRenderInfo != null) {
35401
+ this._renderer = gl.getParameter(debugRenderInfo.UNMASKED_RENDERER_WEBGL);
35402
+ }
35004
35403
  };
35005
35404
  _proto.createPlatformPrimitive = function createPlatformPrimitive(primitive) {
35006
35405
  return new GLPrimitive(this, primitive);
@@ -35017,10 +35416,6 @@ exports.WebGLMode = void 0;
35017
35416
  _proto.createPlatformRenderTarget = function createPlatformRenderTarget(target) {
35018
35417
  return new GLRenderTarget(this, target);
35019
35418
  };
35020
- _proto.createPlatformBuffer = function createPlatformBuffer(type, byteLength, bufferUsage, data) {
35021
- if (bufferUsage === void 0) bufferUsage = miniprogram$1$1.BufferUsage.Static;
35022
- return new GLBuffer(this, type, byteLength, bufferUsage, data);
35023
- };
35024
35419
  _proto.requireExtension = function requireExtension(ext) {
35025
35420
  return this._extensions.requireExtension(ext);
35026
35421
  };
@@ -35148,57 +35543,8 @@ exports.WebGLMode = void 0;
35148
35543
  _proto.flush = function flush() {
35149
35544
  this._gl.flush();
35150
35545
  };
35151
- _proto.forceLoseDevice = function forceLoseDevice() {
35152
- var extension = this.requireExtension(miniprogram$1$1.GLCapabilityType.WEBGL_lose_context);
35153
- extension.loseContext();
35154
- };
35155
- _proto.forceRestoreDevice = function forceRestoreDevice() {
35156
- var extension = this.requireExtension(miniprogram$1$1.GLCapabilityType.WEBGL_lose_context);
35157
- extension.restoreContext();
35158
- };
35159
- _proto.resetState = function resetState() {
35160
- this._readFrameBuffer = null;
35161
- this._enableGlobalDepthBias = false;
35162
- this._currentBindShaderProgram = null;
35163
- var activeTextures = this._activeTextures;
35164
- for(var i = 0, n = activeTextures.length; i < n; i++){
35165
- activeTextures[i] = null;
35166
- }
35167
- this._lastViewport.set(null, null, null, null);
35168
- this._lastScissor.set(null, null, null, null);
35169
- this._lastClearColor.set(null, null, null, null);
35170
- this._scissorEnable = false;
35171
- this._initGLState(this._gl);
35172
- };
35173
- _proto._initGLState = function _initGLState(gl) {
35174
- this._activeTextureID = gl.TEXTURE0;
35175
- this._renderStates = new GLRenderStates(gl);
35176
- this._extensions = new GLExtensions(this);
35177
- this._capability = new GLCapability(this);
35178
- // Make sure the active texture in gl context is on default, because gl context may be used in other webgl renderer.
35179
- gl.activeTexture(gl.TEXTURE0);
35180
- var debugRenderInfo = gl.getExtension("WEBGL_debug_renderer_info");
35181
- if (debugRenderInfo != null) {
35182
- this._renderer = gl.getParameter(debugRenderInfo.UNMASKED_RENDERER_WEBGL);
35183
- }
35184
- };
35185
- _proto.destroy = function destroy() {
35186
- var webCanvas = this._webCanvas;
35187
- webCanvas.removeEventListener("webglcontextcreationerror", this._onContextCreationError, false);
35188
- webCanvas.removeEventListener("webglcontextlost", this._onWebGLContextLost, false);
35189
- webCanvas.removeEventListener("webglcontextrestored", this._onWebGLContextRestored, false);
35190
- };
35191
- _proto._onContextCreationError = function _onContextCreationError(event) {
35192
- console.error("WebGLRenderer: WebGL context could not be created. Reason: ", event.statusMessage);
35193
- };
35194
- _proto._onWebGLContextLost = function _onWebGLContextLost(event) {
35195
- event.preventDefault();
35196
- this._onDeviceLost();
35197
- };
35198
- _proto._onWebGLContextRestored = function _onWebGLContextRestored(event) {
35199
- this._onDeviceRestored();
35200
- };
35201
- _createClass(WebGLGraphicDevice, [
35546
+ _proto.destroy = function destroy() {};
35547
+ _create_class(WebGLRenderer, [
35202
35548
  {
35203
35549
  key: "isWebGL2",
35204
35550
  get: function get() {
@@ -35239,11 +35585,32 @@ exports.WebGLMode = void 0;
35239
35585
  }
35240
35586
  }
35241
35587
  ]);
35242
- return WebGLGraphicDevice;
35588
+ return WebGLRenderer;
35243
35589
  }();
35590
+ /**
35591
+ * WebGL platform engine,support includes WebGL1.0 and WebGL2.0.
35592
+ */ var WebGLEngine = /*#__PURE__*/ function(Engine) {
35593
+ var WebGLEngine = function WebGLEngine(canvas, webGLRendererOptions) {
35594
+ var webCanvas = new WebCanvas(typeof canvas === "string" ? engineMiniprogramAdapter.document.getElementById(canvas) : canvas);
35595
+ var hardwareRenderer = new WebGLRenderer(webGLRendererOptions);
35596
+ return Engine.call(this, webCanvas, hardwareRenderer);
35597
+ };
35598
+ _inherits(WebGLEngine, Engine);
35599
+ _create_class(WebGLEngine, [
35600
+ {
35601
+ key: "canvas",
35602
+ get: /**
35603
+ * Web canvas.
35604
+ */ function get() {
35605
+ return this._canvas;
35606
+ }
35607
+ }
35608
+ ]);
35609
+ return WebGLEngine;
35610
+ }(miniprogram$1$1.Engine);
35244
35611
  exports.WebCanvas = WebCanvas;
35245
35612
  exports.WebGLEngine = WebGLEngine;
35246
- exports.WebGLGraphicDevice = WebGLGraphicDevice;
35613
+ exports.WebGLRenderer = WebGLRenderer;
35247
35614
 
35248
35615
  var miniprogram$3 = /*#__PURE__*/Object.freeze({
35249
35616
  __proto__: null
@@ -35284,7 +35651,7 @@ function _interopNamespace(e) {
35284
35651
  }
35285
35652
  var CoreObjects__namespace = /*#__PURE__*/ _interopNamespace(CoreObjects);
35286
35653
  //@ts-ignore
35287
- var version = "0.9.0-beta.82";
35654
+ var version = "0.9.1";
35288
35655
  console.log("Galacean engine version: " + version);
35289
35656
  for(var key in CoreObjects__namespace){
35290
35657
  CoreObjects.Loader.registerClass(key, CoreObjects__namespace[key]);
@@ -35452,8 +35819,12 @@ Object.keys(miniprogram$2).forEach(function(k) {
35452
35819
  };
35453
35820
  return LiteColliderShape;
35454
35821
  }();
35455
- LiteColliderShape._ray = new miniprogram_1.Ray();
35456
- LiteColliderShape._tempPoint = new miniprogram_1.Vector3();
35822
+ (function() {
35823
+ LiteColliderShape._ray = new miniprogram_1.Ray();
35824
+ })();
35825
+ (function() {
35826
+ LiteColliderShape._tempPoint = new miniprogram_1.Vector3();
35827
+ })();
35457
35828
 
35458
35829
  /**
35459
35830
  * Used to implement transformation related functions.
@@ -35596,7 +35967,7 @@ LiteColliderShape._tempPoint = new miniprogram_1.Vector3();
35596
35967
  this._dirtyFlag |= type;
35597
35968
  this._updateFlagManager.distribute();
35598
35969
  };
35599
- _createClass$3(LiteTransform, [
35970
+ _create_class$3(LiteTransform, [
35600
35971
  {
35601
35972
  key: "owner",
35602
35973
  set: function set(value) {
@@ -35745,8 +36116,12 @@ LiteColliderShape._tempPoint = new miniprogram_1.Vector3();
35745
36116
  ]);
35746
36117
  return LiteTransform;
35747
36118
  }();
35748
- LiteTransform._tempQuat0 = new miniprogram_1.Quaternion();
35749
- LiteTransform._tempMat42 = new miniprogram_1.Matrix();
36119
+ (function() {
36120
+ LiteTransform._tempQuat0 = new miniprogram_1.Quaternion();
36121
+ })();
36122
+ (function() {
36123
+ LiteTransform._tempMat42 = new miniprogram_1.Matrix();
36124
+ })();
35750
36125
  var /**
35751
36126
  * Dirty flag of transform.
35752
36127
  */ TransformFlag;
@@ -36051,7 +36426,9 @@ var /**
36051
36426
  };
36052
36427
  return LiteBoxColliderShape;
36053
36428
  }(LiteColliderShape);
36054
- LiteBoxColliderShape._tempBox = new miniprogram_1.BoundingBox();
36429
+ (function() {
36430
+ LiteBoxColliderShape._tempBox = new miniprogram_1.BoundingBox();
36431
+ })();
36055
36432
 
36056
36433
  /**
36057
36434
  * Sphere collider shape in Lite.
@@ -36091,7 +36468,7 @@ LiteBoxColliderShape._tempBox = new miniprogram_1.BoundingBox();
36091
36468
  return false;
36092
36469
  }
36093
36470
  };
36094
- _createClass$3(LiteSphereColliderShape, [
36471
+ _create_class$3(LiteSphereColliderShape, [
36095
36472
  {
36096
36473
  key: "worldRadius",
36097
36474
  get: function get() {
@@ -36101,7 +36478,9 @@ LiteBoxColliderShape._tempBox = new miniprogram_1.BoundingBox();
36101
36478
  ]);
36102
36479
  return LiteSphereColliderShape;
36103
36480
  }(LiteColliderShape);
36104
- LiteSphereColliderShape._tempSphere = new miniprogram_1.BoundingSphere();
36481
+ (function() {
36482
+ LiteSphereColliderShape._tempSphere = new miniprogram_1.BoundingSphere();
36483
+ })();
36105
36484
 
36106
36485
  /**
36107
36486
  * A manager is a collection of colliders and constraints which can interact.
@@ -36353,10 +36732,18 @@ LiteSphereColliderShape._tempSphere = new miniprogram_1.BoundingSphere();
36353
36732
  };
36354
36733
  return LitePhysicsManager;
36355
36734
  }();
36356
- LitePhysicsManager._tempSphere = new miniprogram_1.BoundingSphere();
36357
- LitePhysicsManager._tempBox = new miniprogram_1.BoundingBox();
36358
- LitePhysicsManager._currentHit = new LiteHitResult();
36359
- LitePhysicsManager._hitResult = new LiteHitResult();
36735
+ (function() {
36736
+ LitePhysicsManager._tempSphere = new miniprogram_1.BoundingSphere();
36737
+ })();
36738
+ (function() {
36739
+ LitePhysicsManager._tempBox = new miniprogram_1.BoundingBox();
36740
+ })();
36741
+ (function() {
36742
+ LitePhysicsManager._currentHit = new LiteHitResult();
36743
+ })();
36744
+ (function() {
36745
+ LitePhysicsManager._hitResult = new LiteHitResult();
36746
+ })();
36360
36747
  var /**
36361
36748
  * Physics state
36362
36749
  */ TriggerEventState;