@galacean/engine-core 0.9.19 → 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 (151) hide show
  1. package/dist/main.js +854 -1513
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +854 -1513
  4. package/dist/module.js +633 -1127
  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/Ticker.d.ts +30 -0
  15. package/types/animation/animationCurve/AnimationRectCurve.d.ts +8 -0
  16. package/types/animation/animationCurve/AnimationRefCurve.d.ts +8 -0
  17. package/types/animation/internal/AnimationCurveOwnerLayerData.d.ts +1 -0
  18. package/types/asset/GraphicsResource.d.ts +4 -0
  19. package/types/asset/request.d.ts +7 -3
  20. package/types/enums/DepthTextureMode.d.ts +7 -0
  21. package/types/graphic/Primitive.d.ts +1 -0
  22. package/types/graphic/PrimitiveVertexBinding.d.ts +1 -0
  23. package/types/graphic/SubPrimitive.d.ts +9 -0
  24. package/types/particle/ParticleBufferUtils.d.ts +1 -0
  25. package/types/particle/ParticleData.d.ts +1 -0
  26. package/types/particle/ParticleGenerator.d.ts +72 -0
  27. package/types/particle/ParticleMaterial.d.ts +28 -0
  28. package/types/particle/ParticleMesh.d.ts +289 -0
  29. package/types/particle/ParticleShaderDeclaration.d.ts +1 -0
  30. package/types/particle/ParticleShaderMacro.d.ts +1 -0
  31. package/types/particle/ParticleShaderProperty.d.ts +1 -0
  32. package/types/particle/ParticleSystem.d.ts +41 -0
  33. package/types/particle/ParticleVertexElements.d.ts +1 -0
  34. package/types/particle/ParticleVertexUtils.d.ts +1 -0
  35. package/types/particle/enum/ParticleAnimationRowMode.d.ts +9 -0
  36. package/types/particle/enum/ParticleAnimationType.d.ts +9 -0
  37. package/types/particle/enum/ParticleCurveMode.d.ts +13 -0
  38. package/types/particle/enum/ParticleGradientMode.d.ts +13 -0
  39. package/types/particle/enum/ParticleRenderMode.d.ts +17 -0
  40. package/types/particle/enum/ParticleScaleMode.d.ts +11 -0
  41. package/types/particle/enum/ParticleShapeMultiModeValue.d.ts +9 -0
  42. package/types/particle/enum/ParticleShapeType.d.ts +15 -0
  43. package/types/particle/enum/ParticleSimulationSpace.d.ts +9 -0
  44. package/types/particle/enum/index.d.ts +9 -0
  45. package/types/particle/enums/ParticleCurveMode.d.ts +9 -0
  46. package/types/particle/enums/ParticleGradientMode.d.ts +9 -0
  47. package/types/particle/enums/ParticleRandomSubSeeds.d.ts +1 -0
  48. package/types/particle/enums/ParticleRenderMode.d.ts +17 -0
  49. package/types/particle/enums/ParticleScaleMode.d.ts +11 -0
  50. package/types/particle/enums/ParticleSimulationSpace.d.ts +9 -0
  51. package/types/particle/enums/ParticleStopMode.d.ts +6 -0
  52. package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +1 -0
  53. package/types/particle/enums/attributes/MeshParticleVertexAttribute.d.ts +5 -0
  54. package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +1 -0
  55. package/types/particle/module/Burst.d.ts +38 -0
  56. package/types/particle/module/ColorGradient.d.ts +75 -0
  57. package/types/particle/module/ColorOverLifetimeModule.d.ts +20 -0
  58. package/types/particle/module/EmissionModule.d.ts +63 -0
  59. package/types/particle/module/FrameOverTime.d.ts +73 -0
  60. package/types/particle/module/ParticleCurve.d.ts +37 -0
  61. package/types/particle/module/RotationOverLifetimeModule.d.ts +21 -0
  62. package/types/particle/module/RotationVelocityGradient.d.ts +184 -0
  63. package/types/particle/module/SizeGradient.d.ts +151 -0
  64. package/types/particle/module/SizeOverLifetimeModule.d.ts +21 -0
  65. package/types/particle/module/StartFrame.d.ts +46 -0
  66. package/types/particle/module/TextureSheetAnimationModule.d.ts +37 -0
  67. package/types/particle/module/VelocityGradient.d.ts +110 -0
  68. package/types/particle/module/VelocityOverLifetimeModule.d.ts +22 -0
  69. package/types/particle/module/index.d.ts +15 -0
  70. package/types/particle/module/shape/BaseShape.d.ts +26 -0
  71. package/types/particle/module/shape/BoxShape.d.ts +20 -0
  72. package/types/particle/module/shape/CircleShape.d.ts +27 -0
  73. package/types/particle/module/shape/ConeShape.d.ts +35 -0
  74. package/types/particle/module/shape/HemisphereShape.d.ts +23 -0
  75. package/types/particle/module/shape/ShapeUtils.d.ts +1 -0
  76. package/types/particle/module/shape/SphereShape.d.ts +23 -0
  77. package/types/particle/module/shape/index.d.ts +5 -0
  78. package/types/particle/modules/Burst.d.ts +14 -0
  79. package/types/particle/modules/ColorOverLifetimeModule.d.ts +20 -0
  80. package/types/particle/modules/EmissionModule.d.ts +45 -0
  81. package/types/particle/modules/MainModule.d.ts +70 -0
  82. package/types/particle/modules/ParticleCompositeCurve.d.ts +56 -0
  83. package/types/particle/modules/ParticleCompositeGradient.d.ts +55 -0
  84. package/types/particle/modules/ParticleCurve.d.ts +56 -0
  85. package/types/particle/modules/ParticleGeneratorModule.d.ts +12 -0
  86. package/types/particle/modules/ParticleGradient.d.ts +94 -0
  87. package/types/particle/modules/RotationOverLifetimeModule.d.ts +34 -0
  88. package/types/particle/modules/ShapeModule.d.ts +9 -0
  89. package/types/particle/modules/SizeOverLifetimeModule.d.ts +34 -0
  90. package/types/particle/modules/TextureSheetAnimationModule.d.ts +38 -0
  91. package/types/particle/modules/VelocityOverLifetimeModule.d.ts +34 -0
  92. package/types/particle/modules/shape/BaseShape.d.ts +12 -0
  93. package/types/particle/modules/shape/BoxShape.d.ts +11 -0
  94. package/types/particle/modules/shape/CircleShape.d.ts +17 -0
  95. package/types/particle/modules/shape/ConeShape.d.ts +28 -0
  96. package/types/particle/modules/shape/HemisphereShape.d.ts +9 -0
  97. package/types/particle/modules/shape/ShapeUtils.d.ts +1 -0
  98. package/types/particle/modules/shape/SphereShape.d.ts +9 -0
  99. package/types/particle/modules/shape/enums/ParticleShapeArcMode.d.ts +9 -0
  100. package/types/particle/modules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
  101. package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +15 -0
  102. package/types/particle/modules/shape/index.d.ts +6 -0
  103. package/types/particle/moudules/Burst.d.ts +25 -0
  104. package/types/particle/moudules/Emission.d.ts +47 -0
  105. package/types/particle/moudules/EmissionModule.d.ts +49 -0
  106. package/types/particle/moudules/MainModule.d.ts +59 -0
  107. package/types/particle/moudules/ParticleCurve.d.ts +27 -0
  108. package/types/particle/moudules/ParticleGradient.d.ts +28 -0
  109. package/types/particle/moudules/ShapeModule.d.ts +7 -0
  110. package/types/particle/moudules/shape/BaseShape.d.ts +28 -0
  111. package/types/particle/moudules/shape/BoxShape.d.ts +20 -0
  112. package/types/particle/moudules/shape/CircleShape.d.ts +27 -0
  113. package/types/particle/moudules/shape/ConeShape.d.ts +35 -0
  114. package/types/particle/moudules/shape/HemisphereShape.d.ts +23 -0
  115. package/types/particle/moudules/shape/ShapeUtils.d.ts +1 -0
  116. package/types/particle/moudules/shape/SphereShape.d.ts +23 -0
  117. package/types/particle/moudules/shape/enums/ParticleShapeMultiModeValue.d.ts +9 -0
  118. package/types/particle/moudules/shape/enums/ParticleShapeType.d.ts +15 -0
  119. package/types/particle/moudules/shape/index.d.ts +5 -0
  120. package/types/physics/PhysicsScene.d.ts +6 -2
  121. package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +0 -1
  122. package/types/shader/ShaderPart.d.ts +5 -0
  123. package/types/shader/SubShader.d.ts +0 -1
  124. package/types/shader/enums/RenderStateElementKey.d.ts +60 -0
  125. package/types/shaderlib/particle/index.d.ts +14 -0
  126. package/types/shadow/PipelinePass.d.ts +16 -0
  127. package/types/utils/BoolUpdateFlag.d.ts +12 -0
  128. package/types/utils/DisorderedArray.d.ts +18 -0
  129. package/types/utils/UpdateFlag.d.ts +20 -0
  130. package/types/utils/UpdateFlagManager.d.ts +1 -0
  131. package/types/utils/Utils.d.ts +31 -0
  132. package/types/xr/XRManager.d.ts +31 -0
  133. package/types/xr/component/XRPoseDriver.d.ts +10 -0
  134. package/types/xr/data/XRCamera.d.ts +6 -0
  135. package/types/xr/data/XRDevice.d.ts +9 -0
  136. package/types/xr/data/XRHandle.d.ts +10 -0
  137. package/types/xr/enum/EnumXRButton.d.ts +5 -0
  138. package/types/xr/enum/EnumXRDevicePhase.d.ts +4 -0
  139. package/types/xr/enum/EnumXRFeature.d.ts +9 -0
  140. package/types/xr/enum/EnumXRInputSource.d.ts +8 -0
  141. package/types/xr/enum/EnumXRMode.d.ts +7 -0
  142. package/types/xr/enum/EnumXRSubsystem.d.ts +4 -0
  143. package/types/xr/enum/EnumXRTrackingMode.d.ts +7 -0
  144. package/types/xr/feature/XRCameraManager.d.ts +21 -0
  145. package/types/xr/feature/XRFeature.d.ts +29 -0
  146. package/types/xr/feature/XRImageTrackManager.d.ts +10 -0
  147. package/types/xr/feature/XRInputManager.d.ts +16 -0
  148. package/types/xr/index.d.ts +18 -0
  149. package/types/xr/provider/XRProvider.d.ts +19 -0
  150. package/types/xr/subsystem/XRInputSubsystem.d.ts +5 -0
  151. package/types/xr/subsystem/XRSubsystem.d.ts +30 -0
package/dist/module.js CHANGED
@@ -1,4 +1,10 @@
1
- import { Quaternion, Vector3, Matrix3x3, Matrix, MathUtil as MathUtil$1, Vector2, Ray, Color as Color$1, Vector4, BoundingBox, Plane, BoundingSphere, FrustumFace, CollisionUtil, BoundingFrustum, Rect } from '@galacean/engine-math';
1
+ import _assert_this_initialized from '@swc/helpers/src/_assert_this_initialized.mjs';
2
+ import _create_class from '@swc/helpers/src/_create_class.mjs';
3
+ import _inherits from '@swc/helpers/src/_inherits.mjs';
4
+ import _ts_decorate from '@swc/helpers/src/_ts_decorate.mjs';
5
+ import _instanceof from '@swc/helpers/src/_instanceof.mjs';
6
+ import { Vector3, Quaternion, Matrix, MathUtil as MathUtil$1, Matrix3x3, Vector2, Ray, Color as Color$1, Vector4, BoundingBox, Plane, BoundingSphere, FrustumFace, CollisionUtil, BoundingFrustum, Rect } from '@galacean/engine-math';
7
+ import _extends from '@swc/helpers/src/_extends.mjs';
2
8
 
3
9
  /**
4
10
  * The platform (including operating system and hardware) is running on.
@@ -11,50 +17,6 @@ import { Quaternion, Vector3, Matrix3x3, Matrix, MathUtil as MathUtil$1, Vector2
11
17
  Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
12
18
  })(Platform || (Platform = {}));
13
19
 
14
- function _assert_this_initialized(self) {
15
- if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
16
-
17
- return self;
18
- }
19
-
20
- function _defineProperties(target, props) {
21
- for (var i = 0; i < props.length; i++) {
22
- var descriptor = props[i];
23
- descriptor.enumerable = descriptor.enumerable || false;
24
- descriptor.configurable = true;
25
-
26
- if ("value" in descriptor) descriptor.writable = true;
27
-
28
- Object.defineProperty(target, descriptor.key, descriptor);
29
- }
30
- }
31
- function _create_class(Constructor, protoProps, staticProps) {
32
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
33
- if (staticProps) _defineProperties(Constructor, staticProps);
34
-
35
- return Constructor;
36
- }
37
-
38
- function _set_prototype_of(o, p) {
39
- _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
40
- o.__proto__ = p;
41
-
42
- return o;
43
- };
44
-
45
- return _set_prototype_of(o, p);
46
- }
47
-
48
- function _inherits(subClass, superClass) {
49
- if (typeof superClass !== "function" && superClass !== null) {
50
- throw new TypeError("Super expression must either be null or a function");
51
- }
52
-
53
- subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
54
-
55
- if (superClass) _set_prototype_of(subClass, superClass);
56
- }
57
-
58
20
  /**
59
21
  * Common utility methods for math operations.
60
22
  */ var MathUtil = /*#__PURE__*/ function() {
@@ -100,15 +62,9 @@ function _inherits(subClass, superClass) {
100
62
  };
101
63
  return MathUtil;
102
64
  }();
103
- (function() {
104
- /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
105
- })();
106
- (function() {
107
- /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
108
- })();
109
- (function() {
110
- /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
111
- })();
65
+ /** The value for which all absolute numbers smaller than are considered equal to zero. */ MathUtil.zeroTolerance = 1e-6;
66
+ /** The conversion factor that radian to degree. */ MathUtil.radToDegreeFactor = 180 / Math.PI;
67
+ /** The conversion factor that degree to radian. */ MathUtil.degreeToRadFactor = Math.PI / 180;
112
68
 
113
69
  /**
114
70
  * Describes a color in the from of RGBA (in order: R, G, B, A).
@@ -371,34 +327,6 @@ function _inherits(subClass, superClass) {
371
327
  return Color;
372
328
  }();
373
329
 
374
- /******************************************************************************
375
- Copyright (c) Microsoft Corporation.
376
-
377
- Permission to use, copy, modify, and/or distribute this software for any
378
- purpose with or without fee is hereby granted.
379
-
380
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
381
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
382
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
383
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
384
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
385
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
386
- PERFORMANCE OF THIS SOFTWARE.
387
- ***************************************************************************** */
388
-
389
- function __decorate(decorators, target, key, desc) {
390
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
391
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
392
- 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;
393
- return c > 3 && r && Object.defineProperty(target, key, r), r;
394
- }
395
-
396
- function _instanceof(left, right) {
397
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
398
- return !!right[Symbol.hasInstance](left);
399
- } else return left instanceof right;
400
- }
401
-
402
330
  /**
403
331
  * Clone mode.
404
332
  */ var CloneMode;
@@ -577,22 +505,16 @@ function _instanceof(left, right) {
577
505
  };
578
506
  return CloneManager;
579
507
  }();
580
- (function() {
581
- /** @internal */ CloneManager._subCloneModeMap = new Map();
582
- })();
583
- (function() {
584
- /** @internal */ CloneManager._cloneModeMap = new Map();
585
- })();
586
- (function() {
587
- CloneManager._objectType = Object.getPrototypeOf(Object);
588
- })();
508
+ /** @internal */ CloneManager._subCloneModeMap = new Map();
509
+ /** @internal */ CloneManager._cloneModeMap = new Map();
510
+ CloneManager._objectType = Object.getPrototypeOf(Object);
589
511
 
590
512
  /**
591
513
  * EngineObject.
592
514
  */ var EngineObject = /*#__PURE__*/ function() {
593
515
  function EngineObject(engine) {
594
- /** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
595
516
  this._destroyed = false;
517
+ /** Engine unique id. */ this.instanceId = ++EngineObject._instanceIdCounter;
596
518
  this._engine = engine;
597
519
  }
598
520
  var _proto = EngineObject.prototype;
@@ -624,13 +546,11 @@ function _instanceof(left, right) {
624
546
  ]);
625
547
  return EngineObject;
626
548
  }();
627
- (function() {
628
- EngineObject._instanceIdCounter = 0;
629
- })();
630
- __decorate([
549
+ EngineObject._instanceIdCounter = 0;
550
+ _ts_decorate([
631
551
  ignoreClone
632
552
  ], EngineObject.prototype, "instanceId", void 0);
633
- __decorate([
553
+ _ts_decorate([
634
554
  ignoreClone
635
555
  ], EngineObject.prototype, "_engine", void 0);
636
556
 
@@ -2032,10 +1952,9 @@ var GLCapabilityType;
2032
1952
  ]);
2033
1953
  return Font;
2034
1954
  }(RefObject);
2035
- (function() {
2036
- Font._fontMap = {};
2037
- })();
1955
+ Font._fontMap = {};
2038
1956
 
1957
+ var _Symbol_toStringTag = Symbol.toStringTag;
2039
1958
  var AssetPromise = /*#__PURE__*/ function() {
2040
1959
  function AssetPromise(executor) {
2041
1960
  var _this = this;
@@ -2156,7 +2075,7 @@ var AssetPromise = /*#__PURE__*/ function() {
2156
2075
  };
2157
2076
  _create_class(AssetPromise, [
2158
2077
  {
2159
- key: Symbol.toStringTag,
2078
+ key: _Symbol_toStringTag,
2160
2079
  get: /** compatible with Promise */ function get() {
2161
2080
  return "AssetPromise";
2162
2081
  }
@@ -2427,13 +2346,13 @@ var /** @internal */ PromiseState;
2427
2346
  };
2428
2347
  _proto._parseQueryPath = function _parseQueryPath(string) {
2429
2348
  var result = [];
2430
- if (string.charCodeAt(0) === charCodeOfDot$1) {
2349
+ if (string.charCodeAt(0) === charCodeOfDot) {
2431
2350
  result.push("");
2432
2351
  }
2433
- string.replace(rePropName$1, function(match, expression, quote, subString) {
2352
+ string.replace(rePropName, function(match, expression, quote, subString) {
2434
2353
  var key = match;
2435
2354
  if (quote) {
2436
- key = subString.replace(reEscapeChar$1, "$1");
2355
+ key = subString.replace(reEscapeChar, "$1");
2437
2356
  } else if (expression) {
2438
2357
  key = expression.trim();
2439
2358
  }
@@ -2491,12 +2410,8 @@ var /** @internal */ PromiseState;
2491
2410
  };
2492
2411
  return ResourceManager;
2493
2412
  }();
2494
- (function() {
2495
- /** Loader collection. */ ResourceManager._loaders = {};
2496
- })();
2497
- (function() {
2498
- ResourceManager._extTypeMapping = {};
2499
- })();
2413
+ /** Loader collection. */ ResourceManager._loaders = {};
2414
+ ResourceManager._extTypeMapping = {};
2500
2415
  /**
2501
2416
  * Declare ResourceLoader's decorator.
2502
2417
  * @param assetType - Type of asset
@@ -2508,9 +2423,9 @@ var /** @internal */ PromiseState;
2508
2423
  ResourceManager._addLoader(assetType, loader, extnames);
2509
2424
  };
2510
2425
  }
2511
- var charCodeOfDot$1 = ".".charCodeAt(0);
2512
- var reEscapeChar$1 = /\\(\\)?/g;
2513
- var rePropName$1 = RegExp(// Match anything that isn't a dot or bracket.
2426
+ var charCodeOfDot = ".".charCodeAt(0);
2427
+ var reEscapeChar = /\\(\\)?/g;
2428
+ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
2514
2429
  "[^.[\\]]+" + "|" + // Or match property names within brackets.
2515
2430
  "\\[(?:" + // Match a non-string expression.
2516
2431
  "([^\"'][^[]*)" + "|" + // Or match strings (supports escaping characters).
@@ -2854,14 +2769,10 @@ var ComponentCloner = /*#__PURE__*/ function() {
2854
2769
  };
2855
2770
  return ComponentsDependencies;
2856
2771
  }();
2857
- (function() {
2858
- /**
2772
+ /**
2859
2773
  * @internal
2860
2774
  */ ComponentsDependencies._dependenciesMap = new Map();
2861
- })();
2862
- (function() {
2863
- ComponentsDependencies._invDependenciesMap = new Map();
2864
- })();
2775
+ ComponentsDependencies._invDependenciesMap = new Map();
2865
2776
  /**
2866
2777
  * Dependent components, automatically added if they do not exist.
2867
2778
  * @param components - Dependent components
@@ -3077,19 +2988,19 @@ var ComponentCloner = /*#__PURE__*/ function() {
3077
2988
  ]);
3078
2989
  return Component;
3079
2990
  }(EngineObject);
3080
- __decorate([
2991
+ _ts_decorate([
3081
2992
  ignoreClone
3082
2993
  ], Component.prototype, "_entity", void 0);
3083
- __decorate([
2994
+ _ts_decorate([
3084
2995
  ignoreClone
3085
2996
  ], Component.prototype, "_awoken", void 0);
3086
- __decorate([
2997
+ _ts_decorate([
3087
2998
  ignoreClone
3088
2999
  ], Component.prototype, "_destroyed", void 0);
3089
- __decorate([
3000
+ _ts_decorate([
3090
3001
  ignoreClone
3091
3002
  ], Component.prototype, "_phasedActive", void 0);
3092
- __decorate([
3003
+ _ts_decorate([
3093
3004
  assignmentClone
3094
3005
  ], Component.prototype, "_enabled", void 0);
3095
3006
 
@@ -3161,6 +3072,7 @@ __decorate([
3161
3072
  function Transform(entity) {
3162
3073
  var _this;
3163
3074
  _this = Component.call(this, entity) || this;
3075
+ _this._dirtyFlag = 0xbc;
3164
3076
  _this._position = new Vector3();
3165
3077
  _this._rotation = new Vector3();
3166
3078
  _this._rotationQuaternion = new Quaternion();
@@ -3173,7 +3085,6 @@ __decorate([
3173
3085
  _this._worldMatrix = new Matrix();
3174
3086
  _this._isParentDirty = true;
3175
3087
  _this._parentTransformCache = null;
3176
- _this._dirtyFlag = 0xbc;
3177
3088
  /** @internal */ _this._updateFlagManager = new UpdateFlagManager();
3178
3089
  _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized(_this));
3179
3090
  _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized(_this));
@@ -3819,91 +3730,73 @@ __decorate([
3819
3730
  ]);
3820
3731
  return Transform;
3821
3732
  }(Component);
3822
- (function() {
3823
- Transform._tempQuat0 = new Quaternion();
3824
- })();
3825
- (function() {
3826
- Transform._tempVec30 = new Vector3();
3827
- })();
3828
- (function() {
3829
- Transform._tempVec31 = new Vector3();
3830
- })();
3831
- (function() {
3832
- Transform._tempVec32 = new Vector3();
3833
- })();
3834
- (function() {
3835
- Transform._tempMat30 = new Matrix3x3();
3836
- })();
3837
- (function() {
3838
- Transform._tempMat31 = new Matrix3x3();
3839
- })();
3840
- (function() {
3841
- Transform._tempMat32 = new Matrix3x3();
3842
- })();
3843
- (function() {
3844
- Transform._tempMat41 = new Matrix();
3845
- })();
3846
- (function() {
3847
- Transform._tempMat42 = new Matrix();
3848
- })();
3849
- __decorate([
3733
+ Transform._tempQuat0 = new Quaternion();
3734
+ Transform._tempVec30 = new Vector3();
3735
+ Transform._tempVec31 = new Vector3();
3736
+ Transform._tempVec32 = new Vector3();
3737
+ Transform._tempMat30 = new Matrix3x3();
3738
+ Transform._tempMat31 = new Matrix3x3();
3739
+ Transform._tempMat32 = new Matrix3x3();
3740
+ Transform._tempMat41 = new Matrix();
3741
+ Transform._tempMat42 = new Matrix();
3742
+ _ts_decorate([
3850
3743
  deepClone
3851
3744
  ], Transform.prototype, "_position", void 0);
3852
- __decorate([
3745
+ _ts_decorate([
3853
3746
  deepClone
3854
3747
  ], Transform.prototype, "_rotation", void 0);
3855
- __decorate([
3748
+ _ts_decorate([
3856
3749
  deepClone
3857
3750
  ], Transform.prototype, "_rotationQuaternion", void 0);
3858
- __decorate([
3751
+ _ts_decorate([
3859
3752
  deepClone
3860
3753
  ], Transform.prototype, "_scale", void 0);
3861
- __decorate([
3754
+ _ts_decorate([
3862
3755
  deepClone
3863
3756
  ], Transform.prototype, "_worldPosition", void 0);
3864
- __decorate([
3757
+ _ts_decorate([
3865
3758
  deepClone
3866
3759
  ], Transform.prototype, "_worldRotation", void 0);
3867
- __decorate([
3760
+ _ts_decorate([
3868
3761
  deepClone
3869
3762
  ], Transform.prototype, "_worldRotationQuaternion", void 0);
3870
- __decorate([
3763
+ _ts_decorate([
3871
3764
  deepClone
3872
3765
  ], Transform.prototype, "_lossyWorldScale", void 0);
3873
- __decorate([
3766
+ _ts_decorate([
3874
3767
  deepClone
3875
3768
  ], Transform.prototype, "_localMatrix", void 0);
3876
- __decorate([
3769
+ _ts_decorate([
3877
3770
  deepClone
3878
3771
  ], Transform.prototype, "_worldMatrix", void 0);
3879
- __decorate([
3772
+ _ts_decorate([
3880
3773
  ignoreClone
3881
3774
  ], Transform.prototype, "_isParentDirty", void 0);
3882
- __decorate([
3775
+ _ts_decorate([
3883
3776
  ignoreClone
3884
3777
  ], Transform.prototype, "_parentTransformCache", void 0);
3885
- __decorate([
3778
+ _ts_decorate([
3886
3779
  ignoreClone
3887
3780
  ], Transform.prototype, "_updateFlagManager", void 0);
3888
- __decorate([
3781
+ _ts_decorate([
3889
3782
  ignoreClone
3890
3783
  ], Transform.prototype, "_onPositionChanged", null);
3891
- __decorate([
3784
+ _ts_decorate([
3892
3785
  ignoreClone
3893
3786
  ], Transform.prototype, "_onWorldPositionChanged", null);
3894
- __decorate([
3787
+ _ts_decorate([
3895
3788
  ignoreClone
3896
3789
  ], Transform.prototype, "_onRotationChanged", null);
3897
- __decorate([
3790
+ _ts_decorate([
3898
3791
  ignoreClone
3899
3792
  ], Transform.prototype, "_onWorldRotationChanged", null);
3900
- __decorate([
3793
+ _ts_decorate([
3901
3794
  ignoreClone
3902
3795
  ], Transform.prototype, "_onRotationQuaternionChanged", null);
3903
- __decorate([
3796
+ _ts_decorate([
3904
3797
  ignoreClone
3905
3798
  ], Transform.prototype, "_onWorldRotationQuaternionChanged", null);
3906
- __decorate([
3799
+ _ts_decorate([
3907
3800
  ignoreClone
3908
3801
  ], Transform.prototype, "_onScaleChanged", null);
3909
3802
  var TransformModifyFlags;
@@ -4584,12 +4477,8 @@ var TransformModifyFlags;
4584
4477
  ]);
4585
4478
  return SystemInfo;
4586
4479
  }();
4587
- (function() {
4588
- /** The platform is running on. */ SystemInfo.platform = Platform.Unknown;
4589
- })();
4590
- (function() {
4591
- /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4592
- })();
4480
+ /** The platform is running on. */ SystemInfo.platform = Platform.Unknown;
4481
+ /** The operating system is running on. */ SystemInfo.operatingSystem = "";
4593
4482
  SystemInfo._initialize();
4594
4483
 
4595
4484
  /**
@@ -5344,8 +5233,8 @@ var Collider = /*#__PURE__*/ function(Component) {
5344
5233
  function Collider(entity) {
5345
5234
  var _this;
5346
5235
  _this = Component.call(this, entity) || this;
5347
- /** @internal */ _this._index = -1;
5348
5236
  _this._shapes = [];
5237
+ /** @internal */ _this._index = -1;
5349
5238
  _this._updateFlag = _this.entity.transform.registerWorldChangeFlag();
5350
5239
  return _this;
5351
5240
  }
@@ -5436,10 +5325,10 @@ var Collider = /*#__PURE__*/ function(Component) {
5436
5325
  ]);
5437
5326
  return Collider;
5438
5327
  }(Component);
5439
- __decorate([
5328
+ _ts_decorate([
5440
5329
  ignoreClone
5441
5330
  ], Collider.prototype, "_index", void 0);
5442
- Collider = __decorate([
5331
+ Collider = _ts_decorate([
5443
5332
  dependentComponents(Transform)
5444
5333
  ], Collider);
5445
5334
 
@@ -5720,9 +5609,7 @@ Collider = __decorate([
5720
5609
  ]);
5721
5610
  return ColliderShape;
5722
5611
  }();
5723
- (function() {
5724
- ColliderShape._idGenerator = 0;
5725
- })();
5612
+ ColliderShape._idGenerator = 0;
5726
5613
 
5727
5614
  /**
5728
5615
  * Physical collider shape for box.
@@ -6002,7 +5889,7 @@ var Joint = /*#__PURE__*/ function(Component) {
6002
5889
  ]);
6003
5890
  return Joint;
6004
5891
  }(Component);
6005
- Joint = __decorate([
5892
+ Joint = _ts_decorate([
6006
5893
  dependentComponents(Collider)
6007
5894
  ], Joint);
6008
5895
  /**
@@ -6977,15 +6864,9 @@ var DynamicColliderConstraints;
6977
6864
  };
6978
6865
  return PointerManager;
6979
6866
  }();
6980
- (function() {
6981
- PointerManager._tempRay = new Ray();
6982
- })();
6983
- (function() {
6984
- PointerManager._tempPoint = new Vector2();
6985
- })();
6986
- (function() {
6987
- PointerManager._tempHitResult = new HitResult();
6988
- })();
6867
+ PointerManager._tempRay = new Ray();
6868
+ PointerManager._tempPoint = new Vector2();
6869
+ PointerManager._tempHitResult = new HitResult();
6989
6870
 
6990
6871
  /**
6991
6872
  * Wheel Manager.
@@ -7378,12 +7259,8 @@ var DynamicColliderConstraints;
7378
7259
  }
7379
7260
  this._nameId = nameID;
7380
7261
  };
7381
- (function() {
7382
- /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7383
- })();
7384
- (function() {
7385
- ShaderMacro._macroNameCounter = 0;
7386
- })();
7262
+ /** @internal */ ShaderMacro._macroNameIdMap = Object.create(null);
7263
+ ShaderMacro._macroNameCounter = 0;
7387
7264
 
7388
7265
  /**
7389
7266
  * Shader macro collection.
@@ -7535,19 +7412,6 @@ var DynamicColliderConstraints;
7535
7412
  return ShaderMacroCollection;
7536
7413
  }();
7537
7414
 
7538
- function _extends() {
7539
- _extends = Object.assign || function assign(target) {
7540
- for (var i = 1; i < arguments.length; i++) {
7541
- var source = arguments[i];
7542
- for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
7543
- }
7544
-
7545
- return target;
7546
- };
7547
-
7548
- return _extends.apply(this, arguments);
7549
- }
7550
-
7551
7415
  var camera_declare = "#define GLSLIFY 1\nuniform vec3 u_cameraPos;"; // eslint-disable-line
7552
7416
 
7553
7417
  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
@@ -7657,7 +7521,7 @@ var PBRShaderLib = {
7657
7521
 
7658
7522
  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
7659
7523
 
7660
- 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
7524
+ 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
7661
7525
 
7662
7526
  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
7663
7527
 
@@ -8399,9 +8263,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8399
8263
  ]);
8400
8264
  return ShaderProgram;
8401
8265
  }();
8402
- (function() {
8403
- ShaderProgram._counter = 0;
8404
- })();
8266
+ ShaderProgram._counter = 0;
8405
8267
 
8406
8268
  /**
8407
8269
  * Shader pass containing vertex and fragment source.
@@ -8446,9 +8308,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8446
8308
  };
8447
8309
  return ShaderPass;
8448
8310
  }();
8449
- (function() {
8450
- ShaderPass._shaderPassCounter = 0;
8451
- })();
8311
+ ShaderPass._shaderPassCounter = 0;
8452
8312
 
8453
8313
  /**
8454
8314
  * Shader property.
@@ -8469,9 +8329,7 @@ var ShaderFactory = /*#__PURE__*/ function() {
8469
8329
  ]);
8470
8330
  return ShaderProperty;
8471
8331
  }();
8472
- (function() {
8473
- ShaderProperty._propertyNameCounter = 0;
8474
- })();
8332
+ ShaderProperty._propertyNameCounter = 0;
8475
8333
 
8476
8334
  /**
8477
8335
  * Shader for rendering.
@@ -8596,34 +8454,18 @@ var ShaderFactory = /*#__PURE__*/ function() {
8596
8454
  ]);
8597
8455
  return Shader;
8598
8456
  }();
8599
- (function() {
8600
- /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8601
- })();
8602
- (function() {
8603
- /** @internal */ Shader._shaderExtension = [
8604
- "GL_EXT_shader_texture_lod",
8605
- "GL_OES_standard_derivatives",
8606
- "GL_EXT_draw_buffers"
8607
- ];
8608
- })();
8609
- (function() {
8610
- /** @internal */ Shader._propertyIdMap = Object.create(null);
8611
- })();
8612
- (function() {
8613
- Shader._shaderMap = Object.create(null);
8614
- })();
8615
- (function() {
8616
- Shader._propertyNameMap = Object.create(null);
8617
- })();
8618
- (function() {
8619
- Shader._macroMaskMap = [];
8620
- })();
8621
- (function() {
8622
- Shader._macroCounter = 0;
8623
- })();
8624
- (function() {
8625
- Shader._macroMap = Object.create(null);
8626
- })();
8457
+ /** @internal */ Shader._compileMacros = new ShaderMacroCollection();
8458
+ /** @internal */ Shader._shaderExtension = [
8459
+ "GL_EXT_shader_texture_lod",
8460
+ "GL_OES_standard_derivatives",
8461
+ "GL_EXT_draw_buffers"
8462
+ ];
8463
+ /** @internal */ Shader._propertyIdMap = Object.create(null);
8464
+ Shader._shaderMap = Object.create(null);
8465
+ Shader._propertyNameMap = Object.create(null);
8466
+ Shader._macroMaskMap = [];
8467
+ Shader._macroCounter = 0;
8468
+ Shader._macroMap = Object.create(null);
8627
8469
 
8628
8470
  /**
8629
8471
  * Shader data collection,Correspondence includes shader properties data and macros data.
@@ -8883,9 +8725,9 @@ var ShaderFactory = /*#__PURE__*/ function() {
8883
8725
  /** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1;
8884
8726
  /** Near plane value to use for shadow frustums. */ _this.shadowNearPlane = 0.1;
8885
8727
  /** Shadow intensity, the larger the value, the clearer and darker the shadow. */ _this.shadowStrength = 1.0;
8886
- /** @internal */ _this._lightIndex = -1;
8887
8728
  _this._color = new Color$1(1, 1, 1, 1);
8888
8729
  _this._lightColor = new Color$1();
8730
+ /** @internal */ _this._lightIndex = -1;
8889
8731
  return _this;
8890
8732
  }
8891
8733
  var _proto = Light.prototype;
@@ -8933,12 +8775,10 @@ var ShaderFactory = /*#__PURE__*/ function() {
8933
8775
  ]);
8934
8776
  return Light;
8935
8777
  }(Component);
8936
- (function() {
8937
- /**
8778
+ /**
8938
8779
  * Each type of light source is at most 10, beyond which it will not take effect.
8939
8780
  * */ Light._maxLight = 10;
8940
- })();
8941
- __decorate([
8781
+ _ts_decorate([
8942
8782
  ignoreClone
8943
8783
  ], Light.prototype, "_lightIndex", void 0);
8944
8784
 
@@ -9026,22 +8866,14 @@ __decorate([
9026
8866
  ]);
9027
8867
  return DirectLight;
9028
8868
  }(Light);
9029
- (function() {
9030
- DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
9031
- })();
9032
- (function() {
9033
- DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
9034
- })();
9035
- (function() {
9036
- DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
9037
- })();
9038
- (function() {
9039
- DirectLight._combinedData = {
9040
- cullingMask: new Int32Array(Light._maxLight * 2),
9041
- color: new Float32Array(Light._maxLight * 3),
9042
- direction: new Float32Array(Light._maxLight * 3)
9043
- };
9044
- })();
8869
+ DirectLight._cullingMaskProperty = Shader.getPropertyByName("u_directLightCullingMask");
8870
+ DirectLight._colorProperty = Shader.getPropertyByName("u_directLightColor");
8871
+ DirectLight._directionProperty = Shader.getPropertyByName("u_directLightDirection");
8872
+ DirectLight._combinedData = {
8873
+ cullingMask: new Int32Array(Light._maxLight * 2),
8874
+ color: new Float32Array(Light._maxLight * 3),
8875
+ direction: new Float32Array(Light._maxLight * 3)
8876
+ };
9045
8877
 
9046
8878
  /**
9047
8879
  * Point light.
@@ -9119,26 +8951,16 @@ __decorate([
9119
8951
  ]);
9120
8952
  return PointLight;
9121
8953
  }(Light);
9122
- (function() {
9123
- PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
9124
- })();
9125
- (function() {
9126
- PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
9127
- })();
9128
- (function() {
9129
- PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
9130
- })();
9131
- (function() {
9132
- PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
9133
- })();
9134
- (function() {
9135
- PointLight._combinedData = {
9136
- cullingMask: new Int32Array(Light._maxLight * 2),
9137
- color: new Float32Array(Light._maxLight * 3),
9138
- position: new Float32Array(Light._maxLight * 3),
9139
- distance: new Float32Array(Light._maxLight)
9140
- };
9141
- })();
8954
+ PointLight._cullingMaskProperty = Shader.getPropertyByName("u_pointLightCullingMask");
8955
+ PointLight._colorProperty = Shader.getPropertyByName("u_pointLightColor");
8956
+ PointLight._positionProperty = Shader.getPropertyByName("u_pointLightPosition");
8957
+ PointLight._distanceProperty = Shader.getPropertyByName("u_pointLightDistance");
8958
+ PointLight._combinedData = {
8959
+ cullingMask: new Int32Array(Light._maxLight * 2),
8960
+ color: new Float32Array(Light._maxLight * 3),
8961
+ position: new Float32Array(Light._maxLight * 3),
8962
+ distance: new Float32Array(Light._maxLight)
8963
+ };
9142
8964
 
9143
8965
  /**
9144
8966
  * Spot light.
@@ -9254,38 +9076,22 @@ __decorate([
9254
9076
  ]);
9255
9077
  return SpotLight;
9256
9078
  }(Light);
9257
- (function() {
9258
- SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9259
- })();
9260
- (function() {
9261
- SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9262
- })();
9263
- (function() {
9264
- SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9265
- })();
9266
- (function() {
9267
- SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9268
- })();
9269
- (function() {
9270
- SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9271
- })();
9272
- (function() {
9273
- SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9274
- })();
9275
- (function() {
9276
- SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9277
- })();
9278
- (function() {
9279
- SpotLight._combinedData = {
9280
- cullingMask: new Int32Array(Light._maxLight * 2),
9281
- color: new Float32Array(Light._maxLight * 3),
9282
- position: new Float32Array(Light._maxLight * 3),
9283
- direction: new Float32Array(Light._maxLight * 3),
9284
- distance: new Float32Array(Light._maxLight),
9285
- angleCos: new Float32Array(Light._maxLight),
9286
- penumbraCos: new Float32Array(Light._maxLight)
9287
- };
9288
- })();
9079
+ SpotLight._cullingMaskProperty = Shader.getPropertyByName("u_spotLightCullingMask");
9080
+ SpotLight._colorProperty = Shader.getPropertyByName("u_spotLightColor");
9081
+ SpotLight._positionProperty = Shader.getPropertyByName("u_spotLightPosition");
9082
+ SpotLight._directionProperty = Shader.getPropertyByName("u_spotLightDirection");
9083
+ SpotLight._distanceProperty = Shader.getPropertyByName("u_spotLightDistance");
9084
+ SpotLight._angleCosProperty = Shader.getPropertyByName("u_spotLightAngleCos");
9085
+ SpotLight._penumbraCosProperty = Shader.getPropertyByName("u_spotLightPenumbraCos");
9086
+ SpotLight._combinedData = {
9087
+ cullingMask: new Int32Array(Light._maxLight * 2),
9088
+ color: new Float32Array(Light._maxLight * 3),
9089
+ position: new Float32Array(Light._maxLight * 3),
9090
+ direction: new Float32Array(Light._maxLight * 3),
9091
+ distance: new Float32Array(Light._maxLight),
9092
+ angleCos: new Float32Array(Light._maxLight),
9093
+ penumbraCos: new Float32Array(Light._maxLight)
9094
+ };
9289
9095
 
9290
9096
  /**
9291
9097
  * Light manager.
@@ -9977,15 +9783,9 @@ var RenderElement = function RenderElement() {
9977
9783
  };
9978
9784
  return RenderContext;
9979
9785
  }();
9980
- (function() {
9981
- /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9982
- })();
9983
- (function() {
9984
- RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9985
- })();
9986
- (function() {
9987
- RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9988
- })();
9786
+ /** @internal */ RenderContext._vpMatrixProperty = Shader.getPropertyByName("u_VPMat");
9787
+ RenderContext._viewMatrixProperty = Shader.getPropertyByName("u_viewMat");
9788
+ RenderContext._projectionMatrixProperty = Shader.getPropertyByName("u_projMat");
9989
9789
 
9990
9790
  var SpriteElement = /*#__PURE__*/ function(RenderElement) {
9991
9791
  _inherits(SpriteElement, RenderElement);
@@ -10046,6 +9846,7 @@ var Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10046
9846
  function Renderer1(entity) {
10047
9847
  var _this;
10048
9848
  _this = Component.call(this, entity) || this;
9849
+ /** Whether cast shadow. */ _this.castShadows = true;
10049
9850
  /** @internal */ _this._onUpdateIndex = -1;
10050
9851
  /** @internal */ _this._rendererIndex = -1;
10051
9852
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
@@ -10062,7 +9863,6 @@ var Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10062
9863
  _this._priority = 0;
10063
9864
  _this._receiveShadows = true;
10064
9865
  _this._rendererLayer = new Vector4();
10065
- /** Whether cast shadow. */ _this.castShadows = true;
10066
9866
  var prototype = Renderer.prototype;
10067
9867
  var shaderData = _this.shaderData;
10068
9868
  _this._overrideUpdate = _this.update !== prototype.update;
@@ -10345,83 +10145,65 @@ var Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10345
10145
  }
10346
10146
  ]);
10347
10147
  return Renderer1;
10348
- }(Component), function() {
10349
- _Renderer._tempVector0 = new Vector3();
10350
- }(), function() {
10351
- _Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS");
10352
- }(), function() {
10353
- _Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat");
10354
- }(), function() {
10355
- _Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat");
10356
- }(), function() {
10357
- _Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat");
10358
- }(), function() {
10359
- _Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat");
10360
- }(), function() {
10361
- _Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat");
10362
- }(), function() {
10363
- _Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat");
10364
- }(), function() {
10365
- _Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer");
10366
- }(), _Renderer);
10367
- __decorate([
10148
+ }(Component), _Renderer._tempVector0 = new Vector3(), _Renderer._receiveShadowMacro = Shader.getMacroByName("OASIS_RECEIVE_SHADOWS"), _Renderer._localMatrixProperty = Shader.getPropertyByName("u_localMat"), _Renderer._worldMatrixProperty = Shader.getPropertyByName("u_modelMat"), _Renderer._mvMatrixProperty = Shader.getPropertyByName("u_MVMat"), _Renderer._mvpMatrixProperty = Shader.getPropertyByName("u_MVPMat"), _Renderer._mvInvMatrixProperty = Shader.getPropertyByName("u_MVInvMat"), _Renderer._normalMatrixProperty = Shader.getPropertyByName("u_normalMat"), _Renderer._rendererLayerProperty = Shader.getPropertyByName("oasis_RendererLayer"), _Renderer);
10149
+ _ts_decorate([
10368
10150
  ignoreClone
10369
10151
  ], Renderer.prototype, "_distanceForSort", void 0);
10370
- __decorate([
10152
+ _ts_decorate([
10371
10153
  ignoreClone
10372
10154
  ], Renderer.prototype, "_onUpdateIndex", void 0);
10373
- __decorate([
10155
+ _ts_decorate([
10374
10156
  ignoreClone
10375
10157
  ], Renderer.prototype, "_rendererIndex", void 0);
10376
- __decorate([
10158
+ _ts_decorate([
10377
10159
  ignoreClone
10378
10160
  ], Renderer.prototype, "_globalShaderMacro", void 0);
10379
- __decorate([
10161
+ _ts_decorate([
10380
10162
  deepClone
10381
10163
  ], Renderer.prototype, "_bounds", void 0);
10382
- __decorate([
10164
+ _ts_decorate([
10383
10165
  ignoreClone
10384
10166
  ], Renderer.prototype, "_renderFrameCount", void 0);
10385
- __decorate([
10167
+ _ts_decorate([
10386
10168
  ignoreClone
10387
10169
  ], Renderer.prototype, "_overrideUpdate", void 0);
10388
- __decorate([
10170
+ _ts_decorate([
10389
10171
  ignoreClone
10390
10172
  ], Renderer.prototype, "_materials", void 0);
10391
- __decorate([
10173
+ _ts_decorate([
10392
10174
  ignoreClone
10393
10175
  ], Renderer.prototype, "_dirtyUpdateFlag", void 0);
10394
- __decorate([
10176
+ _ts_decorate([
10395
10177
  deepClone
10396
10178
  ], Renderer.prototype, "_shaderData", void 0);
10397
- __decorate([
10179
+ _ts_decorate([
10398
10180
  ignoreClone
10399
10181
  ], Renderer.prototype, "_mvMatrix", void 0);
10400
- __decorate([
10182
+ _ts_decorate([
10401
10183
  ignoreClone
10402
10184
  ], Renderer.prototype, "_mvpMatrix", void 0);
10403
- __decorate([
10185
+ _ts_decorate([
10404
10186
  ignoreClone
10405
10187
  ], Renderer.prototype, "_mvInvMatrix", void 0);
10406
- __decorate([
10188
+ _ts_decorate([
10407
10189
  ignoreClone
10408
10190
  ], Renderer.prototype, "_normalMatrix", void 0);
10409
- __decorate([
10191
+ _ts_decorate([
10410
10192
  ignoreClone
10411
10193
  ], Renderer.prototype, "_materialsInstanced", void 0);
10412
- __decorate([
10194
+ _ts_decorate([
10413
10195
  ignoreClone
10414
10196
  ], Renderer.prototype, "_priority", void 0);
10415
- __decorate([
10197
+ _ts_decorate([
10416
10198
  assignmentClone
10417
10199
  ], Renderer.prototype, "_receiveShadows", void 0);
10418
- __decorate([
10200
+ _ts_decorate([
10419
10201
  ignoreClone
10420
10202
  ], Renderer.prototype, "_rendererLayer", void 0);
10421
- __decorate([
10203
+ _ts_decorate([
10422
10204
  ignoreClone
10423
10205
  ], Renderer.prototype, "_onTransformChanged", null);
10424
- Renderer = __decorate([
10206
+ Renderer = _ts_decorate([
10425
10207
  dependentComponents(Transform)
10426
10208
  ], Renderer);
10427
10209
  var RendererUpdateFlags;
@@ -10493,19 +10275,15 @@ var SimpleSpriteAssembler = (_SimpleSpriteAssembler = /*#__PURE__*/ function() {
10493
10275
  renderUVs[3].set(right, top);
10494
10276
  };
10495
10277
  return SimpleSpriteAssembler1;
10496
- }(), function() {
10497
- _SimpleSpriteAssembler._rectangleTriangles = [
10498
- 0,
10499
- 1,
10500
- 2,
10501
- 2,
10502
- 1,
10503
- 3
10504
- ];
10505
- }(), function() {
10506
- _SimpleSpriteAssembler._worldMatrix = new Matrix();
10507
- }(), _SimpleSpriteAssembler);
10508
- SimpleSpriteAssembler = __decorate([
10278
+ }(), _SimpleSpriteAssembler._rectangleTriangles = [
10279
+ 0,
10280
+ 1,
10281
+ 2,
10282
+ 2,
10283
+ 1,
10284
+ 3
10285
+ ], _SimpleSpriteAssembler._worldMatrix = new Matrix(), _SimpleSpriteAssembler);
10286
+ SimpleSpriteAssembler = _ts_decorate([
10509
10287
  StaticInterfaceImplement()
10510
10288
  ], SimpleSpriteAssembler);
10511
10289
 
@@ -10803,40 +10581,36 @@ SimpleSpriteAssembler = __decorate([
10803
10581
  ]);
10804
10582
  return SpriteMask;
10805
10583
  }(Renderer);
10806
- (function() {
10807
- /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10808
- })();
10809
- (function() {
10810
- /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10811
- })();
10812
- __decorate([
10584
+ /** @internal */ SpriteMask._textureProperty = Shader.getPropertyByName("u_maskTexture");
10585
+ /** @internal */ SpriteMask._alphaCutoffProperty = Shader.getPropertyByName("u_maskAlphaCutoff");
10586
+ _ts_decorate([
10813
10587
  assignmentClone
10814
10588
  ], SpriteMask.prototype, "influenceLayers", void 0);
10815
- __decorate([
10589
+ _ts_decorate([
10816
10590
  ignoreClone
10817
10591
  ], SpriteMask.prototype, "_sprite", void 0);
10818
- __decorate([
10592
+ _ts_decorate([
10819
10593
  ignoreClone
10820
10594
  ], SpriteMask.prototype, "_automaticWidth", void 0);
10821
- __decorate([
10595
+ _ts_decorate([
10822
10596
  ignoreClone
10823
10597
  ], SpriteMask.prototype, "_automaticHeight", void 0);
10824
- __decorate([
10598
+ _ts_decorate([
10825
10599
  assignmentClone
10826
10600
  ], SpriteMask.prototype, "_customWidth", void 0);
10827
- __decorate([
10601
+ _ts_decorate([
10828
10602
  assignmentClone
10829
10603
  ], SpriteMask.prototype, "_customHeight", void 0);
10830
- __decorate([
10604
+ _ts_decorate([
10831
10605
  assignmentClone
10832
10606
  ], SpriteMask.prototype, "_flipX", void 0);
10833
- __decorate([
10607
+ _ts_decorate([
10834
10608
  assignmentClone
10835
10609
  ], SpriteMask.prototype, "_flipY", void 0);
10836
- __decorate([
10610
+ _ts_decorate([
10837
10611
  assignmentClone
10838
10612
  ], SpriteMask.prototype, "_alphaCutoff", void 0);
10839
- __decorate([
10613
+ _ts_decorate([
10840
10614
  ignoreClone
10841
10615
  ], SpriteMask.prototype, "_onSpriteChange", null);
10842
10616
  var /**
@@ -11905,27 +11679,13 @@ var MeshModifyFlags;
11905
11679
  };
11906
11680
  return BlendShapeManager;
11907
11681
  }();
11908
- (function() {
11909
- BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11910
- })();
11911
- (function() {
11912
- BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11913
- })();
11914
- (function() {
11915
- BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11916
- })();
11917
- (function() {
11918
- BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11919
- })();
11920
- (function() {
11921
- BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11922
- })();
11923
- (function() {
11924
- BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11925
- })();
11926
- (function() {
11927
- BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11928
- })();
11682
+ BlendShapeManager._blendShapeMacro = Shader.getMacroByName("OASIS_BLENDSHAPE");
11683
+ BlendShapeManager._blendShapeTextureMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TEXTURE");
11684
+ BlendShapeManager._blendShapeNormalMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_NORMAL");
11685
+ BlendShapeManager._blendShapeTangentMacro = Shader.getMacroByName("OASIS_BLENDSHAPE_TANGENT");
11686
+ BlendShapeManager._blendShapeWeightsProperty = Shader.getPropertyByName("u_blendShapeWeights");
11687
+ BlendShapeManager._blendShapeTextureProperty = Shader.getPropertyByName("u_blendShapeTexture");
11688
+ BlendShapeManager._blendShapeTextureInfoProperty = Shader.getPropertyByName("u_blendShapeTextureInfo");
11929
11689
 
11930
11690
  /**
11931
11691
  * Vertex attribute types of a vertex in a ModelMesh.
@@ -13000,21 +12760,11 @@ var MeshModifyFlags;
13000
12760
  ]);
13001
12761
  return ModelMesh;
13002
12762
  }(Mesh);
13003
- (function() {
13004
- ModelMesh._tempVec0 = new Vector3();
13005
- })();
13006
- (function() {
13007
- ModelMesh._tempVec1 = new Vector3();
13008
- })();
13009
- (function() {
13010
- ModelMesh._tempVec2 = new Vector3();
13011
- })();
13012
- (function() {
13013
- ModelMesh._tempVec3 = new Vector3();
13014
- })();
13015
- (function() {
13016
- ModelMesh._tempVec4 = new Vector3();
13017
- })();
12763
+ ModelMesh._tempVec0 = new Vector3();
12764
+ ModelMesh._tempVec1 = new Vector3();
12765
+ ModelMesh._tempVec2 = new Vector3();
12766
+ ModelMesh._tempVec3 = new Vector3();
12767
+ ModelMesh._tempVec4 = new Vector3();
13018
12768
  var VertexChangedFlags;
13019
12769
  (function(VertexChangedFlags) {
13020
12770
  VertexChangedFlags[VertexChangedFlags["Position"] = 0x1] = "Position";
@@ -13194,25 +12944,15 @@ var VertexChangedFlags;
13194
12944
  ]);
13195
12945
  return MeshRenderer;
13196
12946
  }(Renderer);
13197
- (function() {
13198
- MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
13199
- })();
13200
- (function() {
13201
- MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
13202
- })();
13203
- (function() {
13204
- MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
13205
- })();
13206
- (function() {
13207
- MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
13208
- })();
13209
- (function() {
13210
- MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
13211
- })();
13212
- __decorate([
12947
+ MeshRenderer._uvMacro = Shader.getMacroByName("O3_HAS_UV");
12948
+ MeshRenderer._uv1Macro = Shader.getMacroByName("O3_HAS_UV1");
12949
+ MeshRenderer._normalMacro = Shader.getMacroByName("O3_HAS_NORMAL");
12950
+ MeshRenderer._tangentMacro = Shader.getMacroByName("O3_HAS_TANGENT");
12951
+ MeshRenderer._vertexColorMacro = Shader.getMacroByName("O3_HAS_VERTEXCOLOR");
12952
+ _ts_decorate([
13213
12953
  ignoreClone
13214
12954
  ], MeshRenderer.prototype, "_mesh", void 0);
13215
- __decorate([
12955
+ _ts_decorate([
13216
12956
  ignoreClone
13217
12957
  ], MeshRenderer.prototype, "_onMeshChanged", null);
13218
12958
  var /**
@@ -13268,13 +13008,13 @@ var Utils = /*#__PURE__*/ function() {
13268
13008
  };
13269
13009
  Utils._stringToPath = function _stringToPath(string) {
13270
13010
  var result = [];
13271
- if (string.charCodeAt(0) === charCodeOfDot) {
13011
+ if (string.charCodeAt(0) === charCodeOfDot$1) {
13272
13012
  result.push("");
13273
13013
  }
13274
- string.replace(rePropName, function(match, expression, quote, subString) {
13014
+ string.replace(rePropName$1, function(match, expression, quote, subString) {
13275
13015
  var key = match;
13276
13016
  if (quote) {
13277
- key = subString.replace(reEscapeChar, "$1");
13017
+ key = subString.replace(reEscapeChar$1, "$1");
13278
13018
  } else if (expression) {
13279
13019
  key = expression.trim();
13280
13020
  }
@@ -13284,9 +13024,9 @@ var Utils = /*#__PURE__*/ function() {
13284
13024
  };
13285
13025
  return Utils;
13286
13026
  }();
13287
- var charCodeOfDot = ".".charCodeAt(0);
13288
- var reEscapeChar = /\\(\\)?/g;
13289
- var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13027
+ var charCodeOfDot$1 = ".".charCodeAt(0);
13028
+ var reEscapeChar$1 = /\\(\\)?/g;
13029
+ var rePropName$1 = RegExp(// Match anything that isn't a dot or bracket.
13290
13030
  "[^.[\\]]+" + "|" + // Or match property names within brackets.
13291
13031
  "\\[(?:" + // Match a non-string expression.
13292
13032
  "([^\"'][^[]*)" + "|" + // Or match strings (supports escaping characters).
@@ -13601,52 +13341,44 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
13601
13341
  ]);
13602
13342
  return SkinnedMeshRenderer;
13603
13343
  }(MeshRenderer);
13604
- (function() {
13605
- SkinnedMeshRenderer._tempMatrix = new Matrix();
13606
- })();
13607
- (function() {
13608
- SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13609
- })();
13610
- (function() {
13611
- SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13612
- })();
13613
- (function() {
13614
- SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13615
- })();
13616
- __decorate([
13344
+ SkinnedMeshRenderer._tempMatrix = new Matrix();
13345
+ SkinnedMeshRenderer._jointCountProperty = Shader.getPropertyByName("u_jointCount");
13346
+ SkinnedMeshRenderer._jointSamplerProperty = Shader.getPropertyByName("u_jointSampler");
13347
+ SkinnedMeshRenderer._jointMatrixProperty = Shader.getPropertyByName("u_jointMatrix");
13348
+ _ts_decorate([
13617
13349
  ignoreClone
13618
13350
  ], SkinnedMeshRenderer.prototype, "_supportSkinning", void 0);
13619
- __decorate([
13351
+ _ts_decorate([
13620
13352
  ignoreClone
13621
13353
  ], SkinnedMeshRenderer.prototype, "_hasInitSkin", void 0);
13622
- __decorate([
13354
+ _ts_decorate([
13623
13355
  ignoreClone
13624
13356
  ], SkinnedMeshRenderer.prototype, "_jointDataCreateCache", void 0);
13625
- __decorate([
13357
+ _ts_decorate([
13626
13358
  ignoreClone
13627
13359
  ], SkinnedMeshRenderer.prototype, "_blendShapeWeights", void 0);
13628
- __decorate([
13360
+ _ts_decorate([
13629
13361
  ignoreClone
13630
13362
  ], SkinnedMeshRenderer.prototype, "_maxVertexUniformVectors", void 0);
13631
- __decorate([
13363
+ _ts_decorate([
13632
13364
  ignoreClone
13633
13365
  ], SkinnedMeshRenderer.prototype, "_rootBone", void 0);
13634
- __decorate([
13366
+ _ts_decorate([
13635
13367
  ignoreClone
13636
13368
  ], SkinnedMeshRenderer.prototype, "_localBounds", void 0);
13637
- __decorate([
13369
+ _ts_decorate([
13638
13370
  ignoreClone
13639
13371
  ], SkinnedMeshRenderer.prototype, "_jointMatrices", void 0);
13640
- __decorate([
13372
+ _ts_decorate([
13641
13373
  ignoreClone
13642
13374
  ], SkinnedMeshRenderer.prototype, "_jointTexture", void 0);
13643
- __decorate([
13375
+ _ts_decorate([
13644
13376
  ignoreClone
13645
13377
  ], SkinnedMeshRenderer.prototype, "_jointEntities", void 0);
13646
- __decorate([
13378
+ _ts_decorate([
13647
13379
  ignoreClone
13648
13380
  ], SkinnedMeshRenderer.prototype, "_condensedBlendShapeWeights", void 0);
13649
- __decorate([
13381
+ _ts_decorate([
13650
13382
  ignoreClone
13651
13383
  ], SkinnedMeshRenderer.prototype, "_onLocalBoundsChanged", null);
13652
13384
 
@@ -14656,12 +14388,8 @@ var Basic2DBatcher = /*#__PURE__*/ function() {
14656
14388
  };
14657
14389
  return Basic2DBatcher;
14658
14390
  }();
14659
- (function() {
14660
- /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14661
- })();
14662
- (function() {
14663
- Basic2DBatcher._canUploadSameBuffer = true;
14664
- })();
14391
+ /** The maximum number of vertex. */ Basic2DBatcher.MAX_VERTEX_COUNT = 4096;
14392
+ Basic2DBatcher._canUploadSameBuffer = true;
14665
14393
 
14666
14394
  var SpriteMaskBatcher = /*#__PURE__*/ function(Basic2DBatcher) {
14667
14395
  _inherits(SpriteMaskBatcher, Basic2DBatcher);
@@ -14921,15 +14649,9 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
14921
14649
  ]);
14922
14650
  return Sky;
14923
14651
  }();
14924
- (function() {
14925
- Sky._epsilon = 1e-6;
14926
- })();
14927
- (function() {
14928
- Sky._viewProjMatrix = new Matrix();
14929
- })();
14930
- (function() {
14931
- Sky._projectionMatrix = new Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14932
- })();
14652
+ Sky._epsilon = 1e-6;
14653
+ Sky._viewProjMatrix = new Matrix();
14654
+ Sky._projectionMatrix = new Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, Sky._epsilon - 1, -1, 0, 0, 0, 0);
14933
14655
 
14934
14656
  /**
14935
14657
  * Background of scene.
@@ -15309,33 +15031,15 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15309
15031
  ]);
15310
15032
  return AmbientLight;
15311
15033
  }();
15312
- (function() {
15313
- AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
15314
- })();
15315
- (function() {
15316
- AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
15317
- })();
15318
- (function() {
15319
- AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
15320
- })();
15321
- (function() {
15322
- AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
15323
- })();
15324
- (function() {
15325
- AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
15326
- })();
15327
- (function() {
15328
- AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
15329
- })();
15330
- (function() {
15331
- AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
15332
- })();
15333
- (function() {
15334
- AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
15335
- })();
15336
- (function() {
15337
- AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15338
- })();
15034
+ AmbientLight._shMacro = Shader.getMacroByName("O3_USE_SH");
15035
+ AmbientLight._specularMacro = Shader.getMacroByName("O3_USE_SPECULAR_ENV");
15036
+ AmbientLight._decodeRGBMMacro = Shader.getMacroByName("O3_DECODE_ENV_RGBM");
15037
+ AmbientLight._diffuseColorProperty = Shader.getPropertyByName("u_envMapLight.diffuse");
15038
+ AmbientLight._diffuseSHProperty = Shader.getPropertyByName("u_env_sh");
15039
+ AmbientLight._diffuseIntensityProperty = Shader.getPropertyByName("u_envMapLight.diffuseIntensity");
15040
+ AmbientLight._specularTextureProperty = Shader.getPropertyByName("u_env_specularSampler");
15041
+ AmbientLight._specularIntensityProperty = Shader.getPropertyByName("u_envMapLight.specularIntensity");
15042
+ AmbientLight._mipLevelProperty = Shader.getPropertyByName("u_envMapLight.mipMapLevel");
15339
15043
 
15340
15044
  /**
15341
15045
  * Scene.
@@ -15720,12 +15424,8 @@ var TextRenderElement = /*#__PURE__*/ function(RenderElement) {
15720
15424
  ]);
15721
15425
  return Scene;
15722
15426
  }(EngineObject);
15723
- (function() {
15724
- Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15725
- })();
15726
- (function() {
15727
- Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15728
- })();
15427
+ Scene._fogColorProperty = Shader.getPropertyByName("oasis_FogColor");
15428
+ Scene._fogParamsProperty = Shader.getPropertyByName("oasis_FogParams");
15729
15429
 
15730
15430
  /**
15731
15431
  * Scene manager.
@@ -15808,7 +15508,7 @@ var pbrSpecularFs = "#define GLSLIFY 1\n#include <common>\n#include <camera_decl
15808
15508
 
15809
15509
  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
15810
15510
 
15811
- 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
15511
+ 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
15812
15512
 
15813
15513
  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
15814
15514
 
@@ -16273,15 +15973,9 @@ ShaderPool.init();
16273
15973
  ]);
16274
15974
  return Engine;
16275
15975
  }(EventDispatcher);
16276
- (function() {
16277
- /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
16278
- })();
16279
- (function() {
16280
- /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
16281
- })();
16282
- (function() {
16283
- /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
16284
- })();
15976
+ /** @internal */ Engine._gammaMacro = Shader.getMacroByName("OASIS_COLORSPACE_GAMMA");
15977
+ /** @internal */ Engine._noDepthTextureMacro = Shader.getMacroByName("OASIS_NO_DEPTH_TEXTURE");
15978
+ /** @internal Conversion of space units to pixel units for 2D. */ Engine._pixelsPerUnit = 100;
16285
15979
 
16286
15980
  /**
16287
15981
  * Script class, used for logic writing.
@@ -16455,31 +16149,31 @@ ShaderPool.init();
16455
16149
  };
16456
16150
  return Script;
16457
16151
  }(Component);
16458
- __decorate([
16152
+ _ts_decorate([
16459
16153
  ignoreClone
16460
16154
  ], Script.prototype, "_started", void 0);
16461
- __decorate([
16155
+ _ts_decorate([
16462
16156
  ignoreClone
16463
16157
  ], Script.prototype, "_onStartIndex", void 0);
16464
- __decorate([
16158
+ _ts_decorate([
16465
16159
  ignoreClone
16466
16160
  ], Script.prototype, "_onUpdateIndex", void 0);
16467
- __decorate([
16161
+ _ts_decorate([
16468
16162
  ignoreClone
16469
16163
  ], Script.prototype, "_onLateUpdateIndex", void 0);
16470
- __decorate([
16164
+ _ts_decorate([
16471
16165
  ignoreClone
16472
16166
  ], Script.prototype, "_onPhysicsUpdateIndex", void 0);
16473
- __decorate([
16167
+ _ts_decorate([
16474
16168
  ignoreClone
16475
16169
  ], Script.prototype, "_onPreRenderIndex", void 0);
16476
- __decorate([
16170
+ _ts_decorate([
16477
16171
  ignoreClone
16478
16172
  ], Script.prototype, "_onPostRenderIndex", void 0);
16479
- __decorate([
16173
+ _ts_decorate([
16480
16174
  ignoreClone
16481
16175
  ], Script.prototype, "_entityScriptsIndex", void 0);
16482
- __decorate([
16176
+ _ts_decorate([
16483
16177
  ignoreClone
16484
16178
  ], Script.prototype, "_waitHandlingInValid", void 0);
16485
16179
 
@@ -16596,9 +16290,7 @@ __decorate([
16596
16290
  };
16597
16291
  return SpriteBatcher;
16598
16292
  }(Basic2DBatcher);
16599
- (function() {
16600
- SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16601
- })();
16293
+ SpriteBatcher._textureProperty = Shader.getPropertyByName("u_spriteTexture");
16602
16294
 
16603
16295
  /**
16604
16296
  * Render queue.
@@ -17096,247 +16788,227 @@ var /**
17096
16788
  };
17097
16789
  return ShadowUtils;
17098
16790
  }();
17099
- (function() {
17100
- ShadowUtils._tempMatrix0 = new Matrix();
17101
- })();
17102
- (function() {
17103
- // prettier-ignore
17104
- /** @internal */ ShadowUtils._shadowMapCoordMatrix = new Matrix(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);
17105
- })();
17106
- (function() {
17107
- ShadowUtils._frustumCorners = [
17108
- new Vector3(),
17109
- new Vector3(),
17110
- new Vector3(),
17111
- new Vector3(),
17112
- new Vector3(),
17113
- new Vector3(),
17114
- new Vector3(),
17115
- new Vector3()
17116
- ];
17117
- })();
17118
- (function() {
17119
- ShadowUtils._adjustNearPlane = new Plane(new Vector3());
17120
- })();
17121
- (function() {
17122
- ShadowUtils._adjustFarPlane = new Plane(new Vector3());
17123
- })();
17124
- (function() {
17125
- ShadowUtils._backPlaneFaces = new Array(5);
17126
- })();
17127
- (function() {
17128
- ShadowUtils._edgePlanePoint2 = new Vector3();
17129
- })();
17130
- (function() {
17131
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16791
+ ShadowUtils._tempMatrix0 = new Matrix();
16792
+ // prettier-ignore
16793
+ /** @internal */ ShadowUtils._shadowMapCoordMatrix = new Matrix(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);
16794
+ ShadowUtils._frustumCorners = [
16795
+ new Vector3(),
16796
+ new Vector3(),
16797
+ new Vector3(),
16798
+ new Vector3(),
16799
+ new Vector3(),
16800
+ new Vector3(),
16801
+ new Vector3(),
16802
+ new Vector3()
16803
+ ];
16804
+ ShadowUtils._adjustNearPlane = new Plane(new Vector3());
16805
+ ShadowUtils._adjustFarPlane = new Plane(new Vector3());
16806
+ ShadowUtils._backPlaneFaces = new Array(5);
16807
+ ShadowUtils._edgePlanePoint2 = new Vector3();
16808
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumPlaneNeighbors = [
16809
+ [
16810
+ FrustumFace.Left,
16811
+ FrustumFace.Right,
16812
+ FrustumFace.Top,
16813
+ FrustumFace.Bottom
16814
+ ],
16815
+ [
16816
+ FrustumFace.Left,
16817
+ FrustumFace.Right,
16818
+ FrustumFace.Top,
16819
+ FrustumFace.Bottom
16820
+ ],
16821
+ [
16822
+ FrustumFace.Near,
16823
+ FrustumFace.Far,
16824
+ FrustumFace.Top,
16825
+ FrustumFace.Bottom
16826
+ ],
16827
+ [
16828
+ FrustumFace.Near,
16829
+ FrustumFace.Far,
16830
+ FrustumFace.Top,
16831
+ FrustumFace.Bottom
16832
+ ],
16833
+ [
16834
+ FrustumFace.Near,
16835
+ FrustumFace.Far,
16836
+ FrustumFace.Left,
16837
+ FrustumFace.Right
16838
+ ],
16839
+ [
16840
+ FrustumFace.Near,
16841
+ FrustumFace.Far,
16842
+ FrustumFace.Left,
16843
+ FrustumFace.Right
16844
+ ]
16845
+ ];
16846
+ /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16847
+ [
16848
+ // near, far, left, right, bottom, top
17132
16849
  [
17133
- FrustumFace.Left,
17134
- FrustumFace.Right,
17135
- FrustumFace.Top,
17136
- FrustumFace.Bottom
16850
+ 8,
16851
+ 8
17137
16852
  ],
17138
16853
  [
17139
- FrustumFace.Left,
17140
- FrustumFace.Right,
17141
- FrustumFace.Top,
17142
- FrustumFace.Bottom
16854
+ 8,
16855
+ 8
17143
16856
  ],
17144
16857
  [
17145
- FrustumFace.Near,
17146
- FrustumFace.Far,
17147
- FrustumFace.Top,
17148
- FrustumFace.Bottom
16858
+ 4,
16859
+ 5
17149
16860
  ],
17150
16861
  [
17151
- FrustumFace.Near,
17152
- FrustumFace.Far,
17153
- FrustumFace.Top,
17154
- FrustumFace.Bottom
16862
+ 6,
16863
+ 7
17155
16864
  ],
17156
16865
  [
17157
- FrustumFace.Near,
17158
- FrustumFace.Far,
17159
- FrustumFace.Left,
17160
- FrustumFace.Right
16866
+ 7,
16867
+ 4
17161
16868
  ],
17162
16869
  [
17163
- FrustumFace.Near,
17164
- FrustumFace.Far,
17165
- FrustumFace.Left,
17166
- FrustumFace.Right
16870
+ 5,
16871
+ 6
17167
16872
  ]
17168
- ];
17169
- })();
17170
- (function() {
17171
- /** near, far, left, right, bottom, top */ ShadowUtils._frustumTwoPlaneCorners = [
16873
+ ],
16874
+ [
16875
+ // near, far, left, right, bottom, top
17172
16876
  [
17173
- // near, far, left, right, bottom, top
17174
- [
17175
- 8,
17176
- 8
17177
- ],
17178
- [
17179
- 8,
17180
- 8
17181
- ],
17182
- [
17183
- 4,
17184
- 5
17185
- ],
17186
- [
17187
- 6,
17188
- 7
17189
- ],
17190
- [
17191
- 7,
17192
- 4
17193
- ],
17194
- [
17195
- 5,
17196
- 6
17197
- ]
16877
+ 8,
16878
+ 8
17198
16879
  ],
17199
16880
  [
17200
- // near, far, left, right, bottom, top
17201
- [
17202
- 8,
17203
- 8
17204
- ],
17205
- [
17206
- 8,
17207
- 8
17208
- ],
17209
- [
17210
- 1,
17211
- 0
17212
- ],
17213
- [
17214
- 3,
17215
- 2
17216
- ],
17217
- [
17218
- 0,
17219
- 3
17220
- ],
17221
- [
17222
- 2,
17223
- 1
17224
- ]
16881
+ 8,
16882
+ 8
17225
16883
  ],
17226
16884
  [
17227
- // near, far, left, right, bottom, top
17228
- [
17229
- 5,
17230
- 4
17231
- ],
17232
- [
17233
- 0,
17234
- 1
17235
- ],
17236
- [
17237
- 8,
17238
- 8
17239
- ],
17240
- [
17241
- 8,
17242
- 8
17243
- ],
17244
- [
17245
- 4,
17246
- 0
17247
- ],
17248
- [
17249
- 1,
17250
- 5
17251
- ]
16885
+ 1,
16886
+ 0
17252
16887
  ],
17253
16888
  [
17254
- // near, far, left, right, bottom, top
17255
- [
17256
- 7,
17257
- 6
17258
- ],
17259
- [
17260
- 2,
17261
- 3
17262
- ],
17263
- [
17264
- 8,
17265
- 8
17266
- ],
17267
- [
17268
- 8,
17269
- 8
17270
- ],
17271
- [
17272
- 3,
17273
- 7
17274
- ],
17275
- [
17276
- 6,
17277
- 2
17278
- ]
16889
+ 3,
16890
+ 2
17279
16891
  ],
17280
16892
  [
17281
- // near, far, left, right, bottom, top
17282
- [
17283
- 4,
17284
- 7
17285
- ],
17286
- [
17287
- 3,
17288
- 0
17289
- ],
17290
- [
17291
- 0,
17292
- 4
17293
- ],
17294
- [
17295
- 7,
17296
- 3
17297
- ],
17298
- [
17299
- 8,
17300
- 8
17301
- ],
17302
- [
17303
- 8,
17304
- 8
17305
- ]
16893
+ 0,
16894
+ 3
17306
16895
  ],
17307
16896
  [
17308
- // near, far, left, right, bottom, top
17309
- [
17310
- 6,
17311
- 5
17312
- ],
17313
- [
17314
- 1,
17315
- 2
17316
- ],
17317
- [
17318
- 5,
17319
- 1
17320
- ],
17321
- [
17322
- 2,
17323
- 6
17324
- ],
17325
- [
17326
- 8,
17327
- 8
17328
- ],
17329
- [
17330
- 8,
17331
- 8
17332
- ]
16897
+ 2,
16898
+ 1
17333
16899
  ]
17334
- ];
17335
- })();
17336
- (function() {
17337
- //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.
17338
- ShadowUtils.atlasBorderSize = 4.0;
17339
- })();
16900
+ ],
16901
+ [
16902
+ // near, far, left, right, bottom, top
16903
+ [
16904
+ 5,
16905
+ 4
16906
+ ],
16907
+ [
16908
+ 0,
16909
+ 1
16910
+ ],
16911
+ [
16912
+ 8,
16913
+ 8
16914
+ ],
16915
+ [
16916
+ 8,
16917
+ 8
16918
+ ],
16919
+ [
16920
+ 4,
16921
+ 0
16922
+ ],
16923
+ [
16924
+ 1,
16925
+ 5
16926
+ ]
16927
+ ],
16928
+ [
16929
+ // near, far, left, right, bottom, top
16930
+ [
16931
+ 7,
16932
+ 6
16933
+ ],
16934
+ [
16935
+ 2,
16936
+ 3
16937
+ ],
16938
+ [
16939
+ 8,
16940
+ 8
16941
+ ],
16942
+ [
16943
+ 8,
16944
+ 8
16945
+ ],
16946
+ [
16947
+ 3,
16948
+ 7
16949
+ ],
16950
+ [
16951
+ 6,
16952
+ 2
16953
+ ]
16954
+ ],
16955
+ [
16956
+ // near, far, left, right, bottom, top
16957
+ [
16958
+ 4,
16959
+ 7
16960
+ ],
16961
+ [
16962
+ 3,
16963
+ 0
16964
+ ],
16965
+ [
16966
+ 0,
16967
+ 4
16968
+ ],
16969
+ [
16970
+ 7,
16971
+ 3
16972
+ ],
16973
+ [
16974
+ 8,
16975
+ 8
16976
+ ],
16977
+ [
16978
+ 8,
16979
+ 8
16980
+ ]
16981
+ ],
16982
+ [
16983
+ // near, far, left, right, bottom, top
16984
+ [
16985
+ 6,
16986
+ 5
16987
+ ],
16988
+ [
16989
+ 1,
16990
+ 2
16991
+ ],
16992
+ [
16993
+ 5,
16994
+ 1
16995
+ ],
16996
+ [
16997
+ 2,
16998
+ 6
16999
+ ],
17000
+ [
17001
+ 8,
17002
+ 8
17003
+ ],
17004
+ [
17005
+ 8,
17006
+ 8
17007
+ ]
17008
+ ]
17009
+ ];
17010
+ //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.
17011
+ ShadowUtils.atlasBorderSize = 4.0;
17340
17012
 
17341
17013
  /**
17342
17014
  * Cascade shadow caster.
@@ -17577,45 +17249,19 @@ var /**
17577
17249
  };
17578
17250
  return CascadedShadowCasterPass;
17579
17251
  }();
17580
- (function() {
17581
- CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17582
- })();
17583
- (function() {
17584
- CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17585
- })();
17586
- (function() {
17587
- CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17588
- })();
17589
- (function() {
17590
- CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17591
- })();
17592
- (function() {
17593
- CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17594
- })();
17595
- (function() {
17596
- CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17597
- })();
17598
- (function() {
17599
- CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17600
- })();
17601
- (function() {
17602
- CascadedShadowCasterPass._maxCascades = 4;
17603
- })();
17604
- (function() {
17605
- CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17606
- })();
17607
- (function() {
17608
- CascadedShadowCasterPass._viewport = new Vector4(0, 0, 1, 1);
17609
- })();
17610
- (function() {
17611
- CascadedShadowCasterPass._clearColor = new Color$1(1, 1, 1, 1);
17612
- })();
17613
- (function() {
17614
- CascadedShadowCasterPass._tempVector = new Vector3();
17615
- })();
17616
- (function() {
17617
- CascadedShadowCasterPass._tempMatrix0 = new Matrix();
17618
- })();
17252
+ CascadedShadowCasterPass._lightShadowBiasProperty = Shader.getPropertyByName("u_shadowBias");
17253
+ CascadedShadowCasterPass._lightDirectionProperty = Shader.getPropertyByName("u_lightDirection");
17254
+ CascadedShadowCasterPass._shadowMatricesProperty = Shader.getPropertyByName("u_shadowMatrices");
17255
+ CascadedShadowCasterPass._shadowMapSize = Shader.getPropertyByName("u_shadowMapSize");
17256
+ CascadedShadowCasterPass._shadowInfosProperty = Shader.getPropertyByName("u_shadowInfo");
17257
+ CascadedShadowCasterPass._shadowMapsProperty = Shader.getPropertyByName("u_shadowMap");
17258
+ CascadedShadowCasterPass._shadowSplitSpheresProperty = Shader.getPropertyByName("u_shadowSplitSpheres");
17259
+ CascadedShadowCasterPass._maxCascades = 4;
17260
+ CascadedShadowCasterPass._cascadesSplitDistance = new Array(CascadedShadowCasterPass._maxCascades + 1);
17261
+ CascadedShadowCasterPass._viewport = new Vector4(0, 0, 1, 1);
17262
+ CascadedShadowCasterPass._clearColor = new Color$1(1, 1, 1, 1);
17263
+ CascadedShadowCasterPass._tempVector = new Vector3();
17264
+ CascadedShadowCasterPass._tempMatrix0 = new Matrix();
17619
17265
 
17620
17266
  var passNum = 0;
17621
17267
  /**
@@ -17860,25 +17506,15 @@ var passNum = 0;
17860
17506
  ]);
17861
17507
  return BasicRenderPipeline;
17862
17508
  }();
17863
- (function() {
17864
- BasicRenderPipeline._tempVector0 = new Vector3();
17865
- })();
17866
- (function() {
17867
- BasicRenderPipeline._tempVector1 = new Vector3();
17868
- })();
17509
+ BasicRenderPipeline._tempVector0 = new Vector3();
17510
+ BasicRenderPipeline._tempVector1 = new Vector3();
17869
17511
 
17870
17512
  var _Camera;
17871
17513
  var MathTemp = function MathTemp() {
17872
17514
  };
17873
- (function() {
17874
- MathTemp.tempVec4 = new Vector4();
17875
- })();
17876
- (function() {
17877
- MathTemp.tempVec3 = new Vector3();
17878
- })();
17879
- (function() {
17880
- MathTemp.tempVec2 = new Vector2();
17881
- })();
17515
+ MathTemp.tempVec4 = new Vector4();
17516
+ MathTemp.tempVec3 = new Vector3();
17517
+ MathTemp.tempVec2 = new Vector2();
17882
17518
  var Camera = (_Camera = /*#__PURE__*/ function(Component) {
17883
17519
  _inherits(Camera1, Component);
17884
17520
  function Camera1(entity) {
@@ -17895,8 +17531,6 @@ var Camera = (_Camera = /*#__PURE__*/ function(Component) {
17895
17531
  * @remarks Support bit manipulation, corresponding to `Layer`.
17896
17532
  */ _this.cullingMask = Layer.Everything;
17897
17533
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
17898
- /** @internal */ _this._frustum = new BoundingFrustum();
17899
- /** @internal */ _this._virtualCamera = new VirtualCamera();
17900
17534
  _this._shaderData = new ShaderData(ShaderDataGroup.Camera);
17901
17535
  _this._isProjMatSetting = false;
17902
17536
  _this._nearClipPlane = 0.1;
@@ -17908,6 +17542,8 @@ var Camera = (_Camera = /*#__PURE__*/ function(Component) {
17908
17542
  _this._isFrustumProjectDirty = true;
17909
17543
  _this._customAspectRatio = undefined;
17910
17544
  _this._renderTarget = null;
17545
+ /** @internal */ _this._frustum = new BoundingFrustum();
17546
+ /** @internal */ _this._virtualCamera = new VirtualCamera();
17911
17547
  _this._viewport = new Vector4(0, 0, 1, 1);
17912
17548
  _this._inverseProjectionMatrix = new Matrix();
17913
17549
  _this._lastAspectSize = new Vector2(0, 0);
@@ -18320,45 +17956,41 @@ var Camera = (_Camera = /*#__PURE__*/ function(Component) {
18320
17956
  }
18321
17957
  ]);
18322
17958
  return Camera1;
18323
- }(Component), function() {
18324
- /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat");
18325
- }(), function() {
18326
- /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos");
18327
- }(), _Camera);
18328
- __decorate([
17959
+ }(Component), /** @internal */ _Camera._inverseViewMatrixProperty = Shader.getPropertyByName("u_viewInvMat"), /** @internal */ _Camera._cameraPositionProperty = Shader.getPropertyByName("u_cameraPos"), _Camera);
17960
+ _ts_decorate([
18329
17961
  deepClone
18330
17962
  ], Camera.prototype, "_frustum", void 0);
18331
- __decorate([
17963
+ _ts_decorate([
18332
17964
  ignoreClone
18333
17965
  ], Camera.prototype, "_renderPipeline", void 0);
18334
- __decorate([
17966
+ _ts_decorate([
18335
17967
  ignoreClone
18336
17968
  ], Camera.prototype, "_virtualCamera", void 0);
18337
- __decorate([
17969
+ _ts_decorate([
18338
17970
  ignoreClone
18339
17971
  ], Camera.prototype, "_frustumViewChangeFlag", void 0);
18340
- __decorate([
17972
+ _ts_decorate([
18341
17973
  ignoreClone
18342
17974
  ], Camera.prototype, "_transform", void 0);
18343
- __decorate([
17975
+ _ts_decorate([
18344
17976
  ignoreClone
18345
17977
  ], Camera.prototype, "_isViewMatrixDirty", void 0);
18346
- __decorate([
17978
+ _ts_decorate([
18347
17979
  ignoreClone
18348
17980
  ], Camera.prototype, "_isInvViewProjDirty", void 0);
18349
- __decorate([
17981
+ _ts_decorate([
18350
17982
  deepClone
18351
17983
  ], Camera.prototype, "_viewport", void 0);
18352
- __decorate([
17984
+ _ts_decorate([
18353
17985
  deepClone
18354
17986
  ], Camera.prototype, "_inverseProjectionMatrix", void 0);
18355
- __decorate([
17987
+ _ts_decorate([
18356
17988
  deepClone
18357
17989
  ], Camera.prototype, "_lastAspectSize", void 0);
18358
- __decorate([
17990
+ _ts_decorate([
18359
17991
  deepClone
18360
17992
  ], Camera.prototype, "_invViewProjMat", void 0);
18361
- Camera = __decorate([
17993
+ Camera = _ts_decorate([
18362
17994
  dependentComponents(Transform)
18363
17995
  ], Camera);
18364
17996
 
@@ -18392,18 +18024,10 @@ var defaultInterval = 500;
18392
18024
  var _config_type;
18393
18025
  config.type = (_config_type = config.type) != null ? _config_type : getMimeTypeFromUrl(url);
18394
18026
  var realRequest = config.type === "image" ? requestImage : requestRes;
18395
- var lastError;
18396
18027
  var executor = new MultiExecutor(function() {
18397
- return realRequest(url, config).onProgress(setProgress).then(function(res) {
18398
- resolve(res);
18399
- executor.stop();
18400
- }).catch(function(err) {
18401
- return lastError = err;
18402
- });
18028
+ return realRequest(url, config).onProgress(setProgress);
18403
18029
  }, retryCount, retryInterval);
18404
- executor.start(function() {
18405
- reject(lastError);
18406
- });
18030
+ executor.start().onError(reject).onComplete(resolve);
18407
18031
  });
18408
18032
  }
18409
18033
  function requestImage(url, config) {
@@ -18490,23 +18114,33 @@ var MultiExecutor = /*#__PURE__*/ function() {
18490
18114
  this.exec = this.exec.bind(this);
18491
18115
  }
18492
18116
  var _proto = MultiExecutor.prototype;
18493
- _proto.start = function start(done) {
18494
- this.done = done;
18117
+ _proto.start = function start() {
18495
18118
  this.exec();
18119
+ return this;
18496
18120
  };
18497
- _proto.stop = function stop() {
18498
- clearTimeout(this._timeoutId);
18121
+ _proto.onComplete = function onComplete(func) {
18122
+ this._onComplete = func;
18123
+ return this;
18124
+ };
18125
+ _proto.onError = function onError(func) {
18126
+ this._onError = func;
18127
+ return this;
18128
+ };
18129
+ _proto.cancel = function cancel() {
18130
+ window.clearTimeout(this._timeoutId);
18499
18131
  };
18500
18132
  _proto.exec = function exec() {
18501
18133
  var _this = this;
18502
18134
  if (this._currentCount >= this.totalCount) {
18503
- this.done && this.done();
18135
+ this._onError && this._onError(this._error);
18504
18136
  return;
18505
18137
  }
18506
18138
  this._currentCount++;
18507
- this.execFunc(this._currentCount).then(function() {
18508
- //@ts-ignore
18509
- _this._timeoutId = setTimeout(_this.exec, _this.interval);
18139
+ this.execFunc(this._currentCount).then(function(result) {
18140
+ return _this._onComplete && _this._onComplete(result);
18141
+ }).catch(function(e) {
18142
+ _this._error = e;
18143
+ _this._timeoutId = window.setTimeout(_this.exec, _this.interval);
18510
18144
  });
18511
18145
  };
18512
18146
  return MultiExecutor;
@@ -18535,9 +18169,7 @@ var MultiExecutor = /*#__PURE__*/ function() {
18535
18169
  };
18536
18170
  return Loader;
18537
18171
  }();
18538
- (function() {
18539
- Loader._engineObjects = {};
18540
- })();
18172
+ Loader._engineObjects = {};
18541
18173
 
18542
18174
  /**
18543
18175
  * Asset Type.
@@ -18790,45 +18422,19 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
18790
18422
  ]);
18791
18423
  return BaseMaterial;
18792
18424
  }(Material);
18793
- (function() {
18794
- BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18795
- })();
18796
- (function() {
18797
- BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18798
- })();
18799
- (function() {
18800
- BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18801
- })();
18802
- (function() {
18803
- BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18804
- })();
18805
- (function() {
18806
- BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18807
- })();
18808
- (function() {
18809
- BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18810
- })();
18811
- (function() {
18812
- BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18813
- })();
18814
- (function() {
18815
- BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18816
- })();
18817
- (function() {
18818
- BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18819
- })();
18820
- (function() {
18821
- BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18822
- })();
18823
- (function() {
18824
- BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18825
- })();
18826
- (function() {
18827
- BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18828
- })();
18829
- (function() {
18830
- BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18831
- })();
18425
+ BaseMaterial._baseColorProp = Shader.getPropertyByName("u_baseColor");
18426
+ BaseMaterial._baseTextureProp = Shader.getPropertyByName("u_baseTexture");
18427
+ BaseMaterial._baseTextureMacro = Shader.getMacroByName("BASETEXTURE");
18428
+ BaseMaterial._tilingOffsetProp = Shader.getPropertyByName("u_tilingOffset");
18429
+ BaseMaterial._normalTextureProp = Shader.getPropertyByName("u_normalTexture");
18430
+ BaseMaterial._normalIntensityProp = Shader.getPropertyByName("u_normalIntensity");
18431
+ BaseMaterial._normalTextureMacro = Shader.getMacroByName("NORMALTEXTURE");
18432
+ BaseMaterial._emissiveColorProp = Shader.getPropertyByName("u_emissiveColor");
18433
+ BaseMaterial._emissiveTextureProp = Shader.getPropertyByName("u_emissiveTexture");
18434
+ BaseMaterial._emissiveTextureMacro = Shader.getMacroByName("EMISSIVETEXTURE");
18435
+ BaseMaterial._transparentMacro = Shader.getMacroByName("OASIS_TRANSPARENT");
18436
+ BaseMaterial._alphaCutoffProp = Shader.getPropertyByName("u_alphaCutoff");
18437
+ BaseMaterial._alphaCutoffMacro = Shader.getMacroByName("ALPHA_CUTOFF");
18832
18438
 
18833
18439
  /**
18834
18440
  * Blinn-phong Material.
@@ -19002,15 +18608,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19002
18608
  ]);
19003
18609
  return BlinnPhongMaterial;
19004
18610
  }(BaseMaterial);
19005
- (function() {
19006
- BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
19007
- })();
19008
- (function() {
19009
- BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
19010
- })();
19011
- (function() {
19012
- BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
19013
- })();
18611
+ BlinnPhongMaterial._specularColorProp = Shader.getPropertyByName("u_specularColor");
18612
+ BlinnPhongMaterial._shininessProp = Shader.getPropertyByName("u_shininess");
18613
+ BlinnPhongMaterial._specularTextureProp = Shader.getPropertyByName("u_specularTexture");
19014
18614
 
19015
18615
  /**
19016
18616
  * Texture UV coordinate.
@@ -19270,30 +18870,14 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19270
18870
  ]);
19271
18871
  return PBRBaseMaterial;
19272
18872
  }(BaseMaterial);
19273
- (function() {
19274
- PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
19275
- })();
19276
- (function() {
19277
- PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
19278
- })();
19279
- (function() {
19280
- PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
19281
- })();
19282
- (function() {
19283
- PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
19284
- })();
19285
- (function() {
19286
- PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
19287
- })();
19288
- (function() {
19289
- PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
19290
- })();
19291
- (function() {
19292
- PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
19293
- })();
19294
- (function() {
19295
- PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
19296
- })();
18873
+ PBRBaseMaterial._occlusionTextureIntensityProp = Shader.getPropertyByName("u_occlusionIntensity");
18874
+ PBRBaseMaterial._occlusionTextureCoordProp = Shader.getPropertyByName("u_occlusionTextureCoord");
18875
+ PBRBaseMaterial._occlusionTextureProp = Shader.getPropertyByName("u_occlusionTexture");
18876
+ PBRBaseMaterial._clearCoatProp = Shader.getPropertyByName("u_clearCoat");
18877
+ PBRBaseMaterial._clearCoatTextureProp = Shader.getPropertyByName("u_clearCoatTexture");
18878
+ PBRBaseMaterial._clearCoatRoughnessProp = Shader.getPropertyByName("u_clearCoatRoughness");
18879
+ PBRBaseMaterial._clearCoatRoughnessTextureProp = Shader.getPropertyByName("u_clearCoatRoughnessTexture");
18880
+ PBRBaseMaterial._clearCoatNormalTextureProp = Shader.getPropertyByName("u_clearCoatNormalTexture");
19297
18881
 
19298
18882
  /**
19299
18883
  * PBR (Metallic-Roughness Workflow) Material.
@@ -19372,18 +18956,10 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19372
18956
  ]);
19373
18957
  return PBRMaterial;
19374
18958
  }(PBRBaseMaterial);
19375
- (function() {
19376
- PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
19377
- })();
19378
- (function() {
19379
- PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
19380
- })();
19381
- (function() {
19382
- PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
19383
- })();
19384
- (function() {
19385
- PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
19386
- })();
18959
+ PBRMaterial._metallicProp = Shader.getPropertyByName("u_metal");
18960
+ PBRMaterial._roughnessProp = Shader.getPropertyByName("u_roughness");
18961
+ PBRMaterial._roughnessMetallicTextureProp = Shader.getPropertyByName("u_roughnessMetallicTexture");
18962
+ PBRMaterial._iorProp = Shader.getPropertyByName("material_IOR");
19387
18963
 
19388
18964
  /**
19389
18965
  * PBR (Specular-Glossiness Workflow) Material.
@@ -19450,18 +19026,10 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19450
19026
  ]);
19451
19027
  return PBRSpecularMaterial;
19452
19028
  }(PBRBaseMaterial);
19453
- (function() {
19454
- PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
19455
- })();
19456
- (function() {
19457
- PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
19458
- })();
19459
- (function() {
19460
- PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
19461
- })();
19462
- (function() {
19463
- PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19464
- })();
19029
+ PBRSpecularMaterial._specularColorProp = Shader.getPropertyByName("u_PBRSpecularColor");
19030
+ PBRSpecularMaterial._glossinessProp = Shader.getPropertyByName("u_glossiness");
19031
+ PBRSpecularMaterial._specularGlossinessTextureProp = Shader.getPropertyByName("u_specularGlossinessTexture");
19032
+ PBRSpecularMaterial._specularGlossinessTextureMacro = Shader.getMacroByName("SPECULARGLOSSINESSTEXTURE");
19465
19033
 
19466
19034
  /**
19467
19035
  * Unlit Material.
@@ -20140,10 +19708,8 @@ var SlicedSpriteAssembler = (_SlicedSpriteAssembler = /*#__PURE__*/ function() {
20140
19708
  };
20141
19709
  SlicedSpriteAssembler1.updateUVs = function updateUVs(renderer) {};
20142
19710
  return SlicedSpriteAssembler1;
20143
- }(), function() {
20144
- _SlicedSpriteAssembler._worldMatrix = new Matrix();
20145
- }(), _SlicedSpriteAssembler);
20146
- SlicedSpriteAssembler = __decorate([
19711
+ }(), _SlicedSpriteAssembler._worldMatrix = new Matrix(), _SlicedSpriteAssembler);
19712
+ SlicedSpriteAssembler = _ts_decorate([
20147
19713
  StaticInterfaceImplement()
20148
19714
  ], SlicedSpriteAssembler);
20149
19715
 
@@ -20453,49 +20019,47 @@ SlicedSpriteAssembler = __decorate([
20453
20019
  ]);
20454
20020
  return SpriteRenderer;
20455
20021
  }(Renderer);
20456
- (function() {
20457
- /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20458
- })();
20459
- __decorate([
20022
+ /** @internal */ SpriteRenderer._textureProperty = Shader.getPropertyByName("u_spriteTexture");
20023
+ _ts_decorate([
20460
20024
  ignoreClone
20461
20025
  ], SpriteRenderer.prototype, "_renderData", void 0);
20462
- __decorate([
20026
+ _ts_decorate([
20463
20027
  ignoreClone
20464
20028
  ], SpriteRenderer.prototype, "_drawMode", void 0);
20465
- __decorate([
20029
+ _ts_decorate([
20466
20030
  ignoreClone
20467
20031
  ], SpriteRenderer.prototype, "_assembler", void 0);
20468
- __decorate([
20032
+ _ts_decorate([
20469
20033
  deepClone
20470
20034
  ], SpriteRenderer.prototype, "_color", void 0);
20471
- __decorate([
20035
+ _ts_decorate([
20472
20036
  ignoreClone
20473
20037
  ], SpriteRenderer.prototype, "_sprite", void 0);
20474
- __decorate([
20038
+ _ts_decorate([
20475
20039
  ignoreClone
20476
20040
  ], SpriteRenderer.prototype, "_automaticWidth", void 0);
20477
- __decorate([
20041
+ _ts_decorate([
20478
20042
  ignoreClone
20479
20043
  ], SpriteRenderer.prototype, "_automaticHeight", void 0);
20480
- __decorate([
20044
+ _ts_decorate([
20481
20045
  assignmentClone
20482
20046
  ], SpriteRenderer.prototype, "_customWidth", void 0);
20483
- __decorate([
20047
+ _ts_decorate([
20484
20048
  assignmentClone
20485
20049
  ], SpriteRenderer.prototype, "_customHeight", void 0);
20486
- __decorate([
20050
+ _ts_decorate([
20487
20051
  assignmentClone
20488
20052
  ], SpriteRenderer.prototype, "_flipX", void 0);
20489
- __decorate([
20053
+ _ts_decorate([
20490
20054
  assignmentClone
20491
20055
  ], SpriteRenderer.prototype, "_flipY", void 0);
20492
- __decorate([
20056
+ _ts_decorate([
20493
20057
  assignmentClone
20494
20058
  ], SpriteRenderer.prototype, "_maskLayer", void 0);
20495
- __decorate([
20059
+ _ts_decorate([
20496
20060
  assignmentClone
20497
20061
  ], SpriteRenderer.prototype, "_maskInteraction", void 0);
20498
- __decorate([
20062
+ _ts_decorate([
20499
20063
  ignoreClone
20500
20064
  ], SpriteRenderer.prototype, "_onSpriteChange", null);
20501
20065
  var /**
@@ -20520,16 +20084,14 @@ var /**
20520
20084
  ];
20521
20085
  this.renderData = new RenderData2D(4, positions, null, CharRenderData.triangles, null);
20522
20086
  };
20523
- (function() {
20524
- CharRenderData.triangles = [
20525
- 0,
20526
- 2,
20527
- 1,
20528
- 2,
20529
- 0,
20530
- 3
20531
- ];
20532
- })();
20087
+ CharRenderData.triangles = [
20088
+ 0,
20089
+ 2,
20090
+ 1,
20091
+ 2,
20092
+ 0,
20093
+ 3
20094
+ ];
20533
20095
 
20534
20096
  /**
20535
20097
  * @internal
@@ -20853,37 +20415,23 @@ var /**
20853
20415
  };
20854
20416
  return TextUtils;
20855
20417
  }();
20856
- (function() {
20857
- /** @internal */ TextUtils._genericFontFamilies = [
20858
- "serif",
20859
- "sans-serif",
20860
- "monospace",
20861
- "cursive",
20862
- "fantasy",
20863
- "system-ui",
20864
- "math",
20865
- "emoji",
20866
- "fangsong"
20867
- ];
20868
- })();
20869
- (function() {
20870
- /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20871
- })();
20872
- (function() {
20873
- TextUtils._measureBaseline = "M";
20874
- })();
20875
- (function() {
20876
- TextUtils._heightMultiplier = 2;
20877
- })();
20878
- (function() {
20879
- TextUtils._baselineMultiplier = 1.4;
20880
- })();
20881
- (function() {
20882
- TextUtils._fontSizeInfoCache = {};
20883
- })();
20884
- (function() {
20885
- TextUtils._textContext = null;
20886
- })();
20418
+ /** @internal */ TextUtils._genericFontFamilies = [
20419
+ "serif",
20420
+ "sans-serif",
20421
+ "monospace",
20422
+ "cursive",
20423
+ "fantasy",
20424
+ "system-ui",
20425
+ "math",
20426
+ "emoji",
20427
+ "fangsong"
20428
+ ];
20429
+ /** These characters are all tall to help calculate the height required for text. */ TextUtils._measureString = "|\xc9q\xc5";
20430
+ TextUtils._measureBaseline = "M";
20431
+ TextUtils._heightMultiplier = 2;
20432
+ TextUtils._baselineMultiplier = 1.4;
20433
+ TextUtils._fontSizeInfoCache = {};
20434
+ TextUtils._textContext = null;
20887
20435
 
20888
20436
  /**
20889
20437
  * Renders a text for 2D graphics.
@@ -21363,67 +20911,61 @@ var /**
21363
20911
  ]);
21364
20912
  return TextRenderer;
21365
20913
  }(Renderer);
21366
- (function() {
21367
- TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
21368
- })();
21369
- (function() {
21370
- TextRenderer._tempVec30 = new Vector3();
21371
- })();
21372
- (function() {
21373
- TextRenderer._tempVec31 = new Vector3();
21374
- })();
21375
- __decorate([
20914
+ TextRenderer._charRenderDataPool = new CharRenderDataPool(CharRenderData, 50);
20915
+ TextRenderer._tempVec30 = new Vector3();
20916
+ TextRenderer._tempVec31 = new Vector3();
20917
+ _ts_decorate([
21376
20918
  assignmentClone
21377
20919
  ], TextRenderer.prototype, "_subFont", void 0);
21378
- __decorate([
20920
+ _ts_decorate([
21379
20921
  ignoreClone
21380
20922
  ], TextRenderer.prototype, "_charRenderDatas", void 0);
21381
- __decorate([
20923
+ _ts_decorate([
21382
20924
  ignoreClone
21383
20925
  ], TextRenderer.prototype, "_dirtyFlag", void 0);
21384
- __decorate([
20926
+ _ts_decorate([
21385
20927
  deepClone
21386
20928
  ], TextRenderer.prototype, "_color", void 0);
21387
- __decorate([
20929
+ _ts_decorate([
21388
20930
  assignmentClone
21389
20931
  ], TextRenderer.prototype, "_text", void 0);
21390
- __decorate([
20932
+ _ts_decorate([
21391
20933
  assignmentClone
21392
20934
  ], TextRenderer.prototype, "_width", void 0);
21393
- __decorate([
20935
+ _ts_decorate([
21394
20936
  assignmentClone
21395
20937
  ], TextRenderer.prototype, "_height", void 0);
21396
- __decorate([
20938
+ _ts_decorate([
21397
20939
  ignoreClone
21398
20940
  ], TextRenderer.prototype, "_localBounds", void 0);
21399
- __decorate([
20941
+ _ts_decorate([
21400
20942
  assignmentClone
21401
20943
  ], TextRenderer.prototype, "_font", void 0);
21402
- __decorate([
20944
+ _ts_decorate([
21403
20945
  assignmentClone
21404
20946
  ], TextRenderer.prototype, "_fontSize", void 0);
21405
- __decorate([
20947
+ _ts_decorate([
21406
20948
  assignmentClone
21407
20949
  ], TextRenderer.prototype, "_fontStyle", void 0);
21408
- __decorate([
20950
+ _ts_decorate([
21409
20951
  assignmentClone
21410
20952
  ], TextRenderer.prototype, "_lineSpacing", void 0);
21411
- __decorate([
20953
+ _ts_decorate([
21412
20954
  assignmentClone
21413
20955
  ], TextRenderer.prototype, "_horizontalAlignment", void 0);
21414
- __decorate([
20956
+ _ts_decorate([
21415
20957
  assignmentClone
21416
20958
  ], TextRenderer.prototype, "_verticalAlignment", void 0);
21417
- __decorate([
20959
+ _ts_decorate([
21418
20960
  assignmentClone
21419
20961
  ], TextRenderer.prototype, "_enableWrapping", void 0);
21420
- __decorate([
20962
+ _ts_decorate([
21421
20963
  assignmentClone
21422
20964
  ], TextRenderer.prototype, "_overflowMode", void 0);
21423
- __decorate([
20965
+ _ts_decorate([
21424
20966
  assignmentClone
21425
20967
  ], TextRenderer.prototype, "_maskInteraction", void 0);
21426
- __decorate([
20968
+ _ts_decorate([
21427
20969
  assignmentClone
21428
20970
  ], TextRenderer.prototype, "_maskLayer", void 0);
21429
20971
  var DirtyFlag;
@@ -21578,9 +21120,7 @@ var DirtyFlag;
21578
21120
  };
21579
21121
  return AnimationCurveOwner;
21580
21122
  }();
21581
- (function() {
21582
- AnimationCurveOwner._assemblerMap = new Map();
21583
- })();
21123
+ AnimationCurveOwner._assemblerMap = new Map();
21584
21124
 
21585
21125
  /**
21586
21126
  * @internal
@@ -21639,16 +21179,22 @@ AnimationCurveOwner.registerAssembler(Transform, "scale", ScaleAnimationCurveOwn
21639
21179
  /**
21640
21180
  * @internal
21641
21181
  */ var BlendShapeWeightsAnimationCurveOwnerAssembler = /*#__PURE__*/ function() {
21642
- function BlendShapeWeightsAnimationCurveOwnerAssembler() {}
21182
+ function BlendShapeWeightsAnimationCurveOwnerAssembler() {
21183
+ this._skinnedMeshRenderer = [];
21184
+ }
21643
21185
  var _proto = BlendShapeWeightsAnimationCurveOwnerAssembler.prototype;
21644
21186
  _proto.initialize = function initialize(owner) {
21645
- this._skinnedMeshRenderer = owner.target.getComponent(SkinnedMeshRenderer);
21187
+ // @todo: Compatible with multiple SkinnedMeshRenderer in a entity, optimize later.
21188
+ owner.target.getComponents(SkinnedMeshRenderer, this._skinnedMeshRenderer);
21646
21189
  };
21647
21190
  _proto.getTargetValue = function getTargetValue() {
21648
- return this._skinnedMeshRenderer.blendShapeWeights;
21191
+ return this._skinnedMeshRenderer[0].blendShapeWeights;
21649
21192
  };
21650
21193
  _proto.setTargetValue = function setTargetValue(value) {
21651
- this._skinnedMeshRenderer.blendShapeWeights = value;
21194
+ var skinnedMeshRenderer = this._skinnedMeshRenderer;
21195
+ for(var i = 0, n = skinnedMeshRenderer.length; i < n; i++){
21196
+ skinnedMeshRenderer[i].blendShapeWeights = value;
21197
+ }
21652
21198
  };
21653
21199
  return BlendShapeWeightsAnimationCurveOwnerAssembler;
21654
21200
  }();
@@ -22052,12 +21598,8 @@ var AnimationArrayCurve = (_AnimationArrayCurve = /*#__PURE__*/ function(Animati
22052
21598
  return out;
22053
21599
  };
22054
21600
  return AnimationArrayCurve;
22055
- }(AnimationCurve), function() {
22056
- /** @internal */ _AnimationArrayCurve._isReferenceType = true;
22057
- }(), function() {
22058
- /** @internal */ _AnimationArrayCurve._isInterpolationType = true;
22059
- }(), _AnimationArrayCurve);
22060
- AnimationArrayCurve = __decorate([
21601
+ }(AnimationCurve), /** @internal */ _AnimationArrayCurve._isReferenceType = true, /** @internal */ _AnimationArrayCurve._isInterpolationType = true, _AnimationArrayCurve);
21602
+ AnimationArrayCurve = _ts_decorate([
22061
21603
  StaticInterfaceImplement()
22062
21604
  ], AnimationArrayCurve);
22063
21605
 
@@ -22114,12 +21656,8 @@ var AnimationBoolCurve = (_AnimationBoolCurve = /*#__PURE__*/ function(Animation
22114
21656
  return frame.value;
22115
21657
  };
22116
21658
  return AnimationBoolCurve;
22117
- }(AnimationCurve), function() {
22118
- /** @internal */ _AnimationBoolCurve._isReferenceType = false;
22119
- }(), function() {
22120
- /** @internal */ _AnimationBoolCurve._isInterpolationType = false;
22121
- }(), _AnimationBoolCurve);
22122
- AnimationBoolCurve = __decorate([
21659
+ }(AnimationCurve), /** @internal */ _AnimationBoolCurve._isReferenceType = false, /** @internal */ _AnimationBoolCurve._isInterpolationType = false, _AnimationBoolCurve);
21660
+ AnimationBoolCurve = _ts_decorate([
22123
21661
  StaticInterfaceImplement()
22124
21662
  ], AnimationBoolCurve);
22125
21663
 
@@ -22216,12 +21754,8 @@ var AnimationColorCurve = (_AnimationColorCurve = /*#__PURE__*/ function(Animati
22216
21754
  return out;
22217
21755
  };
22218
21756
  return AnimationColorCurve;
22219
- }(AnimationCurve), function() {
22220
- /** @internal */ _AnimationColorCurve._isReferenceType = true;
22221
- }(), function() {
22222
- /** @internal */ _AnimationColorCurve._isInterpolationType = true;
22223
- }(), _AnimationColorCurve);
22224
- AnimationColorCurve = __decorate([
21757
+ }(AnimationCurve), /** @internal */ _AnimationColorCurve._isReferenceType = true, /** @internal */ _AnimationColorCurve._isInterpolationType = true, _AnimationColorCurve);
21758
+ AnimationColorCurve = _ts_decorate([
22225
21759
  StaticInterfaceImplement()
22226
21760
  ], AnimationColorCurve);
22227
21761
 
@@ -22322,12 +21856,8 @@ var AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ functi
22322
21856
  return out;
22323
21857
  };
22324
21858
  return AnimationFloatArrayCurve;
22325
- }(AnimationCurve), function() {
22326
- /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true;
22327
- }(), function() {
22328
- /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true;
22329
- }(), _AnimationFloatArrayCurve);
22330
- AnimationFloatArrayCurve = __decorate([
21859
+ }(AnimationCurve), /** @internal */ _AnimationFloatArrayCurve._isReferenceType = true, /** @internal */ _AnimationFloatArrayCurve._isInterpolationType = true, _AnimationFloatArrayCurve);
21860
+ AnimationFloatArrayCurve = _ts_decorate([
22331
21861
  StaticInterfaceImplement()
22332
21862
  ], AnimationFloatArrayCurve);
22333
21863
 
@@ -22396,12 +21926,8 @@ var AnimationFloatCurve = (_AnimationFloatCurve = /*#__PURE__*/ function(Animati
22396
21926
  }
22397
21927
  };
22398
21928
  return AnimationFloatCurve;
22399
- }(AnimationCurve), function() {
22400
- /** @internal */ _AnimationFloatCurve._isReferenceType = false;
22401
- }(), function() {
22402
- /** @internal */ _AnimationFloatCurve._isInterpolationType = true;
22403
- }(), _AnimationFloatCurve);
22404
- AnimationFloatCurve = __decorate([
21929
+ }(AnimationCurve), /** @internal */ _AnimationFloatCurve._isReferenceType = false, /** @internal */ _AnimationFloatCurve._isInterpolationType = true, _AnimationFloatCurve);
21930
+ AnimationFloatCurve = _ts_decorate([
22405
21931
  StaticInterfaceImplement()
22406
21932
  ], AnimationFloatCurve);
22407
21933
 
@@ -22503,14 +22029,8 @@ var AnimationQuaternionCurve = (_AnimationQuaternionCurve = /*#__PURE__*/ functi
22503
22029
  return out;
22504
22030
  };
22505
22031
  return AnimationQuaternionCurve1;
22506
- }(AnimationCurve), function() {
22507
- /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true;
22508
- }(), function() {
22509
- /** @internal */ _AnimationQuaternionCurve._isReferenceType = true;
22510
- }(), function() {
22511
- /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new Quaternion();
22512
- }(), _AnimationQuaternionCurve);
22513
- AnimationQuaternionCurve = __decorate([
22032
+ }(AnimationCurve), /** @internal */ _AnimationQuaternionCurve._isInterpolationType = true, /** @internal */ _AnimationQuaternionCurve._isReferenceType = true, /** @internal */ _AnimationQuaternionCurve._tempConjugateQuat = new Quaternion(), _AnimationQuaternionCurve);
22033
+ AnimationQuaternionCurve = _ts_decorate([
22514
22034
  StaticInterfaceImplement()
22515
22035
  ], AnimationQuaternionCurve);
22516
22036
 
@@ -22595,12 +22115,8 @@ var AnimationVector2Curve = (_AnimationVector2Curve = /*#__PURE__*/ function(Ani
22595
22115
  return out;
22596
22116
  };
22597
22117
  return AnimationVector2Curve;
22598
- }(AnimationCurve), function() {
22599
- /** @internal */ _AnimationVector2Curve._isReferenceType = true;
22600
- }(), function() {
22601
- /** @internal */ _AnimationVector2Curve._isInterpolationType = true;
22602
- }(), _AnimationVector2Curve);
22603
- AnimationVector2Curve = __decorate([
22118
+ }(AnimationCurve), /** @internal */ _AnimationVector2Curve._isReferenceType = true, /** @internal */ _AnimationVector2Curve._isInterpolationType = true, _AnimationVector2Curve);
22119
+ AnimationVector2Curve = _ts_decorate([
22604
22120
  StaticInterfaceImplement()
22605
22121
  ], AnimationVector2Curve);
22606
22122
 
@@ -22697,12 +22213,8 @@ var AnimationVector3Curve = (_AnimationVector3Curve = /*#__PURE__*/ function(Ani
22697
22213
  return out;
22698
22214
  };
22699
22215
  return AnimationVector3Curve;
22700
- }(AnimationCurve), function() {
22701
- /** @internal */ _AnimationVector3Curve._isReferenceType = true;
22702
- }(), function() {
22703
- /** @internal */ _AnimationVector3Curve._isInterpolationType = true;
22704
- }(), _AnimationVector3Curve);
22705
- AnimationVector3Curve = __decorate([
22216
+ }(AnimationCurve), /** @internal */ _AnimationVector3Curve._isReferenceType = true, /** @internal */ _AnimationVector3Curve._isInterpolationType = true, _AnimationVector3Curve);
22217
+ AnimationVector3Curve = _ts_decorate([
22706
22218
  StaticInterfaceImplement()
22707
22219
  ], AnimationVector3Curve);
22708
22220
 
@@ -22799,12 +22311,8 @@ var AnimationVector4Curve = (_AnimationVector4Curve = /*#__PURE__*/ function(Ani
22799
22311
  return out;
22800
22312
  };
22801
22313
  return AnimationVector4Curve;
22802
- }(AnimationCurve), function() {
22803
- /** @internal */ _AnimationVector4Curve._isReferenceType = true;
22804
- }(), function() {
22805
- /** @internal */ _AnimationVector4Curve._isInterpolationType = true;
22806
- }(), _AnimationVector4Curve);
22807
- AnimationVector4Curve = __decorate([
22314
+ }(AnimationCurve), /** @internal */ _AnimationVector4Curve._isReferenceType = true, /** @internal */ _AnimationVector4Curve._isInterpolationType = true, _AnimationVector4Curve);
22315
+ AnimationVector4Curve = _ts_decorate([
22808
22316
  StaticInterfaceImplement()
22809
22317
  ], AnimationVector4Curve);
22810
22318
 
@@ -22937,6 +22445,7 @@ var AnimatorLayerBlendingMode;
22937
22445
  this.eventHandlers = [];
22938
22446
  };
22939
22447
 
22448
+ var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
22940
22449
  /**
22941
22450
  * The controller of the animation system.
22942
22451
  */ var Animator = /*#__PURE__*/ function(Component) {
@@ -23129,7 +22638,6 @@ var AnimatorLayerBlendingMode;
23129
22638
  var curve = curves[i];
23130
22639
  var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
23131
22640
  if (targetEntity) {
23132
- var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
23133
22641
  var property = curve.property;
23134
22642
  var instanceId = targetEntity.instanceId;
23135
22643
  // Get owner
@@ -23583,28 +23091,28 @@ var AnimatorLayerBlendingMode;
23583
23091
  ]);
23584
23092
  return Animator;
23585
23093
  }(Component);
23586
- __decorate([
23094
+ _ts_decorate([
23587
23095
  assignmentClone
23588
23096
  ], Animator.prototype, "speed", void 0);
23589
- __decorate([
23097
+ _ts_decorate([
23590
23098
  ignoreClone
23591
23099
  ], Animator.prototype, "_controllerUpdateFlag", void 0);
23592
- __decorate([
23100
+ _ts_decorate([
23593
23101
  ignoreClone
23594
23102
  ], Animator.prototype, "_updateMark", void 0);
23595
- __decorate([
23103
+ _ts_decorate([
23596
23104
  ignoreClone
23597
23105
  ], Animator.prototype, "_animatorLayersData", void 0);
23598
- __decorate([
23106
+ _ts_decorate([
23599
23107
  ignoreClone
23600
23108
  ], Animator.prototype, "_curveOwnerPool", void 0);
23601
- __decorate([
23109
+ _ts_decorate([
23602
23110
  ignoreClone
23603
23111
  ], Animator.prototype, "_animationEventHandlerPool", void 0);
23604
- __decorate([
23112
+ _ts_decorate([
23605
23113
  ignoreClone
23606
23114
  ], Animator.prototype, "_tempAnimatorStateInfo", void 0);
23607
- __decorate([
23115
+ _ts_decorate([
23608
23116
  ignoreClone
23609
23117
  ], Animator.prototype, "_controlledRenderers", void 0);
23610
23118
 
@@ -24727,10 +24235,8 @@ var ParticleRendererBlendMode;
24727
24235
  ]);
24728
24236
  return ParticleRenderer;
24729
24237
  }(MeshRenderer);
24730
- (function() {
24731
- /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24732
- })();
24733
- __decorate([
24238
+ /** The max number of indices that Uint16Array can support. */ ParticleRenderer._uint16VertexLimit = 65535;
24239
+ _ts_decorate([
24734
24240
  ignoreClone
24735
24241
  ], ParticleRenderer.prototype, "_onColorChanged", null);
24736
24242