@galacean/engine-core 1.0.0-beta.0 → 1.0.0-beta.3

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 (54) hide show
  1. package/dist/main.js +124 -265
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +124 -265
  4. package/dist/module.js +124 -265
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/2d/atlas/SpriteAtlas.d.ts +1 -0
  8. package/types/2d/data/RenderData2D.d.ts +1 -0
  9. package/types/2d/sprite/Sprite.d.ts +2 -1
  10. package/types/2d/sprite/SpriteMask.d.ts +2 -7
  11. package/types/2d/sprite/SpriteRenderer.d.ts +2 -11
  12. package/types/2d/text/Font.d.ts +1 -0
  13. package/types/2d/text/TextRenderer.d.ts +3 -11
  14. package/types/Camera.d.ts +0 -3
  15. package/types/Component.d.ts +1 -0
  16. package/types/Entity.d.ts +1 -1
  17. package/types/RenderPipeline/MeshRenderElement.d.ts +17 -0
  18. package/types/RenderPipeline/SpriteElement.d.ts +13 -0
  19. package/types/RenderPipeline/SpriteMaskElement.d.ts +10 -0
  20. package/types/RenderPipeline/TextRenderElement.d.ts +6 -0
  21. package/types/Renderer.d.ts +1 -1
  22. package/types/Scene.d.ts +1 -1
  23. package/types/Script.d.ts +1 -0
  24. package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +0 -1
  25. package/types/asset/GraphicsResource.d.ts +0 -3
  26. package/types/asset/IRefObject.d.ts +2 -0
  27. package/types/asset/RefObject.d.ts +27 -0
  28. package/types/asset/ReferResource.d.ts +0 -4
  29. package/types/base/Event.d.ts +24 -0
  30. package/types/base/Util.d.ts +14 -0
  31. package/types/env-probe/CubeProbe.d.ts +0 -6
  32. package/types/env-probe/Probe.d.ts +0 -6
  33. package/types/graphic/Buffer.d.ts +1 -3
  34. package/types/graphic/Mesh.d.ts +0 -6
  35. package/types/material/BaseMaterial.d.ts +0 -2
  36. package/types/material/BlinnPhongMaterial.d.ts +0 -3
  37. package/types/material/Material.d.ts +1 -4
  38. package/types/material/PBRMaterial.d.ts +1 -1
  39. package/types/material/PBRSpecularMaterial.d.ts +1 -1
  40. package/types/material/UnlitMaterial.d.ts +1 -1
  41. package/types/mesh/MeshRenderer.d.ts +3 -8
  42. package/types/mesh/ModelMesh.d.ts +1 -0
  43. package/types/mesh/SkinnedMeshRenderer.d.ts +0 -9
  44. package/types/physics/CharacterController.d.ts +0 -2
  45. package/types/physics/Collider.d.ts +1 -0
  46. package/types/physics/joint/HingeJoint.d.ts +2 -2
  47. package/types/physics/joint/SpringJoint.d.ts +1 -1
  48. package/types/sky/SkyBoxMaterial.d.ts +0 -3
  49. package/types/sky/SkyProceduralMaterial.d.ts +1 -1
  50. package/types/texture/RenderTarget.d.ts +0 -3
  51. package/types/texture/Texture.d.ts +1 -0
  52. package/types/texture/Texture2DArray.d.ts +0 -4
  53. package/types/texture/TextureCube.d.ts +0 -4
  54. package/types/trail/TrailRenderer.d.ts +1 -4
@@ -657,7 +657,6 @@ __decorate([
657
657
  }
658
658
  var _proto = ReferResource.prototype;
659
659
  /**
660
- * @override
661
660
  * Destroy self.
662
661
  * @param force - Whether to force the destruction, if it is false, refCount = 0 can be released successfully.
663
662
  * @returns Whether the release was successful.
@@ -684,9 +683,7 @@ __decorate([
684
683
  */ _proto._addToResourceManager = function _addToResourceManager(path) {
685
684
  this._engine.resourceManager._addAsset(path, this);
686
685
  };
687
- /**
688
- * @override
689
- */ _proto._onDestroy = function _onDestroy() {
686
+ _proto._onDestroy = function _onDestroy() {
690
687
  EngineObject.prototype._onDestroy.call(this);
691
688
  this._engine.resourceManager._deleteReferResource(this);
692
689
  var refCount = this._getReferCount();
@@ -818,9 +815,7 @@ var GraphicsResource = /*#__PURE__*/ function(ReferResource) {
818
815
  return _this;
819
816
  }
820
817
  var _proto = GraphicsResource.prototype;
821
- /**
822
- * @override
823
- */ _proto._onDestroy = function _onDestroy() {
818
+ _proto._onDestroy = function _onDestroy() {
824
819
  ReferResource.prototype._onDestroy.call(this);
825
820
  this.engine.resourceManager._deleteGraphicResource(this);
826
821
  };
@@ -889,7 +884,6 @@ var Logger = {
889
884
  }
890
885
  };
891
886
  /**
892
- * @override
893
887
  * @internal
894
888
  */ _proto._rebuild = function _rebuild() {
895
889
  var platformTexture = this._platformTexture;
@@ -900,10 +894,7 @@ var Logger = {
900
894
  platformTexture.depthCompareFunction = this._depthCompareFunction;
901
895
  platformTexture.setUseDepthCompareMode(this._useDepthCompareMode);
902
896
  };
903
- /**
904
- * @override
905
- * @internal
906
- */ _proto._onDestroy = function _onDestroy() {
897
+ _proto._onDestroy = function _onDestroy() {
907
898
  GraphicsResource.prototype._onDestroy.call(this);
908
899
  this._platformTexture.destroy();
909
900
  this._platformTexture = null;
@@ -1091,9 +1082,7 @@ var Logger = {
1091
1082
  this._depthTexture && this._depthTexture.generateMipmaps();
1092
1083
  }
1093
1084
  };
1094
- /**
1095
- * @override
1096
- */ _proto._onDestroy = function _onDestroy() {
1085
+ _proto._onDestroy = function _onDestroy() {
1097
1086
  GraphicsResource.prototype._onDestroy.call(this);
1098
1087
  this._platformRenderTarget.destroy();
1099
1088
  this._colorTextures.length = 0;
@@ -1111,7 +1100,6 @@ var Logger = {
1111
1100
  this._platformRenderTarget.blitRenderTarget();
1112
1101
  };
1113
1102
  /**
1114
- * @override
1115
1103
  * @internal
1116
1104
  */ _proto._rebuild = function _rebuild() {
1117
1105
  this._platformRenderTarget = this._engine._hardwareRenderer.createPlatformRenderTarget(this);
@@ -1314,7 +1302,7 @@ var Logger = {
1314
1302
  }
1315
1303
  };
1316
1304
  /**
1317
- * @override
1305
+ * @internal
1318
1306
  */ _proto._rebuild = function _rebuild() {
1319
1307
  this._platformTexture = this._engine._hardwareRenderer.createPlatformTexture2DArray(this);
1320
1308
  Texture.prototype._rebuild.call(this);
@@ -1398,7 +1386,7 @@ var Logger = {
1398
1386
  }
1399
1387
  };
1400
1388
  /**
1401
- * @override
1389
+ * @internal
1402
1390
  */ _proto._rebuild = function _rebuild() {
1403
1391
  this._platformTexture = this._engine._hardwareRenderer.createPlatformTextureCube(this);
1404
1392
  Texture.prototype._rebuild.call(this);
@@ -1472,10 +1460,7 @@ var Logger = {
1472
1460
  _proto.getCharInfo = function getCharInfo(char) {
1473
1461
  return this._charInfoMap[char.charCodeAt(0)];
1474
1462
  };
1475
- /**
1476
- * @override
1477
- * @internal
1478
- */ _proto._onDestroy = function _onDestroy() {
1463
+ _proto._onDestroy = function _onDestroy() {
1479
1464
  ReferResource.prototype._onDestroy.call(this);
1480
1465
  this.texture.destroy();
1481
1466
  this.texture = null;
@@ -2038,10 +2023,7 @@ var Logger = {
2038
2023
  subFontMap[key] = subFont;
2039
2024
  return subFont;
2040
2025
  };
2041
- /**
2042
- * @override
2043
- * @internal
2044
- */ _proto._onDestroy = function _onDestroy() {
2026
+ _proto._onDestroy = function _onDestroy() {
2045
2027
  ReferResource.prototype._onDestroy.call(this);
2046
2028
  var subFontMap = this._subFontMap;
2047
2029
  for(var k in subFontMap){
@@ -3213,54 +3195,6 @@ exports.GLCapabilityType = void 0;
3213
3195
  return ComponentsManager;
3214
3196
  }();
3215
3197
 
3216
- var ComponentCloner = /*#__PURE__*/ function() {
3217
- function ComponentCloner() {}
3218
- /**
3219
- * Clone component.
3220
- * @param source - Clone source
3221
- * @param target - Clone target
3222
- */ ComponentCloner.cloneComponent = function cloneComponent(source, target) {
3223
- var cloneModes = CloneManager.getCloneMode(source.constructor);
3224
- var keys = Object.keys(source);
3225
- for(var i = 0, n = keys.length; i < n; i++){
3226
- var k = keys[i];
3227
- var cloneMode = cloneModes[k];
3228
- switch(cloneMode){
3229
- case undefined:
3230
- case CloneMode.Assignment:
3231
- target[k] = source[k];
3232
- break;
3233
- case CloneMode.Shallow:
3234
- var sourcePropS = source[k];
3235
- if (_instanceof(sourcePropS, Object)) {
3236
- var tarProp = target[k];
3237
- tarProp == null && (tarProp = target[k] = sourcePropS.constructor());
3238
- Object.assign(tarProp, sourcePropS);
3239
- } else {
3240
- // Null or undefined and primitive type.
3241
- target[k] = sourcePropS;
3242
- }
3243
- break;
3244
- case CloneMode.Deep:
3245
- var sourcePropD = source[k];
3246
- if (_instanceof(sourcePropD, Object)) {
3247
- var tarProp1 = target[k];
3248
- tarProp1 == null && (tarProp1 = target[k] = sourcePropD.constructor());
3249
- CloneManager.deepCloneObject(sourcePropD, tarProp1);
3250
- } else {
3251
- // Null or undefined and primitive type.
3252
- target[k] = sourcePropD;
3253
- }
3254
- break;
3255
- }
3256
- }
3257
- if (source._cloneTo) {
3258
- source._cloneTo(target);
3259
- }
3260
- };
3261
- return ComponentCloner;
3262
- }();
3263
-
3264
3198
  /**
3265
3199
  * The base class of the components.
3266
3200
  */ var Component = /*#__PURE__*/ function(EngineObject) {
@@ -3308,10 +3242,7 @@ var ComponentCloner = /*#__PURE__*/ function() {
3308
3242
  }
3309
3243
  }
3310
3244
  };
3311
- /**
3312
- * @override
3313
- * @internal
3314
- */ _proto._onDestroy = function _onDestroy() {
3245
+ _proto._onDestroy = function _onDestroy() {
3315
3246
  EngineObject.prototype._onDestroy.call(this);
3316
3247
  this._entity._removeComponent(this);
3317
3248
  if (this._entity.isActiveInHierarchy) {
@@ -4543,6 +4474,54 @@ var TransformModifyFlags;
4543
4474
  TransformModifyFlags[TransformModifyFlags[/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale */ "WmWpWeWqWs"] = 0xbc] = "WmWpWeWqWs";
4544
4475
  })(TransformModifyFlags || (TransformModifyFlags = {}));
4545
4476
 
4477
+ var ComponentCloner = /*#__PURE__*/ function() {
4478
+ function ComponentCloner() {}
4479
+ /**
4480
+ * Clone component.
4481
+ * @param source - Clone source
4482
+ * @param target - Clone target
4483
+ */ ComponentCloner.cloneComponent = function cloneComponent(source, target) {
4484
+ var cloneModes = CloneManager.getCloneMode(source.constructor);
4485
+ var keys = Object.keys(source);
4486
+ for(var i = 0, n = keys.length; i < n; i++){
4487
+ var k = keys[i];
4488
+ var cloneMode = cloneModes[k];
4489
+ switch(cloneMode){
4490
+ case undefined:
4491
+ case CloneMode.Assignment:
4492
+ target[k] = source[k];
4493
+ break;
4494
+ case CloneMode.Shallow:
4495
+ var sourcePropS = source[k];
4496
+ if (_instanceof(sourcePropS, Object)) {
4497
+ var tarProp = target[k];
4498
+ tarProp == null && (tarProp = target[k] = sourcePropS.constructor());
4499
+ Object.assign(tarProp, sourcePropS);
4500
+ } else {
4501
+ // Null or undefined and primitive type.
4502
+ target[k] = sourcePropS;
4503
+ }
4504
+ break;
4505
+ case CloneMode.Deep:
4506
+ var sourcePropD = source[k];
4507
+ if (_instanceof(sourcePropD, Object)) {
4508
+ var tarProp1 = target[k];
4509
+ tarProp1 == null && (tarProp1 = target[k] = sourcePropD.constructor());
4510
+ CloneManager.deepCloneObject(sourcePropD, tarProp1);
4511
+ } else {
4512
+ // Null or undefined and primitive type.
4513
+ target[k] = sourcePropD;
4514
+ }
4515
+ break;
4516
+ }
4517
+ }
4518
+ if (source._cloneTo) {
4519
+ source._cloneTo(target);
4520
+ }
4521
+ };
4522
+ return ComponentCloner;
4523
+ }();
4524
+
4546
4525
  /**
4547
4526
  * Entity, be used as components container.
4548
4527
  */ var Entity = /*#__PURE__*/ function(EngineObject) {
@@ -6027,21 +6006,16 @@ exports.Collider = /*#__PURE__*/ function(Component) {
6027
6006
  * @internal
6028
6007
  */ _proto._onLateUpdate = function _onLateUpdate() {};
6029
6008
  /**
6030
- * @override
6031
6009
  * @internal
6032
6010
  */ _proto._onEnable = function _onEnable() {
6033
6011
  this.engine.physicsManager._addCollider(this);
6034
6012
  };
6035
6013
  /**
6036
- * @override
6037
6014
  * @internal
6038
6015
  */ _proto._onDisable = function _onDisable() {
6039
6016
  this.engine.physicsManager._removeCollider(this);
6040
6017
  };
6041
- /**
6042
- * @override
6043
- * @internal
6044
- */ _proto._onDestroy = function _onDestroy() {
6018
+ _proto._onDestroy = function _onDestroy() {
6045
6019
  Component.prototype._onDestroy.call(this);
6046
6020
  this.clearShapes();
6047
6021
  this._nativeCollider.destroy();
@@ -6080,7 +6054,6 @@ exports.Collider = __decorate([
6080
6054
  function CharacterController(entity) {
6081
6055
  var _this;
6082
6056
  _this = Collider.call(this, entity) || this;
6083
- /** @internal */ _this._index = -1;
6084
6057
  _this._stepOffset = 0.5;
6085
6058
  _this._nonWalkableMode = exports.ControllerNonWalkableMode.PreventClimbing;
6086
6059
  _this._upDirection = new miniprogram.Vector3(0, 1, 0);
@@ -6104,7 +6077,6 @@ exports.Collider = __decorate([
6104
6077
  /**
6105
6078
  * Add collider shape on this controller.
6106
6079
  * @param shape - Collider shape
6107
- * @override
6108
6080
  */ _proto.addShape = function addShape(shape) {
6109
6081
  if (this._shapes.length > 0) {
6110
6082
  throw "only allow single shape on controller!";
@@ -6114,7 +6086,6 @@ exports.Collider = __decorate([
6114
6086
  };
6115
6087
  /**
6116
6088
  * Remove all shape attached.
6117
- * @override
6118
6089
  */ _proto.clearShapes = function clearShapes() {
6119
6090
  if (this._shapes.length > 0) {
6120
6091
  Collider.prototype.removeShape.call(this, this._shapes[0]);
@@ -6122,7 +6093,6 @@ exports.Collider = __decorate([
6122
6093
  };
6123
6094
  /**
6124
6095
  * @internal
6125
- * @override
6126
6096
  */ _proto._onUpdate = function _onUpdate() {
6127
6097
  if (this._updateFlag.flag) {
6128
6098
  var transform = this.entity.transform;
@@ -6137,7 +6107,6 @@ exports.Collider = __decorate([
6137
6107
  };
6138
6108
  /**
6139
6109
  * @internal
6140
- * @override
6141
6110
  */ _proto._onLateUpdate = function _onLateUpdate() {
6142
6111
  var position = this.entity.transform.worldPosition;
6143
6112
  this._nativeCollider.getWorldPosition(position);
@@ -6145,13 +6114,11 @@ exports.Collider = __decorate([
6145
6114
  this._updateFlag.flag = false;
6146
6115
  };
6147
6116
  /**
6148
- * @override
6149
6117
  * @internal
6150
6118
  */ _proto._onEnable = function _onEnable() {
6151
6119
  this.engine.physicsManager._addCharacterController(this);
6152
6120
  };
6153
6121
  /**
6154
- * @override
6155
6122
  * @internal
6156
6123
  */ _proto._onDisable = function _onDisable() {
6157
6124
  this.engine.physicsManager._removeCharacterController(this);
@@ -6644,7 +6611,6 @@ exports.Joint = __decorate([
6644
6611
  }
6645
6612
  var _proto = FixedJoint.prototype;
6646
6613
  /**
6647
- * @override
6648
6614
  * @internal
6649
6615
  */ _proto._onAwake = function _onAwake() {
6650
6616
  var collider = this._collider;
@@ -6678,7 +6644,6 @@ exports.Joint = __decorate([
6678
6644
  }
6679
6645
  var _proto = HingeJoint.prototype;
6680
6646
  /**
6681
- * @override
6682
6647
  * @internal
6683
6648
  */ _proto._onAwake = function _onAwake() {
6684
6649
  var collider = this._collider;
@@ -6830,7 +6795,6 @@ exports.Joint = __decorate([
6830
6795
  }
6831
6796
  var _proto = SpringJoint.prototype;
6832
6797
  /**
6833
- * @override
6834
6798
  * @internal
6835
6799
  */ _proto._onAwake = function _onAwake() {
6836
6800
  var collider = this._collider;
@@ -7035,7 +6999,6 @@ exports.Joint = __decorate([
7035
6999
  this._nativeCollider.wakeUp();
7036
7000
  };
7037
7001
  /**
7038
- * @override
7039
7002
  * @internal
7040
7003
  */ _proto._onLateUpdate = function _onLateUpdate() {
7041
7004
  var transform = this.entity.transform;
@@ -7988,14 +7951,12 @@ __decorate([
7988
7951
  /**
7989
7952
  * Mount to the current Scene.
7990
7953
  * @internal
7991
- * @override
7992
7954
  */ _proto._onEnable = function _onEnable() {
7993
7955
  this.engine._lightManager._attachDirectLight(this);
7994
7956
  };
7995
7957
  /**
7996
7958
  * Unmount from the current Scene.
7997
7959
  * @internal
7998
- * @override
7999
7960
  */ _proto._onDisable = function _onDisable() {
8000
7961
  this.engine._lightManager._detachDirectLight(this);
8001
7962
  };
@@ -8029,7 +7990,6 @@ __decorate([
8029
7990
  key: "_shadowProjectionMatrix",
8030
7991
  get: /**
8031
7992
  * @internal
8032
- * @override
8033
7993
  */ function get() {
8034
7994
  throw "Unknown!";
8035
7995
  }
@@ -8089,14 +8049,12 @@ __decorate([
8089
8049
  /**
8090
8050
  * Mount to the current Scene.
8091
8051
  * @internal
8092
- * @override
8093
8052
  */ _proto._onEnable = function _onEnable() {
8094
8053
  this.engine._lightManager._attachPointLight(this);
8095
8054
  };
8096
8055
  /**
8097
8056
  * Unmount from the current Scene.
8098
8057
  * @internal
8099
- * @override
8100
8058
  */ _proto._onDisable = function _onDisable() {
8101
8059
  this.engine._lightManager._detachPointLight(this);
8102
8060
  };
@@ -8122,7 +8080,6 @@ __decorate([
8122
8080
  key: "_shadowProjectionMatrix",
8123
8081
  get: /**
8124
8082
  * @internal
8125
- * @override
8126
8083
  */ function get() {
8127
8084
  throw "Unknown!";
8128
8085
  }
@@ -8199,14 +8156,12 @@ __decorate([
8199
8156
  /**
8200
8157
  * Mount to the current Scene.
8201
8158
  * @internal
8202
- * @override
8203
8159
  */ _proto._onEnable = function _onEnable() {
8204
8160
  this.engine._lightManager._attachSpotLight(this);
8205
8161
  };
8206
8162
  /**
8207
8163
  * Unmount from the current Scene.
8208
8164
  * @internal
8209
- * @override
8210
8165
  */ _proto._onDisable = function _onDisable() {
8211
8166
  this.engine._lightManager._detachSpotLight(this);
8212
8167
  };
@@ -8252,7 +8207,6 @@ __decorate([
8252
8207
  key: "_shadowProjectionMatrix",
8253
8208
  get: /**
8254
8209
  * @internal
8255
- * @override
8256
8210
  */ function get() {
8257
8211
  var matrix = this._projectMatrix;
8258
8212
  var fov = Math.min(Math.PI / 2, this.angle * 2 * Math.sqrt(2));
@@ -9421,9 +9375,7 @@ __decorate([
9421
9375
  this.shaderData.cloneTo(target.shaderData);
9422
9376
  CloneManager.deepCloneObject(this.renderStates, target.renderStates);
9423
9377
  };
9424
- /**
9425
- * @override
9426
- */ _proto._addReferCount = function _addReferCount(value) {
9378
+ _proto._addReferCount = function _addReferCount(value) {
9427
9379
  ReferResource.prototype._addReferCount.call(this, value);
9428
9380
  this.shaderData._addReferCount(value);
9429
9381
  };
@@ -9558,11 +9510,11 @@ var FogFragmentDeclaration = "#define GLSLIFY 1\n#if SCENE_FOG_MODE != 0\nvaryin
9558
9510
 
9559
9511
  var FogVertexDeclaration = "#define GLSLIFY 1\n#if SCENE_FOG_MODE != 0\nvarying vec3 v_positionVS;\n#endif\n"; // eslint-disable-line
9560
9512
 
9561
- var normal_share = "#define GLSLIFY 1\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nvarying vec3 v_normal;\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\nvarying mat3 v_TBN;\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9513
+ var normal_share = "#define GLSLIFY 1\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nvarying vec3 v_normal;\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\nvarying mat3 v_TBN;\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9562
9514
 
9563
9515
  var uv_share = "#define GLSLIFY 1\nvarying vec2 v_uv;\n#ifdef RENDERER_HAS_UV1\nvarying vec2 v_uv1;\n#endif\n"; // eslint-disable-line
9564
9516
 
9565
- var worldpos_share = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLDPOS\nvarying vec3 v_pos;\n#endif\n"; // eslint-disable-line
9517
+ var worldpos_share = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLD_POS\nvarying vec3 v_pos;\n#endif\n"; // eslint-disable-line
9566
9518
 
9567
9519
  var begin_normal_vert = "#define GLSLIFY 1\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nvec3 normal=vec3(NORMAL);\n#endif\n#ifdef RENDERER_HAS_TANGENT\nvec4 tangent=vec4(TANGENT);\n#endif\n#endif\n"; // eslint-disable-line
9568
9520
 
@@ -9570,21 +9522,21 @@ var begin_position_vert = "#define GLSLIFY 1\nvec4 position=vec4(POSITION,1.0);"
9570
9522
 
9571
9523
  var blendShape_input = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_BLENDSHAPE\n#ifdef RENDERER_BLENDSHAPE_USE_TEXTURE\nuniform mediump sampler2DArray renderer_BlendShapeTexture;uniform ivec3 renderer_BlendShapeTextureInfo;uniform float renderer_BlendShapeWeights[RENDERER_BLENDSHAPE_COUNT];\n#else\nattribute vec3 POSITION_BS0;attribute vec3 POSITION_BS1;\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) && defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\nattribute vec3 NORMAL_BS0;attribute vec3 NORMAL_BS1;attribute vec3 TANGENT_BS0;attribute vec3 TANGENT_BS1;uniform float renderer_BlendShapeWeights[2];\n#else\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) || defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\nattribute vec3 POSITION_BS2;attribute vec3 POSITION_BS3;\n#ifdef RENDERER_BLENDSHAPE_HAS_NORMAL\nattribute vec3 NORMAL_BS0;attribute vec3 NORMAL_BS1;attribute vec3 NORMAL_BS2;attribute vec3 NORMAL_BS3;\n#endif\n#ifdef RENDERER_BLENDSHAPE_HAS_TANGENT\nattribute vec3 TANGENT_BS0;attribute vec3 TANGENT_BS1;attribute vec3 TANGENT_BS2;attribute vec3 TANGENT_BS3;\n#endif\nuniform float renderer_BlendShapeWeights[4];\n#else\nattribute vec3 POSITION_BS2;attribute vec3 POSITION_BS3;attribute vec3 POSITION_BS4;attribute vec3 POSITION_BS5;attribute vec3 POSITION_BS6;attribute vec3 POSITION_BS7;uniform float renderer_BlendShapeWeights[8];\n#endif\n#endif\n#endif\n#ifdef RENDERER_BLENDSHAPE_USE_TEXTURE\nvec3 getBlendShapeVertexElement(int blendShapeIndex,int vertexElementIndex){int y=vertexElementIndex/renderer_BlendShapeTextureInfo.y;int x=vertexElementIndex-y*renderer_BlendShapeTextureInfo.y;ivec3 uv=ivec3(x,y,blendShapeIndex);return texelFetch(renderer_BlendShapeTexture,uv,0).xyz;}\n#endif\n#endif\n"; // eslint-disable-line
9572
9524
 
9573
- var blendShape_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_BLENDSHAPE\n#ifdef RENDERER_BLENDSHAPE_USE_TEXTURE\nint vertexOffset=gl_VertexID*renderer_BlendShapeTextureInfo.x;for(int i=0;i<RENDERER_BLENDSHAPE_COUNT;i++){int vertexElementOffset=vertexOffset;float weight=renderer_BlendShapeWeights[i];position.xyz+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#ifndef MATERIAL_OMIT_NORMAL\n#if defined( RENDERER_HAS_NORMAL ) && defined( RENDERER_BLENDSHAPE_HAS_NORMAL )\nvertexElementOffset+=1;normal+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#endif\n#if defined( RENDERER_HAS_TANGENT ) && defined(RENDERER_BLENDSHAPE_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\nvertexElementOffset+=1;tangent.xyz+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#endif\n#endif\n}\n#else\nposition.xyz+=POSITION_BS0*renderer_BlendShapeWeights[0];position.xyz+=POSITION_BS1*renderer_BlendShapeWeights[1];\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) && defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nnormal+=NORMAL_BS0*renderer_BlendShapeWeights[0];normal+=NORMAL_BS1*renderer_BlendShapeWeights[1];\n#endif\n#if defined( RENDERER_HAS_TANGENT ) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\ntangent.xyz+=TANGENT_BS0*renderer_BlendShapeWeights[0];tangent.xyz+=TANGENT_BS1*renderer_BlendShapeWeights[1];\n#endif\n#endif\n#else\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) || defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\n#ifndef MATERIAL_OMIT_NORMAL\nposition.xyz+=POSITION_BS2*renderer_BlendShapeWeights[2];position.xyz+=POSITION_BS3*renderer_BlendShapeWeights[3];\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) && defined( RENDERER_HAS_NORMAL )\nnormal+=NORMAL_BS0*renderer_BlendShapeWeights[0];normal+=NORMAL_BS1*renderer_BlendShapeWeights[1];normal+=NORMAL_BS2*renderer_BlendShapeWeights[2];normal+=NORMAL_BS3*renderer_BlendShapeWeights[3];\n#endif\n#if defined(RENDERER_BLENDSHAPE_HAS_TANGENT) && defined( RENDERER_HAS_TANGENT ) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\ntangent.xyz+=TANGENT_BS0*renderer_BlendShapeWeights[0];tangent.xyz+=TANGENT_BS1*renderer_BlendShapeWeights[1];tangent.xyz+=TANGENT_BS2*renderer_BlendShapeWeights[2];tangent.xyz+=TANGENT_BS3*renderer_BlendShapeWeights[3];\n#endif\n#endif\n#else\nposition.xyz+=POSITION_BS2*renderer_BlendShapeWeights[2];position.xyz+=POSITION_BS3*renderer_BlendShapeWeights[3];position.xyz+=POSITION_BS4*renderer_BlendShapeWeights[4];position.xyz+=POSITION_BS5*renderer_BlendShapeWeights[5];position.xyz+=POSITION_BS6*renderer_BlendShapeWeights[6];position.xyz+=POSITION_BS7*renderer_BlendShapeWeights[7];\n#endif\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9525
+ var blendShape_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_BLENDSHAPE\n#ifdef RENDERER_BLENDSHAPE_USE_TEXTURE\nint vertexOffset=gl_VertexID*renderer_BlendShapeTextureInfo.x;for(int i=0;i<RENDERER_BLENDSHAPE_COUNT;i++){int vertexElementOffset=vertexOffset;float weight=renderer_BlendShapeWeights[i];position.xyz+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#ifndef MATERIAL_OMIT_NORMAL\n#if defined( RENDERER_HAS_NORMAL ) && defined( RENDERER_BLENDSHAPE_HAS_NORMAL )\nvertexElementOffset+=1;normal+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#endif\n#if defined( RENDERER_HAS_TANGENT ) && defined(RENDERER_BLENDSHAPE_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\nvertexElementOffset+=1;tangent.xyz+=getBlendShapeVertexElement(i,vertexElementOffset)*weight;\n#endif\n#endif\n}\n#else\nposition.xyz+=POSITION_BS0*renderer_BlendShapeWeights[0];position.xyz+=POSITION_BS1*renderer_BlendShapeWeights[1];\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) && defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nnormal+=NORMAL_BS0*renderer_BlendShapeWeights[0];normal+=NORMAL_BS1*renderer_BlendShapeWeights[1];\n#endif\n#if defined( RENDERER_HAS_TANGENT ) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\ntangent.xyz+=TANGENT_BS0*renderer_BlendShapeWeights[0];tangent.xyz+=TANGENT_BS1*renderer_BlendShapeWeights[1];\n#endif\n#endif\n#else\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) || defined( RENDERER_BLENDSHAPE_HAS_TANGENT )\n#ifndef MATERIAL_OMIT_NORMAL\nposition.xyz+=POSITION_BS2*renderer_BlendShapeWeights[2];position.xyz+=POSITION_BS3*renderer_BlendShapeWeights[3];\n#if defined( RENDERER_BLENDSHAPE_HAS_NORMAL ) && defined( RENDERER_HAS_NORMAL )\nnormal+=NORMAL_BS0*renderer_BlendShapeWeights[0];normal+=NORMAL_BS1*renderer_BlendShapeWeights[1];normal+=NORMAL_BS2*renderer_BlendShapeWeights[2];normal+=NORMAL_BS3*renderer_BlendShapeWeights[3];\n#endif\n#if defined(RENDERER_BLENDSHAPE_HAS_TANGENT) && defined( RENDERER_HAS_TANGENT ) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\ntangent.xyz+=TANGENT_BS0*renderer_BlendShapeWeights[0];tangent.xyz+=TANGENT_BS1*renderer_BlendShapeWeights[1];tangent.xyz+=TANGENT_BS2*renderer_BlendShapeWeights[2];tangent.xyz+=TANGENT_BS3*renderer_BlendShapeWeights[3];\n#endif\n#endif\n#else\nposition.xyz+=POSITION_BS2*renderer_BlendShapeWeights[2];position.xyz+=POSITION_BS3*renderer_BlendShapeWeights[3];position.xyz+=POSITION_BS4*renderer_BlendShapeWeights[4];position.xyz+=POSITION_BS5*renderer_BlendShapeWeights[5];position.xyz+=POSITION_BS6*renderer_BlendShapeWeights[6];position.xyz+=POSITION_BS7*renderer_BlendShapeWeights[7];\n#endif\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9574
9526
 
9575
9527
  var color_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_VERTEXCOLOR\nv_color=COLOR_0;\n#endif\n"; // eslint-disable-line
9576
9528
 
9577
9529
  var FogVertex = "#define GLSLIFY 1\n#if SCENE_FOG_MODE != 0\nvec4 positionVS=renderer_MVMat*position;v_positionVS=positionVS.xyz/positionVS.w;\n#endif\n"; // eslint-disable-line
9578
9530
 
9579
- var normal_vert = "#define GLSLIFY 1\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nv_normal=normalize(mat3(renderer_NormalMat)*normal);\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\nvec3 normalW=normalize(mat3(renderer_NormalMat)*normal.xyz);vec3 tangentW=normalize(mat3(renderer_NormalMat)*tangent.xyz);vec3 bitangentW=cross(normalW,tangentW)*tangent.w;v_TBN=mat3(tangentW,bitangentW,normalW);\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9531
+ var normal_vert = "#define GLSLIFY 1\n#ifndef MATERIAL_OMIT_NORMAL\n#ifdef RENDERER_HAS_NORMAL\nv_normal=normalize(mat3(renderer_NormalMat)*normal);\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\nvec3 normalW=normalize(mat3(renderer_NormalMat)*normal.xyz);vec3 tangentW=normalize(mat3(renderer_NormalMat)*tangent.xyz);vec3 bitangentW=cross(normalW,tangentW)*tangent.w;v_TBN=mat3(tangentW,bitangentW,normalW);\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9580
9532
 
9581
9533
  var position_vert = "#define GLSLIFY 1\ngl_Position=renderer_MVPMat*position;"; // eslint-disable-line
9582
9534
 
9583
- var skinning_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_SKIN\n#ifdef RENDERER_USE_JOINT_TEXTURE\nmat4 skinMatrix=WEIGHTS_0.x*getJointMatrix(renderer_JointSampler,JOINTS_0.x)+WEIGHTS_0.y*getJointMatrix(renderer_JointSampler,JOINTS_0.y)+WEIGHTS_0.z*getJointMatrix(renderer_JointSampler,JOINTS_0.z)+WEIGHTS_0.w*getJointMatrix(renderer_JointSampler,JOINTS_0.w);\n#else\nmat4 skinMatrix=WEIGHTS_0.x*renderer_JointMatrix[int(JOINTS_0.x)]+WEIGHTS_0.y*renderer_JointMatrix[int(JOINTS_0.y)]+WEIGHTS_0.z*renderer_JointMatrix[int(JOINTS_0.z)]+WEIGHTS_0.w*renderer_JointMatrix[int(JOINTS_0.w)];\n#endif\nposition=skinMatrix*position;\n#if defined(RENDERER_HAS_NORMAL) && !defined(MATERIAL_OMIT_NORMAL)\nmat3 skinNormalMatrix=INVERSE_MAT(mat3(skinMatrix));normal=normal*skinNormalMatrix;\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\ntangent.xyz=tangent.xyz*skinNormalMatrix;\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9535
+ var skinning_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_SKIN\n#ifdef RENDERER_USE_JOINT_TEXTURE\nmat4 skinMatrix=WEIGHTS_0.x*getJointMatrix(renderer_JointSampler,JOINTS_0.x)+WEIGHTS_0.y*getJointMatrix(renderer_JointSampler,JOINTS_0.y)+WEIGHTS_0.z*getJointMatrix(renderer_JointSampler,JOINTS_0.z)+WEIGHTS_0.w*getJointMatrix(renderer_JointSampler,JOINTS_0.w);\n#else\nmat4 skinMatrix=WEIGHTS_0.x*renderer_JointMatrix[int(JOINTS_0.x)]+WEIGHTS_0.y*renderer_JointMatrix[int(JOINTS_0.y)]+WEIGHTS_0.z*renderer_JointMatrix[int(JOINTS_0.z)]+WEIGHTS_0.w*renderer_JointMatrix[int(JOINTS_0.w)];\n#endif\nposition=skinMatrix*position;\n#if defined(RENDERER_HAS_NORMAL) && !defined(MATERIAL_OMIT_NORMAL)\nmat3 skinNormalMatrix=INVERSE_MAT(mat3(skinMatrix));normal=normal*skinNormalMatrix;\n#if defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\ntangent.xyz=tangent.xyz*skinNormalMatrix;\n#endif\n#endif\n#endif\n"; // eslint-disable-line
9584
9536
 
9585
- var uv_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_UV\nv_uv=TEXCOORD_0;\n#else\nv_uv=vec2(0.,0.);\n#endif\n#ifdef RENDERER_HAS_UV1\nv_uv1=TEXCOORD_1;\n#endif\n#ifdef MATERIAL_NEED_TILINGOFFSET\nv_uv=v_uv*material_TilingOffset.xy+material_TilingOffset.zw;\n#endif\n"; // eslint-disable-line
9537
+ var uv_vert = "#define GLSLIFY 1\n#ifdef RENDERER_HAS_UV\nv_uv=TEXCOORD_0;\n#else\nv_uv=vec2(0.,0.);\n#endif\n#ifdef RENDERER_HAS_UV1\nv_uv1=TEXCOORD_1;\n#endif\n#ifdef MATERIAL_NEED_TILING_OFFSET\nv_uv=v_uv*material_TilingOffset.xy+material_TilingOffset.zw;\n#endif\n"; // eslint-disable-line
9586
9538
 
9587
- var worldpos_vert = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLDPOS\nvec4 temp_pos=renderer_ModelMat*position;v_pos=temp_pos.xyz/temp_pos.w;\n#endif\n"; // eslint-disable-line
9539
+ var worldpos_vert = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLD_POS\nvec4 temp_pos=renderer_ModelMat*position;v_pos=temp_pos.xyz/temp_pos.w;\n#endif\n"; // eslint-disable-line
9588
9540
 
9589
9541
  var FogFragment = "#define GLSLIFY 1\n#if SCENE_FOG_MODE != 0\nfloat fogIntensity=ComputeFogIntensity(length(v_positionVS));gl_FragColor.rgb=mix(scene_FogColor.rgb,gl_FragColor.rgb,fogIntensity);\n#endif\n"; // eslint-disable-line
9590
9542
 
@@ -9594,7 +9546,7 @@ var mobile_material_frag = "#define GLSLIFY 1\nuniform vec4 material_EmissiveCol
9594
9546
 
9595
9547
  var begin_mobile_frag = "#define GLSLIFY 1\nvec4 ambient=vec4(0.0);vec4 emission=material_EmissiveColor;vec4 diffuse=material_BaseColor;vec4 specular=material_SpecularColor;\n#ifdef MATERIAL_HAS_EMISSIVETEXTURE\nvec4 emissiveTextureColor=texture2D(material_EmissiveTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nemissiveTextureColor=gammaToLinear(emissiveTextureColor);\n#endif\nemission*=emissiveTextureColor;\n#endif\n#ifdef MATERIAL_HAS_BASETEXTURE\nvec4 diffuseTextureColor=texture2D(material_BaseTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\ndiffuseTextureColor=gammaToLinear(diffuseTextureColor);\n#endif\ndiffuse*=diffuseTextureColor;\n#endif\n#ifdef RENDERER_HAS_VERTEXCOLOR\ndiffuse*=v_color;\n#endif\n#ifdef MATERIAL_HAS_SPECULAR_TEXTURE\nvec4 specularTextureColor=texture2D(material_SpecularTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nspecularTextureColor=gammaToLinear(specularTextureColor);\n#endif\nspecular*=specularTextureColor;\n#endif\nambient=vec4(scene_EnvMapLight.diffuse*scene_EnvMapLight.diffuseIntensity,1.0)*diffuse;"; // eslint-disable-line
9596
9548
 
9597
- var begin_viewdir_frag = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLDPOS\nvec3 V=normalize(camera_Position-v_pos);\n#endif\n"; // eslint-disable-line
9549
+ var begin_viewdir_frag = "#define GLSLIFY 1\n#ifdef MATERIAL_NEED_WORLD_POS\nvec3 V=normalize(camera_Position-v_pos);\n#endif\n"; // eslint-disable-line
9598
9550
 
9599
9551
  var mobile_blinnphong_frag = "#define GLSLIFY 1\n#ifdef MATERIAL_HAS_NORMALTEXTURE\nmat3 tbn=getTBN();vec3 N=getNormalByNormalTexture(tbn,material_NormalTexture,material_NormalIntensity,v_uv);\n#else\nvec3 N=getNormal();\n#endif\nvec3 lightDiffuse=vec3(0.0,0.0,0.0);vec3 lightSpecular=vec3(0.0,0.0,0.0);float shadowAttenuation=1.0;\n#ifdef SCENE_DIRECT_LIGHT_COUNT\nshadowAttenuation=1.0;\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nshadowAttenuation*=sampleShadowMap();int sunIndex=int(scene_ShadowInfo.z);\n#endif\nDirectLight directionalLight;for(int i=0;i<SCENE_DIRECT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_DirectLightCullingMask[i]))continue;directionalLight.color=scene_DirectLightColor[i];\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nif(i==sunIndex){directionalLight.color*=shadowAttenuation;}\n#endif\ndirectionalLight.direction=scene_DirectLightDirection[i];float d=max(dot(N,-directionalLight.direction),0.0);lightDiffuse+=directionalLight.color*d;vec3 halfDir=normalize(V-directionalLight.direction);float s=pow(clamp(dot(N,halfDir),0.0,1.0),material_Shininess);lightSpecular+=directionalLight.color*s;}\n#endif\n#ifdef SCENE_POINT_LIGHT_COUNT\nPointLight pointLight;for(int i=0;i<SCENE_POINT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_PointLightCullingMask[i]))continue;pointLight.color=scene_PointLightColor[i];pointLight.position=scene_PointLightPosition[i];pointLight.distance=scene_PointLightDistance[i];vec3 direction=v_pos-pointLight.position;float dist=length(direction);direction/=dist;float decay=clamp(1.0-pow(dist/pointLight.distance,4.0),0.0,1.0);float d=max(dot(N,-direction),0.0)*decay;lightDiffuse+=pointLight.color*d;vec3 halfDir=normalize(V-direction);float s=pow(clamp(dot(N,halfDir),0.0,1.0),material_Shininess)*decay;lightSpecular+=pointLight.color*s;}\n#endif\n#ifdef SCENE_SPOT_LIGHT_COUNT\nSpotLight spotLight;for(int i=0;i<SCENE_SPOT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_SpotLightCullingMask[i]))continue;spotLight.color=scene_SpotLightColor[i];spotLight.position=scene_SpotLightPosition[i];spotLight.direction=scene_SpotLightDirection[i];spotLight.distance=scene_SpotLightDistance[i];spotLight.angleCos=scene_SpotLightAngleCos[i];spotLight.penumbraCos=scene_SpotLightPenumbraCos[i];vec3 direction=spotLight.position-v_pos;float lightDistance=length(direction);direction/=lightDistance;float angleCos=dot(direction,-spotLight.direction);float decay=clamp(1.0-pow(lightDistance/spotLight.distance,4.0),0.0,1.0);float spotEffect=smoothstep(spotLight.penumbraCos,spotLight.angleCos,angleCos);float decayTotal=decay*spotEffect;float d=max(dot(N,direction),0.0)*decayTotal;lightDiffuse+=spotLight.color*d;vec3 halfDir=normalize(V+direction);float s=pow(clamp(dot(N,halfDir),0.0,1.0),material_Shininess)*decayTotal;lightSpecular+=spotLight.color*s;}\n#endif\ndiffuse*=vec4(lightDiffuse,1.0);specular*=vec4(lightSpecular,1.0);\n#ifdef MATERIAL_IS_ALPHA_CUTOFF\nif(diffuse.a<material_AlphaCutoff){discard;}\n#endif\n"; // eslint-disable-line
9600
9552
 
@@ -9630,17 +9582,17 @@ var noise_simplex_3D_grad = "#define GLSLIFY 1\nfloat simplex(vec3 v,out vec3 gr
9630
9582
 
9631
9583
  var noise_simplex_4D = "#define GLSLIFY 1\nvec4 grad4(float j,vec4 ip){const vec4 ones=vec4(1.0,1.0,1.0,-1.0);vec4 p,s;p.xyz=floor(fract(vec3(j)*ip.xyz)*7.0)*ip.z-1.0;p.w=1.5-dot(abs(p.xyz),ones.xyz);s=vec4(lessThan(p,vec4(0.0)));p.xyz=p.xyz+(s.xyz*2.0-1.0)*s.www;return p;}\n#define F4 0.309016994374947451\nfloat simplex(vec4 v){const vec4 C=vec4(0.138196601125011,0.276393202250021,0.414589803375032,-0.447213595499958);vec4 i=floor(v+dot(v,vec4(F4)));vec4 x0=v-i+dot(i,C.xxxx);vec4 i0;vec3 isX=step(x0.yzw,x0.xxx);vec3 isYZ=step(x0.zww,x0.yyz);i0.x=isX.x+isX.y+isX.z;i0.yzw=1.0-isX;i0.y+=isYZ.x+isYZ.y;i0.zw+=1.0-isYZ.xy;i0.z+=isYZ.z;i0.w+=1.0-isYZ.z;vec4 i3=clamp(i0,0.0,1.0);vec4 i2=clamp(i0-1.0,0.0,1.0);vec4 i1=clamp(i0-2.0,0.0,1.0);vec4 x1=x0-i1+C.xxxx;vec4 x2=x0-i2+C.yyyy;vec4 x3=x0-i3+C.zzzz;vec4 x4=x0+C.wwww;i=mod289(i);float j0=permute(permute(permute(permute(i.w)+i.z)+i.y)+i.x);vec4 j1=permute(permute(permute(permute(i.w+vec4(i1.w,i2.w,i3.w,1.0))+i.z+vec4(i1.z,i2.z,i3.z,1.0))+i.y+vec4(i1.y,i2.y,i3.y,1.0))+i.x+vec4(i1.x,i2.x,i3.x,1.0));vec4 ip=vec4(1.0/294.0,1.0/49.0,1.0/7.0,0.0);vec4 p0=grad4(j0,ip);vec4 p1=grad4(j1.x,ip);vec4 p2=grad4(j1.y,ip);vec4 p3=grad4(j1.z,ip);vec4 p4=grad4(j1.w,ip);vec4 norm=taylorInvSqrt(vec4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;p4*=taylorInvSqrt(dot(p4,p4));vec3 m0=max(0.6-vec3(dot(x0,x0),dot(x1,x1),dot(x2,x2)),0.0);vec2 m1=max(0.6-vec2(dot(x3,x3),dot(x4,x4)),0.0);m0=m0*m0;m1=m1*m1;return 49.0*(dot(m0*m0,vec3(dot(p0,x0),dot(p1,x1),dot(p2,x2)))+dot(m1*m1,vec2(dot(p3,x3),dot(p4,x4))));}"; // eslint-disable-line
9632
9584
 
9633
- var pbr_frag_define = "#define GLSLIFY 1\nuniform float material_AlphaCutoff;uniform vec4 material_BaseColor;uniform float material_Metal;uniform float material_Roughness;uniform vec3 material_PBRSpecularColor;uniform float material_Glossiness;uniform vec3 material_EmissiveColor;\n#ifdef MATERIAL_CLEARCOAT\nuniform float material_ClearCoat;uniform float material_ClearCoatRoughness;\n#endif\nuniform float material_NormalIntensity;uniform float material_OcclusionIntensity;uniform float material_OcclusionTextureCoord;\n#ifdef MATERIAL_HAS_BASETEXTURE\nuniform sampler2D material_BaseTexture;\n#endif\n#ifdef MATERIAL_HAS_NORMALTEXTURE\nuniform sampler2D material_NormalTexture;\n#endif\n#ifdef MATERIAL_HAS_EMISSIVETEXTURE\nuniform sampler2D MATERIAL_HAS_EMISSIVETEXTURE;\n#endif\n#ifdef MATERIAL_ROUGHNESSMETALLICTEXTURE\nuniform sampler2D material_RoughnessMetallicTexture;\n#endif\n#ifdef MATERIAL_HAS_SPECULARGLOSSINESSTEXTURE\nuniform sampler2D material_SpecularGlossinessTexture;\n#endif\n#ifdef MATERIAL_OCCLUSIONTEXTURE\nuniform sampler2D material_OcclusionTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEARCOATTEXTURE\nuniform sampler2D material_ClearCoatTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEARCOATROUGHNESSTEXTURE\nuniform sampler2D material_ClearCoatRoughnessTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEARCOATNORMALTEXTURE\nuniform sampler2D material_ClearCoatNormalTexture;\n#endif\nstruct ReflectedLight{vec3 directDiffuse;vec3 directSpecular;vec3 indirectDiffuse;vec3 indirectSpecular;};struct Geometry{vec3 position;vec3 normal;vec3 viewDir;float dotNV;\n#ifdef MATERIAL_CLEARCOAT\nvec3 clearCoatNormal;float clearCoatDotNV;\n#endif\n};struct Material{vec3 diffuseColor;float roughness;vec3 specularColor;float opacity;\n#ifdef MATERIAL_CLEARCOAT\nfloat clearCoat;float clearCoatRoughness;\n#endif\n};"; // eslint-disable-line
9585
+ var pbr_frag_define = "#define GLSLIFY 1\nuniform float material_AlphaCutoff;uniform vec4 material_BaseColor;uniform float material_Metal;uniform float material_Roughness;uniform vec3 material_PBRSpecularColor;uniform float material_Glossiness;uniform vec3 material_EmissiveColor;\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nuniform float material_ClearCoat;uniform float material_ClearCoatRoughness;\n#endif\nuniform float material_NormalIntensity;uniform float material_OcclusionIntensity;uniform float material_OcclusionTextureCoord;\n#ifdef MATERIAL_HAS_BASETEXTURE\nuniform sampler2D material_BaseTexture;\n#endif\n#ifdef MATERIAL_HAS_NORMALTEXTURE\nuniform sampler2D material_NormalTexture;\n#endif\n#ifdef MATERIAL_HAS_EMISSIVETEXTURE\nuniform sampler2D material_EmissiveTexture;\n#endif\n#ifdef MATERIAL_HAS_ROUGHNESS_METALLIC_TEXTURE\nuniform sampler2D material_RoughnessMetallicTexture;\n#endif\n#ifdef MATERIAL_HAS_SPECULAR_GLOSSINESS_TEXTURE\nuniform sampler2D material_SpecularGlossinessTexture;\n#endif\n#ifdef MATERIAL_HAS_OCCLUSION_TEXTURE\nuniform sampler2D material_OcclusionTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEAR_COAT_TEXTURE\nuniform sampler2D material_ClearCoatTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEAR_COAT_ROUGHNESS_TEXTURE\nuniform sampler2D material_ClearCoatRoughnessTexture;\n#endif\n#ifdef MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE\nuniform sampler2D material_ClearCoatNormalTexture;\n#endif\nstruct ReflectedLight{vec3 directDiffuse;vec3 directSpecular;vec3 indirectDiffuse;vec3 indirectSpecular;};struct Geometry{vec3 position;vec3 normal;vec3 viewDir;float dotNV;\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nvec3 clearCoatNormal;float clearCoatDotNV;\n#endif\n};struct Material{vec3 diffuseColor;float roughness;vec3 specularColor;float opacity;\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nfloat clearCoat;float clearCoatRoughness;\n#endif\n};"; // eslint-disable-line
9634
9586
 
9635
- var pbr_helper = "#define GLSLIFY 1\n#include <normal_get>\nfloat computeSpecularOcclusion(float ambientOcclusion,float roughness,float dotNV){return saturate(pow(dotNV+ambientOcclusion,exp2(-16.0*roughness-1.0))-1.0+ambientOcclusion);}float getAARoughnessFactor(vec3 normal){\n#ifdef HAS_DERIVATIVES\nvec3 dxy=max(abs(dFdx(normal)),abs(dFdy(normal)));return 0.04+max(max(dxy.x,dxy.y),dxy.z);\n#else\nreturn 0.04;\n#endif\n}void initGeometry(out Geometry geometry){geometry.position=v_pos;geometry.viewDir=normalize(camera_Position-v_pos);\n#if defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE)\nmat3 tbn=getTBN();\n#endif\n#ifdef MATERIAL_HAS_NORMALTEXTURE\ngeometry.normal=getNormalByNormalTexture(tbn,material_NormalTexture,material_NormalIntensity,v_uv);\n#else\ngeometry.normal=getNormal();\n#endif\ngeometry.dotNV=saturate(dot(geometry.normal,geometry.viewDir));\n#ifdef MATERIAL_CLEARCOAT\n#ifdef MATERIAL_HAS_CLEARCOATNORMALTEXTURE\ngeometry.clearCoatNormal=getNormalByNormalTexture(tbn,material_ClearCoatNormalTexture,material_NormalIntensity,v_uv);\n#else\ngeometry.clearCoatNormal=getNormal();\n#endif\ngeometry.clearCoatDotNV=saturate(dot(geometry.clearCoatNormal,geometry.viewDir));\n#endif\n}void initMaterial(out Material material,const in Geometry geometry){vec4 baseColor=material_BaseColor;float metal=material_Metal;float roughness=material_Roughness;vec3 specularColor=material_PBRSpecularColor;float glossiness=material_Glossiness;float alphaCutoff=material_AlphaCutoff;\n#ifdef MATERIAL_HAS_BASETEXTURE\nvec4 baseTextureColor=texture2D(material_BaseTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nbaseTextureColor=gammaToLinear(baseTextureColor);\n#endif\nbaseColor*=baseTextureColor;\n#endif\n#ifdef RENDERER_HAS_VERTEXCOLOR\nbaseColor*=v_color;\n#endif\n#ifdef MATERIAL_IS_ALPHA_CUTOFF\nif(baseColor.a<alphaCutoff){discard;}\n#endif\n#ifdef MATERIAL_ROUGHNESSMETALLICTEXTURE\nvec4 metalRoughMapColor=texture2D(material_RoughnessMetallicTexture,v_uv);roughness*=metalRoughMapColor.g;metal*=metalRoughMapColor.b;\n#endif\n#ifdef MATERIAL_HAS_SPECULARGLOSSINESSTEXTURE\nvec4 specularGlossinessColor=texture2D(material_SpecularGlossinessTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nspecularGlossinessColor=gammaToLinear(specularGlossinessColor);\n#endif\nspecularColor*=specularGlossinessColor.rgb;glossiness*=specularGlossinessColor.a;\n#endif\n#ifdef IS_METALLIC_WORKFLOW\nmaterial.diffuseColor=baseColor.rgb*(1.0-metal);material.specularColor=mix(vec3(0.04),baseColor.rgb,metal);material.roughness=roughness;\n#else\nfloat specularStrength=max(max(specularColor.r,specularColor.g),specularColor.b);material.diffuseColor=baseColor.rgb*(1.0-specularStrength);material.specularColor=specularColor;material.roughness=1.0-glossiness;\n#endif\nmaterial.roughness=max(material.roughness,getAARoughnessFactor(geometry.normal));\n#ifdef MATERIAL_CLEARCOAT\nmaterial.clearCoat=material_ClearCoat;material.clearCoatRoughness=material_ClearCoatRoughness;\n#ifdef MATERIAL_HAS_CLEARCOATTEXTURE\nmaterial.clearCoat*=texture2D(material_ClearCoatTexture,v_uv).r;\n#endif\n#ifdef MATERIAL_HAS_CLEARCOATROUGHNESSTEXTURE\nmaterial.clearCoatRoughness*=texture2D(material_ClearCoatRoughnessTexture,v_uv).g;\n#endif\nmaterial.clearCoat=saturate(material.clearCoat);material.clearCoatRoughness=max(material.clearCoatRoughness,getAARoughnessFactor(geometry.clearCoatNormal));\n#endif\n#ifdef MATERIAL_IS_TRANSPARENT\nmaterial.opacity=baseColor.a;\n#else\nmaterial.opacity=1.0;\n#endif\n}\n#include <brdf>\n#include <direct_irradiance_frag_define>\n#include <ibl_frag_define>\n"; // eslint-disable-line
9587
+ var pbr_helper = "#define GLSLIFY 1\n#include <normal_get>\nfloat computeSpecularOcclusion(float ambientOcclusion,float roughness,float dotNV){return saturate(pow(dotNV+ambientOcclusion,exp2(-16.0*roughness-1.0))-1.0+ambientOcclusion);}float getAARoughnessFactor(vec3 normal){\n#ifdef HAS_DERIVATIVES\nvec3 dxy=max(abs(dFdx(normal)),abs(dFdy(normal)));return 0.04+max(max(dxy.x,dxy.y),dxy.z);\n#else\nreturn 0.04;\n#endif\n}void initGeometry(out Geometry geometry){geometry.position=v_pos;geometry.viewDir=normalize(camera_Position-v_pos);\n#if defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE)\nmat3 tbn=getTBN();\n#endif\n#ifdef MATERIAL_HAS_NORMALTEXTURE\ngeometry.normal=getNormalByNormalTexture(tbn,material_NormalTexture,material_NormalIntensity,v_uv);\n#else\ngeometry.normal=getNormal();\n#endif\ngeometry.dotNV=saturate(dot(geometry.normal,geometry.viewDir));\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\n#ifdef MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE\ngeometry.clearCoatNormal=getNormalByNormalTexture(tbn,material_ClearCoatNormalTexture,material_NormalIntensity,v_uv);\n#else\ngeometry.clearCoatNormal=getNormal();\n#endif\ngeometry.clearCoatDotNV=saturate(dot(geometry.clearCoatNormal,geometry.viewDir));\n#endif\n}void initMaterial(out Material material,const in Geometry geometry){vec4 baseColor=material_BaseColor;float metal=material_Metal;float roughness=material_Roughness;vec3 specularColor=material_PBRSpecularColor;float glossiness=material_Glossiness;float alphaCutoff=material_AlphaCutoff;\n#ifdef MATERIAL_HAS_BASETEXTURE\nvec4 baseTextureColor=texture2D(material_BaseTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nbaseTextureColor=gammaToLinear(baseTextureColor);\n#endif\nbaseColor*=baseTextureColor;\n#endif\n#ifdef RENDERER_HAS_VERTEXCOLOR\nbaseColor*=v_color;\n#endif\n#ifdef MATERIAL_IS_ALPHA_CUTOFF\nif(baseColor.a<alphaCutoff){discard;}\n#endif\n#ifdef MATERIAL_HAS_ROUGHNESS_METALLIC_TEXTURE\nvec4 metalRoughMapColor=texture2D(material_RoughnessMetallicTexture,v_uv);roughness*=metalRoughMapColor.g;metal*=metalRoughMapColor.b;\n#endif\n#ifdef MATERIAL_HAS_SPECULAR_GLOSSINESS_TEXTURE\nvec4 specularGlossinessColor=texture2D(material_SpecularGlossinessTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nspecularGlossinessColor=gammaToLinear(specularGlossinessColor);\n#endif\nspecularColor*=specularGlossinessColor.rgb;glossiness*=specularGlossinessColor.a;\n#endif\n#ifdef IS_METALLIC_WORKFLOW\nmaterial.diffuseColor=baseColor.rgb*(1.0-metal);material.specularColor=mix(vec3(0.04),baseColor.rgb,metal);material.roughness=roughness;\n#else\nfloat specularStrength=max(max(specularColor.r,specularColor.g),specularColor.b);material.diffuseColor=baseColor.rgb*(1.0-specularStrength);material.specularColor=specularColor;material.roughness=1.0-glossiness;\n#endif\nmaterial.roughness=max(material.roughness,getAARoughnessFactor(geometry.normal));\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nmaterial.clearCoat=material_ClearCoat;material.clearCoatRoughness=material_ClearCoatRoughness;\n#ifdef MATERIAL_HAS_CLEAR_COAT_TEXTURE\nmaterial.clearCoat*=texture2D(material_ClearCoatTexture,v_uv).r;\n#endif\n#ifdef MATERIAL_HAS_CLEAR_COAT_ROUGHNESS_TEXTURE\nmaterial.clearCoatRoughness*=texture2D(material_ClearCoatRoughnessTexture,v_uv).g;\n#endif\nmaterial.clearCoat=saturate(material.clearCoat);material.clearCoatRoughness=max(material.clearCoatRoughness,getAARoughnessFactor(geometry.clearCoatNormal));\n#endif\n#ifdef MATERIAL_IS_TRANSPARENT\nmaterial.opacity=baseColor.a;\n#else\nmaterial.opacity=1.0;\n#endif\n}\n#include <brdf>\n#include <direct_irradiance_frag_define>\n#include <ibl_frag_define>\n"; // eslint-disable-line
9636
9588
 
9637
9589
  var brdf = "#define GLSLIFY 1\nfloat F_Schlick(float dotLH){return 0.04+0.96*(pow(1.0-dotLH,5.0));}vec3 F_Schlick(vec3 specularColor,float dotLH){float fresnel=exp2((-5.55473*dotLH-6.98316)*dotLH);return(1.0-specularColor)*fresnel+specularColor;}float G_GGX_SmithCorrelated(float alpha,float dotNL,float dotNV){float a2=pow2(alpha);float gv=dotNL*sqrt(a2+(1.0-a2)*pow2(dotNV));float gl=dotNV*sqrt(a2+(1.0-a2)*pow2(dotNL));return 0.5/max(gv+gl,EPSILON);}float D_GGX(float alpha,float dotNH){float a2=pow2(alpha);float denom=pow2(dotNH)*(a2-1.0)+1.0;return RECIPROCAL_PI*a2/pow2(denom);}vec3 BRDF_Specular_GGX(vec3 incidentDirection,vec3 viewDir,vec3 normal,vec3 specularColor,float roughness){float alpha=pow2(roughness);vec3 halfDir=normalize(incidentDirection+viewDir);float dotNL=saturate(dot(normal,incidentDirection));float dotNV=saturate(dot(normal,viewDir));float dotNH=saturate(dot(normal,halfDir));float dotLH=saturate(dot(incidentDirection,halfDir));vec3 F=F_Schlick(specularColor,dotLH);float G=G_GGX_SmithCorrelated(alpha,dotNL,dotNV);float D=D_GGX(alpha,dotNH);return F*(G*D);}vec3 BRDF_Diffuse_Lambert(vec3 diffuseColor){return RECIPROCAL_PI*diffuseColor;}"; // eslint-disable-line
9638
9590
 
9639
- var direct_irradiance_frag_define = "#define GLSLIFY 1\n#include <ShadowFragmentDeclaration>\nvoid addDirectRadiance(vec3 incidentDirection,vec3 color,Geometry geometry,Material material,inout ReflectedLight reflectedLight){float attenuation=1.0;\n#ifdef MATERIAL_CLEARCOAT\nfloat clearCoatDotNL=saturate(dot(geometry.clearCoatNormal,incidentDirection));vec3 clearCoatIrradiance=clearCoatDotNL*color;reflectedLight.directSpecular+=material.clearCoat*clearCoatIrradiance*BRDF_Specular_GGX(incidentDirection,geometry.viewDir,geometry.clearCoatNormal,vec3(0.04),material.clearCoatRoughness);attenuation-=material.clearCoat*F_Schlick(geometry.clearCoatDotNV);\n#endif\nfloat dotNL=saturate(dot(geometry.normal,incidentDirection));vec3 irradiance=dotNL*color*PI;reflectedLight.directSpecular+=attenuation*irradiance*BRDF_Specular_GGX(incidentDirection,geometry.viewDir,geometry.normal,material.specularColor,material.roughness);reflectedLight.directDiffuse+=attenuation*irradiance*BRDF_Diffuse_Lambert(material.diffuseColor);}\n#ifdef SCENE_DIRECT_LIGHT_COUNT\nvoid addDirectionalDirectLightRadiance(DirectLight directionalLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 color=directionalLight.color;vec3 direction=-directionalLight.direction;addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_POINT_LIGHT_COUNT\nvoid addPointDirectLightRadiance(PointLight pointLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 lVector=pointLight.position-geometry.position;vec3 direction=normalize(lVector);float lightDistance=length(lVector);vec3 color=pointLight.color;color*=clamp(1.0-pow(lightDistance/pointLight.distance,4.0),0.0,1.0);addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_SPOT_LIGHT_COUNT\nvoid addSpotDirectLightRadiance(SpotLight spotLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 lVector=spotLight.position-geometry.position;vec3 direction=normalize(lVector);float lightDistance=length(lVector);float angleCos=dot(direction,-spotLight.direction);float spotEffect=smoothstep(spotLight.penumbraCos,spotLight.angleCos,angleCos);float decayEffect=clamp(1.0-pow(lightDistance/spotLight.distance,4.0),0.0,1.0);vec3 color=spotLight.color;color*=spotEffect*decayEffect;addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\nvoid addTotalDirectRadiance(Geometry geometry,Material material,inout ReflectedLight reflectedLight){float shadowAttenuation=1.0;\n#ifdef SCENE_DIRECT_LIGHT_COUNT\nshadowAttenuation=1.0;\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nshadowAttenuation*=sampleShadowMap();int sunIndex=int(scene_ShadowInfo.z);\n#endif\nDirectLight directionalLight;for(int i=0;i<SCENE_DIRECT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_DirectLightCullingMask[i]))continue;directionalLight.color=scene_DirectLightColor[i];\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nif(i==sunIndex){directionalLight.color*=shadowAttenuation;}\n#endif\ndirectionalLight.direction=scene_DirectLightDirection[i];addDirectionalDirectLightRadiance(directionalLight,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_POINT_LIGHT_COUNT\nPointLight pointLight;for(int i=0;i<SCENE_POINT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_PointLightCullingMask[i]))continue;pointLight.color=scene_PointLightColor[i];pointLight.position=scene_PointLightPosition[i];pointLight.distance=scene_PointLightDistance[i];addPointDirectLightRadiance(pointLight,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_SPOT_LIGHT_COUNT\nSpotLight spotLight;for(int i=0;i<SCENE_SPOT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_SpotLightCullingMask[i]))continue;spotLight.color=scene_SpotLightColor[i];spotLight.position=scene_SpotLightPosition[i];spotLight.direction=scene_SpotLightDirection[i];spotLight.distance=scene_SpotLightDistance[i];spotLight.angleCos=scene_SpotLightAngleCos[i];spotLight.penumbraCos=scene_SpotLightPenumbraCos[i];addSpotDirectLightRadiance(spotLight,geometry,material,reflectedLight);}\n#endif\n}"; // eslint-disable-line
9591
+ var direct_irradiance_frag_define = "#define GLSLIFY 1\n#include <ShadowFragmentDeclaration>\nvoid addDirectRadiance(vec3 incidentDirection,vec3 color,Geometry geometry,Material material,inout ReflectedLight reflectedLight){float attenuation=1.0;\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nfloat clearCoatDotNL=saturate(dot(geometry.clearCoatNormal,incidentDirection));vec3 clearCoatIrradiance=clearCoatDotNL*color;reflectedLight.directSpecular+=material.clearCoat*clearCoatIrradiance*BRDF_Specular_GGX(incidentDirection,geometry.viewDir,geometry.clearCoatNormal,vec3(0.04),material.clearCoatRoughness);attenuation-=material.clearCoat*F_Schlick(geometry.clearCoatDotNV);\n#endif\nfloat dotNL=saturate(dot(geometry.normal,incidentDirection));vec3 irradiance=dotNL*color*PI;reflectedLight.directSpecular+=attenuation*irradiance*BRDF_Specular_GGX(incidentDirection,geometry.viewDir,geometry.normal,material.specularColor,material.roughness);reflectedLight.directDiffuse+=attenuation*irradiance*BRDF_Diffuse_Lambert(material.diffuseColor);}\n#ifdef SCENE_DIRECT_LIGHT_COUNT\nvoid addDirectionalDirectLightRadiance(DirectLight directionalLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 color=directionalLight.color;vec3 direction=-directionalLight.direction;addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_POINT_LIGHT_COUNT\nvoid addPointDirectLightRadiance(PointLight pointLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 lVector=pointLight.position-geometry.position;vec3 direction=normalize(lVector);float lightDistance=length(lVector);vec3 color=pointLight.color;color*=clamp(1.0-pow(lightDistance/pointLight.distance,4.0),0.0,1.0);addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_SPOT_LIGHT_COUNT\nvoid addSpotDirectLightRadiance(SpotLight spotLight,Geometry geometry,Material material,inout ReflectedLight reflectedLight){vec3 lVector=spotLight.position-geometry.position;vec3 direction=normalize(lVector);float lightDistance=length(lVector);float angleCos=dot(direction,-spotLight.direction);float spotEffect=smoothstep(spotLight.penumbraCos,spotLight.angleCos,angleCos);float decayEffect=clamp(1.0-pow(lightDistance/spotLight.distance,4.0),0.0,1.0);vec3 color=spotLight.color;color*=spotEffect*decayEffect;addDirectRadiance(direction,color,geometry,material,reflectedLight);}\n#endif\nvoid addTotalDirectRadiance(Geometry geometry,Material material,inout ReflectedLight reflectedLight){float shadowAttenuation=1.0;\n#ifdef SCENE_DIRECT_LIGHT_COUNT\nshadowAttenuation=1.0;\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nshadowAttenuation*=sampleShadowMap();int sunIndex=int(scene_ShadowInfo.z);\n#endif\nDirectLight directionalLight;for(int i=0;i<SCENE_DIRECT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_DirectLightCullingMask[i]))continue;directionalLight.color=scene_DirectLightColor[i];\n#ifdef SCENE_IS_CALCULATE_SHADOWS\nif(i==sunIndex){directionalLight.color*=shadowAttenuation;}\n#endif\ndirectionalLight.direction=scene_DirectLightDirection[i];addDirectionalDirectLightRadiance(directionalLight,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_POINT_LIGHT_COUNT\nPointLight pointLight;for(int i=0;i<SCENE_POINT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_PointLightCullingMask[i]))continue;pointLight.color=scene_PointLightColor[i];pointLight.position=scene_PointLightPosition[i];pointLight.distance=scene_PointLightDistance[i];addPointDirectLightRadiance(pointLight,geometry,material,reflectedLight);}\n#endif\n#ifdef SCENE_SPOT_LIGHT_COUNT\nSpotLight spotLight;for(int i=0;i<SCENE_SPOT_LIGHT_COUNT;i++){if(isRendererCulledByLight(renderer_Layer.xy,scene_SpotLightCullingMask[i]))continue;spotLight.color=scene_SpotLightColor[i];spotLight.position=scene_SpotLightPosition[i];spotLight.direction=scene_SpotLightDirection[i];spotLight.distance=scene_SpotLightDistance[i];spotLight.angleCos=scene_SpotLightAngleCos[i];spotLight.penumbraCos=scene_SpotLightPenumbraCos[i];addSpotDirectLightRadiance(spotLight,geometry,material,reflectedLight);}\n#endif\n}"; // eslint-disable-line
9640
9592
 
9641
9593
  var ibl_frag_define = "#define GLSLIFY 1\nvec3 getLightProbeIrradiance(vec3 sh[9],vec3 normal){normal.x=-normal.x;vec3 result=sh[0]+sh[1]*(normal.y)+sh[2]*(normal.z)+sh[3]*(normal.x)+sh[4]*(normal.y*normal.x)+sh[5]*(normal.y*normal.z)+sh[6]*(3.0*normal.z*normal.z-1.0)+sh[7]*(normal.z*normal.x)+sh[8]*(normal.x*normal.x-normal.y*normal.y);return max(result,vec3(0.0));}vec3 envBRDFApprox(vec3 specularColor,float roughness,float dotNV){const vec4 c0=vec4(-1,-0.0275,-0.572,0.022);const vec4 c1=vec4(1,0.0425,1.04,-0.04);vec4 r=roughness*c0+c1;float a004=min(r.x*r.x,exp2(-9.28*dotNV))*r.x+r.y;vec2 AB=vec2(-1.04,1.04)*a004+r.zw;return specularColor*AB.x+AB.y;}float getSpecularMIPLevel(float roughness,int maxMIPLevel){return roughness*float(maxMIPLevel);}vec3 getLightProbeRadiance(vec3 viewDir,vec3 normal,float roughness,int maxMIPLevel,float specularIntensity){\n#ifndef SCENE_USE_SPECULAR_ENV\nreturn vec3(0);\n#else\nvec3 reflectVec=reflect(-viewDir,normal);reflectVec.x=-reflectVec.x;float specularMIPLevel=getSpecularMIPLevel(roughness,maxMIPLevel);\n#ifdef HAS_TEX_LOD\nvec4 envMapColor=textureCubeLodEXT(scene_EnvSpecularSampler,reflectVec,specularMIPLevel);\n#else\nvec4 envMapColor=textureCube(scene_EnvSpecularSampler,reflectVec,specularMIPLevel);\n#endif\n#ifdef SCENE_IS_DECODE_ENV_RGBM\nenvMapColor.rgb=RGBMToLinear(envMapColor,5.0).rgb;\n#ifdef ENGINE_IS_COLORSPACE_GAMMA\nenvMapColor=linearToGamma(envMapColor);\n#endif\n#else\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nenvMapColor=gammaToLinear(envMapColor);\n#endif\n#endif\nreturn envMapColor.rgb*specularIntensity;\n#endif\n}"; // eslint-disable-line
9642
9594
 
9643
- var pbr_frag = "#define GLSLIFY 1\nGeometry geometry;Material material;ReflectedLight reflectedLight=ReflectedLight(vec3(0.0),vec3(0.0),vec3(0.0),vec3(0.0));initGeometry(geometry);initMaterial(material,geometry);addTotalDirectRadiance(geometry,material,reflectedLight);\n#ifdef SCENE_USE_SH\nvec3 irradiance=getLightProbeIrradiance(scene_EnvSH,geometry.normal);\n#ifdef ENGINE_IS_COLORSPACE_GAMMA\nirradiance=linearToGamma(vec4(irradiance,1.0)).rgb;\n#endif\nirradiance*=scene_EnvMapLight.diffuseIntensity;\n#else\nvec3 irradiance=scene_EnvMapLight.diffuse*scene_EnvMapLight.diffuseIntensity;irradiance*=PI;\n#endif\nreflectedLight.indirectDiffuse+=irradiance*BRDF_Diffuse_Lambert(material.diffuseColor);vec3 radiance=getLightProbeRadiance(geometry.viewDir,geometry.normal,material.roughness,int(scene_EnvMapLight.mipMapLevel),scene_EnvMapLight.specularIntensity);float radianceAttenuation=1.0;\n#ifdef MATERIAL_CLEARCOAT\nvec3 clearCoatRadiance=getLightProbeRadiance(geometry.viewDir,geometry.clearCoatNormal,material.clearCoatRoughness,int(scene_EnvMapLight.mipMapLevel),scene_EnvMapLight.specularIntensity);reflectedLight.indirectSpecular+=clearCoatRadiance*material.clearCoat*envBRDFApprox(vec3(0.04),material.clearCoatRoughness,geometry.clearCoatDotNV);radianceAttenuation-=material.clearCoat*F_Schlick(geometry.clearCoatDotNV);\n#endif\nreflectedLight.indirectSpecular+=radianceAttenuation*radiance*envBRDFApprox(material.specularColor,material.roughness,geometry.dotNV);\n#ifdef MATERIAL_OCCLUSIONTEXTURE\nvec2 aoUV=v_uv;\n#ifdef RENDERER_HAS_UV1\nif(material_OcclusionTextureCoord==1.0){aoUV=v_uv1;}\n#endif\nfloat ambientOcclusion=(texture2D(material_OcclusionTexture,aoUV).r-1.0)*material_OcclusionIntensity+1.0;reflectedLight.indirectDiffuse*=ambientOcclusion;\n#ifdef SCENE_USE_SPECULAR_ENV\nreflectedLight.indirectSpecular*=computeSpecularOcclusion(ambientOcclusion,material.roughness,geometry.dotNV);\n#endif\n#endif\nvec3 emissiveRadiance=material_EmissiveColor;\n#ifdef MATERIAL_HAS_EMISSIVETEXTURE\nvec4 emissiveColor=texture2D(material_EmissiveTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nemissiveColor=gammaToLinear(emissiveColor);\n#endif\nemissiveRadiance*=emissiveColor.rgb;\n#endif\nvec3 totalRadiance=reflectedLight.directDiffuse+reflectedLight.indirectDiffuse+reflectedLight.directSpecular+reflectedLight.indirectSpecular+emissiveRadiance;vec4 targetColor=vec4(totalRadiance,material.opacity);gl_FragColor=targetColor;"; // eslint-disable-line
9595
+ var pbr_frag = "#define GLSLIFY 1\nGeometry geometry;Material material;ReflectedLight reflectedLight=ReflectedLight(vec3(0.0),vec3(0.0),vec3(0.0),vec3(0.0));initGeometry(geometry);initMaterial(material,geometry);addTotalDirectRadiance(geometry,material,reflectedLight);\n#ifdef SCENE_USE_SH\nvec3 irradiance=getLightProbeIrradiance(scene_EnvSH,geometry.normal);\n#ifdef ENGINE_IS_COLORSPACE_GAMMA\nirradiance=linearToGamma(vec4(irradiance,1.0)).rgb;\n#endif\nirradiance*=scene_EnvMapLight.diffuseIntensity;\n#else\nvec3 irradiance=scene_EnvMapLight.diffuse*scene_EnvMapLight.diffuseIntensity;irradiance*=PI;\n#endif\nreflectedLight.indirectDiffuse+=irradiance*BRDF_Diffuse_Lambert(material.diffuseColor);vec3 radiance=getLightProbeRadiance(geometry.viewDir,geometry.normal,material.roughness,int(scene_EnvMapLight.mipMapLevel),scene_EnvMapLight.specularIntensity);float radianceAttenuation=1.0;\n#ifdef MATERIAL_ENABLE_CLEAR_COAT\nvec3 clearCoatRadiance=getLightProbeRadiance(geometry.viewDir,geometry.clearCoatNormal,material.clearCoatRoughness,int(scene_EnvMapLight.mipMapLevel),scene_EnvMapLight.specularIntensity);reflectedLight.indirectSpecular+=clearCoatRadiance*material.clearCoat*envBRDFApprox(vec3(0.04),material.clearCoatRoughness,geometry.clearCoatDotNV);radianceAttenuation-=material.clearCoat*F_Schlick(geometry.clearCoatDotNV);\n#endif\nreflectedLight.indirectSpecular+=radianceAttenuation*radiance*envBRDFApprox(material.specularColor,material.roughness,geometry.dotNV);\n#ifdef MATERIAL_HAS_OCCLUSION_TEXTURE\nvec2 aoUV=v_uv;\n#ifdef RENDERER_HAS_UV1\nif(material_OcclusionTextureCoord==1.0){aoUV=v_uv1;}\n#endif\nfloat ambientOcclusion=(texture2D(material_OcclusionTexture,aoUV).r-1.0)*material_OcclusionIntensity+1.0;reflectedLight.indirectDiffuse*=ambientOcclusion;\n#ifdef SCENE_USE_SPECULAR_ENV\nreflectedLight.indirectSpecular*=computeSpecularOcclusion(ambientOcclusion,material.roughness,geometry.dotNV);\n#endif\n#endif\nvec3 emissiveRadiance=material_EmissiveColor;\n#ifdef MATERIAL_HAS_EMISSIVETEXTURE\nvec4 emissiveColor=texture2D(material_EmissiveTexture,v_uv);\n#ifndef ENGINE_IS_COLORSPACE_GAMMA\nemissiveColor=gammaToLinear(emissiveColor);\n#endif\nemissiveRadiance*=emissiveColor.rgb;\n#endif\nvec3 totalRadiance=reflectedLight.directDiffuse+reflectedLight.indirectDiffuse+reflectedLight.directSpecular+reflectedLight.indirectSpecular+emissiveRadiance;vec4 targetColor=vec4(totalRadiance,material.opacity);gl_FragColor=targetColor;"; // eslint-disable-line
9644
9596
 
9645
9597
  var PBRShaderLib = {
9646
9598
  pbr_frag_define: pbr_frag_define,
@@ -9669,7 +9621,7 @@ var ShadowLib = {
9669
9621
  ShadowVertex: ShadowVertex
9670
9622
  };
9671
9623
 
9672
- var normal_get = "#define GLSLIFY 1\nvec3 getNormal(){\n#ifdef RENDERER_HAS_NORMAL\nvec3 normal=normalize(v_normal);\n#elif defined(HAS_DERIVATIVES)\nvec3 pos_dx=dFdx(v_pos);vec3 pos_dy=dFdy(v_pos);vec3 normal=normalize(cross(pos_dx,pos_dy));\n#else\nvec3 normal=vec3(0,0,1);\n#endif\nnormal*=float(gl_FrontFacing)*2.0-1.0;return normal;}vec3 getNormalByNormalTexture(mat3 tbn,sampler2D normalTexture,float normalIntensity,vec2 uv){vec3 normal=texture2D(normalTexture,uv).rgb;normal=normalize(tbn*((2.0*normal-1.0)*vec3(normalIntensity,normalIntensity,1.0)));normal*=float(gl_FrontFacing)*2.0-1.0;return normal;}mat3 getTBN(){\n#if defined(RENDERER_HAS_NORMAL) && defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEARCOATNORMALTEXTURE) )\nmat3 tbn=v_TBN;\n#else\nvec3 normal=getNormal();vec3 position=v_pos;vec2 uv=gl_FrontFacing? v_uv:-v_uv;\n#ifdef HAS_DERIVATIVES\nvec3 dp1=dFdx(position);vec3 dp2=dFdy(position);vec2 duv1=dFdx(uv);vec2 duv2=dFdy(uv);vec3 dp2perp=cross(dp2,normal);vec3 dp1perp=cross(normal,dp1);vec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;vec3 binormal=dp2perp*duv1.y+dp1perp*duv2.y;float invmax=inversesqrt(max(dot(tangent,tangent),dot(binormal,binormal)));mat3 tbn=mat3(tangent*invmax,binormal*invmax,normal);\n#else\nmat3 tbn=mat3(vec3(0.0),vec3(0.0),normal);\n#endif\n#endif\nreturn tbn;}"; // eslint-disable-line
9624
+ var normal_get = "#define GLSLIFY 1\nvec3 getNormal(){\n#ifdef RENDERER_HAS_NORMAL\nvec3 normal=normalize(v_normal);\n#elif defined(HAS_DERIVATIVES)\nvec3 pos_dx=dFdx(v_pos);vec3 pos_dy=dFdy(v_pos);vec3 normal=normalize(cross(pos_dx,pos_dy));\n#else\nvec3 normal=vec3(0,0,1);\n#endif\nnormal*=float(gl_FrontFacing)*2.0-1.0;return normal;}vec3 getNormalByNormalTexture(mat3 tbn,sampler2D normalTexture,float normalIntensity,vec2 uv){vec3 normal=texture2D(normalTexture,uv).rgb;normal=normalize(tbn*((2.0*normal-1.0)*vec3(normalIntensity,normalIntensity,1.0)));normal*=float(gl_FrontFacing)*2.0-1.0;return normal;}mat3 getTBN(){\n#if defined(RENDERER_HAS_NORMAL) && defined(RENDERER_HAS_TANGENT) && ( defined(MATERIAL_HAS_NORMALTEXTURE) || defined(MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE) )\nmat3 tbn=v_TBN;\n#else\nvec3 normal=getNormal();vec3 position=v_pos;vec2 uv=gl_FrontFacing? v_uv:-v_uv;\n#ifdef HAS_DERIVATIVES\nvec3 dp1=dFdx(position);vec3 dp2=dFdy(position);vec2 duv1=dFdx(uv);vec2 duv2=dFdy(uv);vec3 dp2perp=cross(dp2,normal);vec3 dp1perp=cross(normal,dp1);vec3 tangent=dp2perp*duv1.x+dp1perp*duv2.x;vec3 binormal=dp2perp*duv1.y+dp1perp*duv2.y;float invmax=inversesqrt(max(dot(tangent,tangent),dot(binormal,binormal)));mat3 tbn=mat3(tangent*invmax,binormal*invmax,normal);\n#else\nmat3 tbn=mat3(vec3(0.0),vec3(0.0),normal);\n#endif\n#endif\nreturn tbn;}"; // eslint-disable-line
9673
9625
 
9674
9626
  var ShaderLib = _extends({
9675
9627
  common: common,
@@ -10784,7 +10736,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10784
10736
  };
10785
10737
  _proto.update = function update(deltaTime) {};
10786
10738
  /**
10787
- * @override
10788
10739
  * @internal
10789
10740
  */ _proto._onEnable = function _onEnable() {
10790
10741
  var componentsManager = this.engine._componentsManager;
@@ -10794,7 +10745,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10794
10745
  componentsManager.addRenderer(this);
10795
10746
  };
10796
10747
  /**
10797
- * @override
10798
10748
  * @internal
10799
10749
  */ _proto._onDisable = function _onDisable() {
10800
10750
  var componentsManager = this.engine._componentsManager;
@@ -10821,7 +10771,6 @@ exports.Renderer = (_Renderer = /*#__PURE__*/ function(Component) {
10821
10771
  ShaderMacroCollection.unionCollection(context.camera._globalShaderMacro, this.shaderData._macroCollection, this._globalShaderMacro);
10822
10772
  };
10823
10773
  /**
10824
- * @override
10825
10774
  * @internal
10826
10775
  */ _proto._onDestroy = function _onDestroy() {
10827
10776
  Component.prototype._onDestroy.call(this);
@@ -11214,9 +11163,7 @@ SimpleSpriteAssembler = __decorate([
11214
11163
  */ _proto._cloneTo = function _cloneTo(target) {
11215
11164
  target.sprite = this._sprite;
11216
11165
  };
11217
- /**
11218
- * @override
11219
- */ _proto._updateBounds = function _updateBounds(worldBounds) {
11166
+ _proto._updateBounds = function _updateBounds(worldBounds) {
11220
11167
  var _this_sprite;
11221
11168
  if (!((_this_sprite = this.sprite) == null ? void 0 : _this_sprite.texture) || !this.width || !this.height) {
11222
11169
  worldBounds.min.set(0, 0, 0);
@@ -11226,7 +11173,6 @@ SimpleSpriteAssembler = __decorate([
11226
11173
  }
11227
11174
  };
11228
11175
  /**
11229
- * @override
11230
11176
  * @inheritdoc
11231
11177
  */ _proto._render = function _render(context) {
11232
11178
  var _this_sprite;
@@ -11252,7 +11198,6 @@ SimpleSpriteAssembler = __decorate([
11252
11198
  this._maskElement = renderElement;
11253
11199
  };
11254
11200
  /**
11255
- * @override
11256
11201
  * @inheritdoc
11257
11202
  */ _proto._onDestroy = function _onDestroy() {
11258
11203
  var _this__sprite;
@@ -11673,16 +11618,11 @@ var BufferUtil = /*#__PURE__*/ function() {
11673
11618
  if (dataOffset === void 0) dataOffset = 0;
11674
11619
  this._platformBuffer.getData(data, bufferByteOffset, dataOffset, dataLength);
11675
11620
  };
11676
- /**
11677
- * @override
11678
- */ _proto._rebuild = function _rebuild() {
11621
+ _proto._rebuild = function _rebuild() {
11679
11622
  var platformBuffer = this._engine._hardwareRenderer.createPlatformBuffer(this._type, this._byteLength, this._bufferUsage);
11680
11623
  this._platformBuffer = platformBuffer;
11681
11624
  };
11682
- /**
11683
- * @override
11684
- * @internal
11685
- */ _proto._onDestroy = function _onDestroy() {
11625
+ _proto._onDestroy = function _onDestroy() {
11686
11626
  GraphicsResource.prototype._onDestroy.call(this);
11687
11627
  this._platformBuffer.destroy();
11688
11628
  };
@@ -11875,22 +11815,17 @@ var BufferUtil = /*#__PURE__*/ function() {
11875
11815
  this._platformPrimitive.draw(shaderProgram, subMesh);
11876
11816
  this._bufferStructChanged = false;
11877
11817
  };
11878
- /**
11879
- * @override
11880
- */ _proto._addReferCount = function _addReferCount(value) {
11818
+ _proto._addReferCount = function _addReferCount(value) {
11881
11819
  GraphicsResource.prototype._addReferCount.call(this, value);
11882
11820
  var vertexBufferBindings = this._vertexBufferBindings;
11883
11821
  for(var i = 0, n = vertexBufferBindings.length; i < n; i++){
11884
11822
  vertexBufferBindings[i]._buffer._addReferCount(value);
11885
11823
  }
11886
11824
  };
11887
- /**
11888
- * @override
11889
- */ _proto._rebuild = function _rebuild() {
11825
+ _proto._rebuild = function _rebuild() {
11890
11826
  this._engine._hardwareRenderer.createPlatformPrimitive(this);
11891
11827
  };
11892
11828
  /**
11893
- * @override
11894
11829
  * @internal
11895
11830
  */ _proto._onDestroy = function _onDestroy() {
11896
11831
  GraphicsResource.prototype._onDestroy.call(this);
@@ -13044,10 +12979,7 @@ var MeshModifyFlags;
13044
12979
  }
13045
12980
  this.setTangents(tangents);
13046
12981
  };
13047
- /**
13048
- * @override
13049
- * @internal
13050
- */ _proto._onDestroy = function _onDestroy() {
12982
+ _proto._onDestroy = function _onDestroy() {
13051
12983
  Mesh.prototype._onDestroy.call(this);
13052
12984
  this._readable && this._releaseCache();
13053
12985
  };
@@ -13522,10 +13454,7 @@ var VertexChangedFlags;
13522
13454
  return _this;
13523
13455
  }
13524
13456
  var _proto = MeshRenderer.prototype;
13525
- /**
13526
- * @internal
13527
- * @override
13528
- */ _proto._onDestroy = function _onDestroy() {
13457
+ _proto._onDestroy = function _onDestroy() {
13529
13458
  Renderer.prototype._onDestroy.call(this);
13530
13459
  var mesh = this._mesh;
13531
13460
  if (mesh && !mesh.destroyed) {
@@ -13538,9 +13467,7 @@ var VertexChangedFlags;
13538
13467
  */ _proto._cloneTo = function _cloneTo(target) {
13539
13468
  target.mesh = this._mesh;
13540
13469
  };
13541
- /**
13542
- * @override
13543
- */ _proto._updateBounds = function _updateBounds(worldBounds) {
13470
+ _proto._updateBounds = function _updateBounds(worldBounds) {
13544
13471
  var mesh = this._mesh;
13545
13472
  if (mesh) {
13546
13473
  var localBounds = mesh.bounds;
@@ -13551,9 +13478,7 @@ var VertexChangedFlags;
13551
13478
  worldBounds.max.set(0, 0, 0);
13552
13479
  }
13553
13480
  };
13554
- /**
13555
- * @override
13556
- */ _proto._render = function _render(context) {
13481
+ _proto._render = function _render(context) {
13557
13482
  var mesh = this._mesh;
13558
13483
  if (mesh) {
13559
13484
  if (this._dirtyUpdateFlag & 0x2) {
@@ -13714,9 +13639,7 @@ var /**
13714
13639
  }
13715
13640
  }
13716
13641
  };
13717
- /**
13718
- * @override
13719
- */ _proto._updateShaderData = function _updateShaderData(context) {
13642
+ _proto._updateShaderData = function _updateShaderData(context) {
13720
13643
  var entity = this.entity;
13721
13644
  var worldMatrix = this._rootBone ? this._rootBone.transform.worldMatrix : entity.transform.worldMatrix;
13722
13645
  this._updateTransformShaderData(context, worldMatrix);
@@ -13771,14 +13694,10 @@ var /**
13771
13694
  MeshRenderer.prototype._cloneTo.call(this, target);
13772
13695
  this._blendShapeWeights && (target._blendShapeWeights = this._blendShapeWeights.slice());
13773
13696
  };
13774
- /**
13775
- * @override
13776
- */ _proto._registerEntityTransformListener = function _registerEntityTransformListener() {
13697
+ _proto._registerEntityTransformListener = function _registerEntityTransformListener() {
13777
13698
  // Cancel register listener to entity transform.
13778
13699
  };
13779
- /**
13780
- * @override
13781
- */ _proto._updateBounds = function _updateBounds(worldBounds) {
13700
+ _proto._updateBounds = function _updateBounds(worldBounds) {
13782
13701
  if (this._rootBone) {
13783
13702
  var localBounds = this._localBounds;
13784
13703
  var worldMatrix = this._rootBone.transform.worldMatrix;
@@ -13998,9 +13917,7 @@ __decorate([
13998
13917
  return _this;
13999
13918
  }
14000
13919
  var _proto = PrimitiveMeshRestorer.prototype;
14001
- /**
14002
- * @override
14003
- */ _proto.restoreContent = function restoreContent() {
13920
+ _proto.restoreContent = function restoreContent() {
14004
13921
  var primitiveInfo = this.primitiveInfo;
14005
13922
  switch(primitiveInfo.type){
14006
13923
  case 0:
@@ -14060,7 +13977,6 @@ var PrimitiveType;
14060
13977
  _this = PrimitiveRestoreInfo.call(this, 0, noLongerAccessible) || this;
14061
13978
  _this.radius = radius;
14062
13979
  _this.segments = segments;
14063
- _this.noLongerAccessible = noLongerAccessible;
14064
13980
  return _this;
14065
13981
  }
14066
13982
  return SphereRestoreInfo;
@@ -14075,7 +13991,6 @@ var PrimitiveType;
14075
13991
  _this.width = width;
14076
13992
  _this.height = height;
14077
13993
  _this.depth = depth;
14078
- _this.noLongerAccessible = noLongerAccessible;
14079
13994
  return _this;
14080
13995
  }
14081
13996
  return CuboidRestoreInfo;
@@ -14091,7 +14006,6 @@ var PrimitiveType;
14091
14006
  _this.height = height;
14092
14007
  _this.horizontalSegments = horizontalSegments;
14093
14008
  _this.verticalSegments = verticalSegments;
14094
- _this.noLongerAccessible = noLongerAccessible;
14095
14009
  return _this;
14096
14010
  }
14097
14011
  return PlaneRestoreInfo;
@@ -14108,7 +14022,6 @@ var PrimitiveType;
14108
14022
  _this.height = height;
14109
14023
  _this.radialSegments = radialSegments;
14110
14024
  _this.heightSegments = heightSegments;
14111
- _this.noLongerAccessible = noLongerAccessible;
14112
14025
  return _this;
14113
14026
  }
14114
14027
  return CylinderRestoreInfo;
@@ -14125,7 +14038,6 @@ var PrimitiveType;
14125
14038
  _this.radialSegments = radialSegments;
14126
14039
  _this.tubularSegments = tubularSegments;
14127
14040
  _this.arc = arc;
14128
- _this.noLongerAccessible = noLongerAccessible;
14129
14041
  return _this;
14130
14042
  }
14131
14043
  return TorusRestoreInfo;
@@ -14141,7 +14053,6 @@ var PrimitiveType;
14141
14053
  _this.height = height;
14142
14054
  _this.radialSegments = radialSegments;
14143
14055
  _this.heightSegments = heightSegments;
14144
- _this.noLongerAccessible = noLongerAccessible;
14145
14056
  return _this;
14146
14057
  }
14147
14058
  return ConeRestoreInfo;
@@ -14157,7 +14068,6 @@ var PrimitiveType;
14157
14068
  _this.height = height;
14158
14069
  _this.radialSegments = radialSegments;
14159
14070
  _this.heightSegments = heightSegments;
14160
- _this.noLongerAccessible = noLongerAccessible;
14161
14071
  return _this;
14162
14072
  }
14163
14073
  return CapsuleRestoreInfo;
@@ -17151,14 +17061,12 @@ ShaderPool.init();
17151
17061
  /**
17152
17062
  * @internal
17153
17063
  * @inheritDoc
17154
- * @override
17155
17064
  */ _proto._onAwake = function _onAwake() {
17156
17065
  this.onAwake();
17157
17066
  };
17158
17067
  /**
17159
17068
  * @internal
17160
17069
  * @inheritDoc
17161
- * @override
17162
17070
  */ _proto._onEnable = function _onEnable() {
17163
17071
  if (this._waitHandlingInValid) {
17164
17072
  this._waitHandlingInValid = false;
@@ -17184,7 +17092,6 @@ ShaderPool.init();
17184
17092
  /**
17185
17093
  * @internal
17186
17094
  * @inheritDoc
17187
- * @override
17188
17095
  */ _proto._onDisable = function _onDisable() {
17189
17096
  this._waitHandlingInValid = true;
17190
17097
  this._engine._componentsManager.addDisableScript(this);
@@ -17207,10 +17114,7 @@ ShaderPool.init();
17207
17114
  this._entity._removeScript(this);
17208
17115
  this._waitHandlingInValid = false;
17209
17116
  };
17210
- /**
17211
- * @override
17212
- * @internal
17213
- */ _proto._onDestroy = function _onDestroy() {
17117
+ _proto._onDestroy = function _onDestroy() {
17214
17118
  Component.prototype._onDestroy.call(this);
17215
17119
  this._engine._componentsManager.addPendingDestroyScript(this);
17216
17120
  };
@@ -18883,19 +18787,16 @@ exports.Camera = (_Camera = /*#__PURE__*/ function(Component) {
18883
18787
  this._replacementSubShaderTag = null;
18884
18788
  };
18885
18789
  /**
18886
- * @override
18887
18790
  * @inheritdoc
18888
18791
  */ _proto._onEnable = function _onEnable() {
18889
18792
  this.entity.scene._attachRenderCamera(this);
18890
18793
  };
18891
18794
  /**
18892
- * @override
18893
18795
  * @inheritdoc
18894
18796
  */ _proto._onDisable = function _onDisable() {
18895
18797
  this.entity.scene._detachRenderCamera(this);
18896
18798
  };
18897
18799
  /**
18898
- * @override
18899
18800
  * @inheritdoc
18900
18801
  */ _proto._onDestroy = function _onDestroy() {
18901
18802
  var _this__renderPipeline;
@@ -19459,7 +19360,6 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19459
19360
  }
19460
19361
  };
19461
19362
  /**
19462
- * @override
19463
19363
  * Clone and return the instance.
19464
19364
  */ _proto.clone = function clone() {
19465
19365
  var dest = new BaseMaterial(this._engine, this.shader);
@@ -19467,7 +19367,6 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19467
19367
  return dest;
19468
19368
  };
19469
19369
  /**
19470
- * @override
19471
19370
  * Clone to the target material.
19472
19371
  * @param target - target material
19473
19372
  */ _proto.cloneTo = function cloneTo(target) {
@@ -19628,8 +19527,8 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19628
19527
  var _this;
19629
19528
  _this = BaseMaterial.call(this, engine, Shader.find("blinn-phong")) || this;
19630
19529
  var shaderData = _this.shaderData;
19631
- shaderData.enableMacro("MATERIAL_NEED_WORLDPOS");
19632
- shaderData.enableMacro("MATERIAL_NEED_TILINGOFFSET");
19530
+ shaderData.enableMacro("MATERIAL_NEED_WORLD_POS");
19531
+ shaderData.enableMacro("MATERIAL_NEED_TILING_OFFSET");
19633
19532
  shaderData.setColor(BlinnPhongMaterial._baseColorProp, new miniprogram.Color(1, 1, 1, 1));
19634
19533
  shaderData.setColor(BlinnPhongMaterial._specularColorProp, new miniprogram.Color(1, 1, 1, 1));
19635
19534
  shaderData.setColor(BlinnPhongMaterial._emissiveColorProp, new miniprogram.Color(0, 0, 0, 1));
@@ -19639,9 +19538,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19639
19538
  return _this;
19640
19539
  }
19641
19540
  var _proto = BlinnPhongMaterial.prototype;
19642
- /**
19643
- * @override
19644
- */ _proto.clone = function clone() {
19541
+ _proto.clone = function clone() {
19645
19542
  var dest = new BlinnPhongMaterial(this._engine);
19646
19543
  this.cloneTo(dest);
19647
19544
  return dest;
@@ -19824,8 +19721,8 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19824
19721
  var _this;
19825
19722
  _this = BaseMaterial.call(this, engine, shader) || this;
19826
19723
  var shaderData = _this.shaderData;
19827
- shaderData.enableMacro("MATERIAL_NEED_WORLDPOS");
19828
- shaderData.enableMacro("MATERIAL_NEED_TILINGOFFSET");
19724
+ shaderData.enableMacro("MATERIAL_NEED_WORLD_POS");
19725
+ shaderData.enableMacro("MATERIAL_NEED_TILING_OFFSET");
19829
19726
  shaderData.setColor(PBRBaseMaterial._baseColorProp, new miniprogram.Color(1, 1, 1, 1));
19830
19727
  shaderData.setColor(PBRBaseMaterial._emissiveColorProp, new miniprogram.Color(0, 0, 0, 1));
19831
19728
  shaderData.setVector4(PBRBaseMaterial._tilingOffsetProp, new miniprogram.Vector4(1, 1, 0, 0));
@@ -19934,9 +19831,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19934
19831
  set: function set(value) {
19935
19832
  this.shaderData.setTexture(PBRBaseMaterial._occlusionTextureProp, value);
19936
19833
  if (value) {
19937
- this.shaderData.enableMacro("OCCLUSIONTEXTURE");
19834
+ this.shaderData.enableMacro("MATERIAL_HAS_OCCLUSION_TEXTURE");
19938
19835
  } else {
19939
- this.shaderData.disableMacro("OCCLUSIONTEXTURE");
19836
+ this.shaderData.disableMacro("MATERIAL_HAS_OCCLUSION_TEXTURE");
19940
19837
  }
19941
19838
  }
19942
19839
  },
@@ -19990,9 +19887,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
19990
19887
  set: function set(value) {
19991
19888
  if (!!this.shaderData.getFloat(PBRBaseMaterial._clearCoatProp) !== !!value) {
19992
19889
  if (value === 0) {
19993
- this.shaderData.disableMacro("CLEARCOAT");
19890
+ this.shaderData.disableMacro("MATERIAL_ENABLE_CLEAR_COAT");
19994
19891
  } else {
19995
- this.shaderData.enableMacro("CLEARCOAT");
19892
+ this.shaderData.enableMacro("MATERIAL_ENABLE_CLEAR_COAT");
19996
19893
  }
19997
19894
  }
19998
19895
  this.shaderData.setFloat(PBRBaseMaterial._clearCoatProp, value);
@@ -20008,9 +19905,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20008
19905
  set: function set(value) {
20009
19906
  this.shaderData.setTexture(PBRBaseMaterial._clearCoatTextureProp, value);
20010
19907
  if (value) {
20011
- this.shaderData.enableMacro("HAS_CLEARCOATTEXTURE");
19908
+ this.shaderData.enableMacro("MATERIAL_HAS_CLEAR_COAT_TEXTURE");
20012
19909
  } else {
20013
- this.shaderData.disableMacro("HAS_CLEARCOATTEXTURE");
19910
+ this.shaderData.disableMacro("MATERIAL_HAS_CLEAR_COAT_TEXTURE");
20014
19911
  }
20015
19912
  }
20016
19913
  },
@@ -20035,9 +19932,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20035
19932
  set: function set(value) {
20036
19933
  this.shaderData.setTexture(PBRBaseMaterial._clearCoatRoughnessTextureProp, value);
20037
19934
  if (value) {
20038
- this.shaderData.enableMacro("HAS_CLEARCOATROUGHNESSTEXTURE");
19935
+ this.shaderData.enableMacro("MATERIAL_HAS_CLEAR_COAT_ROUGHNESS_TEXTURE");
20039
19936
  } else {
20040
- this.shaderData.disableMacro("HAS_CLEARCOATROUGHNESSTEXTURE");
19937
+ this.shaderData.disableMacro("MATERIAL_HAS_CLEAR_COAT_ROUGHNESS_TEXTURE");
20041
19938
  }
20042
19939
  }
20043
19940
  },
@@ -20051,9 +19948,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20051
19948
  set: function set(value) {
20052
19949
  this.shaderData.setTexture(PBRBaseMaterial._clearCoatNormalTextureProp, value);
20053
19950
  if (value) {
20054
- this.shaderData.enableMacro("HAS_CLEARCOATNORMALTEXTURE");
19951
+ this.shaderData.enableMacro("MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE");
20055
19952
  } else {
20056
- this.shaderData.disableMacro("HAS_CLEARCOATNORMALTEXTURE");
19953
+ this.shaderData.disableMacro("MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE");
20057
19954
  }
20058
19955
  }
20059
19956
  }
@@ -20098,7 +19995,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20098
19995
  }
20099
19996
  var _proto = PBRMaterial.prototype;
20100
19997
  /**
20101
- * @override
19998
+ * @inheritdoc
20102
19999
  */ _proto.clone = function clone() {
20103
20000
  var dest = new PBRMaterial(this._engine);
20104
20001
  this.cloneTo(dest);
@@ -20138,9 +20035,9 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20138
20035
  set: function set(value) {
20139
20036
  this.shaderData.setTexture(PBRMaterial._roughnessMetallicTextureProp, value);
20140
20037
  if (value) {
20141
- this.shaderData.enableMacro("MATERIAL_ROUGHNESSMETALLICTEXTURE");
20038
+ this.shaderData.enableMacro("MATERIAL_HAS_ROUGHNESS_METALLIC_TEXTURE");
20142
20039
  } else {
20143
- this.shaderData.disableMacro("MATERIAL_ROUGHNESSMETALLICTEXTURE");
20040
+ this.shaderData.disableMacro("MATERIAL_HAS_ROUGHNESS_METALLIC_TEXTURE");
20144
20041
  }
20145
20042
  }
20146
20043
  }
@@ -20170,7 +20067,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20170
20067
  }
20171
20068
  var _proto = PBRSpecularMaterial.prototype;
20172
20069
  /**
20173
- * @override
20070
+ * @inheritdoc
20174
20071
  */ _proto.clone = function clone() {
20175
20072
  var dest = new PBRSpecularMaterial(this._engine);
20176
20073
  this.cloneTo(dest);
@@ -20232,7 +20129,7 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20232
20129
  PBRSpecularMaterial._specularGlossinessTextureProp = ShaderProperty.getByName("material_SpecularGlossinessTexture");
20233
20130
  })();
20234
20131
  (function() {
20235
- PBRSpecularMaterial._specularGlossinessTextureMacro = ShaderMacro.getByName("MATERIAL_HAS_SPECULARGLOSSINESSTEXTURE");
20132
+ PBRSpecularMaterial._specularGlossinessTextureMacro = ShaderMacro.getByName("MATERIAL_HAS_SPECULAR_GLOSSINESS_TEXTURE");
20236
20133
  })();
20237
20134
 
20238
20135
  /**
@@ -20244,14 +20141,14 @@ var BaseMaterial = /*#__PURE__*/ function(Material) {
20244
20141
  _this = BaseMaterial.call(this, engine, Shader.find("unlit")) || this;
20245
20142
  var shaderData = _this.shaderData;
20246
20143
  shaderData.enableMacro("MATERIAL_OMIT_NORMAL");
20247
- shaderData.enableMacro("MATERIAL_NEED_TILINGOFFSET");
20144
+ shaderData.enableMacro("MATERIAL_NEED_TILING_OFFSET");
20248
20145
  shaderData.setColor(UnlitMaterial._baseColorProp, new miniprogram.Color(1, 1, 1, 1));
20249
20146
  shaderData.setVector4(UnlitMaterial._tilingOffsetProp, new miniprogram.Vector4(1, 1, 0, 0));
20250
20147
  return _this;
20251
20148
  }
20252
20149
  var _proto = UnlitMaterial.prototype;
20253
20150
  /**
20254
- * @override
20151
+ * @inheritdoc
20255
20152
  */ _proto.clone = function clone() {
20256
20153
  var dest = new UnlitMaterial(this._engine);
20257
20154
  this.cloneTo(dest);
@@ -20368,10 +20265,7 @@ exports.TextVerticalAlignment = void 0;
20368
20265
  */ _proto._addSprite = function _addSprite(sprite) {
20369
20266
  this._spriteNamesToIndex[sprite.name] = this._sprites.push(sprite) - 1;
20370
20267
  };
20371
- /**
20372
- * @override
20373
- * @internal
20374
- */ _proto._onDestroy = function _onDestroy() {
20268
+ _proto._onDestroy = function _onDestroy() {
20375
20269
  ReferResource.prototype._onDestroy.call(this);
20376
20270
  this._sprites = null;
20377
20271
  this._spriteNamesToIndex = null;
@@ -20480,10 +20374,7 @@ exports.TextVerticalAlignment = void 0;
20480
20374
  this._dirtyUpdateFlag & 0x1 && this._updatePositions();
20481
20375
  return this._bounds;
20482
20376
  };
20483
- /**
20484
- * @override
20485
- * @internal
20486
- */ _proto._onDestroy = function _onDestroy() {
20377
+ _proto._onDestroy = function _onDestroy() {
20487
20378
  ReferResource.prototype._onDestroy.call(this);
20488
20379
  this._texture = null;
20489
20380
  };
@@ -21221,15 +21112,11 @@ var TiledType;
21221
21112
  target._assembler.resetData(target);
21222
21113
  target.sprite = this._sprite;
21223
21114
  };
21224
- /**
21225
- * @override
21226
- */ _proto._updateShaderData = function _updateShaderData(context) {
21115
+ _proto._updateShaderData = function _updateShaderData(context) {
21227
21116
  // @ts-ignore
21228
21117
  this._updateTransformShaderData(context, miniprogram.Matrix._identity);
21229
21118
  };
21230
- /**
21231
- * @override
21232
- */ _proto._updateBounds = function _updateBounds(worldBounds) {
21119
+ _proto._updateBounds = function _updateBounds(worldBounds) {
21233
21120
  var _this_sprite;
21234
21121
  if (!((_this_sprite = this.sprite) == null ? void 0 : _this_sprite.texture) || !this.width || !this.height) {
21235
21122
  worldBounds.min.set(0, 0, 0);
@@ -21238,9 +21125,7 @@ var TiledType;
21238
21125
  this._assembler.updatePositions(this);
21239
21126
  }
21240
21127
  };
21241
- /**
21242
- * @override
21243
- */ _proto._render = function _render(context) {
21128
+ _proto._render = function _render(context) {
21244
21129
  var _this_sprite;
21245
21130
  if (!((_this_sprite = this.sprite) == null ? void 0 : _this_sprite.texture) || !this.width || !this.height) {
21246
21131
  return;
@@ -21263,7 +21148,6 @@ var TiledType;
21263
21148
  context.camera._renderPipeline.pushRenderData(context, renderData);
21264
21149
  };
21265
21150
  /**
21266
- * @override
21267
21151
  * @internal
21268
21152
  */ _proto._onDestroy = function _onDestroy() {
21269
21153
  var _this__sprite;
@@ -21652,9 +21536,7 @@ var /**
21652
21536
  this._font._addReferCount(1);
21653
21537
  this.setMaterial(engine._spriteDefaultMaterial);
21654
21538
  };
21655
- /**
21656
- * @internal
21657
- */ _proto._onDestroy = function _onDestroy() {
21539
+ _proto._onDestroy = function _onDestroy() {
21658
21540
  Renderer.prototype._onDestroy.call(this);
21659
21541
  // Clear render data.
21660
21542
  var charRenderDatas = this._charRenderDatas;
@@ -21689,20 +21571,14 @@ var /**
21689
21571
  */ _proto._setDirtyFlagFalse = function _setDirtyFlagFalse(type) {
21690
21572
  this._dirtyFlag &= ~type;
21691
21573
  };
21692
- /**
21693
- * @override
21694
- */ _proto._updateShaderData = function _updateShaderData(context) {
21574
+ _proto._updateShaderData = function _updateShaderData(context) {
21695
21575
  // @ts-ignore
21696
21576
  this._updateTransformShaderData(context, miniprogram.Matrix._identity);
21697
21577
  };
21698
- /**
21699
- * @override
21700
- */ _proto._updateBounds = function _updateBounds(worldBounds) {
21578
+ _proto._updateBounds = function _updateBounds(worldBounds) {
21701
21579
  miniprogram.BoundingBox.transform(this._localBounds, this._entity.transform.worldMatrix, worldBounds);
21702
21580
  };
21703
- /**
21704
- * @override
21705
- */ _proto._render = function _render(context) {
21581
+ _proto._render = function _render(context) {
21706
21582
  if (this._text === "" || this.enableWrapping && this.width <= 0 || this.overflowMode === exports.OverflowMode.Truncate && this.height <= 0) {
21707
21583
  return;
21708
21584
  }
@@ -22937,7 +22813,6 @@ exports.AnimationFloatArrayCurve = (_AnimationFloatArrayCurve = /*#__PURE__*/ fu
22937
22813
  var _proto = AnimationFloatArrayCurve.prototype;
22938
22814
  /**
22939
22815
  * @inheritdoc
22940
- * @override
22941
22816
  */ _proto.addKey = function addKey(key) {
22942
22817
  AnimationCurve.prototype.addKey.call(this, key);
22943
22818
  var evaluateData = this._evaluateData;
@@ -23719,7 +23594,6 @@ exports.AnimatorLayerBlendingMode = void 0;
23719
23594
  return this._getAnimatorStateInfo(stateName, layerIndex).state;
23720
23595
  };
23721
23596
  /**
23722
- * @override
23723
23597
  * @internal
23724
23598
  */ _proto._onEnable = function _onEnable() {
23725
23599
  this.engine._componentsManager.addOnUpdateAnimations(this);
@@ -23727,7 +23601,6 @@ exports.AnimatorLayerBlendingMode = void 0;
23727
23601
  this._entity.getComponentsIncludeChildren(exports.Renderer, this._controlledRenderers);
23728
23602
  };
23729
23603
  /**
23730
- * @override
23731
23604
  * @internal
23732
23605
  */ _proto._onDisable = function _onDisable() {
23733
23606
  this.engine._componentsManager.removeOnUpdateAnimations(this);
@@ -24552,9 +24425,7 @@ exports.AnimatorConditionMode = void 0;
24552
24425
  return _this;
24553
24426
  }
24554
24427
  var _proto = SkyBoxMaterial.prototype;
24555
- /**
24556
- * @override
24557
- */ _proto.clone = function clone() {
24428
+ _proto.clone = function clone() {
24558
24429
  var dest = new SkyBoxMaterial(this._engine);
24559
24430
  this.cloneTo(dest);
24560
24431
  return dest;
@@ -24667,7 +24538,7 @@ exports.SunMode = void 0;
24667
24538
  }
24668
24539
  var _proto = SkyProceduralMaterial.prototype;
24669
24540
  /**
24670
- * @override
24541
+ * @inheritDoc
24671
24542
  */ _proto.clone = function clone() {
24672
24543
  var dest = new SkyProceduralMaterial(this._engine);
24673
24544
  this.cloneTo(dest);
@@ -24865,7 +24736,6 @@ exports.ParticleRendererBlendMode = void 0;
24865
24736
  }
24866
24737
  var _proto = ParticleRenderer.prototype;
24867
24738
  /**
24868
- * @override
24869
24739
  * @internal
24870
24740
  */ _proto.update = function update(deltaTime) {
24871
24741
  if (!this._isInit || !this._isStart) {
@@ -24883,7 +24753,6 @@ exports.ParticleRendererBlendMode = void 0;
24883
24753
  this.shaderData.setFloat("u_time", this._time);
24884
24754
  };
24885
24755
  /**
24886
- * @override
24887
24756
  * @internal
24888
24757
  */ _proto._onEnable = function _onEnable() {
24889
24758
  MeshRenderer.prototype._onEnable.call(this);
@@ -25662,9 +25531,7 @@ var _tempVector3 = new miniprogram.Vector3();
25662
25531
  this.getMaterial().shaderData.setTexture("u_texture", texture);
25663
25532
  }
25664
25533
  };
25665
- /**
25666
- * @override
25667
- */ _proto._render = function _render(context) {
25534
+ _proto._render = function _render(context) {
25668
25535
  this._updateStrapVertices(context.camera, this._points);
25669
25536
  this._updateStrapCoords();
25670
25537
  this._vertexBuffer.setData(this._vertices);
@@ -25810,9 +25677,7 @@ var _tempVector3 = new miniprogram.Vector3();
25810
25677
  * Provide hooks for users to exchange Texture.
25811
25678
  * @remarks Prevent issue: Feedback Loops Between Textures and the Framebuffer.
25812
25679
  */ _proto.onTextureChange = function onTextureChange(renderColorTexture) {};
25813
- /**
25814
- * @override
25815
- */ _proto.onBeginRender = function onBeginRender(camera) {
25680
+ _proto.onBeginRender = function onBeginRender(camera) {
25816
25681
  if (!this.enabled) return;
25817
25682
  this._camera = camera;
25818
25683
  this._oriCameraCullingMask = camera.cullingMask;
@@ -25825,9 +25690,7 @@ var _tempVector3 = new miniprogram.Vector3();
25825
25690
  this._oriCameraRenderTarget = camera.renderTarget;
25826
25691
  camera.renderTarget = this._activeRenderTarget;
25827
25692
  };
25828
- /**
25829
- * @override
25830
- */ _proto.onEndRender = function onEndRender(camera) {
25693
+ _proto.onEndRender = function onEndRender(camera) {
25831
25694
  if (!this.enabled) return;
25832
25695
  this.onTextureChange && this.onTextureChange(this._texture);
25833
25696
  this._activeRenderTarget = this._activeRenderTarget === this._renderTarget ? this._renderTargetSwap : this._renderTarget;
@@ -25862,16 +25725,12 @@ var cacheDir = new miniprogram.Vector3();
25862
25725
  /**
25863
25726
  * The position of the probe can be set, the default is the origin [0,0,0].
25864
25727
  */ _this.position = new miniprogram.Vector3(0, 0, 0);
25865
- /**
25866
- * @override
25867
- */ _this._isCube = true;
25728
+ _this._isCube = true;
25868
25729
  _this.oriViewMatrix = new miniprogram.Matrix();
25869
25730
  return _this;
25870
25731
  }
25871
25732
  var _proto = CubeProbe.prototype;
25872
- /**
25873
- * @override
25874
- */ _proto.onBeginRender = function onBeginRender(camera) {
25733
+ _proto.onBeginRender = function onBeginRender(camera) {
25875
25734
  if (!this.enabled) return;
25876
25735
  Probe.prototype.onBeginRender.call(this, camera);
25877
25736
  this._storeCamera(camera);