@galacean/engine-core 0.9.20 → 0.9.21

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.
Files changed (153) hide show
  1. package/dist/main.js +834 -1495
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +834 -1495
  4. package/dist/module.js +613 -1109
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/RenderPipeline/CullingResults.d.ts +1 -0
  8. package/types/RenderPipeline/DepthOnlyPass.d.ts +1 -0
  9. package/types/RenderPipeline/PipelinePass.d.ts +16 -0
  10. package/types/RenderPipeline/PipelineUtils.d.ts +1 -0
  11. package/types/RenderPipeline/RenderData.d.ts +8 -1
  12. package/types/RenderPipeline/RenderElementX.d.ts +12 -0
  13. package/types/RenderPipeline/enums/PipelineStage.d.ts +2 -0
  14. package/types/SafeLoopArray.d.ts +37 -0
  15. package/types/Ticker.d.ts +30 -0
  16. package/types/animation/animationCurve/AnimationRectCurve.d.ts +8 -0
  17. package/types/animation/animationCurve/AnimationRefCurve.d.ts +8 -0
  18. package/types/animation/internal/AnimationCurveOwnerLayerData.d.ts +1 -0
  19. package/types/asset/GraphicsResource.d.ts +4 -0
  20. package/types/enums/ActiveChangeFlag.d.ts +6 -0
  21. package/types/enums/DepthTextureMode.d.ts +7 -0
  22. package/types/graphic/Primitive.d.ts +1 -0
  23. package/types/graphic/PrimitiveVertexBinding.d.ts +1 -0
  24. package/types/graphic/SubPrimitive.d.ts +9 -0
  25. package/types/particle/ParticleBufferUtils.d.ts +1 -0
  26. package/types/particle/ParticleData.d.ts +1 -0
  27. package/types/particle/ParticleGenerator.d.ts +72 -0
  28. package/types/particle/ParticleMaterial.d.ts +28 -0
  29. package/types/particle/ParticleMesh.d.ts +289 -0
  30. package/types/particle/ParticleShaderDeclaration.d.ts +1 -0
  31. package/types/particle/ParticleShaderMacro.d.ts +1 -0
  32. package/types/particle/ParticleShaderProperty.d.ts +1 -0
  33. package/types/particle/ParticleSystem.d.ts +41 -0
  34. package/types/particle/ParticleVertexElements.d.ts +1 -0
  35. package/types/particle/ParticleVertexUtils.d.ts +1 -0
  36. package/types/particle/enum/ParticleAnimationRowMode.d.ts +9 -0
  37. package/types/particle/enum/ParticleAnimationType.d.ts +9 -0
  38. package/types/particle/enum/ParticleCurveMode.d.ts +13 -0
  39. package/types/particle/enum/ParticleGradientMode.d.ts +13 -0
  40. package/types/particle/enum/ParticleRenderMode.d.ts +17 -0
  41. package/types/particle/enum/ParticleScaleMode.d.ts +11 -0
  42. package/types/particle/enum/ParticleShapeMultiModeValue.d.ts +9 -0
  43. package/types/particle/enum/ParticleShapeType.d.ts +15 -0
  44. package/types/particle/enum/ParticleSimulationSpace.d.ts +9 -0
  45. package/types/particle/enum/index.d.ts +9 -0
  46. package/types/particle/enums/ParticleCurveMode.d.ts +9 -0
  47. package/types/particle/enums/ParticleGradientMode.d.ts +9 -0
  48. package/types/particle/enums/ParticleRandomSubSeeds.d.ts +1 -0
  49. package/types/particle/enums/ParticleRenderMode.d.ts +17 -0
  50. package/types/particle/enums/ParticleScaleMode.d.ts +11 -0
  51. package/types/particle/enums/ParticleSimulationSpace.d.ts +9 -0
  52. package/types/particle/enums/ParticleStopMode.d.ts +6 -0
  53. package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +1 -0
  54. package/types/particle/enums/attributes/MeshParticleVertexAttribute.d.ts +5 -0
  55. package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +1 -0
  56. package/types/particle/module/Burst.d.ts +38 -0
  57. package/types/particle/module/ColorGradient.d.ts +75 -0
  58. package/types/particle/module/ColorOverLifetimeModule.d.ts +20 -0
  59. package/types/particle/module/EmissionModule.d.ts +63 -0
  60. package/types/particle/module/FrameOverTime.d.ts +73 -0
  61. package/types/particle/module/ParticleCurve.d.ts +37 -0
  62. package/types/particle/module/RotationOverLifetimeModule.d.ts +21 -0
  63. package/types/particle/module/RotationVelocityGradient.d.ts +184 -0
  64. package/types/particle/module/SizeGradient.d.ts +151 -0
  65. package/types/particle/module/SizeOverLifetimeModule.d.ts +21 -0
  66. package/types/particle/module/StartFrame.d.ts +46 -0
  67. package/types/particle/module/TextureSheetAnimationModule.d.ts +37 -0
  68. package/types/particle/module/VelocityGradient.d.ts +110 -0
  69. package/types/particle/module/VelocityOverLifetimeModule.d.ts +22 -0
  70. package/types/particle/module/index.d.ts +15 -0
  71. package/types/particle/module/shape/BaseShape.d.ts +26 -0
  72. package/types/particle/module/shape/BoxShape.d.ts +20 -0
  73. package/types/particle/module/shape/CircleShape.d.ts +27 -0
  74. package/types/particle/module/shape/ConeShape.d.ts +35 -0
  75. package/types/particle/module/shape/HemisphereShape.d.ts +23 -0
  76. package/types/particle/module/shape/ShapeUtils.d.ts +1 -0
  77. package/types/particle/module/shape/SphereShape.d.ts +23 -0
  78. package/types/particle/module/shape/index.d.ts +5 -0
  79. package/types/particle/modules/Burst.d.ts +14 -0
  80. package/types/particle/modules/ColorOverLifetimeModule.d.ts +20 -0
  81. package/types/particle/modules/EmissionModule.d.ts +45 -0
  82. package/types/particle/modules/MainModule.d.ts +70 -0
  83. package/types/particle/modules/ParticleCompositeCurve.d.ts +56 -0
  84. package/types/particle/modules/ParticleCompositeGradient.d.ts +55 -0
  85. package/types/particle/modules/ParticleCurve.d.ts +56 -0
  86. package/types/particle/modules/ParticleGeneratorModule.d.ts +12 -0
  87. package/types/particle/modules/ParticleGradient.d.ts +94 -0
  88. package/types/particle/modules/RotationOverLifetimeModule.d.ts +34 -0
  89. package/types/particle/modules/ShapeModule.d.ts +9 -0
  90. package/types/particle/modules/SizeOverLifetimeModule.d.ts +34 -0
  91. package/types/particle/modules/TextureSheetAnimationModule.d.ts +38 -0
  92. package/types/particle/modules/VelocityOverLifetimeModule.d.ts +34 -0
  93. package/types/particle/modules/shape/BaseShape.d.ts +12 -0
  94. package/types/particle/modules/shape/BoxShape.d.ts +11 -0
  95. package/types/particle/modules/shape/CircleShape.d.ts +17 -0
  96. package/types/particle/modules/shape/ConeShape.d.ts +28 -0
  97. package/types/particle/modules/shape/HemisphereShape.d.ts +9 -0
  98. package/types/particle/modules/shape/ShapeUtils.d.ts +1 -0
  99. package/types/particle/modules/shape/SphereShape.d.ts +9 -0
  100. package/types/particle/modules/shape/enums/ParticleShapeArcMode.d.ts +9 -0
  101. package/types/particle/modules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
  102. package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +15 -0
  103. package/types/particle/modules/shape/index.d.ts +6 -0
  104. package/types/particle/moudules/Burst.d.ts +25 -0
  105. package/types/particle/moudules/Emission.d.ts +47 -0
  106. package/types/particle/moudules/EmissionModule.d.ts +49 -0
  107. package/types/particle/moudules/MainModule.d.ts +59 -0
  108. package/types/particle/moudules/ParticleCurve.d.ts +27 -0
  109. package/types/particle/moudules/ParticleGradient.d.ts +28 -0
  110. package/types/particle/moudules/ShapeModule.d.ts +7 -0
  111. package/types/particle/moudules/shape/BaseShape.d.ts +28 -0
  112. package/types/particle/moudules/shape/BoxShape.d.ts +20 -0
  113. package/types/particle/moudules/shape/CircleShape.d.ts +27 -0
  114. package/types/particle/moudules/shape/ConeShape.d.ts +35 -0
  115. package/types/particle/moudules/shape/HemisphereShape.d.ts +23 -0
  116. package/types/particle/moudules/shape/ShapeUtils.d.ts +1 -0
  117. package/types/particle/moudules/shape/SphereShape.d.ts +23 -0
  118. package/types/particle/moudules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
  119. package/types/particle/moudules/shape/enums/ParticleShapeType.d.ts +15 -0
  120. package/types/particle/moudules/shape/index.d.ts +5 -0
  121. package/types/physics/PhysicsScene.d.ts +79 -0
  122. package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +0 -1
  123. package/types/shader/ShaderPart.d.ts +5 -0
  124. package/types/shader/SubShader.d.ts +0 -1
  125. package/types/shader/enums/RenderStateElementKey.d.ts +60 -0
  126. package/types/shaderlib/particle/index.d.ts +14 -0
  127. package/types/shadow/PipelinePass.d.ts +16 -0
  128. package/types/utils/BoolUpdateFlag.d.ts +12 -0
  129. package/types/utils/DisorderedArray.d.ts +18 -0
  130. package/types/utils/SafeLoopArray.d.ts +41 -0
  131. package/types/utils/UpdateFlag.d.ts +20 -0
  132. package/types/utils/UpdateFlagManager.d.ts +1 -0
  133. package/types/utils/Utils.d.ts +31 -0
  134. package/types/xr/XRManager.d.ts +31 -0
  135. package/types/xr/component/XRPoseDriver.d.ts +10 -0
  136. package/types/xr/data/XRCamera.d.ts +6 -0
  137. package/types/xr/data/XRDevice.d.ts +9 -0
  138. package/types/xr/data/XRHandle.d.ts +10 -0
  139. package/types/xr/enum/EnumXRButton.d.ts +5 -0
  140. package/types/xr/enum/EnumXRDevicePhase.d.ts +4 -0
  141. package/types/xr/enum/EnumXRFeature.d.ts +9 -0
  142. package/types/xr/enum/EnumXRInputSource.d.ts +8 -0
  143. package/types/xr/enum/EnumXRMode.d.ts +7 -0
  144. package/types/xr/enum/EnumXRSubsystem.d.ts +4 -0
  145. package/types/xr/enum/EnumXRTrackingMode.d.ts +7 -0
  146. package/types/xr/feature/XRCameraManager.d.ts +21 -0
  147. package/types/xr/feature/XRFeature.d.ts +29 -0
  148. package/types/xr/feature/XRImageTrackManager.d.ts +10 -0
  149. package/types/xr/feature/XRInputManager.d.ts +16 -0
  150. package/types/xr/index.d.ts +18 -0
  151. package/types/xr/provider/XRProvider.d.ts +19 -0
  152. package/types/xr/subsystem/XRInputSubsystem.d.ts +5 -0
  153. package/types/xr/subsystem/XRSubsystem.d.ts +30 -0
@@ -3,11 +3,23 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var engineMiniprogramAdapter = require('@galacean/engine-miniprogram-adapter');
6
+ var _assert_this_initialized = require('@swc/helpers/src/_assert_this_initialized.mjs');
7
+ var _create_class = require('@swc/helpers/src/_create_class.mjs');
8
+ var _inherits = require('@swc/helpers/src/_inherits.mjs');
9
+ var _ts_decorate = require('@swc/helpers/src/_ts_decorate.mjs');
10
+ var _instanceof = require('@swc/helpers/src/_instanceof.mjs');
6
11
  var miniprogram = require('@galacean/engine-math/dist/miniprogram');
12
+ var _extends = require('@swc/helpers/src/_extends.mjs');
13
+
14
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
+
16
+ var _assert_this_initialized__default = /*#__PURE__*/_interopDefaultLegacy(_assert_this_initialized);
17
+ var _create_class__default = /*#__PURE__*/_interopDefaultLegacy(_create_class);
18
+ var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
19
+ var _ts_decorate__default = /*#__PURE__*/_interopDefaultLegacy(_ts_decorate);
20
+ var _instanceof__default = /*#__PURE__*/_interopDefaultLegacy(_instanceof);
21
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
7
22
 
8
- /**
9
- * The platform (including operating system and hardware) is running on.
10
- */ exports.Platform = void 0;
11
23
  (function(Platform) {
12
24
  Platform[Platform[/** Android platform. */ "Android"] = 0] = "Android";
13
25
  Platform[Platform[/** IPhone platform. */ "IPhone"] = 1] = "IPhone";
@@ -16,50 +28,6 @@ var miniprogram = require('@galacean/engine-math/dist/miniprogram');
16
28
  Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
17
29
  })(exports.Platform || (exports.Platform = {}));
18
30
 
19
- function _assert_this_initialized(self) {
20
- if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
21
-
22
- return self;
23
- }
24
-
25
- function _defineProperties(target, props) {
26
- for (var i = 0; i < props.length; i++) {
27
- var descriptor = props[i];
28
- descriptor.enumerable = descriptor.enumerable || false;
29
- descriptor.configurable = true;
30
-
31
- if ("value" in descriptor) descriptor.writable = true;
32
-
33
- Object.defineProperty(target, descriptor.key, descriptor);
34
- }
35
- }
36
- function _create_class(Constructor, protoProps, staticProps) {
37
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
38
- if (staticProps) _defineProperties(Constructor, staticProps);
39
-
40
- return Constructor;
41
- }
42
-
43
- function _set_prototype_of(o, p) {
44
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
45
- o.__proto__ = p;
46
-
47
- return o;
48
- };
49
-
50
- return _set_prototype_of(o, p);
51
- }
52
-
53
- function _inherits(subClass, superClass) {
54
- if (typeof superClass !== "function" && superClass !== null) {
55
- throw new TypeError("Super expression must either be null or a function");
56
- }
57
-
58
- subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
59
-
60
- if (superClass) _set_prototype_of(subClass, superClass);
61
- }
62
-
63
31
  /**
64
32
  * Common utility methods for math operations.
65
33
  */ var MathUtil = /*#__PURE__*/ function() {
@@ -105,15 +73,9 @@ function _inherits(subClass, superClass) {
105
73
  };
106
74
  return MathUtil;
107
75
  }();
108
- (function() {
109
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
110
- })();
111
- (function() {
112
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
113
- })();
114
- (function() {
115
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
116
- })();
76
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
77
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
78
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
117
79
 
118
80
  /**
119
81
  * Describes a color in the from of RGBA (in order: R, G, B, A).
@@ -323,7 +285,7 @@ function _inherits(subClass, superClass) {
323
285
  out._onValueChanged && out._onValueChanged();
324
286
  return out;
325
287
  };
326
- _create_class(Color, [
288
+ _create_class__default['default'](Color, [
327
289
  {
328
290
  key: "r",
329
291
  get: /**
@@ -376,34 +338,6 @@ function _inherits(subClass, superClass) {
376
338
  return Color;
377
339
  }();
378
340
 
379
- /******************************************************************************
380
- Copyright (c) Microsoft Corporation.
381
-
382
- Permission to use, copy, modify, and/or distribute this software for any
383
- purpose with or without fee is hereby granted.
384
-
385
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
386
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
387
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
388
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
389
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
390
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
391
- PERFORMANCE OF THIS SOFTWARE.
392
- ***************************************************************************** */
393
-
394
- function __decorate(decorators, target, key, desc) {
395
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
396
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
397
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
398
- return c > 3 && r && Object.defineProperty(target, key, r), r;
399
- }
400
-
401
- function _instanceof(left, right) {
402
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
403
- return !!right[Symbol.hasInstance](left);
404
- } else return left instanceof right;
405
- }
406
-
407
341
  /**
408
342
  * Clone mode.
409
343
  */ var CloneMode;
@@ -526,7 +460,7 @@ function _instanceof(left, right) {
526
460
  };
527
461
  CloneManager._deepCloneObjectItem = function _deepCloneObjectItem(source, target, k) {
528
462
  var sourceItem = source[k];
529
- if (_instanceof(sourceItem, Object)) {
463
+ if (_instanceof__default['default'](sourceItem, Object)) {
530
464
  var itemType = sourceItem.constructor;
531
465
  switch(itemType){
532
466
  case Uint8Array:
@@ -582,22 +516,16 @@ function _instanceof(left, right) {
582
516
  };
583
517
  return CloneManager;
584
518
  }();
585
- (function() {
586
- /** @internal */ CloneManager._subCloneModeMap = new Map();
587
- })();
588
- (function() {
589
- /** @internal */ CloneManager._cloneModeMap = new Map();
590
- })();
591
- (function() {
592
- CloneManager._objectType = Object.getPrototypeOf(Object);
593
- })();
519
+ /** @internal */ CloneManager._subCloneModeMap = new Map();
520
+ /** @internal */ CloneManager._cloneModeMap = new Map();
521
+ CloneManager._objectType = Object.getPrototypeOf(Object);
594
522
 
595
523
  /**
596
524
  * EngineObject.
597
525
  */ var EngineObject = /*#__PURE__*/ function() {
598
526
  function EngineObject(engine) {
599
- /** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
600
527
  this._destroyed = false;
528
+ /** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
601
529
  this._engine = engine;
602
530
  }
603
531
  var _proto = EngineObject.prototype;
@@ -609,7 +537,7 @@ function _instanceof(left, right) {
609
537
  (_this__engine_resourceManager = this._engine.resourceManager) == null ? void 0 : _this__engine_resourceManager._deleteAsset(this);
610
538
  this._destroyed = true;
611
539
  };
612
- _create_class(EngineObject, [
540
+ _create_class__default['default'](EngineObject, [
613
541
  {
614
542
  key: "engine",
615
543
  get: /**
@@ -629,26 +557,24 @@ function _instanceof(left, right) {
629
557
  ]);
630
558
  return EngineObject;
631
559
  }();
632
- (function() {
633
- EngineObject._instanceIdCounter = 0;
634
- })();
635
- __decorate([
560
+ EngineObject._instanceIdCounter = 0;
561
+ _ts_decorate__default['default']([
636
562
  ignoreClone
637
563
  ], EngineObject.prototype, "instanceId", void 0);
638
- __decorate([
564
+ _ts_decorate__default['default']([
639
565
  ignoreClone
640
566
  ], EngineObject.prototype, "_engine", void 0);
641
567
 
642
568
  /**
643
569
  * The base class of assets, with reference counting capability.
644
570
  */ var RefObject = /*#__PURE__*/ function(EngineObject) {
645
- _inherits(RefObject, EngineObject);
571
+ _inherits__default['default'](RefObject, EngineObject);
646
572
  function RefObject(engine) {
647
573
  var _this;
648
574
  _this = EngineObject.call(this, engine) || this;
649
575
  /** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */ _this.isGCIgnored = false;
650
576
  _this._refCount = 0;
651
- engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized(_this));
577
+ engine.resourceManager._addRefObject(_this.instanceId, _assert_this_initialized__default['default'](_this));
652
578
  return _this;
653
579
  }
654
580
  var _proto = RefObject.prototype;
@@ -690,7 +616,7 @@ __decorate([
690
616
  */ _proto._addToResourceManager = function _addToResourceManager(path) {
691
617
  this._engine.resourceManager._addAsset(path, this);
692
618
  };
693
- _create_class(RefObject, [
619
+ _create_class__default['default'](RefObject, [
694
620
  {
695
621
  key: "refCount",
696
622
  get: /**
@@ -703,9 +629,6 @@ __decorate([
703
629
  return RefObject;
704
630
  }(EngineObject);
705
631
 
706
- /**
707
- * Render buffer depth format enumeration.
708
- */ exports.RenderBufferDepthFormat = void 0;
709
632
  (function(RenderBufferDepthFormat) {
710
633
  RenderBufferDepthFormat[RenderBufferDepthFormat[/** Render to depth buffer,engine will automatically select the supported precision. */ "Depth"] = 0] = "Depth";
711
634
  RenderBufferDepthFormat[RenderBufferDepthFormat[/** Render to depth stencil buffer, engine will automatically select the supported precision. */ "DepthStencil"] = 1] = "DepthStencil";
@@ -717,9 +640,6 @@ __decorate([
717
640
  RenderBufferDepthFormat[RenderBufferDepthFormat[/** Force 32-bit depth + 8-bit stencil buffer. */ "Depth32Stencil8"] = 7] = "Depth32Stencil8";
718
641
  })(exports.RenderBufferDepthFormat || (exports.RenderBufferDepthFormat = {}));
719
642
 
720
- /**
721
- * Define the face of the cube texture.
722
- */ exports.TextureCubeFace = void 0;
723
643
  (function(TextureCubeFace) {
724
644
  TextureCubeFace[TextureCubeFace[/** Positive X face for a cube-mapped texture. */ "PositiveX"] = 0] = "PositiveX";
725
645
  TextureCubeFace[TextureCubeFace[/** Negative X face for a cube-mapped texture. */ "NegativeX"] = 1] = "NegativeX";
@@ -729,9 +649,6 @@ __decorate([
729
649
  TextureCubeFace[TextureCubeFace[/** Negative Z face for a cube-mapped texture. */ "NegativeZ"] = 5] = "NegativeZ";
730
650
  })(exports.TextureCubeFace || (exports.TextureCubeFace = {}));
731
651
 
732
- /**
733
- * Define the compare mode of depth texture.
734
- */ exports.TextureDepthCompareFunction = void 0;
735
652
  (function(TextureDepthCompareFunction) {
736
653
  TextureDepthCompareFunction[TextureDepthCompareFunction[/** never pass. */ "Never"] = 0] = "Never";
737
654
  TextureDepthCompareFunction[TextureDepthCompareFunction[/** pass if the compare value is less than the sample value. */ "Less"] = 1] = "Less";
@@ -743,18 +660,12 @@ __decorate([
743
660
  TextureDepthCompareFunction[TextureDepthCompareFunction[/** always pass. */ "Always"] = 7] = "Always";
744
661
  })(exports.TextureDepthCompareFunction || (exports.TextureDepthCompareFunction = {}));
745
662
 
746
- /**
747
- * The filter mode of the texture.
748
- */ exports.TextureFilterMode = void 0;
749
663
  (function(TextureFilterMode) {
750
664
  TextureFilterMode[TextureFilterMode[/** Point filtering. */ "Point"] = 0] = "Point";
751
665
  TextureFilterMode[TextureFilterMode[/** Bilinear filtering. */ "Bilinear"] = 1] = "Bilinear";
752
666
  TextureFilterMode[TextureFilterMode[/** Trilinear filtering. */ "Trilinear"] = 2] = "Trilinear";
753
667
  })(exports.TextureFilterMode || (exports.TextureFilterMode = {}));
754
668
 
755
- /**
756
- * Texture format enumeration.
757
- */ exports.TextureFormat = void 0;
758
669
  (function(TextureFormat) {
759
670
  TextureFormat[TextureFormat[/** RGB format,8 bits per channel. */ "R8G8B8"] = 0] = "R8G8B8";
760
671
  TextureFormat[TextureFormat[/** RGBA format,8 bits per channel. */ "R8G8B8A8"] = 1] = "R8G8B8A8";
@@ -790,9 +701,6 @@ __decorate([
790
701
  TextureFormat[TextureFormat[/** 32-bit depth + 8-bit stencil format. */ "Depth32Stencil8"] = 31] = "Depth32Stencil8";
791
702
  })(exports.TextureFormat || (exports.TextureFormat = {}));
792
703
 
793
- /**
794
- * Wrapping mode of the texture.
795
- */ exports.TextureWrapMode = void 0;
796
704
  (function(TextureWrapMode) {
797
705
  TextureWrapMode[TextureWrapMode[/** Clamping mode. use the color of edge pixels beyond the texture boundary. */ "Clamp"] = 0] = "Clamp";
798
706
  TextureWrapMode[TextureWrapMode[/** Repeating mode. tiling will be repeated if it exceeds the texture boundary. */ "Repeat"] = 1] = "Repeat";
@@ -816,7 +724,7 @@ __decorate([
816
724
  _proto.stopPropagation = function stopPropagation() {
817
725
  this._propagationStopped = true;
818
726
  };
819
- _create_class(Event, [
727
+ _create_class__default['default'](Event, [
820
728
  {
821
729
  key: "propagationStopped",
822
730
  get: function get() {
@@ -1092,7 +1000,7 @@ var Time = /*#__PURE__*/ function() {
1092
1000
  this._lastTickTime = now;
1093
1001
  this._frameCount++;
1094
1002
  };
1095
- _create_class(Time, [
1003
+ _create_class__default['default'](Time, [
1096
1004
  {
1097
1005
  key: "frameCount",
1098
1006
  get: /*
@@ -1215,9 +1123,6 @@ function ObjectValues(obj) {
1215
1123
  });
1216
1124
  }
1217
1125
 
1218
- /**
1219
- * Data type enumeration
1220
- */ exports.DataType = void 0;
1221
1126
  (function(DataType) {
1222
1127
  DataType[DataType[/** Float */ "FLOAT"] = 5126] = "FLOAT";
1223
1128
  DataType[DataType[/** Floating-point two-dimensional vector */ "FLOAT_VEC2"] = 35664] = "FLOAT_VEC2";
@@ -1256,7 +1161,6 @@ function ObjectValues(obj) {
1256
1161
  DataType[DataType[/** Unsigned int */ "UNSIGNED_INT"] = 5125 // gl.UNSIGNED_INT
1257
1162
  ] = "UNSIGNED_INT";
1258
1163
  })(exports.DataType || (exports.DataType = {}));
1259
- exports.GLCapabilityType = void 0;
1260
1164
  (function(GLCapabilityType) {
1261
1165
  GLCapabilityType["shaderVertexID"] = "shaderVertexID";
1262
1166
  GLCapabilityType["standardDerivatives"] = "OES_standard_derivatives";
@@ -1291,7 +1195,7 @@ exports.GLCapabilityType = void 0;
1291
1195
  /**
1292
1196
  * The base class of texture, contains some common functions of texture-related classes.
1293
1197
  */ var Texture = /*#__PURE__*/ function(RefObject) {
1294
- _inherits(Texture, RefObject);
1198
+ _inherits__default['default'](Texture, RefObject);
1295
1199
  function Texture() {
1296
1200
  var _this;
1297
1201
  _this = RefObject.apply(this, arguments) || this;
@@ -1330,7 +1234,7 @@ exports.GLCapabilityType = void 0;
1330
1234
  _proto._getMipmapCount = function _getMipmapCount() {
1331
1235
  return this._mipmap ? Math.floor(Math.log2(Math.max(this._width, this._height))) + 1 : 1;
1332
1236
  };
1333
- _create_class(Texture, [
1237
+ _create_class__default['default'](Texture, [
1334
1238
  {
1335
1239
  key: "format",
1336
1240
  get: /**
@@ -1450,7 +1354,7 @@ exports.GLCapabilityType = void 0;
1450
1354
  /**
1451
1355
  * The render target used for off-screen rendering.
1452
1356
  */ var RenderTarget = /*#__PURE__*/ function(EngineObject) {
1453
- _inherits(RenderTarget, EngineObject);
1357
+ _inherits__default['default'](RenderTarget, EngineObject);
1454
1358
  function RenderTarget(engine, width, height, renderTexture, depth, antiAliasing) {
1455
1359
  if (depth === void 0) depth = exports.RenderBufferDepthFormat.Depth;
1456
1360
  if (antiAliasing === void 0) antiAliasing = 1;
@@ -1462,7 +1366,7 @@ exports.GLCapabilityType = void 0;
1462
1366
  _this._antiAliasing = antiAliasing;
1463
1367
  _this._depth = depth;
1464
1368
  if (renderTexture) {
1465
- var colorTextures = _instanceof(renderTexture, Array) ? renderTexture.slice() : [
1369
+ var colorTextures = _instanceof__default['default'](renderTexture, Array) ? renderTexture.slice() : [
1466
1370
  renderTexture
1467
1371
  ];
1468
1372
  for(var i = 0, n = colorTextures.length; i < n; i++){
@@ -1476,14 +1380,14 @@ exports.GLCapabilityType = void 0;
1476
1380
  } else {
1477
1381
  _this._colorTextures = [];
1478
1382
  }
1479
- if (_instanceof(depth, Texture)) {
1383
+ if (_instanceof__default['default'](depth, Texture)) {
1480
1384
  if (!depth._isDepthTexture) {
1481
1385
  throw "Depth texture must use depth format.";
1482
1386
  }
1483
1387
  _this._depthTexture = depth;
1484
1388
  _this._depthTexture._addRefCount(1);
1485
1389
  }
1486
- _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized(_this));
1390
+ _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized__default['default'](_this));
1487
1391
  return _this;
1488
1392
  }
1489
1393
  var _proto = RenderTarget.prototype;
@@ -1531,7 +1435,7 @@ exports.GLCapabilityType = void 0;
1531
1435
  */ _proto._blitRenderTarget = function _blitRenderTarget() {
1532
1436
  this._platformRenderTarget.blitRenderTarget();
1533
1437
  };
1534
- _create_class(RenderTarget, [
1438
+ _create_class__default['default'](RenderTarget, [
1535
1439
  {
1536
1440
  key: "autoGenerateMipmaps",
1537
1441
  get: /**
@@ -1591,7 +1495,7 @@ exports.GLCapabilityType = void 0;
1591
1495
  /**
1592
1496
  * Two-dimensional texture.
1593
1497
  */ var Texture2D = /*#__PURE__*/ function(Texture) {
1594
- _inherits(Texture2D, Texture);
1498
+ _inherits__default['default'](Texture2D, Texture);
1595
1499
  function Texture2D(engine, width, height, format, mipmap) {
1596
1500
  if (format === void 0) format = exports.TextureFormat.R8G8B8A8;
1597
1501
  if (mipmap === void 0) mipmap = true;
@@ -1603,7 +1507,7 @@ exports.GLCapabilityType = void 0;
1603
1507
  _this._format = format;
1604
1508
  _this._mipmapCount = _this._getMipmapCount();
1605
1509
  _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;
1606
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized(_this));
1510
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized__default['default'](_this));
1607
1511
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1608
1512
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1609
1513
  return _this;
@@ -1658,7 +1562,7 @@ exports.GLCapabilityType = void 0;
1658
1562
  /**
1659
1563
  * Two-dimensional texture array.
1660
1564
  */ var Texture2DArray = /*#__PURE__*/ function(Texture) {
1661
- _inherits(Texture2DArray, Texture);
1565
+ _inherits__default['default'](Texture2DArray, Texture);
1662
1566
  function Texture2DArray(engine, width, height, length, format, mipmap) {
1663
1567
  if (format === void 0) format = exports.TextureFormat.R8G8B8A8;
1664
1568
  if (mipmap === void 0) mipmap = true;
@@ -1670,7 +1574,7 @@ exports.GLCapabilityType = void 0;
1670
1574
  _this._length = length;
1671
1575
  _this._format = format;
1672
1576
  _this._mipmapCount = _this._getMipmapCount();
1673
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized(_this));
1577
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized__default['default'](_this));
1674
1578
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1675
1579
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
1676
1580
  return _this;
@@ -1722,7 +1626,7 @@ exports.GLCapabilityType = void 0;
1722
1626
  this._platformTexture.getPixelBuffer(elementIndex, xOrMipLevelOrOut, yOrMipLevel, width, height, mipLevelOrOut, out);
1723
1627
  }
1724
1628
  };
1725
- _create_class(Texture2DArray, [
1629
+ _create_class__default['default'](Texture2DArray, [
1726
1630
  {
1727
1631
  key: "length",
1728
1632
  get: /**
@@ -1738,7 +1642,7 @@ exports.GLCapabilityType = void 0;
1738
1642
  /**
1739
1643
  * Cube texture.
1740
1644
  */ var TextureCube = /*#__PURE__*/ function(Texture) {
1741
- _inherits(TextureCube, Texture);
1645
+ _inherits__default['default'](TextureCube, Texture);
1742
1646
  function TextureCube(engine, size, format, mipmap) {
1743
1647
  if (format === void 0) format = exports.TextureFormat.R8G8B8A8;
1744
1648
  if (mipmap === void 0) mipmap = true;
@@ -1749,7 +1653,7 @@ exports.GLCapabilityType = void 0;
1749
1653
  _this._height = size;
1750
1654
  _this._format = format;
1751
1655
  _this._mipmapCount = _this._getMipmapCount();
1752
- _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized(_this));
1656
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized__default['default'](_this));
1753
1657
  _this.filterMode = exports.TextureFilterMode.Bilinear;
1754
1658
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Clamp;
1755
1659
  return _this;
@@ -1807,7 +1711,7 @@ exports.GLCapabilityType = void 0;
1807
1711
  * @internal
1808
1712
  * Font Atlas.
1809
1713
  */ var FontAtlas = /*#__PURE__*/ function(RefObject) {
1810
- _inherits(FontAtlas, RefObject);
1714
+ _inherits__default['default'](FontAtlas, RefObject);
1811
1715
  function FontAtlas(engine) {
1812
1716
  var _this;
1813
1717
  _this = RefObject.call(this, engine) || this;
@@ -1876,7 +1780,7 @@ exports.GLCapabilityType = void 0;
1876
1780
  _proto.getCharInfo = function getCharInfo(char) {
1877
1781
  return this._charInfoMap[char.charCodeAt(0)];
1878
1782
  };
1879
- _create_class(FontAtlas, [
1783
+ _create_class__default['default'](FontAtlas, [
1880
1784
  {
1881
1785
  key: "texture",
1882
1786
  get: function get() {
@@ -1973,7 +1877,7 @@ exports.GLCapabilityType = void 0;
1973
1877
  /**
1974
1878
  * Font.
1975
1879
  */ var Font = /*#__PURE__*/ function(RefObject) {
1976
- _inherits(Font, RefObject);
1880
+ _inherits__default['default'](Font, RefObject);
1977
1881
  function Font(engine, name) {
1978
1882
  if (name === void 0) name = "";
1979
1883
  var _this;
@@ -2025,7 +1929,7 @@ exports.GLCapabilityType = void 0;
2025
1929
  }
2026
1930
  return null;
2027
1931
  };
2028
- _create_class(Font, [
1932
+ _create_class__default['default'](Font, [
2029
1933
  {
2030
1934
  key: "name",
2031
1935
  get: /**
@@ -2037,10 +1941,9 @@ exports.GLCapabilityType = void 0;
2037
1941
  ]);
2038
1942
  return Font;
2039
1943
  }(RefObject);
2040
- (function() {
2041
- Font._fontMap = {};
2042
- })();
1944
+ Font._fontMap = {};
2043
1945
 
1946
+ var _Symbol_toStringTag = Symbol.toStringTag;
2044
1947
  var AssetPromise = /*#__PURE__*/ function() {
2045
1948
  function AssetPromise(executor) {
2046
1949
  var _this = this;
@@ -2138,7 +2041,7 @@ var AssetPromise = /*#__PURE__*/ function() {
2138
2041
  }
2139
2042
  };
2140
2043
  var onProgress = function onProgress(promise, index) {
2141
- if (_instanceof(promise, Promise) || _instanceof(promise, AssetPromise)) {
2044
+ if (_instanceof__default['default'](promise, Promise) || _instanceof__default['default'](promise, AssetPromise)) {
2142
2045
  promise.then(function(value) {
2143
2046
  onComplete(index, value);
2144
2047
  }, reject);
@@ -2159,9 +2062,9 @@ var AssetPromise = /*#__PURE__*/ function() {
2159
2062
  }
2160
2063
  });
2161
2064
  };
2162
- _create_class(AssetPromise, [
2065
+ _create_class__default['default'](AssetPromise, [
2163
2066
  {
2164
- key: Symbol.toStringTag,
2067
+ key: _Symbol_toStringTag,
2165
2068
  get: /** compatible with Promise */ function get() {
2166
2069
  return "AssetPromise";
2167
2070
  }
@@ -2360,7 +2263,7 @@ var /** @internal */ PromiseState;
2360
2263
  // Load asset
2361
2264
  item.url = assetBaseURL;
2362
2265
  var promise = loader.load(item, this);
2363
- if (_instanceof(promise, AssetPromise)) {
2266
+ if (_instanceof__default['default'](promise, AssetPromise)) {
2364
2267
  loadingPromises[assetBaseURL] = promise;
2365
2268
  promise.then(function(resource) {
2366
2269
  if (loader.useCache) {
@@ -2432,13 +2335,13 @@ var /** @internal */ PromiseState;
2432
2335
  };
2433
2336
  _proto._parseQueryPath = function _parseQueryPath(string) {
2434
2337
  var result = [];
2435
- if (string.charCodeAt(0) === charCodeOfDot$1) {
2338
+ if (string.charCodeAt(0) === charCodeOfDot) {
2436
2339
  result.push("");
2437
2340
  }
2438
- string.replace(rePropName$1, function(match, expression, quote, subString) {
2341
+ string.replace(rePropName, function(match, expression, quote, subString) {
2439
2342
  var key = match;
2440
2343
  if (quote) {
2441
- key = subString.replace(reEscapeChar$1, "$1");
2344
+ key = subString.replace(reEscapeChar, "$1");
2442
2345
  } else if (expression) {
2443
2346
  key = expression.trim();
2444
2347
  }
@@ -2496,12 +2399,8 @@ var /** @internal */ PromiseState;
2496
2399
  };
2497
2400
  return ResourceManager;
2498
2401
  }();
2499
- (function() {
2500
- /** Loader collection. */ ResourceManager._loaders = {};
2501
- })();
2502
- (function() {
2503
- ResourceManager._extTypeMapping = {};
2504
- })();
2402
+ /** Loader collection. */ ResourceManager._loaders = {};
2403
+ ResourceManager._extTypeMapping = {};
2505
2404
  /**
2506
2405
  * Declare ResourceLoader's decorator.
2507
2406
  * @param assetType - Type of asset
@@ -2513,9 +2412,9 @@ var /** @internal */ PromiseState;
2513
2412
  ResourceManager._addLoader(assetType, loader, extnames);
2514
2413
  };
2515
2414
  }
2516
- var charCodeOfDot$1 = ".".charCodeAt(0);
2517
- var reEscapeChar$1 = /\\(\\)?/g;
2518
- var rePropName$1 = RegExp(// Match anything that isn't a dot or bracket.
2415
+ var charCodeOfDot = ".".charCodeAt(0);
2416
+ var reEscapeChar = /\\(\\)?/g;
2417
+ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
2519
2418
  "[^.[\\]]+" + "|" + // Or match property names within brackets.
2520
2419
  "\\[(?:" + // Match a non-string expression.
2521
2420
  "([^\"'][^[]*)" + "|" + // Or match strings (supports escaping characters).
@@ -2782,7 +2681,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
2782
2681
  break;
2783
2682
  case CloneMode.Shallow:
2784
2683
  var sourcePropS = source[k];
2785
- if (_instanceof(sourcePropS, Object)) {
2684
+ if (_instanceof__default['default'](sourcePropS, Object)) {
2786
2685
  var tarProp = target[k];
2787
2686
  tarProp == null && (tarProp = target[k] = sourcePropS.constructor());
2788
2687
  Object.assign(tarProp, sourcePropS);
@@ -2793,7 +2692,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
2793
2692
  break;
2794
2693
  case CloneMode.Deep:
2795
2694
  var sourcePropD = source[k];
2796
- if (_instanceof(sourcePropD, Object)) {
2695
+ if (_instanceof__default['default'](sourcePropD, Object)) {
2797
2696
  var tarProp1 = target[k];
2798
2697
  tarProp1 == null && (tarProp1 = target[k] = sourcePropD.constructor());
2799
2698
  CloneManager.deepCloneObject(sourcePropD, tarProp1);
@@ -2859,14 +2758,10 @@ var ComponentCloner = /*#__PURE__*/ function() {
2859
2758
  };
2860
2759
  return ComponentsDependencies;
2861
2760
  }();
2862
- (function() {
2863
- /**
2761
+ /**
2864
2762
  * @internal
2865
2763
  */ ComponentsDependencies._dependenciesMap = new Map();
2866
- })();
2867
- (function() {
2868
- ComponentsDependencies._invDependenciesMap = new Map();
2869
- })();
2764
+ ComponentsDependencies._invDependenciesMap = new Map();
2870
2765
  /**
2871
2766
  * Dependent components, automatically added if they do not exist.
2872
2767
  * @param components - Dependent components
@@ -2881,9 +2776,6 @@ var ComponentCloner = /*#__PURE__*/ function() {
2881
2776
  };
2882
2777
  }
2883
2778
 
2884
- /**
2885
- * Layer, used for bit operations.
2886
- */ exports.Layer = void 0;
2887
2779
  (function(Layer) {
2888
2780
  Layer[Layer[/** Layer 0. */ "Layer0"] = 0x1] = "Layer0";
2889
2781
  Layer[Layer[/** Layer 1. */ "Layer1"] = 0x2] = "Layer1";
@@ -2952,7 +2844,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
2952
2844
  /**
2953
2845
  * Bool update flag.
2954
2846
  */ var BoolUpdateFlag = /*#__PURE__*/ function(UpdateFlag) {
2955
- _inherits(BoolUpdateFlag, UpdateFlag);
2847
+ _inherits__default['default'](BoolUpdateFlag, UpdateFlag);
2956
2848
  function BoolUpdateFlag() {
2957
2849
  var _this;
2958
2850
  _this = UpdateFlag.apply(this, arguments) || this;
@@ -2971,7 +2863,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
2971
2863
  /**
2972
2864
  * The base class of the components.
2973
2865
  */ var Component = /*#__PURE__*/ function(EngineObject) {
2974
- _inherits(Component, EngineObject);
2866
+ _inherits__default['default'](Component, EngineObject);
2975
2867
  function Component(entity) {
2976
2868
  var _this;
2977
2869
  _this = EngineObject.call(this, entity.engine) || this;
@@ -3032,7 +2924,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
3032
2924
  }
3033
2925
  }
3034
2926
  };
3035
- _create_class(Component, [
2927
+ _create_class__default['default'](Component, [
3036
2928
  {
3037
2929
  key: "enabled",
3038
2930
  get: /**
@@ -3082,19 +2974,19 @@ var ComponentCloner = /*#__PURE__*/ function() {
3082
2974
  ]);
3083
2975
  return Component;
3084
2976
  }(EngineObject);
3085
- __decorate([
2977
+ _ts_decorate__default['default']([
3086
2978
  ignoreClone
3087
2979
  ], Component.prototype, "_entity", void 0);
3088
- __decorate([
2980
+ _ts_decorate__default['default']([
3089
2981
  ignoreClone
3090
2982
  ], Component.prototype, "_awoken", void 0);
3091
- __decorate([
2983
+ _ts_decorate__default['default']([
3092
2984
  ignoreClone
3093
2985
  ], Component.prototype, "_destroyed", void 0);
3094
- __decorate([
2986
+ _ts_decorate__default['default']([
3095
2987
  ignoreClone
3096
2988
  ], Component.prototype, "_phasedActive", void 0);
3097
- __decorate([
2989
+ _ts_decorate__default['default']([
3098
2990
  assignmentClone
3099
2991
  ], Component.prototype, "_enabled", void 0);
3100
2992
 
@@ -3162,10 +3054,11 @@ __decorate([
3162
3054
  /**
3163
3055
  * Used to implement transformation related functions.
3164
3056
  */ var Transform = /*#__PURE__*/ function(Component) {
3165
- _inherits(Transform, Component);
3057
+ _inherits__default['default'](Transform, Component);
3166
3058
  function Transform(entity) {
3167
3059
  var _this;
3168
3060
  _this = Component.call(this, entity) || this;
3061
+ _this._dirtyFlag = 0xbc;
3169
3062
  _this._position = new miniprogram.Vector3();
3170
3063
  _this._rotation = new miniprogram.Vector3();
3171
3064
  _this._rotationQuaternion = new miniprogram.Quaternion();
@@ -3178,15 +3071,14 @@ __decorate([
3178
3071
  _this._worldMatrix = new miniprogram.Matrix();
3179
3072
  _this._isParentDirty = true;
3180
3073
  _this._parentTransformCache = null;
3181
- _this._dirtyFlag = 0xbc;
3182
3074
  /** @internal */ _this._updateFlagManager = new UpdateFlagManager();
3183
- _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized(_this));
3184
- _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized(_this));
3185
- _this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized(_this));
3186
- _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized(_this));
3187
- _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3188
- _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized(_this));
3189
- _this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized(_this));
3075
+ _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized__default['default'](_this));
3076
+ _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized__default['default'](_this));
3077
+ _this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized__default['default'](_this));
3078
+ _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized__default['default'](_this));
3079
+ _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized__default['default'](_this));
3080
+ _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized__default['default'](_this));
3081
+ _this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized__default['default'](_this));
3190
3082
  //@ts-ignore
3191
3083
  _this._position._onValueChanged = _this._onPositionChanged;
3192
3084
  //@ts-ignore
@@ -3578,7 +3470,7 @@ __decorate([
3578
3470
  this._setDirtyFlagTrue(0x40);
3579
3471
  this._updateWorldScaleFlag();
3580
3472
  };
3581
- _create_class(Transform, [
3473
+ _create_class__default['default'](Transform, [
3582
3474
  {
3583
3475
  key: "position",
3584
3476
  get: /**
@@ -3824,91 +3716,73 @@ __decorate([
3824
3716
  ]);
3825
3717
  return Transform;
3826
3718
  }(Component);
3827
- (function() {
3828
- Transform._tempQuat0 = new miniprogram.Quaternion();
3829
- })();
3830
- (function() {
3831
- Transform._tempVec30 = new miniprogram.Vector3();
3832
- })();
3833
- (function() {
3834
- Transform._tempVec31 = new miniprogram.Vector3();
3835
- })();
3836
- (function() {
3837
- Transform._tempVec32 = new miniprogram.Vector3();
3838
- })();
3839
- (function() {
3840
- Transform._tempMat30 = new miniprogram.Matrix3x3();
3841
- })();
3842
- (function() {
3843
- Transform._tempMat31 = new miniprogram.Matrix3x3();
3844
- })();
3845
- (function() {
3846
- Transform._tempMat32 = new miniprogram.Matrix3x3();
3847
- })();
3848
- (function() {
3849
- Transform._tempMat41 = new miniprogram.Matrix();
3850
- })();
3851
- (function() {
3852
- Transform._tempMat42 = new miniprogram.Matrix();
3853
- })();
3854
- __decorate([
3719
+ Transform._tempQuat0 = new miniprogram.Quaternion();
3720
+ Transform._tempVec30 = new miniprogram.Vector3();
3721
+ Transform._tempVec31 = new miniprogram.Vector3();
3722
+ Transform._tempVec32 = new miniprogram.Vector3();
3723
+ Transform._tempMat30 = new miniprogram.Matrix3x3();
3724
+ Transform._tempMat31 = new miniprogram.Matrix3x3();
3725
+ Transform._tempMat32 = new miniprogram.Matrix3x3();
3726
+ Transform._tempMat41 = new miniprogram.Matrix();
3727
+ Transform._tempMat42 = new miniprogram.Matrix();
3728
+ _ts_decorate__default['default']([
3855
3729
  deepClone
3856
3730
  ], Transform.prototype, "_position", void 0);
3857
- __decorate([
3731
+ _ts_decorate__default['default']([
3858
3732
  deepClone
3859
3733
  ], Transform.prototype, "_rotation", void 0);
3860
- __decorate([
3734
+ _ts_decorate__default['default']([
3861
3735
  deepClone
3862
3736
  ], Transform.prototype, "_rotationQuaternion", void 0);
3863
- __decorate([
3737
+ _ts_decorate__default['default']([
3864
3738
  deepClone
3865
3739
  ], Transform.prototype, "_scale", void 0);
3866
- __decorate([
3740
+ _ts_decorate__default['default']([
3867
3741
  deepClone
3868
3742
  ], Transform.prototype, "_worldPosition", void 0);
3869
- __decorate([
3743
+ _ts_decorate__default['default']([
3870
3744
  deepClone
3871
3745
  ], Transform.prototype, "_worldRotation", void 0);
3872
- __decorate([
3746
+ _ts_decorate__default['default']([
3873
3747
  deepClone
3874
3748
  ], Transform.prototype, "_worldRotationQuaternion", void 0);
3875
- __decorate([
3749
+ _ts_decorate__default['default']([
3876
3750
  deepClone
3877
3751
  ], Transform.prototype, "_lossyWorldScale", void 0);
3878
- __decorate([
3752
+ _ts_decorate__default['default']([
3879
3753
  deepClone
3880
3754
  ], Transform.prototype, "_localMatrix", void 0);
3881
- __decorate([
3755
+ _ts_decorate__default['default']([
3882
3756
  deepClone
3883
3757
  ], Transform.prototype, "_worldMatrix", void 0);
3884
- __decorate([
3758
+ _ts_decorate__default['default']([
3885
3759
  ignoreClone
3886
3760
  ], Transform.prototype, "_isParentDirty", void 0);
3887
- __decorate([
3761
+ _ts_decorate__default['default']([
3888
3762
  ignoreClone
3889
3763
  ], Transform.prototype, "_parentTransformCache", void 0);
3890
- __decorate([
3764
+ _ts_decorate__default['default']([
3891
3765
  ignoreClone
3892
3766
  ], Transform.prototype, "_updateFlagManager", void 0);
3893
- __decorate([
3767
+ _ts_decorate__default['default']([
3894
3768
  ignoreClone
3895
3769
  ], Transform.prototype, "_onPositionChanged", null);
3896
- __decorate([
3770
+ _ts_decorate__default['default']([
3897
3771
  ignoreClone
3898
3772
  ], Transform.prototype, "_onWorldPositionChanged", null);
3899
- __decorate([
3773
+ _ts_decorate__default['default']([
3900
3774
  ignoreClone
3901
3775
  ], Transform.prototype, "_onRotationChanged", null);
3902
- __decorate([
3776
+ _ts_decorate__default['default']([
3903
3777
  ignoreClone
3904
3778
  ], Transform.prototype, "_onWorldRotationChanged", null);
3905
- __decorate([
3779
+ _ts_decorate__default['default']([
3906
3780
  ignoreClone
3907
3781
  ], Transform.prototype, "_onRotationQuaternionChanged", null);
3908
- __decorate([
3782
+ _ts_decorate__default['default']([
3909
3783
  ignoreClone
3910
3784
  ], Transform.prototype, "_onWorldRotationQuaternionChanged", null);
3911
- __decorate([
3785
+ _ts_decorate__default['default']([
3912
3786
  ignoreClone
3913
3787
  ], Transform.prototype, "_onScaleChanged", null);
3914
3788
  var TransformModifyFlags;
@@ -3932,7 +3806,7 @@ var TransformModifyFlags;
3932
3806
  /**
3933
3807
  * Entity, be used as components container.
3934
3808
  */ var Entity = /*#__PURE__*/ function(EngineObject) {
3935
- _inherits(Entity, EngineObject);
3809
+ _inherits__default['default'](Entity, EngineObject);
3936
3810
  function Entity(engine, name) {
3937
3811
  var _this;
3938
3812
  _this = EngineObject.call(this, engine) || this;
@@ -3973,7 +3847,7 @@ var TransformModifyFlags;
3973
3847
  // @todo: should inverse traversal
3974
3848
  for(var i = components.length - 1; i >= 0; i--){
3975
3849
  var component = components[i];
3976
- if (_instanceof(component, type)) {
3850
+ if (_instanceof__default['default'](component, type)) {
3977
3851
  return component;
3978
3852
  }
3979
3853
  }
@@ -3988,7 +3862,7 @@ var TransformModifyFlags;
3988
3862
  var components = this._components;
3989
3863
  for(var i = 0, n = components.length; i < n; i++){
3990
3864
  var component = components[i];
3991
- if (_instanceof(component, type)) {
3865
+ if (_instanceof__default['default'](component, type)) {
3992
3866
  results.push(component);
3993
3867
  }
3994
3868
  }
@@ -4122,7 +3996,7 @@ var TransformModifyFlags;
4122
3996
  var components = this._components;
4123
3997
  for(var i1 = 0, n = components.length; i1 < n; i1++){
4124
3998
  var sourceComp = components[i1];
4125
- if (!_instanceof(sourceComp, Transform)) {
3999
+ if (!_instanceof__default['default'](sourceComp, Transform)) {
4126
4000
  var targetComp = cloneEntity.addComponent(sourceComp.constructor);
4127
4001
  ComponentCloner.cloneComponent(sourceComp, targetComp);
4128
4002
  }
@@ -4256,7 +4130,7 @@ var TransformModifyFlags;
4256
4130
  _proto._getComponentsInChildren = function _getComponentsInChildren(type, results) {
4257
4131
  for(var i = this._components.length - 1; i >= 0; i--){
4258
4132
  var component = this._components[i];
4259
- if (_instanceof(component, type)) {
4133
+ if (_instanceof__default['default'](component, type)) {
4260
4134
  results.push(component);
4261
4135
  }
4262
4136
  }
@@ -4359,7 +4233,7 @@ var TransformModifyFlags;
4359
4233
  this._traverseSetOwnerScene(children[i], scene);
4360
4234
  }
4361
4235
  };
4362
- _create_class(Entity, [
4236
+ _create_class__default['default'](Entity, [
4363
4237
  {
4364
4238
  key: "isActive",
4365
4239
  get: /**
@@ -4445,17 +4319,11 @@ var TransformModifyFlags;
4445
4319
  return Entity;
4446
4320
  }(EngineObject);
4447
4321
 
4448
- /**
4449
- * Color Space.
4450
- */ exports.ColorSpace = void 0;
4451
4322
  (function(ColorSpace) {
4452
4323
  ColorSpace[ColorSpace[/** Linear color space. */ "Linear"] = 0] = "Linear";
4453
4324
  ColorSpace[ColorSpace[/** Gamma color space. */ "Gamma"] = 1] = "Gamma";
4454
4325
  })(exports.ColorSpace || (exports.ColorSpace = {}));
4455
4326
 
4456
- /**
4457
- * The current phase of the pointer.
4458
- */ exports.PointerPhase = void 0;
4459
4327
  (function(PointerPhase) {
4460
4328
  PointerPhase[PointerPhase[/** A Pointer pressed on the screen. */ "Down"] = 0] = "Down";
4461
4329
  PointerPhase[PointerPhase[/** A pointer moved on the screen. */ "Move"] = 1] = "Move";
@@ -4577,7 +4445,7 @@ var TransformModifyFlags;
4577
4445
  }
4578
4446
  }
4579
4447
  };
4580
- _create_class(SystemInfo, null, [
4448
+ _create_class__default['default'](SystemInfo, null, [
4581
4449
  {
4582
4450
  key: "devicePixelRatio",
4583
4451
  get: /**
@@ -4589,18 +4457,10 @@ var TransformModifyFlags;
4589
4457
  ]);
4590
4458
  return SystemInfo;
4591
4459
  }();
4592
- (function() {
4593
- /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4594
- })();
4595
- (function() {
4596
- /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4597
- })();
4460
+ /** The platform is running on. */ SystemInfo.platform = exports.Platform.Unknown;
4461
+ /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4598
4462
  SystemInfo._initialize();
4599
4463
 
4600
- /**
4601
- * The keys of the keyboard.
4602
- * Keep up with W3C standards.(https://www.w3.org/TR/2017/CR-uievents-code-20170601/)
4603
- */ exports.Keys = void 0;
4604
4464
  (function(Keys) {
4605
4465
  Keys[Keys[/** `~ on a US keyboard. This is the 半角/全角/漢字 (hankaku/zenkaku/kanji) key on Japanese keyboards. */ "Backquote"] = 0] = "Backquote";
4606
4466
  Keys[Keys[/** Used for both the US \| (on the 101-key layout) and also for the key located between the " and Enter keys on row C of the 102-, 104- and 106-key layouts. Labelled #~ on a UK (102) keyboard. */ "Backslash"] = 1] = "Backslash";
@@ -4934,9 +4794,6 @@ SystemInfo._initialize();
4934
4794
  return KeyboardManager;
4935
4795
  }();
4936
4796
 
4937
- /**
4938
- * Camera clear flags enumeration.
4939
- */ exports.CameraClearFlags = void 0;
4940
4797
  (function(CameraClearFlags) {
4941
4798
  CameraClearFlags[CameraClearFlags[/* Do nothing. */ "None"] = 0x0] = "None";
4942
4799
  CameraClearFlags[CameraClearFlags[/* Clear color with scene background. */ "Color"] = 0x1] = "Color";
@@ -5211,7 +5068,7 @@ SystemInfo._initialize();
5211
5068
  _proto._setGravity = function _setGravity() {
5212
5069
  this._nativePhysicsManager.setGravity(this._gravity);
5213
5070
  };
5214
- _create_class(PhysicsManager, [
5071
+ _create_class__default['default'](PhysicsManager, [
5215
5072
  {
5216
5073
  key: "gravity",
5217
5074
  get: /**
@@ -5242,9 +5099,6 @@ SystemInfo._initialize();
5242
5099
  return PhysicsManager;
5243
5100
  }();
5244
5101
 
5245
- /**
5246
- * Describes how physics materials of the colliding objects are combined.
5247
- */ exports.PhysicsMaterialCombineMode = void 0;
5248
5102
  (function(PhysicsMaterialCombineMode) {
5249
5103
  PhysicsMaterialCombineMode[PhysicsMaterialCombineMode[/** Averages the friction/bounce of the two colliding materials. */ "Average"] = 0] = "Average";
5250
5104
  PhysicsMaterialCombineMode[PhysicsMaterialCombineMode[/** Uses the smaller friction/bounce of the two colliding materials. */ "Minimum"] = 1] = "Minimum";
@@ -5269,7 +5123,7 @@ SystemInfo._initialize();
5269
5123
  */ _proto._destroy = function _destroy() {
5270
5124
  this._nativeMaterial.destroy();
5271
5125
  };
5272
- _create_class(PhysicsMaterial, [
5126
+ _create_class__default['default'](PhysicsMaterial, [
5273
5127
  {
5274
5128
  key: "bounciness",
5275
5129
  get: /**
@@ -5345,12 +5199,12 @@ SystemInfo._initialize();
5345
5199
  }();
5346
5200
 
5347
5201
  exports.Collider = /*#__PURE__*/ function(Component) {
5348
- _inherits(Collider, Component);
5202
+ _inherits__default['default'](Collider, Component);
5349
5203
  function Collider(entity) {
5350
5204
  var _this;
5351
5205
  _this = Component.call(this, entity) || this;
5352
- /** @internal */ _this._index = -1;
5353
5206
  _this._shapes = [];
5207
+ /** @internal */ _this._index = -1;
5354
5208
  _this._updateFlag = _this.entity.transform.registerWorldChangeFlag();
5355
5209
  return _this;
5356
5210
  }
@@ -5429,7 +5283,7 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5429
5283
  this.clearShapes();
5430
5284
  this._nativeCollider.destroy();
5431
5285
  };
5432
- _create_class(Collider, [
5286
+ _create_class__default['default'](Collider, [
5433
5287
  {
5434
5288
  key: "shapes",
5435
5289
  get: /**
@@ -5441,16 +5295,13 @@ exports.Collider = /*#__PURE__*/ function(Component) {
5441
5295
  ]);
5442
5296
  return Collider;
5443
5297
  }(Component);
5444
- __decorate([
5298
+ _ts_decorate__default['default']([
5445
5299
  ignoreClone
5446
5300
  ], exports.Collider.prototype, "_index", void 0);
5447
- exports.Collider = __decorate([
5301
+ exports.Collider = _ts_decorate__default['default']([
5448
5302
  dependentComponents(Transform)
5449
5303
  ], exports.Collider);
5450
5304
 
5451
- /**
5452
- * The up axis of the collider shape.
5453
- */ exports.ControllerNonWalkableMode = void 0;
5454
5305
  (function(ControllerNonWalkableMode) {
5455
5306
  ControllerNonWalkableMode[ControllerNonWalkableMode[/** Stops character from climbing up non-walkable slopes, but doesn't move it otherwise. */ "PreventClimbing"] = 0] = "PreventClimbing";
5456
5307
  ControllerNonWalkableMode[ControllerNonWalkableMode[/** Stops character from climbing up non-walkable slopes, and forces it to slide down those slopes. */ "PreventClimbingAndForceSliding"] = 1] = "PreventClimbingAndForceSliding";
@@ -5459,7 +5310,7 @@ exports.Collider = __decorate([
5459
5310
  /**
5460
5311
  * The character controllers.
5461
5312
  */ var CharacterController = /*#__PURE__*/ function(Collider) {
5462
- _inherits(CharacterController, Collider);
5313
+ _inherits__default['default'](CharacterController, Collider);
5463
5314
  function CharacterController(entity) {
5464
5315
  var _this;
5465
5316
  _this = Collider.call(this, entity) || this;
@@ -5469,7 +5320,7 @@ exports.Collider = __decorate([
5469
5320
  _this._upDirection = new miniprogram.Vector3(0, 1, 0);
5470
5321
  _this._slopeLimit = 0.707;
5471
5322
  _this._nativeCollider = PhysicsManager._nativePhysics.createCharacterController();
5472
- _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
5323
+ _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized__default['default'](_this));
5473
5324
  //@ts-ignore
5474
5325
  _this._upDirection._onValueChanged = _this._setUpDirection;
5475
5326
  return _this;
@@ -5542,7 +5393,7 @@ exports.Collider = __decorate([
5542
5393
  _proto._setUpDirection = function _setUpDirection() {
5543
5394
  this._nativeCollider.setUpDirection(this._upDirection);
5544
5395
  };
5545
- _create_class(CharacterController, [
5396
+ _create_class__default['default'](CharacterController, [
5546
5397
  {
5547
5398
  key: "stepOffset",
5548
5399
  get: /**
@@ -5637,7 +5488,7 @@ exports.Collider = __decorate([
5637
5488
  _proto._setRotation = function _setRotation() {
5638
5489
  this._nativeShape.setRotation(this._rotation);
5639
5490
  };
5640
- _create_class(ColliderShape, [
5491
+ _create_class__default['default'](ColliderShape, [
5641
5492
  {
5642
5493
  key: "collider",
5643
5494
  get: /**
@@ -5725,20 +5576,18 @@ exports.Collider = __decorate([
5725
5576
  ]);
5726
5577
  return ColliderShape;
5727
5578
  }();
5728
- (function() {
5729
- ColliderShape._idGenerator = 0;
5730
- })();
5579
+ ColliderShape._idGenerator = 0;
5731
5580
 
5732
5581
  /**
5733
5582
  * Physical collider shape for box.
5734
5583
  */ var BoxColliderShape = /*#__PURE__*/ function(ColliderShape) {
5735
- _inherits(BoxColliderShape, ColliderShape);
5584
+ _inherits__default['default'](BoxColliderShape, ColliderShape);
5736
5585
  function BoxColliderShape() {
5737
5586
  var _this;
5738
5587
  _this = ColliderShape.call(this) || this;
5739
5588
  _this._size = new miniprogram.Vector3(1, 1, 1);
5740
5589
  _this._nativeShape = PhysicsManager._nativePhysics.createBoxColliderShape(_this._id, _this._size, _this._material._nativeMaterial);
5741
- _this._setSize = _this._setSize.bind(_assert_this_initialized(_this));
5590
+ _this._setSize = _this._setSize.bind(_assert_this_initialized__default['default'](_this));
5742
5591
  //@ts-ignore
5743
5592
  _this._size._onValueChanged = _this._setSize;
5744
5593
  return _this;
@@ -5747,7 +5596,7 @@ exports.Collider = __decorate([
5747
5596
  _proto._setSize = function _setSize() {
5748
5597
  this._nativeShape.setSize(this._size);
5749
5598
  };
5750
- _create_class(BoxColliderShape, [
5599
+ _create_class__default['default'](BoxColliderShape, [
5751
5600
  {
5752
5601
  key: "size",
5753
5602
  get: /**
@@ -5768,7 +5617,7 @@ exports.Collider = __decorate([
5768
5617
  /**
5769
5618
  * Physical collider shape for sphere.
5770
5619
  */ var SphereColliderShape = /*#__PURE__*/ function(ColliderShape) {
5771
- _inherits(SphereColliderShape, ColliderShape);
5620
+ _inherits__default['default'](SphereColliderShape, ColliderShape);
5772
5621
  function SphereColliderShape() {
5773
5622
  var _this;
5774
5623
  _this = ColliderShape.call(this) || this;
@@ -5776,7 +5625,7 @@ exports.Collider = __decorate([
5776
5625
  _this._nativeShape = PhysicsManager._nativePhysics.createSphereColliderShape(_this._id, _this._radius, _this._material._nativeMaterial);
5777
5626
  return _this;
5778
5627
  }
5779
- _create_class(SphereColliderShape, [
5628
+ _create_class__default['default'](SphereColliderShape, [
5780
5629
  {
5781
5630
  key: "radius",
5782
5631
  get: /**
@@ -5798,7 +5647,7 @@ exports.Collider = __decorate([
5798
5647
  /**
5799
5648
  * Physical collider shape plane.
5800
5649
  */ var PlaneColliderShape = /*#__PURE__*/ function(ColliderShape) {
5801
- _inherits(PlaneColliderShape, ColliderShape);
5650
+ _inherits__default['default'](PlaneColliderShape, ColliderShape);
5802
5651
  function PlaneColliderShape() {
5803
5652
  var _this;
5804
5653
  _this = ColliderShape.call(this) || this;
@@ -5808,9 +5657,6 @@ exports.Collider = __decorate([
5808
5657
  return PlaneColliderShape;
5809
5658
  }(ColliderShape);
5810
5659
 
5811
- /**
5812
- * The up axis of the collider shape.
5813
- */ exports.ColliderShapeUpAxis = void 0;
5814
5660
  (function(ColliderShapeUpAxis) {
5815
5661
  ColliderShapeUpAxis[ColliderShapeUpAxis[/** Up axis is X. */ "X"] = 0] = "X";
5816
5662
  ColliderShapeUpAxis[ColliderShapeUpAxis[/** Up axis is Y. */ "Y"] = 1] = "Y";
@@ -5820,7 +5666,7 @@ exports.Collider = __decorate([
5820
5666
  /**
5821
5667
  * Physical collider shape for capsule.
5822
5668
  */ var CapsuleColliderShape = /*#__PURE__*/ function(ColliderShape) {
5823
- _inherits(CapsuleColliderShape, ColliderShape);
5669
+ _inherits__default['default'](CapsuleColliderShape, ColliderShape);
5824
5670
  function CapsuleColliderShape() {
5825
5671
  var _this;
5826
5672
  _this = ColliderShape.call(this) || this;
@@ -5830,7 +5676,7 @@ exports.Collider = __decorate([
5830
5676
  _this._nativeShape = PhysicsManager._nativePhysics.createCapsuleColliderShape(_this._id, _this._radius, _this._height, _this._material._nativeMaterial);
5831
5677
  return _this;
5832
5678
  }
5833
- _create_class(CapsuleColliderShape, [
5679
+ _create_class__default['default'](CapsuleColliderShape, [
5834
5680
  {
5835
5681
  key: "radius",
5836
5682
  get: /**
@@ -5878,7 +5724,7 @@ exports.Collider = __decorate([
5878
5724
  }(ColliderShape);
5879
5725
 
5880
5726
  exports.Joint = /*#__PURE__*/ function(Component) {
5881
- _inherits(Joint, Component);
5727
+ _inherits__default['default'](Joint, Component);
5882
5728
  function Joint(entity) {
5883
5729
  var _this;
5884
5730
  _this = Component.call(this, entity) || this;
@@ -5889,7 +5735,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
5889
5735
  _this._connectedCollider.localPosition = new miniprogram.Vector3();
5890
5736
  return _this;
5891
5737
  }
5892
- _create_class(Joint, [
5738
+ _create_class__default['default'](Joint, [
5893
5739
  {
5894
5740
  key: "connectedCollider",
5895
5741
  get: /**
@@ -6007,7 +5853,7 @@ exports.Joint = /*#__PURE__*/ function(Component) {
6007
5853
  ]);
6008
5854
  return Joint;
6009
5855
  }(Component);
6010
- exports.Joint = __decorate([
5856
+ exports.Joint = _ts_decorate__default['default']([
6011
5857
  dependentComponents(exports.Collider)
6012
5858
  ], exports.Joint);
6013
5859
  /**
@@ -6021,7 +5867,7 @@ exports.Joint = __decorate([
6021
5867
  /*
6022
5868
  * A fixed joint permits no relative movement between two colliders. ie the colliders are glued together.
6023
5869
  */ var FixedJoint = /*#__PURE__*/ function(Joint) {
6024
- _inherits(FixedJoint, Joint);
5870
+ _inherits__default['default'](FixedJoint, Joint);
6025
5871
  function FixedJoint() {
6026
5872
  return Joint.apply(this, arguments);
6027
5873
  }
@@ -6050,7 +5896,7 @@ exports.Joint = __decorate([
6050
5896
  /**
6051
5897
  * A joint which behaves in a similar way to a hinge or axle.
6052
5898
  */ var HingeJoint = /*#__PURE__*/ function(Joint) {
6053
- _inherits(HingeJoint, Joint);
5899
+ _inherits__default['default'](HingeJoint, Joint);
6054
5900
  function HingeJoint() {
6055
5901
  var _this;
6056
5902
  _this = Joint.apply(this, arguments) || this;
@@ -6069,7 +5915,7 @@ exports.Joint = __decorate([
6069
5915
  collider.collider = this.entity.getComponent(exports.Collider);
6070
5916
  this._nativeJoint = PhysicsManager._nativePhysics.createHingeJoint(collider.collider._nativeCollider);
6071
5917
  };
6072
- _create_class(HingeJoint, [
5918
+ _create_class__default['default'](HingeJoint, [
6073
5919
  {
6074
5920
  key: "axis",
6075
5921
  get: /**
@@ -6200,7 +6046,7 @@ exports.Joint = __decorate([
6200
6046
  /**
6201
6047
  * A joint that maintains an upper or lower bound (or both) on the distance between two points on different objects.
6202
6048
  */ var SpringJoint = /*#__PURE__*/ function(Joint) {
6203
- _inherits(SpringJoint, Joint);
6049
+ _inherits__default['default'](SpringJoint, Joint);
6204
6050
  function SpringJoint() {
6205
6051
  var _this;
6206
6052
  _this = Joint.apply(this, arguments) || this;
@@ -6221,7 +6067,7 @@ exports.Joint = __decorate([
6221
6067
  collider.collider = this.entity.getComponent(exports.Collider);
6222
6068
  this._nativeJoint = PhysicsManager._nativePhysics.createSpringJoint(collider.collider._nativeCollider);
6223
6069
  };
6224
- _create_class(SpringJoint, [
6070
+ _create_class__default['default'](SpringJoint, [
6225
6071
  {
6226
6072
  key: "swingOffset",
6227
6073
  get: /**
@@ -6330,9 +6176,6 @@ exports.Joint = __decorate([
6330
6176
  /** If freeSpin is enabled the motor will only accelerate but never slow down. */ this.freeSpin = false;
6331
6177
  };
6332
6178
 
6333
- /**
6334
- * The up axis of the collider shape.
6335
- */ exports.ControllerCollisionFlag = void 0;
6336
6179
  (function(ControllerCollisionFlag) {
6337
6180
  ControllerCollisionFlag[ControllerCollisionFlag[/** Character is colliding to the sides. */ "Sides"] = 1] = "Sides";
6338
6181
  ControllerCollisionFlag[ControllerCollisionFlag[/** Character has collision above. */ "Up"] = 2] = "Up";
@@ -6343,7 +6186,7 @@ exports.Joint = __decorate([
6343
6186
  * A static collider component that will not move.
6344
6187
  * @remarks Mostly used for object which always stays at the same place and never moves around.
6345
6188
  */ var StaticCollider = /*#__PURE__*/ function(Collider) {
6346
- _inherits(StaticCollider, Collider);
6189
+ _inherits__default['default'](StaticCollider, Collider);
6347
6190
  function StaticCollider(entity) {
6348
6191
  var _this;
6349
6192
  _this = Collider.call(this, entity) || this;
@@ -6357,7 +6200,7 @@ exports.Joint = __decorate([
6357
6200
  /**
6358
6201
  * A dynamic collider can act with self-defined movement or physical force.
6359
6202
  */ var DynamicCollider = /*#__PURE__*/ function(Collider) {
6360
- _inherits(DynamicCollider, Collider);
6203
+ _inherits__default['default'](DynamicCollider, Collider);
6361
6204
  function DynamicCollider(entity) {
6362
6205
  var _this;
6363
6206
  _this = Collider.call(this, entity) || this;
@@ -6377,10 +6220,10 @@ exports.Joint = __decorate([
6377
6220
  _this._sleepThreshold = 5e-3;
6378
6221
  var transform = _this.entity.transform;
6379
6222
  _this._nativeCollider = PhysicsManager._nativePhysics.createDynamicCollider(transform.worldPosition, transform.worldRotationQuaternion);
6380
- _this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized(_this));
6381
- _this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized(_this));
6382
- _this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized(_this));
6383
- _this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized(_this));
6223
+ _this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized__default['default'](_this));
6224
+ _this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized__default['default'](_this));
6225
+ _this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized__default['default'](_this));
6226
+ _this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized__default['default'](_this));
6384
6227
  //@ts-ignore
6385
6228
  _this._linearVelocity._onValueChanged = _this._setLinearVelocity;
6386
6229
  //@ts-ignore
@@ -6438,7 +6281,7 @@ exports.Joint = __decorate([
6438
6281
  _proto._setInertiaTensor = function _setInertiaTensor() {
6439
6282
  this._nativeCollider.setInertiaTensor(this._inertiaTensor);
6440
6283
  };
6441
- _create_class(DynamicCollider, [
6284
+ _create_class__default['default'](DynamicCollider, [
6442
6285
  {
6443
6286
  key: "linearDamping",
6444
6287
  get: /**
@@ -6634,14 +6477,12 @@ exports.Joint = __decorate([
6634
6477
  ]);
6635
6478
  return DynamicCollider;
6636
6479
  }(exports.Collider);
6637
- exports.CollisionDetectionMode = void 0;
6638
6480
  (function(CollisionDetectionMode) {
6639
6481
  CollisionDetectionMode[CollisionDetectionMode["Discrete"] = 0] = "Discrete";
6640
6482
  CollisionDetectionMode[CollisionDetectionMode[/** Continuous collision detection is on for colliding with static mesh geometry. */ "Continuous"] = 1] = "Continuous";
6641
6483
  CollisionDetectionMode[CollisionDetectionMode[/** Continuous collision detection is on for colliding with static and dynamic geometry. */ "ContinuousDynamic"] = 2] = "ContinuousDynamic";
6642
6484
  CollisionDetectionMode[CollisionDetectionMode[/** Speculative continuous collision detection is on for static and dynamic geometries */ "ContinuousSpeculative"] = 3] = "ContinuousSpeculative";
6643
6485
  })(exports.CollisionDetectionMode || (exports.CollisionDetectionMode = {}));
6644
- exports.DynamicColliderConstraints = void 0;
6645
6486
  (function(DynamicColliderConstraints) {
6646
6487
  DynamicColliderConstraints[DynamicColliderConstraints[/** Not Freeze. */ "None"] = 0] = "None";
6647
6488
  DynamicColliderConstraints[DynamicColliderConstraints[/** Freeze motion along the X-axis. */ "FreezePositionX"] = 1] = "FreezePositionX";
@@ -6652,13 +6493,6 @@ exports.DynamicColliderConstraints = void 0;
6652
6493
  DynamicColliderConstraints[DynamicColliderConstraints[/** Freeze rotation along the Z-axis. */ "FreezeRotationZ"] = 32] = "FreezeRotationZ";
6653
6494
  })(exports.DynamicColliderConstraints || (exports.DynamicColliderConstraints = {}));
6654
6495
 
6655
- /**
6656
- * Defines values that specify the buttons on a pointer device.
6657
- * Refer to the W3C standards:
6658
- * (https://www.w3.org/TR/uievents/#dom-mouseevent-button)
6659
- * (https://www.w3.org/TR/uievents/#dom-mouseevent-buttons)
6660
- * Refer to Microsoft's documentation.(https://docs.microsoft.com/en-us/dotnet/api/system.windows.input.mousebutton?view=windowsdesktop-6.0)
6661
- */ exports.PointerButton = void 0;
6662
6496
  (function(PointerButton) {
6663
6497
  PointerButton[PointerButton[/** No button. */ "None"] = 0x0] = "None";
6664
6498
  PointerButton[PointerButton[/** Indicate the primary pointer of the device (in general, the left button or the only button on single-button devices, used to activate a user interface control or select text) or the un-initialized value. */ "Primary"] = 0x1] = "Primary";
@@ -6982,15 +6816,9 @@ exports.DynamicColliderConstraints = void 0;
6982
6816
  };
6983
6817
  return PointerManager;
6984
6818
  }();
6985
- (function() {
6986
- PointerManager._tempRay = new miniprogram.Ray();
6987
- })();
6988
- (function() {
6989
- PointerManager._tempPoint = new miniprogram.Vector2();
6990
- })();
6991
- (function() {
6992
- PointerManager._tempHitResult = new HitResult();
6993
- })();
6819
+ PointerManager._tempRay = new miniprogram.Ray();
6820
+ PointerManager._tempPoint = new miniprogram.Vector2();
6821
+ PointerManager._tempHitResult = new HitResult();
6994
6822
 
6995
6823
  /**
6996
6824
  * Wheel Manager.
@@ -7063,7 +6891,7 @@ exports.DynamicColliderConstraints = void 0;
7063
6891
  this._curFrameCount = 0;
7064
6892
  // @ts-ignore
7065
6893
  var canvas = engine._canvas._webCanvas;
7066
- if (typeof engineMiniprogramAdapter.OffscreenCanvas === "undefined" || !_instanceof(canvas, engineMiniprogramAdapter.OffscreenCanvas)) {
6894
+ if (typeof engineMiniprogramAdapter.OffscreenCanvas === "undefined" || !_instanceof__default['default'](canvas, engineMiniprogramAdapter.OffscreenCanvas)) {
7067
6895
  this._wheelManager = new WheelManager(canvas);
7068
6896
  this._pointerManager = new PointerManager(engine, canvas);
7069
6897
  this._keyboardManager = new KeyboardManager(canvas);
@@ -7196,7 +7024,7 @@ exports.DynamicColliderConstraints = void 0;
7196
7024
  this._pointerManager._onFocus();
7197
7025
  this._keyboardManager._onFocus();
7198
7026
  };
7199
- _create_class(InputManager, [
7027
+ _create_class__default['default'](InputManager, [
7200
7028
  {
7201
7029
  key: "pointers",
7202
7030
  get: /**
@@ -7229,18 +7057,12 @@ exports.DynamicColliderConstraints = void 0;
7229
7057
  return InputManager;
7230
7058
  }();
7231
7059
 
7232
- /**
7233
- * Number of cascades to use for directional light shadows.
7234
- */ exports.ShadowCascadesMode = void 0;
7235
7060
  (function(ShadowCascadesMode) {
7236
7061
  ShadowCascadesMode[ShadowCascadesMode[/** No cascades */ "NoCascades"] = 1] = "NoCascades";
7237
7062
  ShadowCascadesMode[ShadowCascadesMode[/** Two cascades */ "TwoCascades"] = 2] = "TwoCascades";
7238
7063
  ShadowCascadesMode[ShadowCascadesMode[/** Four cascades */ "FourCascades"] = 4] = "FourCascades";
7239
7064
  })(exports.ShadowCascadesMode || (exports.ShadowCascadesMode = {}));
7240
7065
 
7241
- /**
7242
- * Default shadow resolution.
7243
- */ exports.ShadowResolution = void 0;
7244
7066
  (function(ShadowResolution) {
7245
7067
  ShadowResolution[ShadowResolution[/** Low shadow map resolution. */ "Low"] = 0] = "Low";
7246
7068
  ShadowResolution[ShadowResolution[/** Medium shadow map resolution. */ "Medium"] = 1] = "Medium";
@@ -7248,9 +7070,6 @@ exports.DynamicColliderConstraints = void 0;
7248
7070
  ShadowResolution[ShadowResolution[/** Very high shadow map resolution. */ "VeryHigh"] = 3] = "VeryHigh";
7249
7071
  })(exports.ShadowResolution || (exports.ShadowResolution = {}));
7250
7072
 
7251
- /**
7252
- * Determines which type of shadows should be used.
7253
- */ exports.ShadowType = void 0;
7254
7073
  (function(ShadowType) {
7255
7074
  ShadowType[ShadowType[/** Disable Shadows. */ "None"] = 0] = "None";
7256
7075
  ShadowType[ShadowType[/** Hard Shadows Only. */ "Hard"] = 1] = "Hard";
@@ -7258,19 +7077,12 @@ exports.DynamicColliderConstraints = void 0;
7258
7077
  ShadowType[ShadowType[/** Cast "soft" shadows with large range. */ "SoftHigh"] = 3] = "SoftHigh";
7259
7078
  })(exports.ShadowType || (exports.ShadowType = {}));
7260
7079
 
7261
- /**
7262
- * Render queue type.
7263
- */ exports.RenderQueueType = void 0;
7264
7080
  (function(RenderQueueType) {
7265
7081
  RenderQueueType[RenderQueueType[/** Opaque queue. */ "Opaque"] = 0] = "Opaque";
7266
7082
  RenderQueueType[RenderQueueType[/** Opaque queue, alpha cutoff. */ "AlphaTest"] = 1] = "AlphaTest";
7267
7083
  RenderQueueType[RenderQueueType[/** Transparent queue, rendering from back to front to ensure correct rendering of transparent objects. */ "Transparent"] = 2] = "Transparent";
7268
7084
  })(exports.RenderQueueType || (exports.RenderQueueType = {}));
7269
7085
 
7270
- /**
7271
- * Blend factor.
7272
- * @remarks defines which function is used for blending pixel arithmetic
7273
- */ exports.BlendFactor = void 0;
7274
7086
  (function(BlendFactor) {
7275
7087
  BlendFactor[BlendFactor[/** (0, 0, 0, 0)*/ "Zero"] = 0] = "Zero";
7276
7088
  BlendFactor[BlendFactor[/** (1, 1, 1, 1)*/ "One"] = 1] = "One";
@@ -7287,10 +7099,6 @@ exports.DynamicColliderConstraints = void 0;
7287
7099
  BlendFactor[BlendFactor[/** (1 - Rc, 1 - Gc, 1 - Bc, 1 - Ac)*/ "OneMinusBlendColor"] = 12] = "OneMinusBlendColor";
7288
7100
  })(exports.BlendFactor || (exports.BlendFactor = {}));
7289
7101
 
7290
- /**
7291
- * Blend operation function.
7292
- * @remarks defines how a new pixel is combined with a pixel.
7293
- */ exports.BlendOperation = void 0;
7294
7102
  (function(BlendOperation) {
7295
7103
  BlendOperation[BlendOperation[/** src + dst. */ "Add"] = 0] = "Add";
7296
7104
  BlendOperation[BlendOperation[/** src - dst. */ "Subtract"] = 1] = "Subtract";
@@ -7299,10 +7107,6 @@ exports.DynamicColliderConstraints = void 0;
7299
7107
  BlendOperation[BlendOperation[/** Maximum of source and destination. */ "Max"] = 4] = "Max";
7300
7108
  })(exports.BlendOperation || (exports.BlendOperation = {}));
7301
7109
 
7302
- /**
7303
- * Set which color channels can be rendered to frame buffer.
7304
- * @remarks enumeration can be combined using bit operations.
7305
- */ exports.ColorWriteMask = void 0;
7306
7110
  (function(ColorWriteMask) {
7307
7111
  ColorWriteMask[ColorWriteMask[/** Do not write to any channel. */ "None"] = 0] = "None";
7308
7112
  ColorWriteMask[ColorWriteMask[/** Write to the red channel. */ "Red"] = 0x1] = "Red";
@@ -7312,10 +7116,6 @@ exports.DynamicColliderConstraints = void 0;
7312
7116
  ColorWriteMask[ColorWriteMask[/** Write to all channel. */ "All"] = 0xf] = "All";
7313
7117
  })(exports.ColorWriteMask || (exports.ColorWriteMask = {}));
7314
7118
 
7315
- /**
7316
- * Depth/Stencil comparison function.
7317
- * @remarks Specifies a function that compares incoming pixel depth/stencil to the current depth/stencil buffer value.
7318
- */ exports.CompareFunction = void 0;
7319
7119
  (function(CompareFunction) {
7320
7120
  CompareFunction[CompareFunction[/** never pass. */ "Never"] = 0] = "Never";
7321
7121
  CompareFunction[CompareFunction[/** pass if the incoming value is less than the depth/stencil buffer value. */ "Less"] = 1] = "Less";
@@ -7327,19 +7127,12 @@ exports.DynamicColliderConstraints = void 0;
7327
7127
  CompareFunction[CompareFunction[/** always pass. */ "Always"] = 7] = "Always";
7328
7128
  })(exports.CompareFunction || (exports.CompareFunction = {}));
7329
7129
 
7330
- /**
7331
- * Culling mode.
7332
- * @remarks specifies whether or not front- and/or back-facing polygons can be culled.
7333
- */ exports.CullMode = void 0;
7334
7130
  (function(CullMode) {
7335
7131
  CullMode[CullMode[/** Disable culling. */ "Off"] = 0] = "Off";
7336
7132
  CullMode[CullMode[/** cut the front-face of the polygons. */ "Front"] = 1] = "Front";
7337
7133
  CullMode[CullMode[/** cut the back-face of the polygons. */ "Back"] = 2] = "Back";
7338
7134
  })(exports.CullMode || (exports.CullMode = {}));
7339
7135
 
7340
- /**
7341
- * Shader Property type.
7342
- */ exports.ShaderPropertyType = void 0;
7343
7136
  (function(ShaderPropertyType) {
7344
7137
  ShaderPropertyType[ShaderPropertyType[/** Float type. */ "Float"] = 0] = "Float";
7345
7138
  ShaderPropertyType[ShaderPropertyType[/** Int type. */ "Int"] = 1] = "Int";
@@ -7354,10 +7147,6 @@ exports.DynamicColliderConstraints = void 0;
7354
7147
  ShaderPropertyType[ShaderPropertyType[/** Texture array type. */ "TextureArray"] = 10] = "TextureArray";
7355
7148
  })(exports.ShaderPropertyType || (exports.ShaderPropertyType = {}));
7356
7149
 
7357
- /**
7358
- * Stencil operation mode.
7359
- * @remarks sets the front and/or back-facing stencil test actions.
7360
- */ exports.StencilOperation = void 0;
7361
7150
  (function(StencilOperation) {
7362
7151
  StencilOperation[StencilOperation[/** Keeps the current value. */ "Keep"] = 0] = "Keep";
7363
7152
  StencilOperation[StencilOperation[/** Sets the stencil buffer value to 0. */ "Zero"] = 1] = "Zero";
@@ -7383,12 +7172,8 @@ exports.DynamicColliderConstraints = void 0;
7383
7172
  }
7384
7173
  this._nameId = nameID;
7385
7174
  };
7386
- (function() {
7387
- /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7388
- })();
7389
- (function() {
7390
- ShaderMacro._macroNameCounter = 0;
7391
- })();
7175
+ /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7176
+ ShaderMacro._macroNameCounter = 0;
7392
7177
 
7393
7178
  /**
7394
7179
  * Shader macro collection.
@@ -7540,19 +7325,6 @@ exports.DynamicColliderConstraints = void 0;
7540
7325
  return ShaderMacroCollection;
7541
7326
  }();
7542
7327
 
7543
- function _extends() {
7544
- _extends = Object.assign || function assign(target) {
7545
- for (var i = 1; i < arguments.length; i++) {
7546
- var source = arguments[i];
7547
- for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
7548
- }
7549
-
7550
- return target;
7551
- };
7552
-
7553
- return _extends.apply(this, arguments);
7554
- }
7555
-
7556
7328
  var camera_declare = "#define GLSLIFY 1\nuniform vec3 u_cameraPos;"; // eslint-disable-line
7557
7329
 
7558
7330
  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
@@ -7662,7 +7434,7 @@ var PBRShaderLib = {
7662
7434
 
7663
7435
  var ShadowCoord = "#define GLSLIFY 1\nuniform mat4 u_shadowMatrices[CASCADED_COUNT+1];uniform vec4 u_shadowSplitSpheres[4];mediump int computeCascadeIndex(vec3 positionWS){vec3 fromCenter0=positionWS-u_shadowSplitSpheres[0].xyz;vec3 fromCenter1=positionWS-u_shadowSplitSpheres[1].xyz;vec3 fromCenter2=positionWS-u_shadowSplitSpheres[2].xyz;vec3 fromCenter3=positionWS-u_shadowSplitSpheres[3].xyz;mediump vec4 comparison=vec4(dot(fromCenter0,fromCenter0)<u_shadowSplitSpheres[0].w,dot(fromCenter1,fromCenter1)<u_shadowSplitSpheres[1].w,dot(fromCenter2,fromCenter2)<u_shadowSplitSpheres[2].w,dot(fromCenter3,fromCenter3)<u_shadowSplitSpheres[3].w);comparison.yzw=clamp(comparison.yzw-comparison.xyz,0.0,1.0);mediump vec4 indexCoefficient=vec4(4.0,3.0,2.0,1.0);mediump int index=4-int(dot(comparison,indexCoefficient));return index;}vec3 getShadowCoord(){\n#if CASCADED_COUNT == 1\nmediump int cascadeIndex=0;\n#else\nmediump int cascadeIndex=computeCascadeIndex(v_pos);\n#endif\n#ifdef GRAPHICS_API_WEBGL2\nmat4 shadowMatrix=u_shadowMatrices[cascadeIndex];\n#else\nmat4 shadowMatrix;\n#if CASCADED_COUNT == 4\nif(cascadeIndex==0){shadowMatrix=u_shadowMatrices[0];}else if(cascadeIndex==1){shadowMatrix=u_shadowMatrices[1];}else if(cascadeIndex==2){shadowMatrix=u_shadowMatrices[2];}else if(cascadeIndex==3){shadowMatrix=u_shadowMatrices[3];}else{shadowMatrix=u_shadowMatrices[4];}\n#endif\n#if CASCADED_COUNT == 2\nif(cascadeIndex==0){shadowMatrix=u_shadowMatrices[0];}else if(cascadeIndex==1){shadowMatrix=u_shadowMatrices[1];}else{shadowMatrix=u_shadowMatrices[2];}\n#endif\n#if CASCADED_COUNT == 1\nif(cascadeIndex==0){shadowMatrix=u_shadowMatrices[0];}else{shadowMatrix=u_shadowMatrices[1];}\n#endif\n#endif\nvec4 shadowCoord=shadowMatrix*vec4(v_pos,1.0);return shadowCoord.xyz;}"; // eslint-disable-line
7664
7436
 
7665
- var ShadowFragmentDeclaration = "#define GLSLIFY 1\n#if defined(SHADOW_TYPE) && defined(OASIS_RECEIVE_SHADOWS)\n#define OASIS_CALCULATE_SHADOWS\n#endif\n#ifdef OASIS_CALCULATE_SHADOWS\n#if CASCADED_COUNT == 1\nvarying vec3 v_shadowCoord;\n#else\n#include <ShadowCoord>\n#endif\nuniform vec3 u_shadowInfo;uniform vec4 u_shadowMapSize;\n#ifdef GRAPHICS_API_WEBGL2\nuniform mediump sampler2DShadow u_shadowMap;\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) textureLod(textureName, coord3 , 0.0)\n#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2DShadow shadowMap\n#else\nuniform sampler2D u_shadowMap;\n#ifdef OASIS_NO_DEPTH_TEXTURE\nconst vec4 bitShift=vec4(1.0,1.0/256.0,1.0/(256.0*256.0),1.0/(256.0*256.0*256.0));float unpack(const in vec4 rgbaDepth){return dot(rgbaDepth,bitShift);}\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) (unpack(texture2D(textureName, coord3.xy)) < coord3.z ? 0.0 : 1.0)\n#else\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) (texture2D(textureName, coord3.xy).r < coord3.z ? 0.0 : 1.0)\n#endif\n#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2D shadowMap\n#endif\n#if SHADOW_TYPE == 2\nfloat sampleShadowMapFiltered4(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowMapSize){float attenuation;vec4 attenuation4;vec2 offset=shadowMapSize.xy/2.0;vec3 shadowCoord0=shadowCoord+vec3(-offset,0.0);vec3 shadowCoord1=shadowCoord+vec3(offset.x,-offset.y,0.0);vec3 shadowCoord2=shadowCoord+vec3(-offset.x,offset.y,0.0);vec3 shadowCoord3=shadowCoord+vec3(offset,0.0);attenuation4.x=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord0);attenuation4.y=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord1);attenuation4.z=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord2);attenuation4.w=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord3);attenuation=dot(attenuation4,vec4(0.25));return attenuation;}\n#endif\n#if SHADOW_TYPE == 3\n#include <shadow_sample_tent>\nfloat sampleShadowMapFiltered9(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowmapSize){float attenuation;float fetchesWeights[9];vec2 fetchesUV[9];sampleShadowComputeSamplesTent5x5(shadowmapSize,shadowCoord.xy,fetchesWeights,fetchesUV);attenuation=fetchesWeights[0]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[0].xy,shadowCoord.z));attenuation+=fetchesWeights[1]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[1].xy,shadowCoord.z));attenuation+=fetchesWeights[2]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[2].xy,shadowCoord.z));attenuation+=fetchesWeights[3]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[3].xy,shadowCoord.z));attenuation+=fetchesWeights[4]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[4].xy,shadowCoord.z));attenuation+=fetchesWeights[5]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[5].xy,shadowCoord.z));attenuation+=fetchesWeights[6]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[6].xy,shadowCoord.z));attenuation+=fetchesWeights[7]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[7].xy,shadowCoord.z));attenuation+=fetchesWeights[8]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[8].xy,shadowCoord.z));return attenuation;}\n#endif\nfloat sampleShadowMap(){\n#if CASCADED_COUNT == 1\nvec3 shadowCoord=v_shadowCoord;\n#else\nvec3 shadowCoord=getShadowCoord();\n#endif\nfloat attenuation=1.0;if(shadowCoord.z>0.0&&shadowCoord.z<1.0){\n#if SHADOW_TYPE == 1\nattenuation=SAMPLE_TEXTURE2D_SHADOW(u_shadowMap,shadowCoord);\n#endif\n#if SHADOW_TYPE == 2\nattenuation=sampleShadowMapFiltered4(u_shadowMap,shadowCoord,u_shadowMapSize);\n#endif\n#if SHADOW_TYPE == 3\nattenuation=sampleShadowMapFiltered9(u_shadowMap,shadowCoord,u_shadowMapSize);\n#endif\nattenuation=mix(1.0,attenuation,u_shadowInfo.x);}return attenuation;}\n#endif\n"; // eslint-disable-line
7437
+ var ShadowFragmentDeclaration = "#define GLSLIFY 1\n#if defined(SHADOW_TYPE) && defined(OASIS_RECEIVE_SHADOWS)\n#define OASIS_CALCULATE_SHADOWS\n#endif\n#ifdef OASIS_CALCULATE_SHADOWS\n#if CASCADED_COUNT == 1\nvarying vec3 v_shadowCoord;\n#else\n#include <ShadowCoord>\n#endif\nuniform vec3 u_shadowInfo;uniform vec4 u_shadowMapSize;\n#ifdef GRAPHICS_API_WEBGL2\nuniform mediump sampler2DShadow u_shadowMap;\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) textureLod(textureName, coord3 , 0.0)\n#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2DShadow shadowMap\n#else\nuniform sampler2D u_shadowMap;\n#ifdef OASIS_NO_DEPTH_TEXTURE\nconst vec4 bitShift=vec4(1.0,1.0/256.0,1.0/(256.0*256.0),1.0/(256.0*256.0*256.0));/***Unpack depth value.*/float unpack(const in vec4 rgbaDepth){return dot(rgbaDepth,bitShift);}\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) (unpack(texture2D(textureName, coord3.xy)) < coord3.z ? 0.0 : 1.0)\n#else\n#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) (texture2D(textureName, coord3.xy).r < coord3.z ? 0.0 : 1.0)\n#endif\n#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2D shadowMap\n#endif\n#if SHADOW_TYPE == 2\nfloat sampleShadowMapFiltered4(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowMapSize){float attenuation;vec4 attenuation4;vec2 offset=shadowMapSize.xy/2.0;vec3 shadowCoord0=shadowCoord+vec3(-offset,0.0);vec3 shadowCoord1=shadowCoord+vec3(offset.x,-offset.y,0.0);vec3 shadowCoord2=shadowCoord+vec3(-offset.x,offset.y,0.0);vec3 shadowCoord3=shadowCoord+vec3(offset,0.0);attenuation4.x=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord0);attenuation4.y=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord1);attenuation4.z=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord2);attenuation4.w=SAMPLE_TEXTURE2D_SHADOW(shadowMap,shadowCoord3);attenuation=dot(attenuation4,vec4(0.25));return attenuation;}\n#endif\n#if SHADOW_TYPE == 3\n#include <shadow_sample_tent>\nfloat sampleShadowMapFiltered9(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowmapSize){float attenuation;float fetchesWeights[9];vec2 fetchesUV[9];sampleShadowComputeSamplesTent5x5(shadowmapSize,shadowCoord.xy,fetchesWeights,fetchesUV);attenuation=fetchesWeights[0]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[0].xy,shadowCoord.z));attenuation+=fetchesWeights[1]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[1].xy,shadowCoord.z));attenuation+=fetchesWeights[2]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[2].xy,shadowCoord.z));attenuation+=fetchesWeights[3]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[3].xy,shadowCoord.z));attenuation+=fetchesWeights[4]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[4].xy,shadowCoord.z));attenuation+=fetchesWeights[5]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[5].xy,shadowCoord.z));attenuation+=fetchesWeights[6]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[6].xy,shadowCoord.z));attenuation+=fetchesWeights[7]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[7].xy,shadowCoord.z));attenuation+=fetchesWeights[8]*SAMPLE_TEXTURE2D_SHADOW(shadowMap,vec3(fetchesUV[8].xy,shadowCoord.z));return attenuation;}\n#endif\nfloat sampleShadowMap(){\n#if CASCADED_COUNT == 1\nvec3 shadowCoord=v_shadowCoord;\n#else\nvec3 shadowCoord=getShadowCoord();\n#endif\nfloat attenuation=1.0;if(shadowCoord.z>0.0&&shadowCoord.z<1.0){\n#if SHADOW_TYPE == 1\nattenuation=SAMPLE_TEXTURE2D_SHADOW(u_shadowMap,shadowCoord);\n#endif\n#if SHADOW_TYPE == 2\nattenuation=sampleShadowMapFiltered4(u_shadowMap,shadowCoord,u_shadowMapSize);\n#endif\n#if SHADOW_TYPE == 3\nattenuation=sampleShadowMapFiltered9(u_shadowMap,shadowCoord,u_shadowMapSize);\n#endif\nattenuation=mix(1.0,attenuation,u_shadowInfo.x);}return attenuation;}\n#endif\n"; // eslint-disable-line
7666
7438
 
7667
7439
  var shadow_sample_tent = "#define GLSLIFY 1\nfloat sampleShadowGetIRTriangleTexelArea(float triangleHeight){return triangleHeight-0.5;}void sampleShadowGetTexelAreasTent3x3(float offset,out vec4 computedArea,out vec4 computedAreaUncut){float a=offset+0.5;float offsetSquaredHalved=a*a*0.5;computedAreaUncut.x=computedArea.x=offsetSquaredHalved-offset;computedAreaUncut.w=computedArea.w=offsetSquaredHalved;computedAreaUncut.y=sampleShadowGetIRTriangleTexelArea(1.5-offset);float clampedOffsetLeft=min(offset,0.0);float areaOfSmallLeftTriangle=clampedOffsetLeft*clampedOffsetLeft;computedArea.y=computedAreaUncut.y-areaOfSmallLeftTriangle;computedAreaUncut.z=sampleShadowGetIRTriangleTexelArea(1.5+offset);float clampedOffsetRight=max(offset,0.0);float areaOfSmallRightTriangle=clampedOffsetRight*clampedOffsetRight;computedArea.z=computedAreaUncut.z-areaOfSmallRightTriangle;}void sampleShadowGetTexelWeightsTent5x5(float offset,out vec3 texelsWeightsA,out vec3 texelsWeightsB){vec4 areaFrom3texelTriangle;vec4 areaUncutFrom3texelTriangle;sampleShadowGetTexelAreasTent3x3(offset,areaFrom3texelTriangle,areaUncutFrom3texelTriangle);texelsWeightsA.x=0.16*(areaFrom3texelTriangle.x);texelsWeightsA.y=0.16*(areaUncutFrom3texelTriangle.y);texelsWeightsA.z=0.16*(areaFrom3texelTriangle.y+1.0);texelsWeightsB.x=0.16*(areaFrom3texelTriangle.z+1.0);texelsWeightsB.y=0.16*(areaUncutFrom3texelTriangle.z);texelsWeightsB.z=0.16*(areaFrom3texelTriangle.w);}void sampleShadowComputeSamplesTent5x5(vec4 shadowMapTextureTexelSize,vec2 coord,out float fetchesWeights[9],out vec2 fetchesUV[9]){vec2 tentCenterInTexelSpace=coord.xy*shadowMapTextureTexelSize.zw;vec2 centerOfFetchesInTexelSpace=floor(tentCenterInTexelSpace+0.5);vec2 offsetFromTentCenterToCenterOfFetches=tentCenterInTexelSpace-centerOfFetchesInTexelSpace;vec3 texelsWeightsUA,texelsWeightsUB;vec3 texelsWeightsVA,texelsWeightsVB;sampleShadowGetTexelWeightsTent5x5(offsetFromTentCenterToCenterOfFetches.x,texelsWeightsUA,texelsWeightsUB);sampleShadowGetTexelWeightsTent5x5(offsetFromTentCenterToCenterOfFetches.y,texelsWeightsVA,texelsWeightsVB);vec3 fetchesWeightsU=vec3(texelsWeightsUA.xz,texelsWeightsUB.y)+vec3(texelsWeightsUA.y,texelsWeightsUB.xz);vec3 fetchesWeightsV=vec3(texelsWeightsVA.xz,texelsWeightsVB.y)+vec3(texelsWeightsVA.y,texelsWeightsVB.xz);vec3 fetchesOffsetsU=vec3(texelsWeightsUA.y,texelsWeightsUB.xz)/fetchesWeightsU.xyz+vec3(-2.5,-0.5,1.5);vec3 fetchesOffsetsV=vec3(texelsWeightsVA.y,texelsWeightsVB.xz)/fetchesWeightsV.xyz+vec3(-2.5,-0.5,1.5);fetchesOffsetsU*=shadowMapTextureTexelSize.xxx;fetchesOffsetsV*=shadowMapTextureTexelSize.yyy;vec2 bilinearFetchOrigin=centerOfFetchesInTexelSpace*shadowMapTextureTexelSize.xy;fetchesUV[0]=bilinearFetchOrigin+vec2(fetchesOffsetsU.x,fetchesOffsetsV.x);fetchesUV[1]=bilinearFetchOrigin+vec2(fetchesOffsetsU.y,fetchesOffsetsV.x);fetchesUV[2]=bilinearFetchOrigin+vec2(fetchesOffsetsU.z,fetchesOffsetsV.x);fetchesUV[3]=bilinearFetchOrigin+vec2(fetchesOffsetsU.x,fetchesOffsetsV.y);fetchesUV[4]=bilinearFetchOrigin+vec2(fetchesOffsetsU.y,fetchesOffsetsV.y);fetchesUV[5]=bilinearFetchOrigin+vec2(fetchesOffsetsU.z,fetchesOffsetsV.y);fetchesUV[6]=bilinearFetchOrigin+vec2(fetchesOffsetsU.x,fetchesOffsetsV.z);fetchesUV[7]=bilinearFetchOrigin+vec2(fetchesOffsetsU.y,fetchesOffsetsV.z);fetchesUV[8]=bilinearFetchOrigin+vec2(fetchesOffsetsU.z,fetchesOffsetsV.z);fetchesWeights[0]=fetchesWeightsU.x*fetchesWeightsV.x;fetchesWeights[1]=fetchesWeightsU.y*fetchesWeightsV.x;fetchesWeights[2]=fetchesWeightsU.z*fetchesWeightsV.x;fetchesWeights[3]=fetchesWeightsU.x*fetchesWeightsV.y;fetchesWeights[4]=fetchesWeightsU.y*fetchesWeightsV.y;fetchesWeights[5]=fetchesWeightsU.z*fetchesWeightsV.y;fetchesWeights[6]=fetchesWeightsU.x*fetchesWeightsV.z;fetchesWeights[7]=fetchesWeightsU.y*fetchesWeightsV.z;fetchesWeights[8]=fetchesWeightsU.z*fetchesWeightsV.z;}"; // eslint-disable-line
7668
7440
 
@@ -7680,7 +7452,7 @@ var ShadowLib = {
7680
7452
 
7681
7453
  var normal_get = "#define GLSLIFY 1\nvec3 getNormal(bool isFrontFacing){\n#ifdef O3_HAS_NORMAL\nvec3 normal=normalize(v_normal);\n#elif defined(HAS_DERIVATIVES)\nvec3 pos_dx=dFdx(v_pos);vec3 pos_dy=dFdy(v_pos);vec3 normal=normalize(cross(pos_dx,pos_dy));\n#else\nvec3 normal=vec3(0,0,1);\n#endif\nnormal*=float(isFrontFacing)*2.0-1.0;return normal;}vec3 getNormalByNormalTexture(mat3 tbn,sampler2D normalTexture,float normalIntensity,vec2 uv,bool isFrontFacing){vec3 normal=texture2D(normalTexture,uv).rgb;normal=normalize(tbn*((2.0*normal-1.0)*vec3(normalIntensity,normalIntensity,1.0)));normal*=float(isFrontFacing)*2.0-1.0;return normal;}mat3 getTBN(bool isFrontFacing){\n#if defined(O3_HAS_NORMAL) && defined(O3_HAS_TANGENT) && ( defined(NORMALTEXTURE) || defined(HAS_CLEARCOATNORMALTEXTURE) )\nmat3 tbn=v_TBN;\n#else\nvec3 normal=getNormal(isFrontFacing);vec3 position=v_pos;vec2 uv=isFrontFacing? v_uv:-v_uv;\n#ifdef HAS_DERIVATIVES\nvec3 dp1=dFdx(position);vec3 dp2=dFdy(position);vec2 duv1=dFdx(uv);vec2 duv2=dFdy(uv);vec3 dp2perp=cross(dp2,normal);vec3 dp1perp=cross(normal,dp1);vec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;vec3 binormal=dp2perp*duv1.y+dp1perp*duv2.y;float invmax=inversesqrt(max(dot(tangent,tangent),dot(binormal,binormal)));mat3 tbn=mat3(tangent*invmax,binormal*invmax,normal);\n#else\nmat3 tbn=mat3(vec3(0.0),vec3(0.0),normal);\n#endif\n#endif\nreturn tbn;}"; // eslint-disable-line
7682
7454
 
7683
- var ShaderLib = _extends({
7455
+ var ShaderLib = _extends__default['default']({
7684
7456
  common: common,
7685
7457
  common_vert: common_vert,
7686
7458
  transform_declare: transform_declare,
@@ -8392,7 +8164,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8392
8164
  return prefix + line;
8393
8165
  }).join("\n");
8394
8166
  };
8395
- _create_class(ShaderProgram, [
8167
+ _create_class__default['default'](ShaderProgram, [
8396
8168
  {
8397
8169
  key: "isValid",
8398
8170
  get: /**
@@ -8404,9 +8176,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8404
8176
  ]);
8405
8177
  return ShaderProgram;
8406
8178
  }();
8407
- (function() {
8408
- ShaderProgram._counter = 0;
8409
- })();
8179
+ ShaderProgram._counter = 0;
8410
8180
 
8411
8181
  /**
8412
8182
  * Shader pass containing vertex and fragment source.
@@ -8451,9 +8221,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8451
8221
  };
8452
8222
  return ShaderPass;
8453
8223
  }();
8454
- (function() {
8455
- ShaderPass._shaderPassCounter = 0;
8456
- })();
8224
+ ShaderPass._shaderPassCounter = 0;
8457
8225
 
8458
8226
  /**
8459
8227
  * Shader property.
@@ -8462,7 +8230,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8462
8230
  this.name = name;
8463
8231
  this._uniqueId = ShaderProperty._propertyNameCounter++;
8464
8232
  }
8465
- _create_class(ShaderProperty, [
8233
+ _create_class__default['default'](ShaderProperty, [
8466
8234
  {
8467
8235
  key: "type",
8468
8236
  get: /**
@@ -8474,9 +8242,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8474
8242
  ]);
8475
8243
  return ShaderProperty;
8476
8244
  }();
8477
- (function() {
8478
- ShaderProperty._propertyNameCounter = 0;
8479
- })();
8245
+ ShaderProperty._propertyNameCounter = 0;
8480
8246
 
8481
8247
  /**
8482
8248
  * Shader for rendering.
@@ -8589,7 +8355,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8589
8355
  }
8590
8356
  }
8591
8357
  };
8592
- _create_class(Shader, [
8358
+ _create_class__default['default'](Shader, [
8593
8359
  {
8594
8360
  key: "passes",
8595
8361
  get: /**
@@ -8601,34 +8367,18 @@ var ShaderFactory = /*#__PURE__*/ function() {
8601
8367
  ]);
8602
8368
  return Shader;
8603
8369
  }();
8604
- (function() {
8605
- /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8606
- })();
8607
- (function() {
8608
- /** @internal */ Shader._shaderExtension = [
8609
- "GL_EXT_shader_texture_lod",
8610
- "GL_OES_standard_derivatives",
8611
- "GL_EXT_draw_buffers"
8612
- ];
8613
- })();
8614
- (function() {
8615
- /** @internal */ Shader._propertyIdMap = Object.create(null);
8616
- })();
8617
- (function() {
8618
- Shader._shaderMap = Object.create(null);
8619
- })();
8620
- (function() {
8621
- Shader._propertyNameMap = Object.create(null);
8622
- })();
8623
- (function() {
8624
- Shader._macroMaskMap = [];
8625
- })();
8626
- (function() {
8627
- Shader._macroCounter = 0;
8628
- })();
8629
- (function() {
8630
- Shader._macroMap = Object.create(null);
8631
- })();
8370
+ /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8371
+ /** @internal */ Shader._shaderExtension = [
8372
+ "GL_EXT_shader_texture_lod",
8373
+ "GL_OES_standard_derivatives",
8374
+ "GL_EXT_draw_buffers"
8375
+ ];
8376
+ /** @internal */ Shader._propertyIdMap = Object.create(null);
8377
+ Shader._shaderMap = Object.create(null);
8378
+ Shader._propertyNameMap = Object.create(null);
8379
+ Shader._macroMaskMap = [];
8380
+ Shader._macroCounter = 0;
8381
+ Shader._macroMap = Object.create(null);
8632
8382
 
8633
8383
  /**
8634
8384
  * Shader data collection,Correspondence includes shader properties data and macros data.
@@ -8810,10 +8560,10 @@ var ShaderFactory = /*#__PURE__*/ function() {
8810
8560
  if (property != null) {
8811
8561
  if (typeof property === "number") {
8812
8562
  targetPropertyValueMap[k] = property;
8813
- } else if (_instanceof(property, Texture)) {
8563
+ } else if (_instanceof__default['default'](property, Texture)) {
8814
8564
  targetPropertyValueMap[k] = property;
8815
8565
  referCount > 0 && property._addRefCount(referCount);
8816
- } else if (_instanceof(property, Array) || _instanceof(property, Float32Array) || _instanceof(property, Int32Array)) {
8566
+ } else if (_instanceof__default['default'](property, Array) || _instanceof__default['default'](property, Float32Array) || _instanceof__default['default'](property, Int32Array)) {
8817
8567
  targetPropertyValueMap[k] = property.slice();
8818
8568
  } else {
8819
8569
  var targetProperty = targetPropertyValueMap[k];
@@ -8863,7 +8613,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8863
8613
  for(var k in properties){
8864
8614
  var property = properties[k];
8865
8615
  // @todo: Separate array to speed performance.
8866
- if (property && _instanceof(property, Texture)) {
8616
+ if (property && _instanceof__default['default'](property, Texture)) {
8867
8617
  property._addRefCount(value);
8868
8618
  }
8869
8619
  }
@@ -8874,7 +8624,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8874
8624
  /**
8875
8625
  * Light base class.
8876
8626
  */ var Light = /*#__PURE__*/ function(Component) {
8877
- _inherits(Light, Component);
8627
+ _inherits__default['default'](Light, Component);
8878
8628
  function Light() {
8879
8629
  var _this;
8880
8630
  _this = Component.apply(this, arguments) || this;
@@ -8888,9 +8638,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
8888
8638
  /** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
8889
8639
  /** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
8890
8640
  /** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
8891
- /** @internal */ _this._lightIndex = -1;
8892
8641
  _this._color = new miniprogram.Color(1, 1, 1, 1);
8893
8642
  _this._lightColor = new miniprogram.Color();
8643
+ /** @internal */ _this._lightIndex = -1;
8894
8644
  return _this;
8895
8645
  }
8896
8646
  var _proto = Light.prototype;
@@ -8901,7 +8651,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8901
8651
  this._lightColor.a = this.color.a * this.intensity;
8902
8652
  return this._lightColor;
8903
8653
  };
8904
- _create_class(Light, [
8654
+ _create_class__default['default'](Light, [
8905
8655
  {
8906
8656
  key: "color",
8907
8657
  get: /**
@@ -8938,19 +8688,17 @@ var ShaderFactory = /*#__PURE__*/ function() {
8938
8688
  ]);
8939
8689
  return Light;
8940
8690
  }(Component);
8941
- (function() {
8942
- /**
8691
+ /**
8943
8692
  * Each type of light source is at most 10, beyond which it will not take effect.
8944
8693
  * */ Light._maxLight = 10;
8945
- })();
8946
- __decorate([
8694
+ _ts_decorate__default['default']([
8947
8695
  ignoreClone
8948
8696
  ], Light.prototype, "_lightIndex", void 0);
8949
8697
 
8950
8698
  /**
8951
8699
  * Directional light.
8952
8700
  */ var DirectLight = /*#__PURE__*/ function(Light) {
8953
- _inherits(DirectLight, Light);
8701
+ _inherits__default['default'](DirectLight, Light);
8954
8702
  function DirectLight() {
8955
8703
  var _this;
8956
8704
  _this = Light.apply(this, arguments) || this;
@@ -9000,7 +8748,7 @@ __decorate([
9000
8748
  shaderData.setFloatArray(DirectLight._colorProperty, data.color);
9001
8749
  shaderData.setFloatArray(DirectLight._directionProperty, data.direction);
9002
8750
  };
9003
- _create_class(DirectLight, [
8751
+ _create_class__default['default'](DirectLight, [
9004
8752
  {
9005
8753
  key: "direction",
9006
8754
  get: /**
@@ -9031,27 +8779,19 @@ __decorate([
9031
8779
  ]);
9032
8780
  return DirectLight;
9033
8781
  }(Light);
9034
- (function() {
9035
- DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
9036
- })();
9037
- (function() {
9038
- DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
9039
- })();
9040
- (function() {
9041
- DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
9042
- })();
9043
- (function() {
9044
- DirectLight._combinedData = {
9045
- cullingMask: new Int32Array(Light._maxLight * 2),
9046
- color: new Float32Array(Light._maxLight * 3),
9047
- direction: new Float32Array(Light._maxLight * 3)
9048
- };
9049
- })();
8782
+ DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8783
+ DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8784
+ DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8785
+ DirectLight._combinedData = {
8786
+ cullingMask: new Int32Array(Light._maxLight * 2),
8787
+ color: new Float32Array(Light._maxLight * 3),
8788
+ direction: new Float32Array(Light._maxLight * 3)
8789
+ };
9050
8790
 
9051
8791
  /**
9052
8792
  * Point light.
9053
8793
  */ var PointLight = /*#__PURE__*/ function(Light) {
9054
- _inherits(PointLight, Light);
8794
+ _inherits__default['default'](PointLight, Light);
9055
8795
  function PointLight() {
9056
8796
  var _this;
9057
8797
  _this = Light.apply(this, arguments) || this;
@@ -9103,7 +8843,7 @@ __decorate([
9103
8843
  shaderData.setFloatArray(PointLight._positionProperty, data.position);
9104
8844
  shaderData.setFloatArray(PointLight._distanceProperty, data.distance);
9105
8845
  };
9106
- _create_class(PointLight, [
8846
+ _create_class__default['default'](PointLight, [
9107
8847
  {
9108
8848
  key: "position",
9109
8849
  get: /**
@@ -9124,31 +8864,21 @@ __decorate([
9124
8864
  ]);
9125
8865
  return PointLight;
9126
8866
  }(Light);
9127
- (function() {
9128
- PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
9129
- })();
9130
- (function() {
9131
- PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
9132
- })();
9133
- (function() {
9134
- PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9135
- })();
9136
- (function() {
9137
- PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9138
- })();
9139
- (function() {
9140
- PointLight._combinedData = {
9141
- cullingMask: new Int32Array(Light._maxLight * 2),
9142
- color: new Float32Array(Light._maxLight * 3),
9143
- position: new Float32Array(Light._maxLight * 3),
9144
- distance: new Float32Array(Light._maxLight)
9145
- };
9146
- })();
8867
+ PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
8868
+ PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
8869
+ PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
8870
+ PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
8871
+ PointLight._combinedData = {
8872
+ cullingMask: new Int32Array(Light._maxLight * 2),
8873
+ color: new Float32Array(Light._maxLight * 3),
8874
+ position: new Float32Array(Light._maxLight * 3),
8875
+ distance: new Float32Array(Light._maxLight)
8876
+ };
9147
8877
 
9148
8878
  /**
9149
8879
  * Spot light.
9150
8880
  */ var SpotLight = /*#__PURE__*/ function(Light) {
9151
- _inherits(SpotLight, Light);
8881
+ _inherits__default['default'](SpotLight, Light);
9152
8882
  function SpotLight() {
9153
8883
  var _this;
9154
8884
  _this = Light.apply(this, arguments) || this;
@@ -9217,7 +8947,7 @@ __decorate([
9217
8947
  shaderData.setFloatArray(SpotLight._angleCosProperty, data.angleCos);
9218
8948
  shaderData.setFloatArray(SpotLight._penumbraCosProperty, data.penumbraCos);
9219
8949
  };
9220
- _create_class(SpotLight, [
8950
+ _create_class__default['default'](SpotLight, [
9221
8951
  {
9222
8952
  key: "position",
9223
8953
  get: /**
@@ -9259,38 +8989,22 @@ __decorate([
9259
8989
  ]);
9260
8990
  return SpotLight;
9261
8991
  }(Light);
9262
- (function() {
9263
- SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9264
- })();
9265
- (function() {
9266
- SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9267
- })();
9268
- (function() {
9269
- SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9270
- })();
9271
- (function() {
9272
- SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9273
- })();
9274
- (function() {
9275
- SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9276
- })();
9277
- (function() {
9278
- SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9279
- })();
9280
- (function() {
9281
- SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9282
- })();
9283
- (function() {
9284
- SpotLight._combinedData = {
9285
- cullingMask: new Int32Array(Light._maxLight * 2),
9286
- color: new Float32Array(Light._maxLight * 3),
9287
- position: new Float32Array(Light._maxLight * 3),
9288
- direction: new Float32Array(Light._maxLight * 3),
9289
- distance: new Float32Array(Light._maxLight),
9290
- angleCos: new Float32Array(Light._maxLight),
9291
- penumbraCos: new Float32Array(Light._maxLight)
9292
- };
9293
- })();
8992
+ SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
8993
+ SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
8994
+ SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
8995
+ SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
8996
+ SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
8997
+ SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
8998
+ SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
8999
+ SpotLight._combinedData = {
9000
+ cullingMask: new Int32Array(Light._maxLight * 2),
9001
+ color: new Float32Array(Light._maxLight * 3),
9002
+ position: new Float32Array(Light._maxLight * 3),
9003
+ direction: new Float32Array(Light._maxLight * 3),
9004
+ distance: new Float32Array(Light._maxLight),
9005
+ angleCos: new Float32Array(Light._maxLight),
9006
+ penumbraCos: new Float32Array(Light._maxLight)
9007
+ };
9294
9008
 
9295
9009
  /**
9296
9010
  * Light manager.
@@ -9812,7 +9526,7 @@ __decorate([
9812
9526
  /**
9813
9527
  * Material.
9814
9528
  */ var Material = /*#__PURE__*/ function(RefObject) {
9815
- _inherits(Material, RefObject);
9529
+ _inherits__default['default'](Material, RefObject);
9816
9530
  function Material(engine, shader) {
9817
9531
  var _this;
9818
9532
  _this = RefObject.call(this, engine) || this;
@@ -9856,7 +9570,7 @@ __decorate([
9856
9570
  this._renderStates.length = 0;
9857
9571
  this._renderStates = null;
9858
9572
  };
9859
- _create_class(Material, [
9573
+ _create_class__default['default'](Material, [
9860
9574
  {
9861
9575
  key: "shaderData",
9862
9576
  get: /**
@@ -9948,7 +9662,7 @@ var RenderElement = function RenderElement() {
9948
9662
  /**
9949
9663
  * Render element.
9950
9664
  */ var MeshRenderElement = /*#__PURE__*/ function(RenderElement) {
9951
- _inherits(MeshRenderElement, RenderElement);
9665
+ _inherits__default['default'](MeshRenderElement, RenderElement);
9952
9666
  function MeshRenderElement() {
9953
9667
  return RenderElement.apply(this, arguments);
9954
9668
  }
@@ -9982,18 +9696,12 @@ var RenderElement = function RenderElement() {
9982
9696
  };
9983
9697
  return RenderContext;
9984
9698
  }();
9985
- (function() {
9986
- /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9987
- })();
9988
- (function() {
9989
- RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9990
- })();
9991
- (function() {
9992
- RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9993
- })();
9699
+ /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9700
+ RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9701
+ RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9994
9702
 
9995
9703
  var SpriteElement = /*#__PURE__*/ function(RenderElement) {
9996
- _inherits(SpriteElement, RenderElement);
9704
+ _inherits__default['default'](SpriteElement, RenderElement);
9997
9705
  function SpriteElement() {
9998
9706
  var _this;
9999
9707
  _this = RenderElement.call(this) || this;
@@ -10016,7 +9724,7 @@ var SpriteElement = /*#__PURE__*/ function(RenderElement) {
10016
9724
  }(RenderElement);
10017
9725
 
10018
9726
  var SpriteMaskElement = /*#__PURE__*/ function(RenderElement) {
10019
- _inherits(SpriteMaskElement, RenderElement);
9727
+ _inherits__default['default'](SpriteMaskElement, RenderElement);
10020
9728
  function SpriteMaskElement() {
10021
9729
  var _this;
10022
9730
  _this = RenderElement.call(this) || this;
@@ -10036,9 +9744,6 @@ var SpriteMaskElement = /*#__PURE__*/ function(RenderElement) {
10036
9744
  return SpriteMaskElement;
10037
9745
  }(RenderElement);
10038
9746
 
10039
- /**
10040
- * Sprite mask interaction.
10041
- */ exports.SpriteMaskInteraction = void 0;
10042
9747
  (function(SpriteMaskInteraction) {
10043
9748
  SpriteMaskInteraction[SpriteMaskInteraction[/** The sprite will not interact with the masking system. */ "None"] = 0] = "None";
10044
9749
  SpriteMaskInteraction[SpriteMaskInteraction[/** The sprite will be visible only in areas where a mask is present. */ "VisibleInsideMask"] = 1] = "VisibleInsideMask";
@@ -10047,10 +9752,11 @@ var SpriteMaskElement = /*#__PURE__*/ function(RenderElement) {
10047
9752
 
10048
9753
  var _Renderer;
10049
9754
  exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10050
- _inherits(Renderer1, Component);
9755
+ _inherits__default['default'](Renderer1, Component);
10051
9756
  function Renderer1(entity) {
10052
9757
  var _this;
10053
9758
  _this = Component.call(this, entity) || this;
9759
+ /** Whether cast shadow. */ _this.castShadows = true;
10054
9760
  /** @internal */ _this._onUpdateIndex = -1;
10055
9761
  /** @internal */ _this._rendererIndex = -1;
10056
9762
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
@@ -10067,12 +9773,11 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10067
9773
  _this._priority = 0;
10068
9774
  _this._receiveShadows = true;
10069
9775
  _this._rendererLayer = new miniprogram.Vector4();
10070
- /** Whether cast shadow. */ _this.castShadows = true;
10071
9776
  var prototype = exports.Renderer.prototype;
10072
9777
  var shaderData = _this.shaderData;
10073
9778
  _this._overrideUpdate = _this.update !== prototype.update;
10074
9779
  shaderData._addRefCount(1);
10075
- _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
9780
+ _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized__default['default'](_this));
10076
9781
  _this._registerEntityTransformListener();
10077
9782
  shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
10078
9783
  shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
@@ -10276,7 +9981,7 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10276
9981
  _proto._onTransformChanged = function _onTransformChanged(type) {
10277
9982
  this._dirtyUpdateFlag |= 0x1;
10278
9983
  };
10279
- _create_class(Renderer1, [
9984
+ _create_class__default['default'](Renderer1, [
10280
9985
  {
10281
9986
  key: "shaderData",
10282
9987
  get: /**
@@ -10350,83 +10055,65 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10350
10055
  }
10351
10056
  ]);
10352
10057
  return Renderer1;
10353
- }(Component), function() {
10354
- _Renderer._tempVector0 = new miniprogram.Vector3();
10355
- }(), function() {
10356
- _Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS");
10357
- }(), function() {
10358
- _Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat");
10359
- }(), function() {
10360
- _Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat");
10361
- }(), function() {
10362
- _Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat");
10363
- }(), function() {
10364
- _Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat");
10365
- }(), function() {
10366
- _Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat");
10367
- }(), function() {
10368
- _Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat");
10369
- }(), function() {
10370
- _Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
10371
- }(), _Renderer);
10372
- __decorate([
10058
+ }(Component), _Renderer._tempVector0 = new miniprogram.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);
10059
+ _ts_decorate__default['default']([
10373
10060
  ignoreClone
10374
10061
  ], exports.Renderer.prototype, "_distanceForSort", void 0);
10375
- __decorate([
10062
+ _ts_decorate__default['default']([
10376
10063
  ignoreClone
10377
10064
  ], exports.Renderer.prototype, "_onUpdateIndex", void 0);
10378
- __decorate([
10065
+ _ts_decorate__default['default']([
10379
10066
  ignoreClone
10380
10067
  ], exports.Renderer.prototype, "_rendererIndex", void 0);
10381
- __decorate([
10068
+ _ts_decorate__default['default']([
10382
10069
  ignoreClone
10383
10070
  ], exports.Renderer.prototype, "_globalShaderMacro", void 0);
10384
- __decorate([
10071
+ _ts_decorate__default['default']([
10385
10072
  deepClone
10386
10073
  ], exports.Renderer.prototype, "_bounds", void 0);
10387
- __decorate([
10074
+ _ts_decorate__default['default']([
10388
10075
  ignoreClone
10389
10076
  ], exports.Renderer.prototype, "_renderFrameCount", void 0);
10390
- __decorate([
10077
+ _ts_decorate__default['default']([
10391
10078
  ignoreClone
10392
10079
  ], exports.Renderer.prototype, "_overrideUpdate", void 0);
10393
- __decorate([
10080
+ _ts_decorate__default['default']([
10394
10081
  ignoreClone
10395
10082
  ], exports.Renderer.prototype, "_materials", void 0);
10396
- __decorate([
10083
+ _ts_decorate__default['default']([
10397
10084
  ignoreClone
10398
10085
  ], exports.Renderer.prototype, "_dirtyUpdateFlag", void 0);
10399
- __decorate([
10086
+ _ts_decorate__default['default']([
10400
10087
  deepClone
10401
10088
  ], exports.Renderer.prototype, "_shaderData", void 0);
10402
- __decorate([
10089
+ _ts_decorate__default['default']([
10403
10090
  ignoreClone
10404
10091
  ], exports.Renderer.prototype, "_mvMatrix", void 0);
10405
- __decorate([
10092
+ _ts_decorate__default['default']([
10406
10093
  ignoreClone
10407
10094
  ], exports.Renderer.prototype, "_mvpMatrix", void 0);
10408
- __decorate([
10095
+ _ts_decorate__default['default']([
10409
10096
  ignoreClone
10410
10097
  ], exports.Renderer.prototype, "_mvInvMatrix", void 0);
10411
- __decorate([
10098
+ _ts_decorate__default['default']([
10412
10099
  ignoreClone
10413
10100
  ], exports.Renderer.prototype, "_normalMatrix", void 0);
10414
- __decorate([
10101
+ _ts_decorate__default['default']([
10415
10102
  ignoreClone
10416
10103
  ], exports.Renderer.prototype, "_materialsInstanced", void 0);
10417
- __decorate([
10104
+ _ts_decorate__default['default']([
10418
10105
  ignoreClone
10419
10106
  ], exports.Renderer.prototype, "_priority", void 0);
10420
- __decorate([
10107
+ _ts_decorate__default['default']([
10421
10108
  assignmentClone
10422
10109
  ], exports.Renderer.prototype, "_receiveShadows", void 0);
10423
- __decorate([
10110
+ _ts_decorate__default['default']([
10424
10111
  ignoreClone
10425
10112
  ], exports.Renderer.prototype, "_rendererLayer", void 0);
10426
- __decorate([
10113
+ _ts_decorate__default['default']([
10427
10114
  ignoreClone
10428
10115
  ], exports.Renderer.prototype, "_onTransformChanged", null);
10429
- exports.Renderer = __decorate([
10116
+ exports.Renderer = _ts_decorate__default['default']([
10430
10117
  dependentComponents(Transform)
10431
10118
  ], exports.Renderer);
10432
10119
  var RendererUpdateFlags;
@@ -10498,19 +10185,15 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
10498
10185
  renderUVs[3].set(right, top);
10499
10186
  };
10500
10187
  return SimpleSpriteAssembler1;
10501
- }(), function() {
10502
- _SimpleSpriteAssembler._rectangleTriangles = [
10503
- 0,
10504
- 1,
10505
- 2,
10506
- 2,
10507
- 1,
10508
- 3
10509
- ];
10510
- }(), function() {
10511
- _SimpleSpriteAssembler._worldMatrix = new miniprogram.Matrix();
10512
- }(), _SimpleSpriteAssembler);
10513
- SimpleSpriteAssembler = __decorate([
10188
+ }(), _SimpleSpriteAssembler._rectangleTriangles = [
10189
+ 0,
10190
+ 1,
10191
+ 2,
10192
+ 2,
10193
+ 1,
10194
+ 3
10195
+ ], _SimpleSpriteAssembler._worldMatrix = new miniprogram.Matrix(), _SimpleSpriteAssembler);
10196
+ SimpleSpriteAssembler = _ts_decorate__default['default']([
10514
10197
  StaticInterfaceImplement()
10515
10198
  ], SimpleSpriteAssembler);
10516
10199
 
@@ -10526,9 +10209,6 @@ SimpleSpriteAssembler = __decorate([
10526
10209
  this.color = color;
10527
10210
  };
10528
10211
 
10529
- /**
10530
- * Sprite mask layer.
10531
- */ exports.SpriteMaskLayer = void 0;
10532
10212
  (function(SpriteMaskLayer) {
10533
10213
  SpriteMaskLayer[SpriteMaskLayer[/** Mask layer 0. */ "Layer0"] = 0x1] = "Layer0";
10534
10214
  SpriteMaskLayer[SpriteMaskLayer[/** Mask layer 1. */ "Layer1"] = 0x2] = "Layer1";
@@ -10582,7 +10262,7 @@ SimpleSpriteAssembler = __decorate([
10582
10262
  /**
10583
10263
  * A component for masking Sprites.
10584
10264
  */ var SpriteMask = /*#__PURE__*/ function(Renderer) {
10585
- _inherits(SpriteMask, Renderer);
10265
+ _inherits__default['default'](SpriteMask, Renderer);
10586
10266
  function SpriteMask(entity) {
10587
10267
  var _this;
10588
10268
  _this = Renderer.call(this, entity) || this;
@@ -10596,10 +10276,10 @@ SimpleSpriteAssembler = __decorate([
10596
10276
  _this._flipY = false;
10597
10277
  _this._alphaCutoff = 0.5;
10598
10278
  _this._renderData = new RenderData2D(4, [], []);
10599
- SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
10279
+ SimpleSpriteAssembler.resetData(_assert_this_initialized__default['default'](_this));
10600
10280
  _this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
10601
10281
  _this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
10602
- _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
10282
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized__default['default'](_this));
10603
10283
  return _this;
10604
10284
  }
10605
10285
  var _proto = SpriteMask.prototype;
@@ -10690,7 +10370,7 @@ SimpleSpriteAssembler = __decorate([
10690
10370
  break;
10691
10371
  }
10692
10372
  };
10693
- _create_class(SpriteMask, [
10373
+ _create_class__default['default'](SpriteMask, [
10694
10374
  {
10695
10375
  key: "width",
10696
10376
  get: /**
@@ -10808,40 +10488,36 @@ SimpleSpriteAssembler = __decorate([
10808
10488
  ]);
10809
10489
  return SpriteMask;
10810
10490
  }(exports.Renderer);
10811
- (function() {
10812
- /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10813
- })();
10814
- (function() {
10815
- /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10816
- })();
10817
- __decorate([
10491
+ /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10492
+ /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10493
+ _ts_decorate__default['default']([
10818
10494
  assignmentClone
10819
10495
  ], SpriteMask.prototype, "influenceLayers", void 0);
10820
- __decorate([
10496
+ _ts_decorate__default['default']([
10821
10497
  ignoreClone
10822
10498
  ], SpriteMask.prototype, "_sprite", void 0);
10823
- __decorate([
10499
+ _ts_decorate__default['default']([
10824
10500
  ignoreClone
10825
10501
  ], SpriteMask.prototype, "_automaticWidth", void 0);
10826
- __decorate([
10502
+ _ts_decorate__default['default']([
10827
10503
  ignoreClone
10828
10504
  ], SpriteMask.prototype, "_automaticHeight", void 0);
10829
- __decorate([
10505
+ _ts_decorate__default['default']([
10830
10506
  assignmentClone
10831
10507
  ], SpriteMask.prototype, "_customWidth", void 0);
10832
- __decorate([
10508
+ _ts_decorate__default['default']([
10833
10509
  assignmentClone
10834
10510
  ], SpriteMask.prototype, "_customHeight", void 0);
10835
- __decorate([
10511
+ _ts_decorate__default['default']([
10836
10512
  assignmentClone
10837
10513
  ], SpriteMask.prototype, "_flipX", void 0);
10838
- __decorate([
10514
+ _ts_decorate__default['default']([
10839
10515
  assignmentClone
10840
10516
  ], SpriteMask.prototype, "_flipY", void 0);
10841
- __decorate([
10517
+ _ts_decorate__default['default']([
10842
10518
  assignmentClone
10843
10519
  ], SpriteMask.prototype, "_alphaCutoff", void 0);
10844
- __decorate([
10520
+ _ts_decorate__default['default']([
10845
10521
  ignoreClone
10846
10522
  ], SpriteMask.prototype, "_onSpriteChange", null);
10847
10523
  var /**
@@ -10854,9 +10530,6 @@ var /**
10854
10530
  SpriteMaskUpdateFlags[SpriteMaskUpdateFlags[/** All. */ "All"] = 0x7] = "All";
10855
10531
  })(SpriteMaskUpdateFlags || (SpriteMaskUpdateFlags = {}));
10856
10532
 
10857
- /**
10858
- * Vertex element format.
10859
- */ exports.VertexElementFormat = void 0;
10860
10533
  (function(VertexElementFormat) {
10861
10534
  VertexElementFormat[VertexElementFormat[/** 32-bit float */ "Float"] = 0] = "Float";
10862
10535
  VertexElementFormat[VertexElementFormat[/** Two-dimensional 32-bit float */ "Vector2"] = 1] = "Vector2";
@@ -10876,18 +10549,12 @@ var /**
10876
10549
  VertexElementFormat[VertexElementFormat[/** Four-dimensional 16-bit Normalized unsigned integer, range is [0, 1] */ "NormalizedUShort4"] = 15] = "NormalizedUShort4";
10877
10550
  })(exports.VertexElementFormat || (exports.VertexElementFormat = {}));
10878
10551
 
10879
- /**
10880
- * Buffer usage.
10881
- */ exports.BufferUsage = void 0;
10882
10552
  (function(BufferUsage) {
10883
10553
  BufferUsage[BufferUsage[/** The buffer content are intended to be specified once, and used many times */ "Static"] = 0] = "Static";
10884
10554
  BufferUsage[BufferUsage[/** The buffer contents are intended to be respecified repeatedly, and used many times */ "Dynamic"] = 1] = "Dynamic";
10885
10555
  BufferUsage[BufferUsage[/** The buffer contents are intended to be specified once, and used at most a few times */ "Stream"] = 2] = "Stream";
10886
10556
  })(exports.BufferUsage || (exports.BufferUsage = {}));
10887
10557
 
10888
- /**
10889
- * Index format.
10890
- */ exports.IndexFormat = void 0;
10891
10558
  (function(IndexFormat) {
10892
10559
  IndexFormat[IndexFormat[/** 8 bit */ "UInt8"] = 0] = "UInt8";
10893
10560
  IndexFormat[IndexFormat[/** 16 bit */ "UInt16"] = 1] = "UInt16";
@@ -11027,7 +10694,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11027
10694
  this._glElementInfo = BufferUtil._getElementInfo(this.format);
11028
10695
  this._instanceStepRate = Math.floor(instanceStepRate);
11029
10696
  }
11030
- _create_class(VertexElement, [
10697
+ _create_class__default['default'](VertexElement, [
11031
10698
  {
11032
10699
  key: "semantic",
11033
10700
  get: /**
@@ -11078,17 +10745,11 @@ var BufferUtil = /*#__PURE__*/ function() {
11078
10745
  return VertexElement;
11079
10746
  }();
11080
10747
 
11081
- /**
11082
- * Buffer binding flag.
11083
- */ exports.BufferBindFlag = void 0;
11084
10748
  (function(BufferBindFlag) {
11085
10749
  BufferBindFlag[BufferBindFlag[/** Vertex buffer binding flag */ "VertexBuffer"] = 0] = "VertexBuffer";
11086
10750
  BufferBindFlag[BufferBindFlag[/** Index buffer binding flag */ "IndexBuffer"] = 1] = "IndexBuffer";
11087
10751
  })(exports.BufferBindFlag || (exports.BufferBindFlag = {}));
11088
10752
 
11089
- /**
11090
- * Define update strategy when call bufferData/bufferSubData func.
11091
- */ exports.SetDataOptions = void 0;
11092
10753
  (function(SetDataOptions) {
11093
10754
  SetDataOptions[SetDataOptions[/** Can overwrite part of used buffer data and ensure correct rendering */ "None"] = 0] = "None";
11094
10755
  SetDataOptions[SetDataOptions[/** Discard old buffer and create a new buffer, and won't affect the previous rendering */ "Discard"] = 1] = "Discard";
@@ -11097,7 +10758,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11097
10758
  /**
11098
10759
  * Buffer.
11099
10760
  */ var Buffer = /*#__PURE__*/ function(RefObject) {
11100
- _inherits(Buffer, RefObject);
10761
+ _inherits__default['default'](Buffer, RefObject);
11101
10762
  function Buffer(engine, type, byteLengthOrData, bufferUsage) {
11102
10763
  if (bufferUsage === void 0) bufferUsage = exports.BufferUsage.Static;
11103
10764
  var _this;
@@ -11187,7 +10848,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11187
10848
  gl.bufferData(this._glBindTarget, dataLength, this._glBufferUsage);
11188
10849
  this._byteLength = dataLength;
11189
10850
  };
11190
- _create_class(Buffer, [
10851
+ _create_class__default['default'](Buffer, [
11191
10852
  {
11192
10853
  key: "type",
11193
10854
  get: /**
@@ -11216,9 +10877,6 @@ var BufferUtil = /*#__PURE__*/ function() {
11216
10877
  return Buffer;
11217
10878
  }(RefObject);
11218
10879
 
11219
- /**
11220
- * Mesh topology.
11221
- */ exports.MeshTopology = void 0;
11222
10880
  (function(MeshTopology) {
11223
10881
  MeshTopology[MeshTopology[/** Draws a single dot */ "Points"] = 0] = "Points";
11224
10882
  MeshTopology[MeshTopology[/** Draws a line between a pair of vertices */ "Lines"] = 1] = "Lines";
@@ -11236,7 +10894,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11236
10894
  this._buffer = buffer;
11237
10895
  this._format = format;
11238
10896
  }
11239
- _create_class(IndexBufferBinding, [
10897
+ _create_class__default['default'](IndexBufferBinding, [
11240
10898
  {
11241
10899
  key: "buffer",
11242
10900
  get: /**
@@ -11276,7 +10934,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11276
10934
  /**
11277
10935
  * Mesh.
11278
10936
  */ var Mesh = /*#__PURE__*/ function(RefObject) {
11279
- _inherits(Mesh, RefObject);
10937
+ _inherits__default['default'](Mesh, RefObject);
11280
10938
  function Mesh(engine, name) {
11281
10939
  var _this;
11282
10940
  _this = RefObject.call(this, engine) || this;
@@ -11290,8 +10948,8 @@ var BufferUtil = /*#__PURE__*/ function() {
11290
10948
  _this._bounds = new miniprogram.BoundingBox();
11291
10949
  _this._subMeshes = [];
11292
10950
  _this.name = name;
11293
- _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized(_this));
11294
- _this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized(_this));
10951
+ _this._platformPrimitive = _this._engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized__default['default'](_this));
10952
+ _this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized__default['default'](_this));
11295
10953
  var bounds = _this._bounds;
11296
10954
  // @ts-ignore
11297
10955
  bounds.min._onValueChanged = _this._onBoundsChanged;
@@ -11417,7 +11075,7 @@ var BufferUtil = /*#__PURE__*/ function() {
11417
11075
  _proto._onBoundsChanged = function _onBoundsChanged() {
11418
11076
  this._updateFlagManager.dispatch(0x1);
11419
11077
  };
11420
- _create_class(Mesh, [
11078
+ _create_class__default['default'](Mesh, [
11421
11079
  {
11422
11080
  key: "bounds",
11423
11081
  get: /**
@@ -11463,7 +11121,7 @@ var MeshModifyFlags;
11463
11121
  this._buffer = buffer;
11464
11122
  this._stride = stride;
11465
11123
  }
11466
- _create_class(VertexBufferBinding, [
11124
+ _create_class__default['default'](VertexBufferBinding, [
11467
11125
  {
11468
11126
  key: "buffer",
11469
11127
  get: /**
@@ -11910,27 +11568,13 @@ var MeshModifyFlags;
11910
11568
  };
11911
11569
  return BlendShapeManager;
11912
11570
  }();
11913
- (function() {
11914
- BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11915
- })();
11916
- (function() {
11917
- BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11918
- })();
11919
- (function() {
11920
- BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11921
- })();
11922
- (function() {
11923
- BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11924
- })();
11925
- (function() {
11926
- BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11927
- })();
11928
- (function() {
11929
- BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11930
- })();
11931
- (function() {
11932
- BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11933
- })();
11571
+ BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11572
+ BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11573
+ BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11574
+ BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11575
+ BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11576
+ BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11577
+ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11934
11578
 
11935
11579
  /**
11936
11580
  * Vertex attribute types of a vertex in a ModelMesh.
@@ -11955,7 +11599,7 @@ var MeshModifyFlags;
11955
11599
  /**
11956
11600
  * Mesh containing common vertex elements of the model.
11957
11601
  */ var ModelMesh = /*#__PURE__*/ function(Mesh) {
11958
- _inherits(ModelMesh, Mesh);
11602
+ _inherits__default['default'](ModelMesh, Mesh);
11959
11603
  function ModelMesh(engine, name) {
11960
11604
  var _this;
11961
11605
  _this = Mesh.call(this, engine) || this;
@@ -11987,7 +11631,7 @@ var MeshModifyFlags;
11987
11631
  _this._customVertexElements = [];
11988
11632
  _this._vertexCountChanged = false;
11989
11633
  _this.name = name;
11990
- _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
11634
+ _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized__default['default'](_this));
11991
11635
  return _this;
11992
11636
  }
11993
11637
  var _proto = ModelMesh.prototype;
@@ -12277,11 +11921,11 @@ var MeshModifyFlags;
12277
11921
  }
12278
11922
  if (this._indices !== indices) {
12279
11923
  this._indices = indices;
12280
- if (_instanceof(indices, Uint8Array)) {
11924
+ if (_instanceof__default['default'](indices, Uint8Array)) {
12281
11925
  this._indicesFormat = exports.IndexFormat.UInt8;
12282
- } else if (_instanceof(indices, Uint16Array)) {
11926
+ } else if (_instanceof__default['default'](indices, Uint16Array)) {
12283
11927
  this._indicesFormat = exports.IndexFormat.UInt16;
12284
- } else if (_instanceof(indices, Uint32Array)) {
11928
+ } else if (_instanceof__default['default'](indices, Uint32Array)) {
12285
11929
  this._indicesFormat = exports.IndexFormat.UInt32;
12286
11930
  }
12287
11931
  }
@@ -12937,7 +12581,7 @@ var MeshModifyFlags;
12937
12581
  this._uv7 = null;
12938
12582
  this._blendShapeManager._releaseMemoryCache();
12939
12583
  };
12940
- _create_class(ModelMesh, [
12584
+ _create_class__default['default'](ModelMesh, [
12941
12585
  {
12942
12586
  key: "accessible",
12943
12587
  get: /**
@@ -13005,21 +12649,11 @@ var MeshModifyFlags;
13005
12649
  ]);
13006
12650
  return ModelMesh;
13007
12651
  }(Mesh);
13008
- (function() {
13009
- ModelMesh._tempVec0 = new miniprogram.Vector3();
13010
- })();
13011
- (function() {
13012
- ModelMesh._tempVec1 = new miniprogram.Vector3();
13013
- })();
13014
- (function() {
13015
- ModelMesh._tempVec2 = new miniprogram.Vector3();
13016
- })();
13017
- (function() {
13018
- ModelMesh._tempVec3 = new miniprogram.Vector3();
13019
- })();
13020
- (function() {
13021
- ModelMesh._tempVec4 = new miniprogram.Vector3();
13022
- })();
12652
+ ModelMesh._tempVec0 = new miniprogram.Vector3();
12653
+ ModelMesh._tempVec1 = new miniprogram.Vector3();
12654
+ ModelMesh._tempVec2 = new miniprogram.Vector3();
12655
+ ModelMesh._tempVec3 = new miniprogram.Vector3();
12656
+ ModelMesh._tempVec4 = new miniprogram.Vector3();
13023
12657
  var VertexChangedFlags;
13024
12658
  (function(VertexChangedFlags) {
13025
12659
  VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
@@ -13042,7 +12676,7 @@ var VertexChangedFlags;
13042
12676
  /**
13043
12677
  * Mesh skin data, equal glTF skins define
13044
12678
  */ var Skin = /*#__PURE__*/ function(EngineObject) {
13045
- _inherits(Skin, EngineObject);
12679
+ _inherits__default['default'](Skin, EngineObject);
13046
12680
  function Skin(name) {
13047
12681
  var _this;
13048
12682
  _this = EngineObject.call(this, null) || this;
@@ -13058,12 +12692,12 @@ var VertexChangedFlags;
13058
12692
  /**
13059
12693
  * MeshRenderer Component.
13060
12694
  */ var MeshRenderer = /*#__PURE__*/ function(Renderer) {
13061
- _inherits(MeshRenderer, Renderer);
12695
+ _inherits__default['default'](MeshRenderer, Renderer);
13062
12696
  function MeshRenderer(entity) {
13063
12697
  var _this;
13064
12698
  _this = Renderer.call(this, entity) || this;
13065
12699
  _this._enableVertexColor = false;
13066
- _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
12700
+ _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized__default['default'](_this));
13067
12701
  return _this;
13068
12702
  }
13069
12703
  var _proto = MeshRenderer.prototype;
@@ -13168,7 +12802,7 @@ var VertexChangedFlags;
13168
12802
  type & MeshModifyFlags.Bounds && (this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume);
13169
12803
  type & MeshModifyFlags.VertexElements && (this._dirtyUpdateFlag |= 0x2);
13170
12804
  };
13171
- _create_class(MeshRenderer, [
12805
+ _create_class__default['default'](MeshRenderer, [
13172
12806
  {
13173
12807
  key: "mesh",
13174
12808
  get: /**
@@ -13199,25 +12833,15 @@ var VertexChangedFlags;
13199
12833
  ]);
13200
12834
  return MeshRenderer;
13201
12835
  }(exports.Renderer);
13202
- (function() {
13203
- MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
13204
- })();
13205
- (function() {
13206
- MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
13207
- })();
13208
- (function() {
13209
- MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
13210
- })();
13211
- (function() {
13212
- MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
13213
- })();
13214
- (function() {
13215
- MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
13216
- })();
13217
- __decorate([
12836
+ MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
12837
+ MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
12838
+ MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
12839
+ MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
12840
+ MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
12841
+ _ts_decorate__default['default']([
13218
12842
  ignoreClone
13219
12843
  ], MeshRenderer.prototype, "_mesh", void 0);
13220
- __decorate([
12844
+ _ts_decorate__default['default']([
13221
12845
  ignoreClone
13222
12846
  ], MeshRenderer.prototype, "_onMeshChanged", null);
13223
12847
  var /**
@@ -13273,13 +12897,13 @@ var Utils = /*#__PURE__*/ function() {
13273
12897
  };
13274
12898
  Utils._stringToPath = function _stringToPath(string) {
13275
12899
  var result = [];
13276
- if (string.charCodeAt(0) === charCodeOfDot) {
12900
+ if (string.charCodeAt(0) === charCodeOfDot$1) {
13277
12901
  result.push("");
13278
12902
  }
13279
- string.replace(rePropName, function(match, expression, quote, subString) {
12903
+ string.replace(rePropName$1, function(match, expression, quote, subString) {
13280
12904
  var key = match;
13281
12905
  if (quote) {
13282
- key = subString.replace(reEscapeChar, "$1");
12906
+ key = subString.replace(reEscapeChar$1, "$1");
13283
12907
  } else if (expression) {
13284
12908
  key = expression.trim();
13285
12909
  }
@@ -13289,9 +12913,9 @@ var Utils = /*#__PURE__*/ function() {
13289
12913
  };
13290
12914
  return Utils;
13291
12915
  }();
13292
- var charCodeOfDot = ".".charCodeAt(0);
13293
- var reEscapeChar = /\\(\\)?/g;
13294
- var rePropName = RegExp(// Match anything that isn't a dot or bracket.
12916
+ var charCodeOfDot$1 = ".".charCodeAt(0);
12917
+ var reEscapeChar$1 = /\\(\\)?/g;
12918
+ var rePropName$1 = RegExp(// Match anything that isn't a dot or bracket.
13295
12919
  "[^.[\\]]+" + "|" + // Or match property names within brackets.
13296
12920
  "\\[(?:" + // Match a non-string expression.
13297
12921
  "([^\"'][^[]*)" + "|" + // Or match strings (supports escaping characters).
@@ -13301,7 +12925,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13301
12925
  /**
13302
12926
  * SkinnedMeshRenderer.
13303
12927
  */ var SkinnedMeshRenderer = /*#__PURE__*/ function(MeshRenderer) {
13304
- _inherits(SkinnedMeshRenderer, MeshRenderer);
12928
+ _inherits__default['default'](SkinnedMeshRenderer, MeshRenderer);
13305
12929
  function SkinnedMeshRenderer(entity) {
13306
12930
  var _this;
13307
12931
  _this = MeshRenderer.call(this, entity) || this;
@@ -13317,7 +12941,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13317
12941
  // 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.
13318
12942
  maxVertexUniformVectors = Math.min(maxVertexUniformVectors, rhi._options._maxAllowSkinUniformVectorCount);
13319
12943
  _this._maxVertexUniformVectors = maxVertexUniformVectors;
13320
- _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
12944
+ _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized__default['default'](_this));
13321
12945
  var localBounds = _this._localBounds;
13322
12946
  // @ts-ignore
13323
12947
  localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
@@ -13541,7 +13165,7 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13541
13165
  _proto._onLocalBoundsChanged = function _onLocalBoundsChanged() {
13542
13166
  this._dirtyUpdateFlag |= RendererUpdateFlags.WorldVolume;
13543
13167
  };
13544
- _create_class(SkinnedMeshRenderer, [
13168
+ _create_class__default['default'](SkinnedMeshRenderer, [
13545
13169
  {
13546
13170
  key: "blendShapeWeights",
13547
13171
  get: /**
@@ -13606,52 +13230,44 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13606
13230
  ]);
13607
13231
  return SkinnedMeshRenderer;
13608
13232
  }(MeshRenderer);
13609
- (function() {
13610
- SkinnedMeshRenderer._tempMatrix = new miniprogram.Matrix();
13611
- })();
13612
- (function() {
13613
- SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13614
- })();
13615
- (function() {
13616
- SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13617
- })();
13618
- (function() {
13619
- SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13620
- })();
13621
- __decorate([
13233
+ SkinnedMeshRenderer._tempMatrix = new miniprogram.Matrix();
13234
+ SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13235
+ SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13236
+ SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13237
+ _ts_decorate__default['default']([
13622
13238
  ignoreClone
13623
13239
  ], SkinnedMeshRenderer.prototype, "_supportSkinning", void 0);
13624
- __decorate([
13240
+ _ts_decorate__default['default']([
13625
13241
  ignoreClone
13626
13242
  ], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
13627
- __decorate([
13243
+ _ts_decorate__default['default']([
13628
13244
  ignoreClone
13629
13245
  ], SkinnedMeshRenderer.prototype, "_jointDataCreateCache", void 0);
13630
- __decorate([
13246
+ _ts_decorate__default['default']([
13631
13247
  ignoreClone
13632
13248
  ], SkinnedMeshRenderer.prototype, "_blendShapeWeights", void 0);
13633
- __decorate([
13249
+ _ts_decorate__default['default']([
13634
13250
  ignoreClone
13635
13251
  ], SkinnedMeshRenderer.prototype, "_maxVertexUniformVectors", void 0);
13636
- __decorate([
13252
+ _ts_decorate__default['default']([
13637
13253
  ignoreClone
13638
13254
  ], SkinnedMeshRenderer.prototype, "_rootBone", void 0);
13639
- __decorate([
13255
+ _ts_decorate__default['default']([
13640
13256
  ignoreClone
13641
13257
  ], SkinnedMeshRenderer.prototype, "_localBounds", void 0);
13642
- __decorate([
13258
+ _ts_decorate__default['default']([
13643
13259
  ignoreClone
13644
13260
  ], SkinnedMeshRenderer.prototype, "_jointMatrices", void 0);
13645
- __decorate([
13261
+ _ts_decorate__default['default']([
13646
13262
  ignoreClone
13647
13263
  ], SkinnedMeshRenderer.prototype, "_jointTexture", void 0);
13648
- __decorate([
13264
+ _ts_decorate__default['default']([
13649
13265
  ignoreClone
13650
13266
  ], SkinnedMeshRenderer.prototype, "_jointEntities", void 0);
13651
- __decorate([
13267
+ _ts_decorate__default['default']([
13652
13268
  ignoreClone
13653
13269
  ], SkinnedMeshRenderer.prototype, "_condensedBlendShapeWeights", void 0);
13654
- __decorate([
13270
+ _ts_decorate__default['default']([
13655
13271
  ignoreClone
13656
13272
  ], SkinnedMeshRenderer.prototype, "_onLocalBoundsChanged", null);
13657
13273
 
@@ -14343,7 +13959,7 @@ __decorate([
14343
13959
  /**
14344
13960
  * BufferMesh.
14345
13961
  */ var BufferMesh = /*#__PURE__*/ function(Mesh) {
14346
- _inherits(BufferMesh, Mesh);
13962
+ _inherits__default['default'](BufferMesh, Mesh);
14347
13963
  function BufferMesh() {
14348
13964
  return Mesh.apply(this, arguments);
14349
13965
  }
@@ -14386,7 +14002,7 @@ __decorate([
14386
14002
  }
14387
14003
  this._setIndexBufferBinding(binding);
14388
14004
  };
14389
- _create_class(BufferMesh, [
14005
+ _create_class__default['default'](BufferMesh, [
14390
14006
  {
14391
14007
  key: "instanceCount",
14392
14008
  get: /**
@@ -14500,7 +14116,7 @@ __decorate([
14500
14116
  this._layoutChangeManager.dispatch(0, this);
14501
14117
  }
14502
14118
  };
14503
- _create_class(BlendShape, [
14119
+ _create_class__default['default'](BlendShape, [
14504
14120
  {
14505
14121
  key: "frames",
14506
14122
  get: /**
@@ -14661,15 +14277,11 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
14661
14277
  };
14662
14278
  return Basic2DBatcher;
14663
14279
  }();
14664
- (function() {
14665
- /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14666
- })();
14667
- (function() {
14668
- Basic2DBatcher._canUploadSameBuffer = true;
14669
- })();
14280
+ /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14281
+ Basic2DBatcher._canUploadSameBuffer = true;
14670
14282
 
14671
14283
  var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
14672
- _inherits(SpriteMaskBatcher, Basic2DBatcher);
14284
+ _inherits__default['default'](SpriteMaskBatcher, Basic2DBatcher);
14673
14285
  function SpriteMaskBatcher() {
14674
14286
  return Basic2DBatcher.apply(this, arguments);
14675
14287
  }
@@ -14805,7 +14417,7 @@ var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
14805
14417
  }();
14806
14418
 
14807
14419
  var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14808
- _inherits(TextRenderElement, RenderElement);
14420
+ _inherits__default['default'](TextRenderElement, RenderElement);
14809
14421
  function TextRenderElement() {
14810
14422
  var _this;
14811
14423
  _this = RenderElement.call(this) || this;
@@ -14821,18 +14433,12 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14821
14433
  return TextRenderElement;
14822
14434
  }(RenderElement);
14823
14435
 
14824
- /**
14825
- * The Background mode enumeration.
14826
- */ exports.BackgroundMode = void 0;
14827
14436
  (function(BackgroundMode) {
14828
14437
  BackgroundMode[BackgroundMode[/* Solid color. */ "SolidColor"] = 0] = "SolidColor";
14829
14438
  BackgroundMode[BackgroundMode[/* Sky. */ "Sky"] = 1] = "Sky";
14830
14439
  BackgroundMode[BackgroundMode[/** Texture */ "Texture"] = 2] = "Texture";
14831
14440
  })(exports.BackgroundMode || (exports.BackgroundMode = {}));
14832
14441
 
14833
- /**
14834
- * Filling mode of background texture.
14835
- */ exports.BackgroundTextureFillMode = void 0;
14836
14442
  (function(BackgroundTextureFillMode) {
14837
14443
  BackgroundTextureFillMode[BackgroundTextureFillMode[/* Maintain the aspect ratio and scale the texture to fit the width of the canvas. */ "AspectFitWidth"] = 0] = "AspectFitWidth";
14838
14444
  BackgroundTextureFillMode[BackgroundTextureFillMode[/* Maintain the aspect ratio and scale the texture to fit the height of the canvas. */ "AspectFitHeight"] = 1] = "AspectFitHeight";
@@ -14890,7 +14496,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14890
14496
  rhi.drawPrimitive(mesh, mesh.subMesh, program);
14891
14497
  cameraShaderData.setMatrix(RenderContext._vpMatrixProperty, originViewProjMatrix);
14892
14498
  };
14893
- _create_class(Sky, [
14499
+ _create_class__default['default'](Sky, [
14894
14500
  {
14895
14501
  key: "material",
14896
14502
  get: /**
@@ -14926,15 +14532,9 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14926
14532
  ]);
14927
14533
  return Sky;
14928
14534
  }();
14929
- (function() {
14930
- Sky._epsilon = 1e-6;
14931
- })();
14932
- (function() {
14933
- Sky._viewProjMatrix = new miniprogram.Matrix();
14934
- })();
14935
- (function() {
14936
- Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14937
- })();
14535
+ Sky._epsilon = 1e-6;
14536
+ Sky._viewProjMatrix = new miniprogram.Matrix();
14537
+ Sky._projectionMatrix = new miniprogram.Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14938
14538
 
14939
14539
  /**
14940
14540
  * Background of scene.
@@ -15032,7 +14632,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15032
14632
  mesh.addSubMesh(0, indices.length);
15033
14633
  return mesh;
15034
14634
  };
15035
- _create_class(Background, [
14635
+ _create_class__default['default'](Background, [
15036
14636
  {
15037
14637
  key: "texture",
15038
14638
  get: /**
@@ -15072,9 +14672,6 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15072
14672
  return Background;
15073
14673
  }();
15074
14674
 
15075
- /**
15076
- * Fog Mode.
15077
- */ exports.FogMode = void 0;
15078
14675
  (function(FogMode) {
15079
14676
  FogMode[FogMode[/** Disable fog. */ "None"] = 0] = "None";
15080
14677
  FogMode[FogMode[/** Linear fog. */ "Linear"] = 1] = "Linear";
@@ -15082,9 +14679,6 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15082
14679
  FogMode[FogMode[/** Exponential squared fog. */ "ExponentialSquared"] = 3] = "ExponentialSquared";
15083
14680
  })(exports.FogMode || (exports.FogMode = {}));
15084
14681
 
15085
- /**
15086
- * Diffuse mode.
15087
- */ exports.DiffuseMode = void 0;
15088
14682
  (function(DiffuseMode) {
15089
14683
  DiffuseMode[DiffuseMode[/** Solid color mode. */ "SolidColor"] = 0] = "SolidColor";
15090
14684
  DiffuseMode[DiffuseMode[/**
@@ -15203,7 +14797,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15203
14797
  out[25] = src[25] * 0.429042;
15204
14798
  out[26] = src[26] * 0.429042;
15205
14799
  };
15206
- _create_class(AmbientLight, [
14800
+ _create_class__default['default'](AmbientLight, [
15207
14801
  {
15208
14802
  key: "specularTextureDecodeRGBM",
15209
14803
  get: /**
@@ -15314,38 +14908,20 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15314
14908
  ]);
15315
14909
  return AmbientLight;
15316
14910
  }();
15317
- (function() {
15318
- AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
15319
- })();
15320
- (function() {
15321
- AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
15322
- })();
15323
- (function() {
15324
- AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
15325
- })();
15326
- (function() {
15327
- AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
15328
- })();
15329
- (function() {
15330
- AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
15331
- })();
15332
- (function() {
15333
- AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
15334
- })();
15335
- (function() {
15336
- AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
15337
- })();
15338
- (function() {
15339
- AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
15340
- })();
15341
- (function() {
15342
- AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15343
- })();
14911
+ AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
14912
+ AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
14913
+ AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
14914
+ AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
14915
+ AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
14916
+ AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
14917
+ AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
14918
+ AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
14919
+ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15344
14920
 
15345
14921
  /**
15346
14922
  * Scene.
15347
14923
  */ var Scene = /*#__PURE__*/ function(EngineObject) {
15348
- _inherits(Scene, EngineObject);
14924
+ _inherits__default['default'](Scene, EngineObject);
15349
14925
  function Scene(engine, name) {
15350
14926
  var _this;
15351
14927
  _this = EngineObject.call(this, engine) || this;
@@ -15371,7 +14947,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15371
14947
  var shaderData = _this.shaderData;
15372
14948
  shaderData._addRefCount(1);
15373
14949
  _this.ambientLight = new AmbientLight();
15374
- engine.sceneManager._allScenes.push(_assert_this_initialized(_this));
14950
+ engine.sceneManager._allScenes.push(_assert_this_initialized__default['default'](_this));
15375
14951
  shaderData.enableMacro("OASIS_FOG_MODE", _this._fogMode.toString());
15376
14952
  shaderData.enableMacro("CASCADED_COUNT", _this.shadowCascades.toString());
15377
14953
  shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
@@ -15581,7 +15157,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15581
15157
  this._fogParams.z = density / Math.LN2;
15582
15158
  this._fogParams.w = density / Math.sqrt(Math.LN2);
15583
15159
  };
15584
- _create_class(Scene, [
15160
+ _create_class__default['default'](Scene, [
15585
15161
  {
15586
15162
  key: "shaderData",
15587
15163
  get: /**
@@ -15725,12 +15301,8 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15725
15301
  ]);
15726
15302
  return Scene;
15727
15303
  }(EngineObject);
15728
- (function() {
15729
- Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15730
- })();
15731
- (function() {
15732
- Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15733
- })();
15304
+ Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15305
+ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15734
15306
 
15735
15307
  /**
15736
15308
  * Scene manager.
@@ -15778,7 +15350,7 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15778
15350
  }
15779
15351
  allScenes.length = 0;
15780
15352
  };
15781
- _create_class(SceneManager, [
15353
+ _create_class__default['default'](SceneManager, [
15782
15354
  {
15783
15355
  key: "activeScene",
15784
15356
  get: /**
@@ -15813,7 +15385,7 @@ var pbrSpecularFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_decl
15813
15385
 
15814
15386
  var pbrVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#include <blendShape_input>\n#include <uv_share>\n#include <color_share>\n#include <normal_share>\n#include <worldpos_share>\n#include <ShadowVertexDeclaration>\n#include <FogVertexDeclaration>\nvoid main(){\n#include <begin_position_vert>\n#include <begin_normal_vert>\n#include <blendShape_vert>\n#include <skinning_vert>\n#include <uv_vert>\n#include <color_vert>\n#include <normal_vert>\n#include <worldpos_vert>\n#include <position_vert>\n#include <ShadowVertex>\n#include <FogVertex>\n}"; // eslint-disable-line
15815
15387
 
15816
- var shadowMapFs = "#define GLSLIFY 1\n#ifdef OASIS_NO_DEPTH_TEXTURE\nvec4 pack(float depth){const vec4 bitShift=vec4(1.0,256.0,256.0*256.0,256.0*256.0*256.0);const vec4 bitMask=vec4(1.0/256.0,1.0/256.0,1.0/256.0,0.0);vec4 rgbaDepth=fract(depth*bitShift);rgbaDepth-=rgbaDepth.gbaa*bitMask;return rgbaDepth;}\n#endif\nvoid main(){\n#ifdef OASIS_NO_DEPTH_TEXTURE\ngl_FragColor=pack(gl_FragCoord.z);\n#else\ngl_FragColor=vec4(0.0,0.0,0.0,0.0);\n#endif\n}"; // eslint-disable-line
15388
+ var shadowMapFs = "#define GLSLIFY 1\n#ifdef OASIS_NO_DEPTH_TEXTURE\n/***Decompose and save depth value.*/vec4 pack(float depth){const vec4 bitShift=vec4(1.0,256.0,256.0*256.0,256.0*256.0*256.0);const vec4 bitMask=vec4(1.0/256.0,1.0/256.0,1.0/256.0,0.0);vec4 rgbaDepth=fract(depth*bitShift);rgbaDepth-=rgbaDepth.gbaa*bitMask;return rgbaDepth;}\n#endif\nvoid main(){\n#ifdef OASIS_NO_DEPTH_TEXTURE\ngl_FragColor=pack(gl_FragCoord.z);\n#else\ngl_FragColor=vec4(0.0,0.0,0.0,0.0);\n#endif\n}"; // eslint-disable-line
15817
15389
 
15818
15390
  var shadowMapVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#include <blendShape_input>\n#include <normal_share>\nuniform mat4 u_VPMat;uniform vec2 u_shadowBias;uniform vec3 u_lightDirection;vec3 applyShadowBias(vec3 positionWS){positionWS-=u_lightDirection*u_shadowBias.x;return positionWS;}vec3 applyShadowNormalBias(vec3 positionWS,vec3 normalWS){float invNdotL=1.0-clamp(dot(-u_lightDirection,normalWS),0.0,1.0);float scale=invNdotL*u_shadowBias.y;positionWS+=normalWS*vec3(scale);return positionWS;}void main(){\n#include <begin_position_vert>\n#include <begin_normal_vert>\n#include <blendShape_vert>\n#include <skinning_vert>\nvec4 positionWS=u_modelMat*position;positionWS.xyz=applyShadowBias(positionWS.xyz);\n#ifndef OMIT_NORMAL\n#ifdef O3_HAS_NORMAL\nvec3 normalWS=normalize(mat3(u_normalMat)*normal);positionWS.xyz=applyShadowNormalBias(positionWS.xyz,normalWS);\n#endif\n#endif\nvec4 positionCS=u_VPMat*positionWS;positionCS.z=max(positionCS.z,-1.0);gl_Position=positionCS;}"; // eslint-disable-line
15819
15391
 
@@ -15932,7 +15504,7 @@ ShaderPool.init();
15932
15504
  /**
15933
15505
  * Engine.
15934
15506
  */ var Engine = /*#__PURE__*/ function(EventDispatcher) {
15935
- _inherits(Engine, EventDispatcher);
15507
+ _inherits__default['default'](Engine, EventDispatcher);
15936
15508
  function Engine(canvas, hardwareRenderer, settings) {
15937
15509
  var _this;
15938
15510
  _this = EventDispatcher.call(this) || this;
@@ -15949,8 +15521,8 @@ ShaderPool.init();
15949
15521
  /** @internal */ _this._canSpriteBatch = true;
15950
15522
  /** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
15951
15523
  _this._settings = {};
15952
- _this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
15953
- _this._sceneManager = new SceneManager(_assert_this_initialized(_this));
15524
+ _this._resourceManager = new ResourceManager(_assert_this_initialized__default['default'](_this));
15525
+ _this._sceneManager = new SceneManager(_assert_this_initialized__default['default'](_this));
15954
15526
  _this._vSyncCount = 1;
15955
15527
  _this._targetFrameRate = 60;
15956
15528
  _this._time = new Time();
@@ -15974,25 +15546,25 @@ ShaderPool.init();
15974
15546
  };
15975
15547
  _this._hardwareRenderer = hardwareRenderer;
15976
15548
  _this._hardwareRenderer.init(canvas);
15977
- _this.physicsManager = new PhysicsManager(_assert_this_initialized(_this));
15549
+ _this.physicsManager = new PhysicsManager(_assert_this_initialized__default['default'](_this));
15978
15550
  _this._canvas = canvas;
15979
- _this._sceneManager.activeScene = new Scene(_assert_this_initialized(_this), "DefaultScene");
15980
- _this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized(_this));
15551
+ _this._sceneManager.activeScene = new Scene(_assert_this_initialized__default['default'](_this), "DefaultScene");
15552
+ _this._spriteMaskManager = new SpriteMaskManager(_assert_this_initialized__default['default'](_this));
15981
15553
  _this._spriteDefaultMaterial = _this._createSpriteMaterial();
15982
15554
  _this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
15983
- _this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
15555
+ _this._textDefaultFont = Font.createFromOS(_assert_this_initialized__default['default'](_this), "Arial");
15984
15556
  _this._textDefaultFont.isGCIgnored = true;
15985
- _this.inputManager = new InputManager(_assert_this_initialized(_this));
15557
+ _this.inputManager = new InputManager(_assert_this_initialized__default['default'](_this));
15986
15558
  var magentaPixel = new Uint8Array([
15987
15559
  255,
15988
15560
  0,
15989
15561
  255,
15990
15562
  255
15991
15563
  ]);
15992
- var magentaTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15564
+ var magentaTexture2D = new Texture2D(_assert_this_initialized__default['default'](_this), 1, 1, exports.TextureFormat.R8G8B8A8, false);
15993
15565
  magentaTexture2D.setPixelBuffer(magentaPixel);
15994
15566
  magentaTexture2D.isGCIgnored = true;
15995
- var magentaTextureCube = new TextureCube(_assert_this_initialized(_this), 1, exports.TextureFormat.R8G8B8A8, false);
15567
+ var magentaTextureCube = new TextureCube(_assert_this_initialized__default['default'](_this), 1, exports.TextureFormat.R8G8B8A8, false);
15996
15568
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveX, magentaPixel);
15997
15569
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.NegativeX, magentaPixel);
15998
15570
  magentaTextureCube.setPixelBuffer(exports.TextureCubeFace.PositiveY, magentaPixel);
@@ -16003,23 +15575,23 @@ ShaderPool.init();
16003
15575
  if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
16004
15576
  _this._macroCollection.enable(Engine._noDepthTextureMacro);
16005
15577
  } else {
16006
- var depthTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
15578
+ var depthTexture2D = new Texture2D(_assert_this_initialized__default['default'](_this), 1, 1, exports.TextureFormat.Depth16, false);
16007
15579
  depthTexture2D.isGCIgnored = true;
16008
15580
  _this._depthTexture2D = depthTexture2D;
16009
15581
  }
16010
15582
  _this._magentaTexture2D = magentaTexture2D;
16011
15583
  _this._magentaTextureCube = magentaTextureCube;
16012
15584
  if (hardwareRenderer.isWebGL2) {
16013
- var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized(_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
15585
+ var magentaTexture2DArray = new Texture2DArray(_assert_this_initialized__default['default'](_this), 1, 1, 1, exports.TextureFormat.R8G8B8A8, false);
16014
15586
  magentaTexture2DArray.setPixelBuffer(0, magentaPixel);
16015
15587
  magentaTexture2DArray.isGCIgnored = true;
16016
15588
  _this._magentaTexture2DArray = magentaTexture2DArray;
16017
15589
  }
16018
- var magentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
15590
+ var magentaMaterial = new Material(_assert_this_initialized__default['default'](_this), Shader.find("unlit"));
16019
15591
  magentaMaterial.isGCIgnored = true;
16020
15592
  magentaMaterial.shaderData.setColor("u_baseColor", new Color(1.0, 0.0, 1.01, 1.0));
16021
15593
  _this._magentaMaterial = magentaMaterial;
16022
- var backgroundTextureMaterial = new Material(_assert_this_initialized(_this), Shader.find("background-texture"));
15594
+ var backgroundTextureMaterial = new Material(_assert_this_initialized__default['default'](_this), Shader.find("background-texture"));
16023
15595
  backgroundTextureMaterial.isGCIgnored = true;
16024
15596
  backgroundTextureMaterial.renderState.depthState.compareFunction = exports.CompareFunction.LessEqual;
16025
15597
  _this._backgroundTextureMaterial = backgroundTextureMaterial;
@@ -16190,7 +15762,7 @@ ShaderPool.init();
16190
15762
  material.isGCIgnored = true;
16191
15763
  return material;
16192
15764
  };
16193
- _create_class(Engine, [
15765
+ _create_class__default['default'](Engine, [
16194
15766
  {
16195
15767
  key: "settings",
16196
15768
  get: /**
@@ -16278,20 +15850,14 @@ ShaderPool.init();
16278
15850
  ]);
16279
15851
  return Engine;
16280
15852
  }(EventDispatcher);
16281
- (function() {
16282
- /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
16283
- })();
16284
- (function() {
16285
- /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
16286
- })();
16287
- (function() {
16288
- /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
16289
- })();
15853
+ /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15854
+ /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15855
+ /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
16290
15856
 
16291
15857
  /**
16292
15858
  * Script class, used for logic writing.
16293
15859
  */ var Script = /*#__PURE__*/ function(Component) {
16294
- _inherits(Script, Component);
15860
+ _inherits__default['default'](Script, Component);
16295
15861
  function Script() {
16296
15862
  var _this;
16297
15863
  _this = Component.apply(this, arguments) || this;
@@ -16460,38 +16026,38 @@ ShaderPool.init();
16460
16026
  };
16461
16027
  return Script;
16462
16028
  }(Component);
16463
- __decorate([
16029
+ _ts_decorate__default['default']([
16464
16030
  ignoreClone
16465
16031
  ], Script.prototype, "_started", void 0);
16466
- __decorate([
16032
+ _ts_decorate__default['default']([
16467
16033
  ignoreClone
16468
16034
  ], Script.prototype, "_onStartIndex", void 0);
16469
- __decorate([
16035
+ _ts_decorate__default['default']([
16470
16036
  ignoreClone
16471
16037
  ], Script.prototype, "_onUpdateIndex", void 0);
16472
- __decorate([
16038
+ _ts_decorate__default['default']([
16473
16039
  ignoreClone
16474
16040
  ], Script.prototype, "_onLateUpdateIndex", void 0);
16475
- __decorate([
16041
+ _ts_decorate__default['default']([
16476
16042
  ignoreClone
16477
16043
  ], Script.prototype, "_onPhysicsUpdateIndex", void 0);
16478
- __decorate([
16044
+ _ts_decorate__default['default']([
16479
16045
  ignoreClone
16480
16046
  ], Script.prototype, "_onPreRenderIndex", void 0);
16481
- __decorate([
16047
+ _ts_decorate__default['default']([
16482
16048
  ignoreClone
16483
16049
  ], Script.prototype, "_onPostRenderIndex", void 0);
16484
- __decorate([
16050
+ _ts_decorate__default['default']([
16485
16051
  ignoreClone
16486
16052
  ], Script.prototype, "_entityScriptsIndex", void 0);
16487
- __decorate([
16053
+ _ts_decorate__default['default']([
16488
16054
  ignoreClone
16489
16055
  ], Script.prototype, "_waitHandlingInValid", void 0);
16490
16056
 
16491
16057
  /**
16492
16058
  * @internal
16493
16059
  */ var SpriteBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
16494
- _inherits(SpriteBatcher, Basic2DBatcher);
16060
+ _inherits__default['default'](SpriteBatcher, Basic2DBatcher);
16495
16061
  function SpriteBatcher() {
16496
16062
  return Basic2DBatcher.apply(this, arguments);
16497
16063
  }
@@ -16601,9 +16167,7 @@ __decorate([
16601
16167
  };
16602
16168
  return SpriteBatcher;
16603
16169
  }(Basic2DBatcher);
16604
- (function() {
16605
- SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16606
- })();
16170
+ SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16607
16171
 
16608
16172
  /**
16609
16173
  * Render queue.
@@ -17101,247 +16665,227 @@ var /**
17101
16665
  };
17102
16666
  return ShadowUtils;
17103
16667
  }();
17104
- (function() {
17105
- ShadowUtils._tempMatrix0 = new miniprogram.Matrix();
17106
- })();
17107
- (function() {
17108
- // prettier-ignore
17109
- /** @internal */ ShadowUtils._shadowMapCoordMatrix = new miniprogram.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);
17110
- })();
17111
- (function() {
17112
- ShadowUtils._frustumCorners = [
17113
- new miniprogram.Vector3(),
17114
- new miniprogram.Vector3(),
17115
- new miniprogram.Vector3(),
17116
- new miniprogram.Vector3(),
17117
- new miniprogram.Vector3(),
17118
- new miniprogram.Vector3(),
17119
- new miniprogram.Vector3(),
17120
- new miniprogram.Vector3()
17121
- ];
17122
- })();
17123
- (function() {
17124
- ShadowUtils._adjustNearPlane = new miniprogram.Plane(new miniprogram.Vector3());
17125
- })();
17126
- (function() {
17127
- ShadowUtils._adjustFarPlane = new miniprogram.Plane(new miniprogram.Vector3());
17128
- })();
17129
- (function() {
17130
- ShadowUtils._backPlaneFaces = new Array(5);
17131
- })();
17132
- (function() {
17133
- ShadowUtils._edgePlanePoint2 = new miniprogram.Vector3();
17134
- })();
17135
- (function() {
17136
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16668
+ ShadowUtils._tempMatrix0 = new miniprogram.Matrix();
16669
+ // prettier-ignore
16670
+ /** @internal */ ShadowUtils._shadowMapCoordMatrix = new miniprogram.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);
16671
+ ShadowUtils._frustumCorners = [
16672
+ new miniprogram.Vector3(),
16673
+ new miniprogram.Vector3(),
16674
+ new miniprogram.Vector3(),
16675
+ new miniprogram.Vector3(),
16676
+ new miniprogram.Vector3(),
16677
+ new miniprogram.Vector3(),
16678
+ new miniprogram.Vector3(),
16679
+ new miniprogram.Vector3()
16680
+ ];
16681
+ ShadowUtils._adjustNearPlane = new miniprogram.Plane(new miniprogram.Vector3());
16682
+ ShadowUtils._adjustFarPlane = new miniprogram.Plane(new miniprogram.Vector3());
16683
+ ShadowUtils._backPlaneFaces = new Array(5);
16684
+ ShadowUtils._edgePlanePoint2 = new miniprogram.Vector3();
16685
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16686
+ [
16687
+ miniprogram.FrustumFace.Left,
16688
+ miniprogram.FrustumFace.Right,
16689
+ miniprogram.FrustumFace.Top,
16690
+ miniprogram.FrustumFace.Bottom
16691
+ ],
16692
+ [
16693
+ miniprogram.FrustumFace.Left,
16694
+ miniprogram.FrustumFace.Right,
16695
+ miniprogram.FrustumFace.Top,
16696
+ miniprogram.FrustumFace.Bottom
16697
+ ],
16698
+ [
16699
+ miniprogram.FrustumFace.Near,
16700
+ miniprogram.FrustumFace.Far,
16701
+ miniprogram.FrustumFace.Top,
16702
+ miniprogram.FrustumFace.Bottom
16703
+ ],
16704
+ [
16705
+ miniprogram.FrustumFace.Near,
16706
+ miniprogram.FrustumFace.Far,
16707
+ miniprogram.FrustumFace.Top,
16708
+ miniprogram.FrustumFace.Bottom
16709
+ ],
16710
+ [
16711
+ miniprogram.FrustumFace.Near,
16712
+ miniprogram.FrustumFace.Far,
16713
+ miniprogram.FrustumFace.Left,
16714
+ miniprogram.FrustumFace.Right
16715
+ ],
16716
+ [
16717
+ miniprogram.FrustumFace.Near,
16718
+ miniprogram.FrustumFace.Far,
16719
+ miniprogram.FrustumFace.Left,
16720
+ miniprogram.FrustumFace.Right
16721
+ ]
16722
+ ];
16723
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16724
+ [
16725
+ // near, far, left, right, bottom, top
17137
16726
  [
17138
- miniprogram.FrustumFace.Left,
17139
- miniprogram.FrustumFace.Right,
17140
- miniprogram.FrustumFace.Top,
17141
- miniprogram.FrustumFace.Bottom
16727
+ 8,
16728
+ 8
17142
16729
  ],
17143
16730
  [
17144
- miniprogram.FrustumFace.Left,
17145
- miniprogram.FrustumFace.Right,
17146
- miniprogram.FrustumFace.Top,
17147
- miniprogram.FrustumFace.Bottom
16731
+ 8,
16732
+ 8
17148
16733
  ],
17149
16734
  [
17150
- miniprogram.FrustumFace.Near,
17151
- miniprogram.FrustumFace.Far,
17152
- miniprogram.FrustumFace.Top,
17153
- miniprogram.FrustumFace.Bottom
16735
+ 4,
16736
+ 5
17154
16737
  ],
17155
16738
  [
17156
- miniprogram.FrustumFace.Near,
17157
- miniprogram.FrustumFace.Far,
17158
- miniprogram.FrustumFace.Top,
17159
- miniprogram.FrustumFace.Bottom
16739
+ 6,
16740
+ 7
17160
16741
  ],
17161
16742
  [
17162
- miniprogram.FrustumFace.Near,
17163
- miniprogram.FrustumFace.Far,
17164
- miniprogram.FrustumFace.Left,
17165
- miniprogram.FrustumFace.Right
16743
+ 7,
16744
+ 4
17166
16745
  ],
17167
16746
  [
17168
- miniprogram.FrustumFace.Near,
17169
- miniprogram.FrustumFace.Far,
17170
- miniprogram.FrustumFace.Left,
17171
- miniprogram.FrustumFace.Right
16747
+ 5,
16748
+ 6
17172
16749
  ]
17173
- ];
17174
- })();
17175
- (function() {
17176
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16750
+ ],
16751
+ [
16752
+ // near, far, left, right, bottom, top
17177
16753
  [
17178
- // near, far, left, right, bottom, top
17179
- [
17180
- 8,
17181
- 8
17182
- ],
17183
- [
17184
- 8,
17185
- 8
17186
- ],
17187
- [
17188
- 4,
17189
- 5
17190
- ],
17191
- [
17192
- 6,
17193
- 7
17194
- ],
17195
- [
17196
- 7,
17197
- 4
17198
- ],
17199
- [
17200
- 5,
17201
- 6
17202
- ]
16754
+ 8,
16755
+ 8
17203
16756
  ],
17204
16757
  [
17205
- // near, far, left, right, bottom, top
17206
- [
17207
- 8,
17208
- 8
17209
- ],
17210
- [
17211
- 8,
17212
- 8
17213
- ],
17214
- [
17215
- 1,
17216
- 0
17217
- ],
17218
- [
17219
- 3,
17220
- 2
17221
- ],
17222
- [
17223
- 0,
17224
- 3
17225
- ],
17226
- [
17227
- 2,
17228
- 1
17229
- ]
16758
+ 8,
16759
+ 8
17230
16760
  ],
17231
16761
  [
17232
- // near, far, left, right, bottom, top
17233
- [
17234
- 5,
17235
- 4
17236
- ],
17237
- [
17238
- 0,
17239
- 1
17240
- ],
17241
- [
17242
- 8,
17243
- 8
17244
- ],
17245
- [
17246
- 8,
17247
- 8
17248
- ],
17249
- [
17250
- 4,
17251
- 0
17252
- ],
17253
- [
17254
- 1,
17255
- 5
17256
- ]
16762
+ 1,
16763
+ 0
17257
16764
  ],
17258
16765
  [
17259
- // near, far, left, right, bottom, top
17260
- [
17261
- 7,
17262
- 6
17263
- ],
17264
- [
17265
- 2,
17266
- 3
17267
- ],
17268
- [
17269
- 8,
17270
- 8
17271
- ],
17272
- [
17273
- 8,
17274
- 8
17275
- ],
17276
- [
17277
- 3,
17278
- 7
17279
- ],
17280
- [
17281
- 6,
17282
- 2
17283
- ]
16766
+ 3,
16767
+ 2
17284
16768
  ],
17285
16769
  [
17286
- // near, far, left, right, bottom, top
17287
- [
17288
- 4,
17289
- 7
17290
- ],
17291
- [
17292
- 3,
17293
- 0
17294
- ],
17295
- [
17296
- 0,
17297
- 4
17298
- ],
17299
- [
17300
- 7,
17301
- 3
17302
- ],
17303
- [
17304
- 8,
17305
- 8
17306
- ],
17307
- [
17308
- 8,
17309
- 8
17310
- ]
16770
+ 0,
16771
+ 3
17311
16772
  ],
17312
16773
  [
17313
- // near, far, left, right, bottom, top
17314
- [
17315
- 6,
17316
- 5
17317
- ],
17318
- [
17319
- 1,
17320
- 2
17321
- ],
17322
- [
17323
- 5,
17324
- 1
17325
- ],
17326
- [
17327
- 2,
17328
- 6
17329
- ],
17330
- [
17331
- 8,
17332
- 8
17333
- ],
17334
- [
17335
- 8,
17336
- 8
17337
- ]
16774
+ 2,
16775
+ 1
17338
16776
  ]
17339
- ];
17340
- })();
17341
- (function() {
17342
- //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.
17343
- ShadowUtils.atlasBorderSize = 4.0;
17344
- })();
16777
+ ],
16778
+ [
16779
+ // near, far, left, right, bottom, top
16780
+ [
16781
+ 5,
16782
+ 4
16783
+ ],
16784
+ [
16785
+ 0,
16786
+ 1
16787
+ ],
16788
+ [
16789
+ 8,
16790
+ 8
16791
+ ],
16792
+ [
16793
+ 8,
16794
+ 8
16795
+ ],
16796
+ [
16797
+ 4,
16798
+ 0
16799
+ ],
16800
+ [
16801
+ 1,
16802
+ 5
16803
+ ]
16804
+ ],
16805
+ [
16806
+ // near, far, left, right, bottom, top
16807
+ [
16808
+ 7,
16809
+ 6
16810
+ ],
16811
+ [
16812
+ 2,
16813
+ 3
16814
+ ],
16815
+ [
16816
+ 8,
16817
+ 8
16818
+ ],
16819
+ [
16820
+ 8,
16821
+ 8
16822
+ ],
16823
+ [
16824
+ 3,
16825
+ 7
16826
+ ],
16827
+ [
16828
+ 6,
16829
+ 2
16830
+ ]
16831
+ ],
16832
+ [
16833
+ // near, far, left, right, bottom, top
16834
+ [
16835
+ 4,
16836
+ 7
16837
+ ],
16838
+ [
16839
+ 3,
16840
+ 0
16841
+ ],
16842
+ [
16843
+ 0,
16844
+ 4
16845
+ ],
16846
+ [
16847
+ 7,
16848
+ 3
16849
+ ],
16850
+ [
16851
+ 8,
16852
+ 8
16853
+ ],
16854
+ [
16855
+ 8,
16856
+ 8
16857
+ ]
16858
+ ],
16859
+ [
16860
+ // near, far, left, right, bottom, top
16861
+ [
16862
+ 6,
16863
+ 5
16864
+ ],
16865
+ [
16866
+ 1,
16867
+ 2
16868
+ ],
16869
+ [
16870
+ 5,
16871
+ 1
16872
+ ],
16873
+ [
16874
+ 2,
16875
+ 6
16876
+ ],
16877
+ [
16878
+ 8,
16879
+ 8
16880
+ ],
16881
+ [
16882
+ 8,
16883
+ 8
16884
+ ]
16885
+ ]
16886
+ ];
16887
+ //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.
16888
+ ShadowUtils.atlasBorderSize = 4.0;
17345
16889
 
17346
16890
  /**
17347
16891
  * Cascade shadow caster.
@@ -17582,45 +17126,19 @@ var /**
17582
17126
  };
17583
17127
  return CascadedShadowCasterPass;
17584
17128
  }();
17585
- (function() {
17586
- CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17587
- })();
17588
- (function() {
17589
- CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17590
- })();
17591
- (function() {
17592
- CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17593
- })();
17594
- (function() {
17595
- CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17596
- })();
17597
- (function() {
17598
- CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17599
- })();
17600
- (function() {
17601
- CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17602
- })();
17603
- (function() {
17604
- CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17605
- })();
17606
- (function() {
17607
- CascadedShadowCasterPass._maxCascades = 4;
17608
- })();
17609
- (function() {
17610
- CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17611
- })();
17612
- (function() {
17613
- CascadedShadowCasterPass._viewport = new miniprogram.Vector4(0, 0, 1, 1);
17614
- })();
17615
- (function() {
17616
- CascadedShadowCasterPass._clearColor = new miniprogram.Color(1, 1, 1, 1);
17617
- })();
17618
- (function() {
17619
- CascadedShadowCasterPass._tempVector = new miniprogram.Vector3();
17620
- })();
17621
- (function() {
17622
- CascadedShadowCasterPass._tempMatrix0 = new miniprogram.Matrix();
17623
- })();
17129
+ CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17130
+ CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17131
+ CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17132
+ CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17133
+ CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17134
+ CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17135
+ CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17136
+ CascadedShadowCasterPass._maxCascades = 4;
17137
+ CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17138
+ CascadedShadowCasterPass._viewport = new miniprogram.Vector4(0, 0, 1, 1);
17139
+ CascadedShadowCasterPass._clearColor = new miniprogram.Color(1, 1, 1, 1);
17140
+ CascadedShadowCasterPass._tempVector = new miniprogram.Vector3();
17141
+ CascadedShadowCasterPass._tempMatrix0 = new miniprogram.Matrix();
17624
17142
 
17625
17143
  var passNum = 0;
17626
17144
  /**
@@ -17697,7 +17215,7 @@ var passNum = 0;
17697
17215
  if (typeof nameOrPass === "string") {
17698
17216
  var renderPass = new RenderPass(nameOrPass, priority, renderTarget, replaceMaterial, mask);
17699
17217
  this._renderPassArray.push(renderPass);
17700
- } else if (_instanceof(nameOrPass, RenderPass)) {
17218
+ } else if (_instanceof__default['default'](nameOrPass, RenderPass)) {
17701
17219
  this._renderPassArray.push(nameOrPass);
17702
17220
  }
17703
17221
  this._renderPassArray.sort(function(p1, p2) {
@@ -17710,7 +17228,7 @@ var passNum = 0;
17710
17228
  */ _proto.removeRenderPass = function removeRenderPass(nameOrPass) {
17711
17229
  var pass;
17712
17230
  if (typeof nameOrPass === "string") pass = this.getRenderPass(nameOrPass);
17713
- else if (_instanceof(nameOrPass, RenderPass)) pass = nameOrPass;
17231
+ else if (_instanceof__default['default'](nameOrPass, RenderPass)) pass = nameOrPass;
17714
17232
  if (pass) {
17715
17233
  var idx = this._renderPassArray.indexOf(pass);
17716
17234
  this._renderPassArray.splice(idx, 1);
@@ -17853,7 +17371,7 @@ var passNum = 0;
17853
17371
  renderer._prepareRender(context);
17854
17372
  }
17855
17373
  };
17856
- _create_class(BasicRenderPipeline, [
17374
+ _create_class__default['default'](BasicRenderPipeline, [
17857
17375
  {
17858
17376
  key: "defaultRenderPass",
17859
17377
  get: /**
@@ -17865,27 +17383,17 @@ var passNum = 0;
17865
17383
  ]);
17866
17384
  return BasicRenderPipeline;
17867
17385
  }();
17868
- (function() {
17869
- BasicRenderPipeline._tempVector0 = new miniprogram.Vector3();
17870
- })();
17871
- (function() {
17872
- BasicRenderPipeline._tempVector1 = new miniprogram.Vector3();
17873
- })();
17386
+ BasicRenderPipeline._tempVector0 = new miniprogram.Vector3();
17387
+ BasicRenderPipeline._tempVector1 = new miniprogram.Vector3();
17874
17388
 
17875
17389
  var _Camera;
17876
17390
  var MathTemp = function MathTemp() {
17877
17391
  };
17878
- (function() {
17879
- MathTemp.tempVec4 = new miniprogram.Vector4();
17880
- })();
17881
- (function() {
17882
- MathTemp.tempVec3 = new miniprogram.Vector3();
17883
- })();
17884
- (function() {
17885
- MathTemp.tempVec2 = new miniprogram.Vector2();
17886
- })();
17392
+ MathTemp.tempVec4 = new miniprogram.Vector4();
17393
+ MathTemp.tempVec3 = new miniprogram.Vector3();
17394
+ MathTemp.tempVec2 = new miniprogram.Vector2();
17887
17395
  exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17888
- _inherits(Camera1, Component);
17396
+ _inherits__default['default'](Camera1, Component);
17889
17397
  function Camera1(entity) {
17890
17398
  var _this;
17891
17399
  _this = Component.call(this, entity) || this;
@@ -17900,8 +17408,6 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17900
17408
  * @remarks Support bit manipulation, corresponding to `Layer`.
17901
17409
  */ _this.cullingMask = exports.Layer.Everything;
17902
17410
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
17903
- /** @internal */ _this._frustum = new miniprogram.BoundingFrustum();
17904
- /** @internal */ _this._virtualCamera = new VirtualCamera();
17905
17411
  _this._shaderData = new ShaderData(ShaderDataGroup.Camera);
17906
17412
  _this._isProjMatSetting = false;
17907
17413
  _this._nearClipPlane = 0.1;
@@ -17913,6 +17419,8 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17913
17419
  _this._isFrustumProjectDirty = true;
17914
17420
  _this._customAspectRatio = undefined;
17915
17421
  _this._renderTarget = null;
17422
+ /** @internal */ _this._frustum = new miniprogram.BoundingFrustum();
17423
+ /** @internal */ _this._virtualCamera = new VirtualCamera();
17916
17424
  _this._viewport = new miniprogram.Vector4(0, 0, 1, 1);
17917
17425
  _this._inverseProjectionMatrix = new miniprogram.Matrix();
17918
17426
  _this._lastAspectSize = new miniprogram.Vector2(0, 0);
@@ -17922,7 +17430,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
17922
17430
  _this._isViewMatrixDirty = transform.registerWorldChangeFlag();
17923
17431
  _this._isInvViewProjDirty = transform.registerWorldChangeFlag();
17924
17432
  _this._frustumViewChangeFlag = transform.registerWorldChangeFlag();
17925
- _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
17433
+ _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized__default['default'](_this));
17926
17434
  _this.shaderData._addRefCount(1);
17927
17435
  return _this;
17928
17436
  }
@@ -18153,7 +17661,7 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
18153
17661
  }
18154
17662
  return this._inverseProjectionMatrix;
18155
17663
  };
18156
- _create_class(Camera1, [
17664
+ _create_class__default['default'](Camera1, [
18157
17665
  {
18158
17666
  key: "shaderData",
18159
17667
  get: /**
@@ -18325,45 +17833,41 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
18325
17833
  }
18326
17834
  ]);
18327
17835
  return Camera1;
18328
- }(Component), function() {
18329
- /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat");
18330
- }(), function() {
18331
- /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
18332
- }(), _Camera);
18333
- __decorate([
17836
+ }(Component), /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat"), /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos"), _Camera);
17837
+ _ts_decorate__default['default']([
18334
17838
  deepClone
18335
17839
  ], exports.Camera.prototype, "_frustum", void 0);
18336
- __decorate([
17840
+ _ts_decorate__default['default']([
18337
17841
  ignoreClone
18338
17842
  ], exports.Camera.prototype, "_renderPipeline", void 0);
18339
- __decorate([
17843
+ _ts_decorate__default['default']([
18340
17844
  ignoreClone
18341
17845
  ], exports.Camera.prototype, "_virtualCamera", void 0);
18342
- __decorate([
17846
+ _ts_decorate__default['default']([
18343
17847
  ignoreClone
18344
17848
  ], exports.Camera.prototype, "_frustumViewChangeFlag", void 0);
18345
- __decorate([
17849
+ _ts_decorate__default['default']([
18346
17850
  ignoreClone
18347
17851
  ], exports.Camera.prototype, "_transform", void 0);
18348
- __decorate([
17852
+ _ts_decorate__default['default']([
18349
17853
  ignoreClone
18350
17854
  ], exports.Camera.prototype, "_isViewMatrixDirty", void 0);
18351
- __decorate([
17855
+ _ts_decorate__default['default']([
18352
17856
  ignoreClone
18353
17857
  ], exports.Camera.prototype, "_isInvViewProjDirty", void 0);
18354
- __decorate([
17858
+ _ts_decorate__default['default']([
18355
17859
  deepClone
18356
17860
  ], exports.Camera.prototype, "_viewport", void 0);
18357
- __decorate([
17861
+ _ts_decorate__default['default']([
18358
17862
  deepClone
18359
17863
  ], exports.Camera.prototype, "_inverseProjectionMatrix", void 0);
18360
- __decorate([
17864
+ _ts_decorate__default['default']([
18361
17865
  deepClone
18362
17866
  ], exports.Camera.prototype, "_lastAspectSize", void 0);
18363
- __decorate([
17867
+ _ts_decorate__default['default']([
18364
17868
  deepClone
18365
17869
  ], exports.Camera.prototype, "_invViewProjMat", void 0);
18366
- exports.Camera = __decorate([
17870
+ exports.Camera = _ts_decorate__default['default']([
18367
17871
  dependentComponents(Transform)
18368
17872
  ], exports.Camera);
18369
17873
 
@@ -18542,13 +18046,8 @@ var MultiExecutor = /*#__PURE__*/ function() {
18542
18046
  };
18543
18047
  return Loader;
18544
18048
  }();
18545
- (function() {
18546
- Loader._engineObjects = {};
18547
- })();
18049
+ Loader._engineObjects = {};
18548
18050
 
18549
- /**
18550
- * Asset Type.
18551
- */ exports.AssetType = void 0;
18552
18051
  (function(AssetType) {
18553
18052
  AssetType[/**
18554
18053
  * Plain text.
@@ -18580,17 +18079,11 @@ var MultiExecutor = /*#__PURE__*/ function() {
18580
18079
  AssetType[/** Source Font, include ttf、 otf and woff. */ "SourceFont"] = "source-font";
18581
18080
  })(exports.AssetType || (exports.AssetType = {}));
18582
18081
 
18583
- /**
18584
- * Alpha blend mode.
18585
- */ exports.BlendMode = void 0;
18586
18082
  (function(BlendMode) {
18587
18083
  BlendMode[BlendMode[/** SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */ "Normal"] = 0] = "Normal";
18588
18084
  BlendMode[BlendMode[/** SRC ALPHA * SRC + ONE * DEST */ "Additive"] = 1] = "Additive";
18589
18085
  })(exports.BlendMode || (exports.BlendMode = {}));
18590
18086
 
18591
- /**
18592
- * Set which face for render.
18593
- */ exports.RenderFace = void 0;
18594
18087
  (function(RenderFace) {
18595
18088
  RenderFace[RenderFace[/** Render front face. */ "Front"] = 0] = "Front";
18596
18089
  RenderFace[RenderFace[/** Render back face. */ "Back"] = 1] = "Back";
@@ -18598,7 +18091,7 @@ var MultiExecutor = /*#__PURE__*/ function() {
18598
18091
  })(exports.RenderFace || (exports.RenderFace = {}));
18599
18092
 
18600
18093
  var BaseMaterial = /*#__PURE__*/ function(Material) {
18601
- _inherits(BaseMaterial, Material);
18094
+ _inherits__default['default'](BaseMaterial, Material);
18602
18095
  function BaseMaterial(engine, shader) {
18603
18096
  var _this;
18604
18097
  _this = Material.call(this, engine, shader) || this;
@@ -18697,7 +18190,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18697
18190
  target._isTransparent = this._isTransparent;
18698
18191
  target._blendMode = this._blendMode;
18699
18192
  };
18700
- _create_class(BaseMaterial, [
18193
+ _create_class__default['default'](BaseMaterial, [
18701
18194
  {
18702
18195
  key: "shader",
18703
18196
  get: /**
@@ -18797,50 +18290,24 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18797
18290
  ]);
18798
18291
  return BaseMaterial;
18799
18292
  }(Material);
18800
- (function() {
18801
- BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18802
- })();
18803
- (function() {
18804
- BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18805
- })();
18806
- (function() {
18807
- BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18808
- })();
18809
- (function() {
18810
- BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18811
- })();
18812
- (function() {
18813
- BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18814
- })();
18815
- (function() {
18816
- BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18817
- })();
18818
- (function() {
18819
- BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18820
- })();
18821
- (function() {
18822
- BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18823
- })();
18824
- (function() {
18825
- BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18826
- })();
18827
- (function() {
18828
- BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18829
- })();
18830
- (function() {
18831
- BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18832
- })();
18833
- (function() {
18834
- BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18835
- })();
18836
- (function() {
18837
- BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18838
- })();
18293
+ BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18294
+ BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18295
+ BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18296
+ BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18297
+ BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18298
+ BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18299
+ BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18300
+ BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18301
+ BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18302
+ BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18303
+ BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18304
+ BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18305
+ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18839
18306
 
18840
18307
  /**
18841
18308
  * Blinn-phong Material.
18842
18309
  */ var BlinnPhongMaterial = /*#__PURE__*/ function(BaseMaterial) {
18843
- _inherits(BlinnPhongMaterial, BaseMaterial);
18310
+ _inherits__default['default'](BlinnPhongMaterial, BaseMaterial);
18844
18311
  function BlinnPhongMaterial(engine) {
18845
18312
  var _this;
18846
18313
  _this = BaseMaterial.call(this, engine, Shader.find("blinn-phong")) || this;
@@ -18863,7 +18330,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18863
18330
  this.cloneTo(dest);
18864
18331
  return dest;
18865
18332
  };
18866
- _create_class(BlinnPhongMaterial, [
18333
+ _create_class__default['default'](BlinnPhongMaterial, [
18867
18334
  {
18868
18335
  key: "baseColor",
18869
18336
  get: /**
@@ -19009,19 +18476,10 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19009
18476
  ]);
19010
18477
  return BlinnPhongMaterial;
19011
18478
  }(BaseMaterial);
19012
- (function() {
19013
- BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
19014
- })();
19015
- (function() {
19016
- BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
19017
- })();
19018
- (function() {
19019
- BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
19020
- })();
18479
+ BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18480
+ BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18481
+ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
19021
18482
 
19022
- /**
19023
- * Texture UV coordinate.
19024
- */ exports.TextureCoordinate = void 0;
19025
18483
  (function(TextureCoordinate) {
19026
18484
  TextureCoordinate[TextureCoordinate["UV0"] = 0] = "UV0";
19027
18485
  TextureCoordinate[TextureCoordinate["UV1"] = 1] = "UV1";
@@ -19036,7 +18494,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19036
18494
  /**
19037
18495
  * PBR (Physically-Based Rendering) Material.
19038
18496
  */ var PBRBaseMaterial = /*#__PURE__*/ function(BaseMaterial) {
19039
- _inherits(PBRBaseMaterial, BaseMaterial);
18497
+ _inherits__default['default'](PBRBaseMaterial, BaseMaterial);
19040
18498
  function PBRBaseMaterial(engine, shader) {
19041
18499
  var _this;
19042
18500
  _this = BaseMaterial.call(this, engine, shader) || this;
@@ -19053,7 +18511,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19053
18511
  shaderData.setFloat(PBRBaseMaterial._clearCoatRoughnessProp, 0);
19054
18512
  return _this;
19055
18513
  }
19056
- _create_class(PBRBaseMaterial, [
18514
+ _create_class__default['default'](PBRBaseMaterial, [
19057
18515
  {
19058
18516
  key: "baseColor",
19059
18517
  get: /**
@@ -19277,35 +18735,19 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19277
18735
  ]);
19278
18736
  return PBRBaseMaterial;
19279
18737
  }(BaseMaterial);
19280
- (function() {
19281
- PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
19282
- })();
19283
- (function() {
19284
- PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
19285
- })();
19286
- (function() {
19287
- PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
19288
- })();
19289
- (function() {
19290
- PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
19291
- })();
19292
- (function() {
19293
- PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
19294
- })();
19295
- (function() {
19296
- PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
19297
- })();
19298
- (function() {
19299
- PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
19300
- })();
19301
- (function() {
19302
- PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
19303
- })();
18738
+ PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18739
+ PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18740
+ PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18741
+ PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18742
+ PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18743
+ PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18744
+ PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18745
+ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
19304
18746
 
19305
18747
  /**
19306
18748
  * PBR (Metallic-Roughness Workflow) Material.
19307
18749
  */ var PBRMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
19308
- _inherits(PBRMaterial, PBRBaseMaterial);
18750
+ _inherits__default['default'](PBRMaterial, PBRBaseMaterial);
19309
18751
  function PBRMaterial(engine) {
19310
18752
  var _this;
19311
18753
  _this = PBRBaseMaterial.call(this, engine, Shader.find("pbr")) || this;
@@ -19322,7 +18764,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19322
18764
  this.cloneTo(dest);
19323
18765
  return dest;
19324
18766
  };
19325
- _create_class(PBRMaterial, [
18767
+ _create_class__default['default'](PBRMaterial, [
19326
18768
  {
19327
18769
  key: "ior",
19328
18770
  get: /**
@@ -19379,23 +18821,15 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19379
18821
  ]);
19380
18822
  return PBRMaterial;
19381
18823
  }(PBRBaseMaterial);
19382
- (function() {
19383
- PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
19384
- })();
19385
- (function() {
19386
- PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
19387
- })();
19388
- (function() {
19389
- PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
19390
- })();
19391
- (function() {
19392
- PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
19393
- })();
18824
+ PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
18825
+ PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
18826
+ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
18827
+ PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
19394
18828
 
19395
18829
  /**
19396
18830
  * PBR (Specular-Glossiness Workflow) Material.
19397
18831
  */ var PBRSpecularMaterial = /*#__PURE__*/ function(PBRBaseMaterial) {
19398
- _inherits(PBRSpecularMaterial, PBRBaseMaterial);
18832
+ _inherits__default['default'](PBRSpecularMaterial, PBRBaseMaterial);
19399
18833
  function PBRSpecularMaterial(engine) {
19400
18834
  var _this;
19401
18835
  _this = PBRBaseMaterial.call(this, engine, Shader.find("pbr-specular")) || this;
@@ -19411,7 +18845,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19411
18845
  this.cloneTo(dest);
19412
18846
  return dest;
19413
18847
  };
19414
- _create_class(PBRSpecularMaterial, [
18848
+ _create_class__default['default'](PBRSpecularMaterial, [
19415
18849
  {
19416
18850
  key: "specularColor",
19417
18851
  get: /**
@@ -19457,23 +18891,15 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19457
18891
  ]);
19458
18892
  return PBRSpecularMaterial;
19459
18893
  }(PBRBaseMaterial);
19460
- (function() {
19461
- PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
19462
- })();
19463
- (function() {
19464
- PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
19465
- })();
19466
- (function() {
19467
- PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
19468
- })();
19469
- (function() {
19470
- PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19471
- })();
18894
+ PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
18895
+ PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
18896
+ PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
18897
+ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19472
18898
 
19473
18899
  /**
19474
18900
  * Unlit Material.
19475
18901
  */ var UnlitMaterial = /*#__PURE__*/ function(BaseMaterial) {
19476
- _inherits(UnlitMaterial, BaseMaterial);
18902
+ _inherits__default['default'](UnlitMaterial, BaseMaterial);
19477
18903
  function UnlitMaterial(engine) {
19478
18904
  var _this;
19479
18905
  _this = BaseMaterial.call(this, engine, Shader.find("unlit")) || this;
@@ -19492,7 +18918,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19492
18918
  this.cloneTo(dest);
19493
18919
  return dest;
19494
18920
  };
19495
- _create_class(UnlitMaterial, [
18921
+ _create_class__default['default'](UnlitMaterial, [
19496
18922
  {
19497
18923
  key: "baseColor",
19498
18924
  get: /**
@@ -19541,32 +18967,22 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19541
18967
  return UnlitMaterial;
19542
18968
  }(BaseMaterial);
19543
18969
 
19544
- /**
19545
- * The horizontal alignment of the text.
19546
- */ exports.TextHorizontalAlignment = void 0;
19547
18970
  (function(TextHorizontalAlignment) {
19548
18971
  TextHorizontalAlignment[TextHorizontalAlignment[/** Align left horizontally */ "Left"] = 0] = "Left";
19549
18972
  TextHorizontalAlignment[TextHorizontalAlignment[/** Align center horizontally */ "Center"] = 1] = "Center";
19550
18973
  TextHorizontalAlignment[TextHorizontalAlignment[/** Align right horizontally */ "Right"] = 2] = "Right";
19551
18974
  })(exports.TextHorizontalAlignment || (exports.TextHorizontalAlignment = {}));
19552
- exports.TextVerticalAlignment = void 0;
19553
18975
  (function(TextVerticalAlignment) {
19554
18976
  TextVerticalAlignment[TextVerticalAlignment[/** Align top vertically */ "Top"] = 0] = "Top";
19555
18977
  TextVerticalAlignment[TextVerticalAlignment[/** Align center vertically */ "Center"] = 1] = "Center";
19556
18978
  TextVerticalAlignment[TextVerticalAlignment[/** Align bottom vertically */ "Bottom"] = 2] = "Bottom";
19557
18979
  })(exports.TextVerticalAlignment || (exports.TextVerticalAlignment = {}));
19558
18980
 
19559
- /**
19560
- * The way to handle the situation where wrapped text is too tall to fit in the height.
19561
- */ exports.OverflowMode = void 0;
19562
18981
  (function(OverflowMode) {
19563
18982
  OverflowMode[OverflowMode[/** Overflow when the text is too tall */ "Overflow"] = 0] = "Overflow";
19564
18983
  OverflowMode[OverflowMode[/** Truncate with height when the text is too tall */ "Truncate"] = 1] = "Truncate";
19565
18984
  })(exports.OverflowMode || (exports.OverflowMode = {}));
19566
18985
 
19567
- /**
19568
- * The style of the font.
19569
- */ exports.FontStyle = void 0;
19570
18986
  (function(FontStyle) {
19571
18987
  FontStyle[FontStyle[/** Set font without style */ "None"] = 0x0] = "None";
19572
18988
  FontStyle[FontStyle[/** Set font bold */ "Bold"] = 0x1] = "Bold";
@@ -19576,7 +18992,7 @@ exports.TextVerticalAlignment = void 0;
19576
18992
  /**
19577
18993
  * Sprite Atlas.
19578
18994
  */ var SpriteAtlas = /*#__PURE__*/ function(RefObject) {
19579
- _inherits(SpriteAtlas, RefObject);
18995
+ _inherits__default['default'](SpriteAtlas, RefObject);
19580
18996
  function SpriteAtlas(engine) {
19581
18997
  var _this;
19582
18998
  _this = RefObject.call(this, engine) || this;
@@ -19633,7 +19049,7 @@ exports.TextVerticalAlignment = void 0;
19633
19049
  this._sprites = null;
19634
19050
  this._spriteNamesToIndex = null;
19635
19051
  };
19636
- _create_class(SpriteAtlas, [
19052
+ _create_class__default['default'](SpriteAtlas, [
19637
19053
  {
19638
19054
  key: "sprites",
19639
19055
  get: /**
@@ -19646,9 +19062,6 @@ exports.TextVerticalAlignment = void 0;
19646
19062
  return SpriteAtlas;
19647
19063
  }(RefObject);
19648
19064
 
19649
- /**
19650
- * Sprite's drawing mode enumeration.
19651
- */ exports.SpriteDrawMode = void 0;
19652
19065
  (function(SpriteDrawMode) {
19653
19066
  SpriteDrawMode[SpriteDrawMode[/** Overall scaling when modifying size. */ "Simple"] = 0] = "Simple";
19654
19067
  SpriteDrawMode[SpriteDrawMode[/** When modifying the size, it is transformed according to the 9-slice settings (border). */ "Sliced"] = 1] = "Sliced";
@@ -19657,7 +19070,7 @@ exports.TextVerticalAlignment = void 0;
19657
19070
  /**
19658
19071
  * 2D sprite.
19659
19072
  */ var Sprite = /*#__PURE__*/ function(RefObject) {
19660
- _inherits(Sprite, RefObject);
19073
+ _inherits__default['default'](Sprite, RefObject);
19661
19074
  function Sprite(engine, texture, region, pivot, border, name) {
19662
19075
  if (texture === void 0) texture = null;
19663
19076
  if (region === void 0) region = null;
@@ -19833,7 +19246,7 @@ exports.TextVerticalAlignment = void 0;
19833
19246
  }
19834
19247
  this._updateFlagManager.dispatch(type);
19835
19248
  };
19836
- _create_class(Sprite, [
19249
+ _create_class__default['default'](Sprite, [
19837
19250
  {
19838
19251
  key: "texture",
19839
19252
  get: /**
@@ -20147,17 +19560,15 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
20147
19560
  };
20148
19561
  SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
20149
19562
  return SlicedSpriteAssembler1;
20150
- }(), function() {
20151
- _SlicedSpriteAssembler._worldMatrix = new miniprogram.Matrix();
20152
- }(), _SlicedSpriteAssembler);
20153
- SlicedSpriteAssembler = __decorate([
19563
+ }(), _SlicedSpriteAssembler._worldMatrix = new miniprogram.Matrix(), _SlicedSpriteAssembler);
19564
+ SlicedSpriteAssembler = _ts_decorate__default['default']([
20154
19565
  StaticInterfaceImplement()
20155
19566
  ], SlicedSpriteAssembler);
20156
19567
 
20157
19568
  /**
20158
19569
  * Renders a Sprite for 2D graphics.
20159
19570
  */ var SpriteRenderer = /*#__PURE__*/ function(Renderer) {
20160
- _inherits(SpriteRenderer, Renderer);
19571
+ _inherits__default['default'](SpriteRenderer, Renderer);
20161
19572
  function SpriteRenderer(entity) {
20162
19573
  var _this;
20163
19574
  _this = Renderer.call(this, entity) || this;
@@ -20174,7 +19585,7 @@ SlicedSpriteAssembler = __decorate([
20174
19585
  _this._renderData = new RenderData2D(4, [], [], null, _this._color);
20175
19586
  _this.drawMode = exports.SpriteDrawMode.Simple;
20176
19587
  _this.setMaterial(_this._engine._spriteDefaultMaterial);
20177
- _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
19588
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized__default['default'](_this));
20178
19589
  return _this;
20179
19590
  }
20180
19591
  var _proto = SpriteRenderer.prototype;
@@ -20295,7 +19706,7 @@ SlicedSpriteAssembler = __decorate([
20295
19706
  break;
20296
19707
  }
20297
19708
  };
20298
- _create_class(SpriteRenderer, [
19709
+ _create_class__default['default'](SpriteRenderer, [
20299
19710
  {
20300
19711
  key: "drawMode",
20301
19712
  get: /**
@@ -20460,49 +19871,47 @@ SlicedSpriteAssembler = __decorate([
20460
19871
  ]);
20461
19872
  return SpriteRenderer;
20462
19873
  }(exports.Renderer);
20463
- (function() {
20464
- /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20465
- })();
20466
- __decorate([
19874
+ /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
19875
+ _ts_decorate__default['default']([
20467
19876
  ignoreClone
20468
19877
  ], SpriteRenderer.prototype, "_renderData", void 0);
20469
- __decorate([
19878
+ _ts_decorate__default['default']([
20470
19879
  ignoreClone
20471
19880
  ], SpriteRenderer.prototype, "_drawMode", void 0);
20472
- __decorate([
19881
+ _ts_decorate__default['default']([
20473
19882
  ignoreClone
20474
19883
  ], SpriteRenderer.prototype, "_assembler", void 0);
20475
- __decorate([
19884
+ _ts_decorate__default['default']([
20476
19885
  deepClone
20477
19886
  ], SpriteRenderer.prototype, "_color", void 0);
20478
- __decorate([
19887
+ _ts_decorate__default['default']([
20479
19888
  ignoreClone
20480
19889
  ], SpriteRenderer.prototype, "_sprite", void 0);
20481
- __decorate([
19890
+ _ts_decorate__default['default']([
20482
19891
  ignoreClone
20483
19892
  ], SpriteRenderer.prototype, "_automaticWidth", void 0);
20484
- __decorate([
19893
+ _ts_decorate__default['default']([
20485
19894
  ignoreClone
20486
19895
  ], SpriteRenderer.prototype, "_automaticHeight", void 0);
20487
- __decorate([
19896
+ _ts_decorate__default['default']([
20488
19897
  assignmentClone
20489
19898
  ], SpriteRenderer.prototype, "_customWidth", void 0);
20490
- __decorate([
19899
+ _ts_decorate__default['default']([
20491
19900
  assignmentClone
20492
19901
  ], SpriteRenderer.prototype, "_customHeight", void 0);
20493
- __decorate([
19902
+ _ts_decorate__default['default']([
20494
19903
  assignmentClone
20495
19904
  ], SpriteRenderer.prototype, "_flipX", void 0);
20496
- __decorate([
19905
+ _ts_decorate__default['default']([
20497
19906
  assignmentClone
20498
19907
  ], SpriteRenderer.prototype, "_flipY", void 0);
20499
- __decorate([
19908
+ _ts_decorate__default['default']([
20500
19909
  assignmentClone
20501
19910
  ], SpriteRenderer.prototype, "_maskLayer", void 0);
20502
- __decorate([
19911
+ _ts_decorate__default['default']([
20503
19912
  assignmentClone
20504
19913
  ], SpriteRenderer.prototype, "_maskInteraction", void 0);
20505
- __decorate([
19914
+ _ts_decorate__default['default']([
20506
19915
  ignoreClone
20507
19916
  ], SpriteRenderer.prototype, "_onSpriteChange", null);
20508
19917
  var /**
@@ -20527,16 +19936,14 @@ var /**
20527
19936
  ];
20528
19937
  this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
20529
19938
  };
20530
- (function() {
20531
- CharRenderData.triangles = [
20532
- 0,
20533
- 2,
20534
- 1,
20535
- 2,
20536
- 0,
20537
- 3
20538
- ];
20539
- })();
19939
+ CharRenderData.triangles = [
19940
+ 0,
19941
+ 2,
19942
+ 1,
19943
+ 2,
19944
+ 0,
19945
+ 3
19946
+ ];
20540
19947
 
20541
19948
  /**
20542
19949
  * @internal
@@ -20860,42 +20267,28 @@ var /**
20860
20267
  };
20861
20268
  return TextUtils;
20862
20269
  }();
20863
- (function() {
20864
- /** @internal */ TextUtils._genericFontFamilies = [
20865
- "serif",
20866
- "sans-serif",
20867
- "monospace",
20868
- "cursive",
20869
- "fantasy",
20870
- "system-ui",
20871
- "math",
20872
- "emoji",
20873
- "fangsong"
20874
- ];
20875
- })();
20876
- (function() {
20877
- /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20878
- })();
20879
- (function() {
20880
- TextUtils._measureBaseline = "M";
20881
- })();
20882
- (function() {
20883
- TextUtils._heightMultiplier = 2;
20884
- })();
20885
- (function() {
20886
- TextUtils._baselineMultiplier = 1.4;
20887
- })();
20888
- (function() {
20889
- TextUtils._fontSizeInfoCache = {};
20890
- })();
20891
- (function() {
20892
- TextUtils._textContext = null;
20893
- })();
20270
+ /** @internal */ TextUtils._genericFontFamilies = [
20271
+ "serif",
20272
+ "sans-serif",
20273
+ "monospace",
20274
+ "cursive",
20275
+ "fantasy",
20276
+ "system-ui",
20277
+ "math",
20278
+ "emoji",
20279
+ "fangsong"
20280
+ ];
20281
+ /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20282
+ TextUtils._measureBaseline = "M";
20283
+ TextUtils._heightMultiplier = 2;
20284
+ TextUtils._baselineMultiplier = 1.4;
20285
+ TextUtils._fontSizeInfoCache = {};
20286
+ TextUtils._textContext = null;
20894
20287
 
20895
20288
  /**
20896
20289
  * Renders a text for 2D graphics.
20897
20290
  */ var TextRenderer = /*#__PURE__*/ function(Renderer) {
20898
- _inherits(TextRenderer, Renderer);
20291
+ _inherits__default['default'](TextRenderer, Renderer);
20899
20292
  function TextRenderer(entity) {
20900
20293
  var _this;
20901
20294
  _this = Renderer.call(this, entity) || this;
@@ -20917,7 +20310,7 @@ var /**
20917
20310
  _this._overflowMode = exports.OverflowMode.Overflow;
20918
20311
  _this._maskInteraction = exports.SpriteMaskInteraction.None;
20919
20312
  _this._maskLayer = exports.SpriteMaskLayer.Layer0;
20920
- var engine = _assert_this_initialized(_this).engine;
20313
+ var engine = _assert_this_initialized__default['default'](_this).engine;
20921
20314
  _this._font = engine._textDefaultFont;
20922
20315
  _this._font._addRefCount(1);
20923
20316
  _this.setMaterial(engine._spriteDefaultMaterial);
@@ -21157,7 +20550,7 @@ var /**
21157
20550
  Renderer.prototype._onTransformChanged.call(this, bit);
21158
20551
  this._setDirtyFlagTrue(0x4 | 0x8);
21159
20552
  };
21160
- _create_class(TextRenderer, [
20553
+ _create_class__default['default'](TextRenderer, [
21161
20554
  {
21162
20555
  key: "color",
21163
20556
  get: /**
@@ -21370,67 +20763,61 @@ var /**
21370
20763
  ]);
21371
20764
  return TextRenderer;
21372
20765
  }(exports.Renderer);
21373
- (function() {
21374
- TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
21375
- })();
21376
- (function() {
21377
- TextRenderer._tempVec30 = new miniprogram.Vector3();
21378
- })();
21379
- (function() {
21380
- TextRenderer._tempVec31 = new miniprogram.Vector3();
21381
- })();
21382
- __decorate([
20766
+ TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20767
+ TextRenderer._tempVec30 = new miniprogram.Vector3();
20768
+ TextRenderer._tempVec31 = new miniprogram.Vector3();
20769
+ _ts_decorate__default['default']([
21383
20770
  assignmentClone
21384
20771
  ], TextRenderer.prototype, "_subFont", void 0);
21385
- __decorate([
20772
+ _ts_decorate__default['default']([
21386
20773
  ignoreClone
21387
20774
  ], TextRenderer.prototype, "_charRenderDatas", void 0);
21388
- __decorate([
20775
+ _ts_decorate__default['default']([
21389
20776
  ignoreClone
21390
20777
  ], TextRenderer.prototype, "_dirtyFlag", void 0);
21391
- __decorate([
20778
+ _ts_decorate__default['default']([
21392
20779
  deepClone
21393
20780
  ], TextRenderer.prototype, "_color", void 0);
21394
- __decorate([
20781
+ _ts_decorate__default['default']([
21395
20782
  assignmentClone
21396
20783
  ], TextRenderer.prototype, "_text", void 0);
21397
- __decorate([
20784
+ _ts_decorate__default['default']([
21398
20785
  assignmentClone
21399
20786
  ], TextRenderer.prototype, "_width", void 0);
21400
- __decorate([
20787
+ _ts_decorate__default['default']([
21401
20788
  assignmentClone
21402
20789
  ], TextRenderer.prototype, "_height", void 0);
21403
- __decorate([
20790
+ _ts_decorate__default['default']([
21404
20791
  ignoreClone
21405
20792
  ], TextRenderer.prototype, "_localBounds", void 0);
21406
- __decorate([
20793
+ _ts_decorate__default['default']([
21407
20794
  assignmentClone
21408
20795
  ], TextRenderer.prototype, "_font", void 0);
21409
- __decorate([
20796
+ _ts_decorate__default['default']([
21410
20797
  assignmentClone
21411
20798
  ], TextRenderer.prototype, "_fontSize", void 0);
21412
- __decorate([
20799
+ _ts_decorate__default['default']([
21413
20800
  assignmentClone
21414
20801
  ], TextRenderer.prototype, "_fontStyle", void 0);
21415
- __decorate([
20802
+ _ts_decorate__default['default']([
21416
20803
  assignmentClone
21417
20804
  ], TextRenderer.prototype, "_lineSpacing", void 0);
21418
- __decorate([
20805
+ _ts_decorate__default['default']([
21419
20806
  assignmentClone
21420
20807
  ], TextRenderer.prototype, "_horizontalAlignment", void 0);
21421
- __decorate([
20808
+ _ts_decorate__default['default']([
21422
20809
  assignmentClone
21423
20810
  ], TextRenderer.prototype, "_verticalAlignment", void 0);
21424
- __decorate([
20811
+ _ts_decorate__default['default']([
21425
20812
  assignmentClone
21426
20813
  ], TextRenderer.prototype, "_enableWrapping", void 0);
21427
- __decorate([
20814
+ _ts_decorate__default['default']([
21428
20815
  assignmentClone
21429
20816
  ], TextRenderer.prototype, "_overflowMode", void 0);
21430
- __decorate([
20817
+ _ts_decorate__default['default']([
21431
20818
  assignmentClone
21432
20819
  ], TextRenderer.prototype, "_maskInteraction", void 0);
21433
- __decorate([
20820
+ _ts_decorate__default['default']([
21434
20821
  assignmentClone
21435
20822
  ], TextRenderer.prototype, "_maskLayer", void 0);
21436
20823
  var DirtyFlag;
@@ -21585,9 +20972,7 @@ var DirtyFlag;
21585
20972
  };
21586
20973
  return AnimationCurveOwner;
21587
20974
  }();
21588
- (function() {
21589
- AnimationCurveOwner._assemblerMap = new Map();
21590
- })();
20975
+ AnimationCurveOwner._assemblerMap = new Map();
21591
20976
 
21592
20977
  /**
21593
20978
  * @internal
@@ -21646,16 +21031,22 @@ AnimationCurveOwner.registerAssembler(Transform, "scale", ScaleAnimationCurveOwn
21646
21031
  /**
21647
21032
  * @internal
21648
21033
  */ var BlendShapeWeightsAnimationCurveOwnerAssembler = /*#__PURE__*/ function() {
21649
- function BlendShapeWeightsAnimationCurveOwnerAssembler() {}
21034
+ function BlendShapeWeightsAnimationCurveOwnerAssembler() {
21035
+ this._skinnedMeshRenderer = [];
21036
+ }
21650
21037
  var _proto = BlendShapeWeightsAnimationCurveOwnerAssembler.prototype;
21651
21038
  _proto.initialize = function initialize(owner) {
21652
- this._skinnedMeshRenderer = owner.target.getComponent(SkinnedMeshRenderer);
21039
+ // @todo: Compatible with multiple SkinnedMeshRenderer in a entity, optimize later.
21040
+ owner.target.getComponents(SkinnedMeshRenderer, this._skinnedMeshRenderer);
21653
21041
  };
21654
21042
  _proto.getTargetValue = function getTargetValue() {
21655
- return this._skinnedMeshRenderer.blendShapeWeights;
21043
+ return this._skinnedMeshRenderer[0].blendShapeWeights;
21656
21044
  };
21657
21045
  _proto.setTargetValue = function setTargetValue(value) {
21658
- this._skinnedMeshRenderer.blendShapeWeights = value;
21046
+ var skinnedMeshRenderer = this._skinnedMeshRenderer;
21047
+ for(var i = 0, n = skinnedMeshRenderer.length; i < n; i++){
21048
+ skinnedMeshRenderer[i].blendShapeWeights = value;
21049
+ }
21659
21050
  };
21660
21051
  return BlendShapeWeightsAnimationCurveOwnerAssembler;
21661
21052
  }();
@@ -21795,7 +21186,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21795
21186
  }
21796
21187
  }
21797
21188
  };
21798
- _create_class(AnimationClip, [
21189
+ _create_class__default['default'](AnimationClip, [
21799
21190
  {
21800
21191
  key: "events",
21801
21192
  get: /**
@@ -21824,9 +21215,6 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21824
21215
  return AnimationClip;
21825
21216
  }();
21826
21217
 
21827
- /**
21828
- * Animation interpolation method.
21829
- */ exports.InterpolationType = void 0;
21830
21218
  (function(InterpolationType) {
21831
21219
  InterpolationType[InterpolationType[/** Linear interpolation */ "Linear"] = 0] = "Linear";
21832
21220
  InterpolationType[InterpolationType[/** Cubic spline interpolation */ "CubicSpine"] = 1] = "CubicSpine";
@@ -21944,7 +21332,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21944
21332
  var result = this._evaluate(time, evaluateData);
21945
21333
  return this._type._subtractValue(result, this.keys[0].value, evaluateData.value);
21946
21334
  };
21947
- _create_class(AnimationCurve, [
21335
+ _create_class__default['default'](AnimationCurve, [
21948
21336
  {
21949
21337
  key: "interpolation",
21950
21338
  get: /**
@@ -21975,7 +21363,7 @@ AnimationCurveOwner.registerAssembler(SkinnedMeshRenderer, "blendShapeWeights",
21975
21363
 
21976
21364
  var _AnimationArrayCurve;
21977
21365
  exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(AnimationCurve) {
21978
- _inherits(AnimationArrayCurve, AnimationCurve);
21366
+ _inherits__default['default'](AnimationArrayCurve, AnimationCurve);
21979
21367
  function AnimationArrayCurve() {
21980
21368
  var _this;
21981
21369
  _this = AnimationCurve.call(this) || this;
@@ -22059,18 +21447,14 @@ exports.AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Ani
22059
21447
  return out;
22060
21448
  };
22061
21449
  return AnimationArrayCurve;
22062
- }(AnimationCurve), function() {
22063
- /** @internal */ _AnimationArrayCurve._isReferenceType = true;
22064
- }(), function() {
22065
- /** @internal */ _AnimationArrayCurve._isInterpolationType = true;
22066
- }(), _AnimationArrayCurve);
22067
- exports.AnimationArrayCurve = __decorate([
21450
+ }(AnimationCurve), /** @internal */ _AnimationArrayCurve._isReferenceType = true, /** @internal */ _AnimationArrayCurve._isInterpolationType = true, _AnimationArrayCurve);
21451
+ exports.AnimationArrayCurve = _ts_decorate__default['default']([
22068
21452
  StaticInterfaceImplement()
22069
21453
  ], exports.AnimationArrayCurve);
22070
21454
 
22071
21455
  var _AnimationBoolCurve;
22072
21456
  exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(AnimationCurve) {
22073
- _inherits(AnimationBoolCurve, AnimationCurve);
21457
+ _inherits__default['default'](AnimationBoolCurve, AnimationCurve);
22074
21458
  function AnimationBoolCurve() {
22075
21459
  var _this;
22076
21460
  _this = AnimationCurve.call(this) || this;
@@ -22121,18 +21505,14 @@ exports.AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Anima
22121
21505
  return frame.value;
22122
21506
  };
22123
21507
  return AnimationBoolCurve;
22124
- }(AnimationCurve), function() {
22125
- /** @internal */ _AnimationBoolCurve._isReferenceType = false;
22126
- }(), function() {
22127
- /** @internal */ _AnimationBoolCurve._isInterpolationType = false;
22128
- }(), _AnimationBoolCurve);
22129
- exports.AnimationBoolCurve = __decorate([
21508
+ }(AnimationCurve), /** @internal */ _AnimationBoolCurve._isReferenceType = false, /** @internal */ _AnimationBoolCurve._isInterpolationType = false, _AnimationBoolCurve);
21509
+ exports.AnimationBoolCurve = _ts_decorate__default['default']([
22130
21510
  StaticInterfaceImplement()
22131
21511
  ], exports.AnimationBoolCurve);
22132
21512
 
22133
21513
  var _AnimationColorCurve;
22134
21514
  exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(AnimationCurve) {
22135
- _inherits(AnimationColorCurve, AnimationCurve);
21515
+ _inherits__default['default'](AnimationColorCurve, AnimationCurve);
22136
21516
  function AnimationColorCurve() {
22137
21517
  var _this;
22138
21518
  _this = AnimationCurve.call(this) || this;
@@ -22223,18 +21603,14 @@ exports.AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Ani
22223
21603
  return out;
22224
21604
  };
22225
21605
  return AnimationColorCurve;
22226
- }(AnimationCurve), function() {
22227
- /** @internal */ _AnimationColorCurve._isReferenceType = true;
22228
- }(), function() {
22229
- /** @internal */ _AnimationColorCurve._isInterpolationType = true;
22230
- }(), _AnimationColorCurve);
22231
- exports.AnimationColorCurve = __decorate([
21606
+ }(AnimationCurve), /** @internal */ _AnimationColorCurve._isReferenceType = true, /** @internal */ _AnimationColorCurve._isInterpolationType = true, _AnimationColorCurve);
21607
+ exports.AnimationColorCurve = _ts_decorate__default['default']([
22232
21608
  StaticInterfaceImplement()
22233
21609
  ], exports.AnimationColorCurve);
22234
21610
 
22235
21611
  var _AnimationFloatArrayCurve;
22236
21612
  exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ function(AnimationCurve) {
22237
- _inherits(AnimationFloatArrayCurve, AnimationCurve);
21613
+ _inherits__default['default'](AnimationFloatArrayCurve, AnimationCurve);
22238
21614
  function AnimationFloatArrayCurve() {
22239
21615
  return AnimationCurve.apply(this, arguments);
22240
21616
  }
@@ -22329,18 +21705,14 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
22329
21705
  return out;
22330
21706
  };
22331
21707
  return AnimationFloatArrayCurve;
22332
- }(AnimationCurve), function() {
22333
- /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true;
22334
- }(), function() {
22335
- /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
22336
- }(), _AnimationFloatArrayCurve);
22337
- exports.AnimationFloatArrayCurve = __decorate([
21708
+ }(AnimationCurve), /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true, /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true, _AnimationFloatArrayCurve);
21709
+ exports.AnimationFloatArrayCurve = _ts_decorate__default['default']([
22338
21710
  StaticInterfaceImplement()
22339
21711
  ], exports.AnimationFloatArrayCurve);
22340
21712
 
22341
21713
  var _AnimationFloatCurve;
22342
21714
  exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(AnimationCurve) {
22343
- _inherits(AnimationFloatCurve, AnimationCurve);
21715
+ _inherits__default['default'](AnimationFloatCurve, AnimationCurve);
22344
21716
  function AnimationFloatCurve() {
22345
21717
  var _this;
22346
21718
  _this = AnimationCurve.call(this) || this;
@@ -22403,18 +21775,14 @@ exports.AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Ani
22403
21775
  }
22404
21776
  };
22405
21777
  return AnimationFloatCurve;
22406
- }(AnimationCurve), function() {
22407
- /** @internal */ _AnimationFloatCurve._isReferenceType = false;
22408
- }(), function() {
22409
- /** @internal */ _AnimationFloatCurve._isInterpolationType = true;
22410
- }(), _AnimationFloatCurve);
22411
- exports.AnimationFloatCurve = __decorate([
21778
+ }(AnimationCurve), /** @internal */ _AnimationFloatCurve._isReferenceType = false, /** @internal */ _AnimationFloatCurve._isInterpolationType = true, _AnimationFloatCurve);
21779
+ exports.AnimationFloatCurve = _ts_decorate__default['default']([
22412
21780
  StaticInterfaceImplement()
22413
21781
  ], exports.AnimationFloatCurve);
22414
21782
 
22415
21783
  var _AnimationQuaternionCurve;
22416
21784
  exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ function(AnimationCurve) {
22417
- _inherits(AnimationQuaternionCurve1, AnimationCurve);
21785
+ _inherits__default['default'](AnimationQuaternionCurve1, AnimationCurve);
22418
21786
  function AnimationQuaternionCurve1() {
22419
21787
  var _this;
22420
21788
  _this = AnimationCurve.call(this) || this;
@@ -22510,20 +21878,14 @@ exports.AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ fu
22510
21878
  return out;
22511
21879
  };
22512
21880
  return AnimationQuaternionCurve1;
22513
- }(AnimationCurve), function() {
22514
- /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true;
22515
- }(), function() {
22516
- /** @internal */ _AnimationQuaternionCurve._isReferenceType = true;
22517
- }(), function() {
22518
- /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram.Quaternion();
22519
- }(), _AnimationQuaternionCurve);
22520
- exports.AnimationQuaternionCurve = __decorate([
21881
+ }(AnimationCurve), /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true, /** @internal */ _AnimationQuaternionCurve._isReferenceType = true, /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new miniprogram.Quaternion(), _AnimationQuaternionCurve);
21882
+ exports.AnimationQuaternionCurve = _ts_decorate__default['default']([
22521
21883
  StaticInterfaceImplement()
22522
21884
  ], exports.AnimationQuaternionCurve);
22523
21885
 
22524
21886
  var _AnimationVector2Curve;
22525
21887
  exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function(AnimationCurve) {
22526
- _inherits(AnimationVector2Curve, AnimationCurve);
21888
+ _inherits__default['default'](AnimationVector2Curve, AnimationCurve);
22527
21889
  function AnimationVector2Curve() {
22528
21890
  var _this;
22529
21891
  _this = AnimationCurve.call(this) || this;
@@ -22602,18 +21964,14 @@ exports.AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function
22602
21964
  return out;
22603
21965
  };
22604
21966
  return AnimationVector2Curve;
22605
- }(AnimationCurve), function() {
22606
- /** @internal */ _AnimationVector2Curve._isReferenceType = true;
22607
- }(), function() {
22608
- /** @internal */ _AnimationVector2Curve._isInterpolationType = true;
22609
- }(), _AnimationVector2Curve);
22610
- exports.AnimationVector2Curve = __decorate([
21967
+ }(AnimationCurve), /** @internal */ _AnimationVector2Curve._isReferenceType = true, /** @internal */ _AnimationVector2Curve._isInterpolationType = true, _AnimationVector2Curve);
21968
+ exports.AnimationVector2Curve = _ts_decorate__default['default']([
22611
21969
  StaticInterfaceImplement()
22612
21970
  ], exports.AnimationVector2Curve);
22613
21971
 
22614
21972
  var _AnimationVector3Curve;
22615
21973
  exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function(AnimationCurve) {
22616
- _inherits(AnimationVector3Curve, AnimationCurve);
21974
+ _inherits__default['default'](AnimationVector3Curve, AnimationCurve);
22617
21975
  function AnimationVector3Curve() {
22618
21976
  var _this;
22619
21977
  _this = AnimationCurve.call(this) || this;
@@ -22704,18 +22062,14 @@ exports.AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function
22704
22062
  return out;
22705
22063
  };
22706
22064
  return AnimationVector3Curve;
22707
- }(AnimationCurve), function() {
22708
- /** @internal */ _AnimationVector3Curve._isReferenceType = true;
22709
- }(), function() {
22710
- /** @internal */ _AnimationVector3Curve._isInterpolationType = true;
22711
- }(), _AnimationVector3Curve);
22712
- exports.AnimationVector3Curve = __decorate([
22065
+ }(AnimationCurve), /** @internal */ _AnimationVector3Curve._isReferenceType = true, /** @internal */ _AnimationVector3Curve._isInterpolationType = true, _AnimationVector3Curve);
22066
+ exports.AnimationVector3Curve = _ts_decorate__default['default']([
22713
22067
  StaticInterfaceImplement()
22714
22068
  ], exports.AnimationVector3Curve);
22715
22069
 
22716
22070
  var _AnimationVector4Curve;
22717
22071
  exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function(AnimationCurve) {
22718
- _inherits(AnimationVector4Curve, AnimationCurve);
22072
+ _inherits__default['default'](AnimationVector4Curve, AnimationCurve);
22719
22073
  function AnimationVector4Curve() {
22720
22074
  var _this;
22721
22075
  _this = AnimationCurve.call(this) || this;
@@ -22806,24 +22160,16 @@ exports.AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function
22806
22160
  return out;
22807
22161
  };
22808
22162
  return AnimationVector4Curve;
22809
- }(AnimationCurve), function() {
22810
- /** @internal */ _AnimationVector4Curve._isReferenceType = true;
22811
- }(), function() {
22812
- /** @internal */ _AnimationVector4Curve._isInterpolationType = true;
22813
- }(), _AnimationVector4Curve);
22814
- exports.AnimationVector4Curve = __decorate([
22163
+ }(AnimationCurve), /** @internal */ _AnimationVector4Curve._isReferenceType = true, /** @internal */ _AnimationVector4Curve._isInterpolationType = true, _AnimationVector4Curve);
22164
+ exports.AnimationVector4Curve = _ts_decorate__default['default']([
22815
22165
  StaticInterfaceImplement()
22816
22166
  ], exports.AnimationVector4Curve);
22817
22167
 
22818
- /**
22819
- * Animator culling mode.
22820
- */ exports.AnimatorCullingMode = void 0;
22821
22168
  (function(AnimatorCullingMode) {
22822
22169
  AnimatorCullingMode[AnimatorCullingMode[/** Disable Culling. */ "None"] = 0] = "None";
22823
22170
  AnimatorCullingMode[AnimatorCullingMode[/** Completely disabled when renderers are all culled. */ "Complete"] = 1] = "Complete";
22824
22171
  })(exports.AnimatorCullingMode || (exports.AnimatorCullingMode = {}));
22825
22172
 
22826
- exports.AnimatorLayerBlendingMode = void 0;
22827
22173
  (function(AnimatorLayerBlendingMode) {
22828
22174
  AnimatorLayerBlendingMode[AnimatorLayerBlendingMode["Override"] = 0] = "Override";
22829
22175
  AnimatorLayerBlendingMode[AnimatorLayerBlendingMode["Additive"] = 1] = "Additive";
@@ -22870,9 +22216,6 @@ exports.AnimatorLayerBlendingMode = void 0;
22870
22216
  /** ExitTime represents the exact time at which the transition can take effect. This is represented in normalized time. */ this.exitTime = 1;
22871
22217
  };
22872
22218
 
22873
- /**
22874
- * Animation wrap mode.
22875
- */ exports.WrapMode = void 0;
22876
22219
  (function(WrapMode) {
22877
22220
  WrapMode[WrapMode[/** Play once */ "Once"] = 0] = "Once";
22878
22221
  WrapMode[WrapMode[/** Loop play */ "Loop"] = 1] = "Loop";
@@ -22944,10 +22287,11 @@ exports.AnimatorLayerBlendingMode = void 0;
22944
22287
  this.eventHandlers = [];
22945
22288
  };
22946
22289
 
22290
+ var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
22947
22291
  /**
22948
22292
  * The controller of the animation system.
22949
22293
  */ var Animator = /*#__PURE__*/ function(Component) {
22950
- _inherits(Animator, Component);
22294
+ _inherits__default['default'](Animator, Component);
22951
22295
  function Animator(entity) {
22952
22296
  var _this;
22953
22297
  _this = Component.call(this, entity) || this;
@@ -23136,7 +22480,6 @@ exports.AnimatorLayerBlendingMode = void 0;
23136
22480
  var curve = curves[i];
23137
22481
  var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
23138
22482
  if (targetEntity) {
23139
- var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
23140
22483
  var property = curve.property;
23141
22484
  var instanceId = targetEntity.instanceId;
23142
22485
  // Get owner
@@ -23570,7 +22913,7 @@ exports.AnimatorLayerBlendingMode = void 0;
23570
22913
  }
23571
22914
  owner.updateMark = this._updateMark;
23572
22915
  };
23573
- _create_class(Animator, [
22916
+ _create_class__default['default'](Animator, [
23574
22917
  {
23575
22918
  key: "animatorController",
23576
22919
  get: /**
@@ -23590,28 +22933,28 @@ exports.AnimatorLayerBlendingMode = void 0;
23590
22933
  ]);
23591
22934
  return Animator;
23592
22935
  }(Component);
23593
- __decorate([
22936
+ _ts_decorate__default['default']([
23594
22937
  assignmentClone
23595
22938
  ], Animator.prototype, "speed", void 0);
23596
- __decorate([
22939
+ _ts_decorate__default['default']([
23597
22940
  ignoreClone
23598
22941
  ], Animator.prototype, "_controllerUpdateFlag", void 0);
23599
- __decorate([
22942
+ _ts_decorate__default['default']([
23600
22943
  ignoreClone
23601
22944
  ], Animator.prototype, "_updateMark", void 0);
23602
- __decorate([
22945
+ _ts_decorate__default['default']([
23603
22946
  ignoreClone
23604
22947
  ], Animator.prototype, "_animatorLayersData", void 0);
23605
- __decorate([
22948
+ _ts_decorate__default['default']([
23606
22949
  ignoreClone
23607
22950
  ], Animator.prototype, "_curveOwnerPool", void 0);
23608
- __decorate([
22951
+ _ts_decorate__default['default']([
23609
22952
  ignoreClone
23610
22953
  ], Animator.prototype, "_animationEventHandlerPool", void 0);
23611
- __decorate([
22954
+ _ts_decorate__default['default']([
23612
22955
  ignoreClone
23613
22956
  ], Animator.prototype, "_tempAnimatorStateInfo", void 0);
23614
- __decorate([
22957
+ _ts_decorate__default['default']([
23615
22958
  ignoreClone
23616
22959
  ], Animator.prototype, "_controlledRenderers", void 0);
23617
22960
 
@@ -23661,7 +23004,7 @@ __decorate([
23661
23004
  */ _proto._registerChangeFlag = function _registerChangeFlag() {
23662
23005
  return this._updateFlagManager.createFlag(BoolUpdateFlag);
23663
23006
  };
23664
- _create_class(AnimatorController, [
23007
+ _create_class__default['default'](AnimatorController, [
23665
23008
  {
23666
23009
  key: "layers",
23667
23010
  get: /**
@@ -23795,7 +23138,7 @@ __decorate([
23795
23138
  index2 !== -1 && this._onStateExitScripts.splice(index2, 1);
23796
23139
  }
23797
23140
  };
23798
- _create_class(AnimatorState, [
23141
+ _create_class__default['default'](AnimatorState, [
23799
23142
  {
23800
23143
  key: "transitions",
23801
23144
  get: /**
@@ -23898,7 +23241,6 @@ __decorate([
23898
23241
  return AnimatorStateMachine;
23899
23242
  }();
23900
23243
 
23901
- exports.AnimatorConditionMode = void 0;
23902
23244
  (function(AnimatorConditionMode) {
23903
23245
  AnimatorConditionMode[AnimatorConditionMode["If"] = 0] = "If";
23904
23246
  AnimatorConditionMode[AnimatorConditionMode["IfNot"] = 1] = "IfNot";
@@ -23917,7 +23259,7 @@ exports.AnimatorConditionMode = void 0;
23917
23259
  /**
23918
23260
  * SkyboxMaterial
23919
23261
  */ var SkyBoxMaterial = /*#__PURE__*/ function(Material) {
23920
- _inherits(SkyBoxMaterial, Material);
23262
+ _inherits__default['default'](SkyBoxMaterial, Material);
23921
23263
  function SkyBoxMaterial(engine) {
23922
23264
  var _this;
23923
23265
  _this = Material.call(this, engine, Shader.find("skybox")) || this;
@@ -23927,7 +23269,7 @@ exports.AnimatorConditionMode = void 0;
23927
23269
  _this.shaderData.setVector4("u_cubeDecodeParam", _this._decodeParam);
23928
23270
  return _this;
23929
23271
  }
23930
- _create_class(SkyBoxMaterial, [
23272
+ _create_class__default['default'](SkyBoxMaterial, [
23931
23273
  {
23932
23274
  key: "textureDecodeRGBM",
23933
23275
  get: /**
@@ -23980,7 +23322,6 @@ var DirtyFlagType;
23980
23322
  DirtyFlagType[DirtyFlagType["Scale"] = 0x400] = "Scale";
23981
23323
  DirtyFlagType[DirtyFlagType["Everything"] = 0xffffffff] = "Everything";
23982
23324
  })(DirtyFlagType || (DirtyFlagType = {}));
23983
- exports.ParticleRendererBlendMode = void 0;
23984
23325
  (function(ParticleRendererBlendMode) {
23985
23326
  ParticleRendererBlendMode[ParticleRendererBlendMode["Transparent"] = 0] = "Transparent";
23986
23327
  ParticleRendererBlendMode[ParticleRendererBlendMode["Additive"] = 1] = "Additive";
@@ -23988,7 +23329,7 @@ exports.ParticleRendererBlendMode = void 0;
23988
23329
  /**
23989
23330
  * Particle Renderer Component.
23990
23331
  */ var ParticleRenderer = /*#__PURE__*/ function(MeshRenderer) {
23991
- _inherits(ParticleRenderer, MeshRenderer);
23332
+ _inherits__default['default'](ParticleRenderer, MeshRenderer);
23992
23333
  function ParticleRenderer(props) {
23993
23334
  var _this;
23994
23335
  _this = MeshRenderer.call(this, props) || this;
@@ -24026,7 +23367,7 @@ exports.ParticleRendererBlendMode = void 0;
24026
23367
  _this._isFadeOut = false;
24027
23368
  _this._playOnEnable = true;
24028
23369
  _this._blendMode = 0;
24029
- _this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
23370
+ _this._onColorChanged = _this._onColorChanged.bind(_assert_this_initialized__default['default'](_this));
24030
23371
  //@ts-ignore
24031
23372
  _this._color._onValueChanged = _this._onColorChanged;
24032
23373
  _this.setMaterial(_this._createMaterial());
@@ -24303,7 +23644,7 @@ exports.ParticleRendererBlendMode = void 0;
24303
23644
  ParticleRenderer._getRandom = function _getRandom() {
24304
23645
  return Math.random() - 0.5;
24305
23646
  };
24306
- _create_class(ParticleRenderer, [
23647
+ _create_class__default['default'](ParticleRenderer, [
24307
23648
  {
24308
23649
  key: "texture",
24309
23650
  get: /**
@@ -24734,10 +24075,8 @@ exports.ParticleRendererBlendMode = void 0;
24734
24075
  ]);
24735
24076
  return ParticleRenderer;
24736
24077
  }(MeshRenderer);
24737
- (function() {
24738
- /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24739
- })();
24740
- __decorate([
24078
+ /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24079
+ _ts_decorate__default['default']([
24741
24080
  ignoreClone
24742
24081
  ], ParticleRenderer.prototype, "_onColorChanged", null);
24743
24082
 
@@ -24747,7 +24086,7 @@ var VERT_SHADER = "#define GLSLIFY 1\nattribute vec3 POSITION;attribute vec2 TEX
24747
24086
 
24748
24087
  Shader.create("trail", VERT_SHADER, FRAG_SHADER);
24749
24088
  var TrailMaterial = /*#__PURE__*/ function(Material) {
24750
- _inherits(TrailMaterial, Material);
24089
+ _inherits__default['default'](TrailMaterial, Material);
24751
24090
  function TrailMaterial(engine) {
24752
24091
  var _this;
24753
24092
  _this = Material.call(this, engine, Shader.find("trail")) || this;
@@ -24765,7 +24104,7 @@ var _tempVector3 = new miniprogram.Vector3();
24765
24104
  /**
24766
24105
  * @deprecated
24767
24106
  */ var TrailRenderer = /*#__PURE__*/ function(MeshRenderer) {
24768
- _inherits(TrailRenderer, MeshRenderer);
24107
+ _inherits__default['default'](TrailRenderer, MeshRenderer);
24769
24108
  function TrailRenderer(entity, props) {
24770
24109
  var _this;
24771
24110
  _this = MeshRenderer.call(this, entity) || this;
@@ -24953,7 +24292,7 @@ var _tempVector3 = new miniprogram.Vector3();
24953
24292
  * }
24954
24293
  * ```
24955
24294
  */ var Probe = /*#__PURE__*/ function(Script) {
24956
- _inherits(Probe, Script);
24295
+ _inherits__default['default'](Probe, Script);
24957
24296
  function Probe() {
24958
24297
  var _this;
24959
24298
  _this = Script.apply(this, arguments) || this;
@@ -25006,7 +24345,7 @@ var _tempVector3 = new miniprogram.Vector3();
25006
24345
  this._camera.renderTarget = this._oriCameraRenderTarget;
25007
24346
  this._camera.cullingMask = this._oriCameraCullingMask;
25008
24347
  };
25009
- _create_class(Probe, [
24348
+ _create_class__default['default'](Probe, [
25010
24349
  {
25011
24350
  key: "_texture",
25012
24351
  get: function get() {
@@ -25024,7 +24363,7 @@ var cacheDir = new miniprogram.Vector3();
25024
24363
  /**
25025
24364
  * Cube probe, generate cubeTexture, used for dynamic environment reflection and other effects.
25026
24365
  */ var CubeProbe = /*#__PURE__*/ function(Probe) {
25027
- _inherits(CubeProbe, Probe);
24366
+ _inherits__default['default'](CubeProbe, Probe);
25028
24367
  function CubeProbe() {
25029
24368
  var _this;
25030
24369
  _this = Probe.apply(this, arguments) || this;