@galacean/engine-core 1.5.11 → 1.5.13
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.
- package/dist/main.js +116 -23
- package/dist/main.js.map +1 -1
- package/dist/module.js +116 -23
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Camera.d.ts +3 -3
- package/types/animation/Animator.d.ts +1 -0
- package/types/lighting/SpotLight.d.ts +0 -1
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +3 -0
package/dist/module.js
CHANGED
|
@@ -4748,7 +4748,7 @@ var particle_common = "\n\nvec3 rotationByEuler(in vec3 vector, in vec3 rot) {\n
|
|
|
4748
4748
|
|
|
4749
4749
|
var velocity_over_lifetime_module = "#if defined(RENDERER_VOL_CONSTANT_MODE) || defined(RENDERER_VOL_CURVE_MODE)\n #define _VOL_MODULE_ENABLED\n#endif\n\n#ifdef _VOL_MODULE_ENABLED\n uniform int renderer_VOLSpace;\n\n #ifdef RENDERER_VOL_CONSTANT_MODE\n uniform vec3 renderer_VOLMaxConst;\n\n #ifdef RENDERER_VOL_IS_RANDOM_TWO\n uniform vec3 renderer_VOLMinConst;\n #endif\n #endif\n\n #ifdef RENDERER_VOL_CURVE_MODE\n uniform vec2 renderer_VOLMaxGradientX[4]; // x:time y:value\n uniform vec2 renderer_VOLMaxGradientY[4]; // x:time y:value\n uniform vec2 renderer_VOLMaxGradientZ[4]; // x:time y:value\n\n #ifdef RENDERER_VOL_IS_RANDOM_TWO\n uniform vec2 renderer_VOLMinGradientX[4]; // x:time y:value\n uniform vec2 renderer_VOLMinGradientY[4]; // x:time y:value\n uniform vec2 renderer_VOLMinGradientZ[4]; // x:time y:value\n #endif\n #endif\n\n\n vec3 computeVelocityPositionOffset(in float normalizedAge, in float age, out vec3 currentVelocity) {\n vec3 velocityPosition;\n\n #ifdef RENDERER_VOL_CONSTANT_MODE\n currentVelocity = renderer_VOLMaxConst;\n #ifdef RENDERER_VOL_IS_RANDOM_TWO\n currentVelocity = mix(renderer_VOLMinConst, currentVelocity, a_Random1.yzw);\n #endif\n\n velocityPosition = currentVelocity * age;\n #endif\n\n #ifdef RENDERER_VOL_CURVE_MODE\n velocityPosition = vec3(\n evaluateParticleCurveCumulative(renderer_VOLMaxGradientX, normalizedAge, currentVelocity.x),\n evaluateParticleCurveCumulative(renderer_VOLMaxGradientY, normalizedAge, currentVelocity.y),\n evaluateParticleCurveCumulative(renderer_VOLMaxGradientZ, normalizedAge, currentVelocity.z));\n\n #ifdef RENDERER_VOL_IS_RANDOM_TWO\n vec3 minCurrentVelocity;\n vec3 minVelocityPosition = vec3(\n evaluateParticleCurveCumulative(renderer_VOLMinGradientX, normalizedAge, minCurrentVelocity.x),\n evaluateParticleCurveCumulative(renderer_VOLMinGradientY, normalizedAge, minCurrentVelocity.y),\n evaluateParticleCurveCumulative(renderer_VOLMinGradientZ, normalizedAge, minCurrentVelocity.z));\n\n currentVelocity = mix(minCurrentVelocity, currentVelocity, a_Random1.yzw);\n velocityPosition = mix(minVelocityPosition, velocityPosition, a_Random1.yzw);\n #endif\n\n velocityPosition *= vec3(a_ShapePositionStartLifeTime.w);\n #endif\n return velocityPosition;\n }\n#endif\n"; // eslint-disable-line
|
|
4750
4750
|
|
|
4751
|
-
var rotation_over_lifetime_module = "#if defined(RENDERER_ROL_CONSTANT_MODE) || defined(RENDERER_ROL_CURVE_MODE)\n #ifdef RENDERER_ROL_CURVE_MODE\n uniform vec2 renderer_ROLMaxCurveZ[4];\n // #ifdef RENDERER_ROL_IS_SEPARATE\n // uniform vec2 renderer_ROLMaxCurveX[4];\n // uniform vec2 renderer_ROLMaxCurveY[4];\n // #endif\n #ifdef RENDERER_ROL_IS_RANDOM_TWO\n uniform vec2 renderer_ROLMinCurveZ[4];\n // #ifdef RENDERER_ROL_IS_SEPARATE\n // uniform vec2 renderer_ROLMinCurveX[4];\n // uniform vec2 renderer_ROLMinCurveY[4];\n // #endif\n #endif\n #else\n uniform vec3 renderer_ROLMaxConst;\n #ifdef RENDERER_ROL_IS_RANDOM_TWO\n uniform vec3 renderer_ROLMinConst;\n #endif\n #endif\n#endif\n\nfloat computeParticleRotationFloat(in float rotation, in float age, in float normalizedAge) {\n #if defined(RENDERER_ROL_CONSTANT_MODE) || defined(RENDERER_ROL_CURVE_MODE)\n #ifdef RENDERER_ROL_CURVE_MODE\n float lifeRotation = evaluateParticleCurveCumulative(renderer_ROLMaxCurveZ, normalizedAge);\n #ifdef RENDERER_ROL_IS_RANDOM_TWO\n lifeRotation = mix(evaluateParticleCurveCumulative(renderer_ROLMinCurveZ, normalizedAge), lifeRotation, a_Random0.w);\n #endif\n rotation += lifeRotation * a_ShapePositionStartLifeTime.w;\n #else\n float lifeRotation = renderer_ROLMaxConst.z;\n #ifdef RENDERER_ROL_IS_RANDOM_TWO\n lifeRotation = mix(renderer_ROLMinConst.z, lifeRotation, a_Random0.w);\n #endif\n rotation += lifeRotation * age;\n #endif\n #endif\n return rotation;\n}\n\n\n#if defined(RENDERER_MODE_MESH) && (defined(ROTATION_OVER_LIFETIME) || defined(ROTATION_OVER_LIFETIME_SEPARATE))\nvec3 computeParticleRotationVec3(in vec3 rotation,\n in float age,\n in float normalizedAge) {\n#ifdef ROTATION_OVER_LIFETIME\n #ifdef ROTATION_OVER_LIFETIME_CONSTANT\n float ageRot = u_ROLAngularVelocityConst * age;\n rotation += ageRot;\n #endif\n #ifdef ROTATION_OVER_LIFETIME_CURVE\n rotation += getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient, normalizedAge);\n #endif\n #ifdef ROTATION_OVER_LIFETIME_RANDOM_CONSTANTS\n float ageRot = mix(u_ROLAngularVelocityConst, u_ROLAngularVelocityConstMax, a_Random0.w) * age;\n rotation += ageRot;\n #endif\n #ifdef ROTATION_OVER_LIFETIME_RANDOM_CURVES\n rotation += mix(\n getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient, normalizedAge),\n getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMax,\n normalizedAge),\n a_Random0.w);\n #endif\n#endif\n\n#ifdef ROTATION_OVER_LIFETIME_SEPARATE\n #ifdef ROTATION_OVER_LIFETIME_CONSTANT\n vec3 ageRot = u_ROLAngularVelocityConstSeparate * age;\n rotation += ageRot;\n #endif\n #ifdef ROTATION_OVER_LIFETIME_CURVE\n rotation += vec3(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientX,\n normalizedAge),\n getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientY,\n normalizedAge),\n getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,\n normalizedAge));\n #endif\n #ifdef ROTATION_OVER_LIFETIME_RANDOM_CONSTANTS\n vec3 ageRot = mix(u_ROLAngularVelocityConstSeparate,\n renderer_ROLMaxConst,\n a_Random0.w)\n * age;\n rotation += ageRot;\n #endif\n #ifdef ROTATION_OVER_LIFETIME_RANDOM_CURVES\n rotation += vec3(mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientX,\n normalizedAge),\n getTotalValueFromGradientFloat(renderer_ROLMaxCurveX,\n normalizedAge),\n a_Random0.w),\n mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientY,\n normalizedAge),\n getTotalValueFromGradientFloat(renderer_ROLMaxCurveY,\n normalizedAge),\n a_Random0.w),\n mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,\n normalizedAge),\n getTotalValueFromGradientFloat(renderer_ROLMaxCurveZ,\n normalizedAge),\n a_Random0.w));\n #endif\n#endif\n return rotation;\n}\n#endif\n"; // eslint-disable-line
|
|
4751
|
+
var rotation_over_lifetime_module = "#if defined(RENDERER_ROL_CONSTANT_MODE) || defined(RENDERER_ROL_CURVE_MODE)\n #ifdef RENDERER_ROL_CURVE_MODE\n uniform vec2 renderer_ROLMaxCurveZ[4];\n // #ifdef RENDERER_ROL_IS_SEPARATE\n // uniform vec2 renderer_ROLMaxCurveX[4];\n // uniform vec2 renderer_ROLMaxCurveY[4];\n // #endif\n #ifdef RENDERER_ROL_IS_RANDOM_TWO\n uniform vec2 renderer_ROLMinCurveZ[4];\n // #ifdef RENDERER_ROL_IS_SEPARATE\n // uniform vec2 renderer_ROLMinCurveX[4];\n // uniform vec2 renderer_ROLMinCurveY[4];\n // #endif\n #endif\n #else\n uniform vec3 renderer_ROLMaxConst;\n #ifdef RENDERER_ROL_IS_RANDOM_TWO\n uniform vec3 renderer_ROLMinConst;\n #endif\n #endif\n#endif\n\nfloat computeParticleRotationFloat(in float rotation, in float age, in float normalizedAge) {\n #if defined(RENDERER_ROL_CONSTANT_MODE) || defined(RENDERER_ROL_CURVE_MODE)\n #ifdef RENDERER_ROL_CURVE_MODE\n float currentValue;\n float lifeRotation = evaluateParticleCurveCumulative(renderer_ROLMaxCurveZ, normalizedAge, currentValue);\n #ifdef RENDERER_ROL_IS_RANDOM_TWO\n lifeRotation = mix(evaluateParticleCurveCumulative(renderer_ROLMinCurveZ, normalizedAge, currentValue), lifeRotation, a_Random0.w);\n #endif\n rotation += lifeRotation * a_ShapePositionStartLifeTime.w;\n #else\n float lifeRotation = renderer_ROLMaxConst.z;\n #ifdef RENDERER_ROL_IS_RANDOM_TWO\n lifeRotation = mix(renderer_ROLMinConst.z, lifeRotation, a_Random0.w);\n #endif\n rotation += lifeRotation * age;\n #endif\n #endif\n return rotation;\n}\n\n\n#if defined(RENDERER_MODE_MESH) && (defined(ROTATION_OVER_LIFETIME) || defined(ROTATION_OVER_LIFETIME_SEPARATE))\nvec3 computeParticleRotationVec3(in vec3 rotation,\n in float age,\n in float normalizedAge) {\n#ifdef ROTATION_OVER_LIFETIME\n #ifdef ROTATION_OVER_LIFETIME_CONSTANT\n float ageRot = u_ROLAngularVelocityConst * age;\n rotation += ageRot;\n #endif\n #ifdef ROTATION_OVER_LIFETIME_CURVE\n rotation += getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient, normalizedAge);\n #endif\n #ifdef ROTATION_OVER_LIFETIME_RANDOM_CONSTANTS\n float ageRot = mix(u_ROLAngularVelocityConst, u_ROLAngularVelocityConstMax, a_Random0.w) * age;\n rotation += ageRot;\n #endif\n #ifdef ROTATION_OVER_LIFETIME_RANDOM_CURVES\n rotation += mix(\n getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient, normalizedAge),\n getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMax,\n normalizedAge),\n a_Random0.w);\n #endif\n#endif\n\n#ifdef ROTATION_OVER_LIFETIME_SEPARATE\n #ifdef ROTATION_OVER_LIFETIME_CONSTANT\n vec3 ageRot = u_ROLAngularVelocityConstSeparate * age;\n rotation += ageRot;\n #endif\n #ifdef ROTATION_OVER_LIFETIME_CURVE\n rotation += vec3(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientX,\n normalizedAge),\n getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientY,\n normalizedAge),\n getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,\n normalizedAge));\n #endif\n #ifdef ROTATION_OVER_LIFETIME_RANDOM_CONSTANTS\n vec3 ageRot = mix(u_ROLAngularVelocityConstSeparate,\n renderer_ROLMaxConst,\n a_Random0.w)\n * age;\n rotation += ageRot;\n #endif\n #ifdef ROTATION_OVER_LIFETIME_RANDOM_CURVES\n rotation += vec3(mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientX,\n normalizedAge),\n getTotalValueFromGradientFloat(renderer_ROLMaxCurveX,\n normalizedAge),\n a_Random0.w),\n mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientY,\n normalizedAge),\n getTotalValueFromGradientFloat(renderer_ROLMaxCurveY,\n normalizedAge),\n a_Random0.w),\n mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,\n normalizedAge),\n getTotalValueFromGradientFloat(renderer_ROLMaxCurveZ,\n normalizedAge),\n a_Random0.w));\n #endif\n#endif\n return rotation;\n}\n#endif\n"; // eslint-disable-line
|
|
4752
4752
|
|
|
4753
4753
|
var size_over_lifetime_module = "#ifdef RENDERER_SOL_CURVE_MODE\n uniform vec2 renderer_SOLMaxCurveX[4]; // x:time y:value\n #ifdef RENDERER_SOL_IS_SEPARATE\n uniform vec2 renderer_SOLMaxCurveY[4]; // x:time y:value\n uniform vec2 renderer_SOLMaxCurveZ[4]; // x:time y:value\n #endif\n\n #ifdef RENDERER_SOL_IS_RANDOM_TWO\n uniform vec2 renderer_SOLMinCurveX[4]; // x:time y:value\n #ifdef RENDERER_SOL_IS_SEPARATE\n uniform vec2 renderer_SOLMinCurveY[4]; // x:time y:value\n uniform vec2 renderer_SOLMinCurveZ[4]; // x:time y:value\n #endif\n #endif\n#endif\n\nvec2 computeParticleSizeBillboard(in vec2 size, in float normalizedAge) {\n #ifdef RENDERER_SOL_CURVE_MODE\n float lifeSizeX = evaluateParticleCurve(renderer_SOLMaxCurveX, normalizedAge);\n #ifdef RENDERER_SOL_IS_RANDOM_TWO\n lifeSizeX = mix(evaluateParticleCurve(renderer_SOLMinCurveX, normalizedAge), lifeSizeX, a_Random0.z);\n #endif\n\n #ifdef RENDERER_SOL_IS_SEPARATE\n float lifeSizeY = evaluateParticleCurve(renderer_SOLMaxCurveY, normalizedAge);\n #ifdef RENDERER_SOL_IS_RANDOM_TWO\n lifeSizeY = mix(evaluateParticleCurve(renderer_SOLMinCurveY, normalizedAge), lifeSizeY, a_Random0.z);\n #endif\n size *= vec2(lifeSizeX, lifeSizeY);\n #else\n size *= lifeSizeX;\n #endif\n #endif\n return size;\n}\n\n#ifdef RENDERER_MODE_MESH\n vec3 computeParticleSizeMesh(in vec3 size, in float normalizedAge) {\n #ifdef RENDERER_SOL_CURVE\n size *= evaluateParticleCurve(renderer_SOLMaxCurveX, normalizedAge);\n #endif\n #ifdef RENDERER_SOL_RANDOM_CURVES\n size *= mix(evaluateParticleCurve(renderer_SOLMaxCurveX, normalizedAge),\n evaluateParticleCurve(u_SOLSizeGradientMax, normalizedAge),\n a_Random0.z);\n #endif\n #ifdef RENDERER_SOL_CURVE_SEPARATE\n size *= vec3(evaluateParticleCurve(renderer_SOLMinCurveX, normalizedAge),\n evaluateParticleCurve(renderer_SOLMinCurveY, normalizedAge),\n evaluateParticleCurve(renderer_SOLMinCurveZ, normalizedAge));\n #endif\n #ifdef RENDERER_SOL_RANDOM_CURVES_SEPARATE\n size *= vec3(mix(evaluateParticleCurve(renderer_SOLMinCurveX, normalizedAge),\n evaluateParticleCurve(renderer_SOLMaxCurveX, normalizedAge),\n a_Random0.z),\n mix(evaluateParticleCurve(renderer_SOLMinCurveY, normalizedAge),\n evaluateParticleCurve(renderer_SOLMaxCurveY, normalizedAge),\n a_Random0.z),\n mix(evaluateParticleCurve(renderer_SOLMinCurveZ, normalizedAge),\n evaluateParticleCurve(renderer_SOLMaxCurveZ, normalizedAge),\n a_Random0.z));\n #endif\n return size;\n }\n#endif"; // eslint-disable-line
|
|
4754
4754
|
|
|
@@ -8454,15 +8454,30 @@ __decorate([
|
|
|
8454
8454
|
/**
|
|
8455
8455
|
* @internal
|
|
8456
8456
|
*/ var VirtualCamera = function VirtualCamera() {
|
|
8457
|
-
this.position = new Vector3();
|
|
8458
8457
|
this.isOrthographic = false;
|
|
8458
|
+
this.nearClipPlane = 0.1;
|
|
8459
|
+
this.farClipPlane = 100;
|
|
8460
|
+
this.position = new Vector3();
|
|
8459
8461
|
this.viewMatrix = new Matrix();
|
|
8460
8462
|
this.projectionMatrix = new Matrix();
|
|
8461
8463
|
this.viewProjectionMatrix = new Matrix();
|
|
8462
|
-
this.nearClipPlane = 0.1;
|
|
8463
|
-
this.farClipPlane = 100;
|
|
8464
8464
|
/** Only orth mode use. */ this.forward = new Vector3();
|
|
8465
8465
|
};
|
|
8466
|
+
__decorate([
|
|
8467
|
+
ignoreClone
|
|
8468
|
+
], VirtualCamera.prototype, "position", void 0);
|
|
8469
|
+
__decorate([
|
|
8470
|
+
ignoreClone
|
|
8471
|
+
], VirtualCamera.prototype, "viewMatrix", void 0);
|
|
8472
|
+
__decorate([
|
|
8473
|
+
ignoreClone
|
|
8474
|
+
], VirtualCamera.prototype, "projectionMatrix", void 0);
|
|
8475
|
+
__decorate([
|
|
8476
|
+
ignoreClone
|
|
8477
|
+
], VirtualCamera.prototype, "viewProjectionMatrix", void 0);
|
|
8478
|
+
__decorate([
|
|
8479
|
+
ignoreClone
|
|
8480
|
+
], VirtualCamera.prototype, "forward", void 0);
|
|
8466
8481
|
|
|
8467
8482
|
/**
|
|
8468
8483
|
* The anti-aliasing mode.
|
|
@@ -8584,7 +8599,7 @@ var Camera = /*#__PURE__*/ function(Component) {
|
|
|
8584
8599
|
* Set to true if you need to ensure the alpha channel is preserved, for example, when performing canvas transparent blending.
|
|
8585
8600
|
*
|
|
8586
8601
|
* @defaultValue `false`
|
|
8587
|
-
*/ _this.isAlphaOutputRequired = false, /** @internal */ _this._cameraType = CameraType.Normal, /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection(), /** @internal */ _this._frustum = new BoundingFrustum(), /** @internal */ _this._virtualCamera = new VirtualCamera(), /** @internal */ _this._replacementShader = null, /** @internal */ _this._replacementSubShaderTag = null, /** @internal */ _this._replacementFailureStrategy = null, /** @internal */ _this._cameraIndex = -1, _this._priority = 0, _this.
|
|
8602
|
+
*/ _this.isAlphaOutputRequired = false, /** @internal */ _this._cameraType = CameraType.Normal, /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection(), /** @internal */ _this._frustum = new BoundingFrustum(), /** @internal */ _this._virtualCamera = new VirtualCamera(), /** @internal */ _this._replacementShader = null, /** @internal */ _this._replacementSubShaderTag = null, /** @internal */ _this._replacementFailureStrategy = null, /** @internal */ _this._cameraIndex = -1, _this._priority = 0, _this._isCustomViewMatrix = false, _this._isCustomProjectionMatrix = false, _this._fieldOfView = 45, _this._orthographicSize = 10, _this._isProjectionDirty = true, _this._isInvProjMatDirty = true, _this._customAspectRatio = undefined, _this._opaqueTextureEnabled = false, _this._enableHDR = false, _this._enablePostProcess = false, _this._renderTarget = null, _this._shaderData = new ShaderData(ShaderDataGroup.Camera), _this._depthBufferParams = new Vector4(), _this._viewport = new Vector4(0, 0, 1, 1), _this._pixelViewport = new Rect(0, 0, 0, 0), _this._inverseProjectionMatrix = new Matrix(), _this._invViewProjMat = new Matrix();
|
|
8588
8603
|
// Includes hardware detection correction
|
|
8589
8604
|
_this.msaaSamples = MSAASamples.FourX;
|
|
8590
8605
|
_this._isViewMatrixDirty = entity.registerWorldChangeFlag();
|
|
@@ -8854,6 +8869,12 @@ var Camera = /*#__PURE__*/ function(Component) {
|
|
|
8854
8869
|
};
|
|
8855
8870
|
/**
|
|
8856
8871
|
* @internal
|
|
8872
|
+
*/ _proto._cloneTo = function _cloneTo(target, srcRoot, targetRoot) {
|
|
8873
|
+
var _this__renderTarget;
|
|
8874
|
+
(_this__renderTarget = this._renderTarget) == null ? void 0 : _this__renderTarget._addReferCount(1);
|
|
8875
|
+
};
|
|
8876
|
+
/**
|
|
8877
|
+
* @internal
|
|
8857
8878
|
* @inheritdoc
|
|
8858
8879
|
*/ _proto._onDestroy = function _onDestroy() {
|
|
8859
8880
|
var _this__renderPipeline;
|
|
@@ -8862,6 +8883,7 @@ var Camera = /*#__PURE__*/ function(Component) {
|
|
|
8862
8883
|
this._isInvViewProjDirty.destroy();
|
|
8863
8884
|
this._isViewMatrixDirty.destroy();
|
|
8864
8885
|
this._addResourceReferCount(this.shaderData, -1);
|
|
8886
|
+
this._renderTarget && this._addResourceReferCount(this._renderTarget, -1);
|
|
8865
8887
|
//@ts-ignore
|
|
8866
8888
|
this._viewport._onValueChanged = null;
|
|
8867
8889
|
this.engine.canvas._sizeUpdateFlagManager.removeListener(this._onPixelViewportChanged);
|
|
@@ -9236,6 +9258,12 @@ Camera._cameraPositionProperty = ShaderProperty.getByName("camera_Position");
|
|
|
9236
9258
|
Camera._cameraForwardProperty = ShaderProperty.getByName("camera_Forward");
|
|
9237
9259
|
Camera._cameraUpProperty = ShaderProperty.getByName("camera_Up");
|
|
9238
9260
|
Camera._cameraDepthBufferParamsProperty = ShaderProperty.getByName("camera_DepthBufferParams");
|
|
9261
|
+
__decorate([
|
|
9262
|
+
ignoreClone
|
|
9263
|
+
], Camera.prototype, "_cameraType", void 0);
|
|
9264
|
+
__decorate([
|
|
9265
|
+
ignoreClone
|
|
9266
|
+
], Camera.prototype, "_globalShaderMacro", void 0);
|
|
9239
9267
|
__decorate([
|
|
9240
9268
|
deepClone
|
|
9241
9269
|
], Camera.prototype, "_frustum", void 0);
|
|
@@ -9243,7 +9271,7 @@ __decorate([
|
|
|
9243
9271
|
ignoreClone
|
|
9244
9272
|
], Camera.prototype, "_renderPipeline", void 0);
|
|
9245
9273
|
__decorate([
|
|
9246
|
-
|
|
9274
|
+
deepClone
|
|
9247
9275
|
], Camera.prototype, "_virtualCamera", void 0);
|
|
9248
9276
|
__decorate([
|
|
9249
9277
|
ignoreClone
|
|
@@ -9260,6 +9288,12 @@ __decorate([
|
|
|
9260
9288
|
__decorate([
|
|
9261
9289
|
ignoreClone
|
|
9262
9290
|
], Camera.prototype, "_isInvViewProjDirty", void 0);
|
|
9291
|
+
__decorate([
|
|
9292
|
+
deepClone
|
|
9293
|
+
], Camera.prototype, "_shaderData", void 0);
|
|
9294
|
+
__decorate([
|
|
9295
|
+
ignoreClone
|
|
9296
|
+
], Camera.prototype, "_depthBufferParams", void 0);
|
|
9263
9297
|
__decorate([
|
|
9264
9298
|
deepClone
|
|
9265
9299
|
], Camera.prototype, "_viewport", void 0);
|
|
@@ -26903,7 +26937,7 @@ AmbientLight._mipLevelProperty = ShaderProperty.getByName("scene_EnvMapLight.mip
|
|
|
26903
26937
|
*/ _this.cullingMask = Layer.Everything, /** How this light casts shadows. */ _this.shadowType = ShadowType.None, /** Shadow bias.*/ _this.shadowBias = 1, /** Shadow mapping normal-based bias. */ _this.shadowNormalBias = 1, /**
|
|
26904
26938
|
* @deprecated
|
|
26905
26939
|
* Please use `shadowNearPlaneOffset` instead.
|
|
26906
|
-
*/ _this.shadowNearPlane = 0.1, /** @internal */ _this._lightIndex = -1,
|
|
26940
|
+
*/ _this.shadowNearPlane = 0.1, /** @internal */ _this._lightIndex = -1, _this._shadowStrength = 1.0, _this._color = new Color(1, 1, 1, 1);
|
|
26907
26941
|
return _this;
|
|
26908
26942
|
}
|
|
26909
26943
|
_create_class(Light, [
|
|
@@ -26955,6 +26989,15 @@ AmbientLight._mipLevelProperty = ShaderProperty.getByName("scene_EnvMapLight.mip
|
|
|
26955
26989
|
__decorate([
|
|
26956
26990
|
ignoreClone
|
|
26957
26991
|
], Light.prototype, "_lightIndex", void 0);
|
|
26992
|
+
__decorate([
|
|
26993
|
+
deepClone
|
|
26994
|
+
], Light.prototype, "_color", void 0);
|
|
26995
|
+
__decorate([
|
|
26996
|
+
ignoreClone
|
|
26997
|
+
], Light.prototype, "_viewMat", void 0);
|
|
26998
|
+
__decorate([
|
|
26999
|
+
ignoreClone
|
|
27000
|
+
], Light.prototype, "_inverseViewMat", void 0);
|
|
26958
27001
|
|
|
26959
27002
|
/**
|
|
26960
27003
|
* Directional light.
|
|
@@ -27027,6 +27070,9 @@ __decorate([
|
|
|
27027
27070
|
DirectLight._cullingMaskProperty = ShaderProperty.getByName("scene_DirectLightCullingMask");
|
|
27028
27071
|
DirectLight._colorProperty = ShaderProperty.getByName("scene_DirectLightColor");
|
|
27029
27072
|
DirectLight._directionProperty = ShaderProperty.getByName("scene_DirectLightDirection");
|
|
27073
|
+
__decorate([
|
|
27074
|
+
ignoreClone
|
|
27075
|
+
], DirectLight.prototype, "_reverseDirection", void 0);
|
|
27030
27076
|
|
|
27031
27077
|
/**
|
|
27032
27078
|
* Point light.
|
|
@@ -27098,7 +27144,7 @@ PointLight._distanceProperty = ShaderProperty.getByName("scene_PointLightDistanc
|
|
|
27098
27144
|
_inherits(SpotLight, Light);
|
|
27099
27145
|
function SpotLight() {
|
|
27100
27146
|
var _this;
|
|
27101
|
-
_this = Light.apply(this, arguments) || this, /** Defines a distance cutoff at which the light's intensity must be considered zero. */ _this.distance = 100, /** Angle, in radians, from centre of spotlight where falloff begins. */ _this.angle = Math.PI / 6, /** Angle, in radians, from falloff begins to ends. */ _this.penumbra = Math.PI / 12, _this._inverseDirection = new Vector3()
|
|
27147
|
+
_this = Light.apply(this, arguments) || this, /** Defines a distance cutoff at which the light's intensity must be considered zero. */ _this.distance = 100, /** Angle, in radians, from centre of spotlight where falloff begins. */ _this.angle = Math.PI / 6, /** Angle, in radians, from falloff begins to ends. */ _this.penumbra = Math.PI / 12, _this._inverseDirection = new Vector3();
|
|
27102
27148
|
return _this;
|
|
27103
27149
|
}
|
|
27104
27150
|
var _proto = SpotLight.prototype;
|
|
@@ -27186,6 +27232,9 @@ SpotLight._directionProperty = ShaderProperty.getByName("scene_SpotLightDirectio
|
|
|
27186
27232
|
SpotLight._distanceProperty = ShaderProperty.getByName("scene_SpotLightDistance");
|
|
27187
27233
|
SpotLight._angleCosProperty = ShaderProperty.getByName("scene_SpotLightAngleCos");
|
|
27188
27234
|
SpotLight._penumbraCosProperty = ShaderProperty.getByName("scene_SpotLightPenumbraCos");
|
|
27235
|
+
__decorate([
|
|
27236
|
+
ignoreClone
|
|
27237
|
+
], SpotLight.prototype, "_inverseDirection", void 0);
|
|
27189
27238
|
|
|
27190
27239
|
/**
|
|
27191
27240
|
* Light manager.
|
|
@@ -27517,7 +27566,7 @@ SpotLight._penumbraCosProperty = ShaderProperty.getByName("scene_SpotLightPenumb
|
|
|
27517
27566
|
var sunlight = this._lightManager._sunlight = this._getSunlight();
|
|
27518
27567
|
if (sunlight) {
|
|
27519
27568
|
lightManager._updateSunlightIndex(sunlight);
|
|
27520
|
-
shaderData.setColor(LightManager._sunlightColorProperty, sunlight.
|
|
27569
|
+
shaderData.setColor(LightManager._sunlightColorProperty, sunlight.color);
|
|
27521
27570
|
shaderData.setVector3(LightManager._sunlightDirectionProperty, sunlight.direction);
|
|
27522
27571
|
} else {
|
|
27523
27572
|
// @ts-ignore
|
|
@@ -30050,6 +30099,24 @@ function _type_of(obj) {
|
|
|
30050
30099
|
this._controllerUpdateFlag.flag = false;
|
|
30051
30100
|
}
|
|
30052
30101
|
};
|
|
30102
|
+
/**
|
|
30103
|
+
* @internal
|
|
30104
|
+
*/ _proto._cloneTo = function _cloneTo(target, srcRoot, targetRoot) {
|
|
30105
|
+
var animatorController = target._animatorController;
|
|
30106
|
+
if (animatorController) {
|
|
30107
|
+
target._addResourceReferCount(animatorController, 1);
|
|
30108
|
+
target._controllerUpdateFlag = animatorController._registerChangeFlag();
|
|
30109
|
+
}
|
|
30110
|
+
};
|
|
30111
|
+
_proto._onDestroy = function _onDestroy() {
|
|
30112
|
+
Component.prototype._onDestroy.call(this);
|
|
30113
|
+
var controller = this._animatorController;
|
|
30114
|
+
if (controller) {
|
|
30115
|
+
var _this__controllerUpdateFlag;
|
|
30116
|
+
this._addResourceReferCount(controller, -1);
|
|
30117
|
+
(_this__controllerUpdateFlag = this._controllerUpdateFlag) == null ? void 0 : _this__controllerUpdateFlag.destroy();
|
|
30118
|
+
}
|
|
30119
|
+
};
|
|
30053
30120
|
_proto._crossFade = function _crossFade(stateName, duration, layerIndex, normalizedTimeOffset, isFixedDuration) {
|
|
30054
30121
|
var _this__controllerUpdateFlag;
|
|
30055
30122
|
if ((_this__controllerUpdateFlag = this._controllerUpdateFlag) == null ? void 0 : _this__controllerUpdateFlag.flag) {
|
|
@@ -30850,10 +30917,15 @@ function _type_of(obj) {
|
|
|
30850
30917
|
return this._animatorController;
|
|
30851
30918
|
},
|
|
30852
30919
|
set: function set(animatorController) {
|
|
30853
|
-
|
|
30854
|
-
|
|
30920
|
+
var lastController = this._animatorController;
|
|
30921
|
+
if (animatorController !== lastController) {
|
|
30922
|
+
lastController && this._addResourceReferCount(lastController, -1);
|
|
30855
30923
|
this._controllerUpdateFlag && this._controllerUpdateFlag.destroy();
|
|
30856
|
-
this.
|
|
30924
|
+
this._reset();
|
|
30925
|
+
if (animatorController) {
|
|
30926
|
+
this._addResourceReferCount(animatorController, 1);
|
|
30927
|
+
this._controllerUpdateFlag = animatorController._registerChangeFlag();
|
|
30928
|
+
}
|
|
30857
30929
|
this._animatorController = animatorController;
|
|
30858
30930
|
}
|
|
30859
30931
|
}
|
|
@@ -30883,6 +30955,9 @@ Animator._passedTriggerParameterNames = new Array();
|
|
|
30883
30955
|
__decorate([
|
|
30884
30956
|
assignmentClone
|
|
30885
30957
|
], Animator.prototype, "speed", void 0);
|
|
30958
|
+
__decorate([
|
|
30959
|
+
assignmentClone
|
|
30960
|
+
], Animator.prototype, "_animatorController", void 0);
|
|
30886
30961
|
__decorate([
|
|
30887
30962
|
ignoreClone
|
|
30888
30963
|
], Animator.prototype, "_controllerUpdateFlag", void 0);
|
|
@@ -33939,10 +34014,12 @@ __decorate([
|
|
|
33939
34014
|
* Texture sheet animation module.
|
|
33940
34015
|
*/ var TextureSheetAnimationModule = /*#__PURE__*/ function(ParticleGeneratorModule) {
|
|
33941
34016
|
_inherits(TextureSheetAnimationModule, ParticleGeneratorModule);
|
|
33942
|
-
function TextureSheetAnimationModule() {
|
|
34017
|
+
function TextureSheetAnimationModule(generator) {
|
|
33943
34018
|
var _this;
|
|
33944
|
-
_this = ParticleGeneratorModule.
|
|
34019
|
+
_this = ParticleGeneratorModule.call(this, generator) || this, /** Frame over time curve of the texture sheet. */ _this.frameOverTime = new ParticleCompositeCurve(new ParticleCurve(new CurveKey(0, 0), new CurveKey(1, 1))), /** Texture sheet animation type. */ _this.type = 0, /** Cycle count. */ _this.cycleCount = 1, /** @internal */ _this._tillingInfo = new Vector3(1, 1, 1) // x:subU, y:subV, z:tileCount
|
|
33945
34020
|
, /** @internal */ _this._frameOverTimeRand = new Rand(0, ParticleRandomSubSeeds.TextureSheetAnimation), _this._tiling = new Vector2(1, 1);
|
|
34021
|
+
// @ts-ignore
|
|
34022
|
+
_this._tiling._onValueChanged = _this._onTilingChanged.bind(_this);
|
|
33946
34023
|
return _this;
|
|
33947
34024
|
}
|
|
33948
34025
|
var _proto = TextureSheetAnimationModule.prototype;
|
|
@@ -33972,6 +34049,10 @@ __decorate([
|
|
|
33972
34049
|
*/ _proto._resetRandomSeed = function _resetRandomSeed(randomSeed) {
|
|
33973
34050
|
this._frameOverTimeRand.reset(randomSeed, ParticleRandomSubSeeds.TextureSheetAnimation);
|
|
33974
34051
|
};
|
|
34052
|
+
_proto._onTilingChanged = function _onTilingChanged() {
|
|
34053
|
+
var tiling = this.tiling;
|
|
34054
|
+
this._tillingInfo.set(1.0 / tiling.x, 1.0 / tiling.y, tiling.x * tiling.y);
|
|
34055
|
+
};
|
|
33975
34056
|
_create_class(TextureSheetAnimationModule, [
|
|
33976
34057
|
{
|
|
33977
34058
|
key: "tiling",
|
|
@@ -33981,8 +34062,7 @@ __decorate([
|
|
|
33981
34062
|
return this._tiling;
|
|
33982
34063
|
},
|
|
33983
34064
|
set: function set(value) {
|
|
33984
|
-
this._tiling
|
|
33985
|
-
this._tillingInfo.set(1.0 / value.x, 1.0 / value.y, value.x * value.y);
|
|
34065
|
+
value !== this._tiling && this._tiling.copyFrom(value);
|
|
33986
34066
|
}
|
|
33987
34067
|
}
|
|
33988
34068
|
]);
|
|
@@ -34009,6 +34089,9 @@ __decorate([
|
|
|
34009
34089
|
__decorate([
|
|
34010
34090
|
ignoreClone
|
|
34011
34091
|
], TextureSheetAnimationModule.prototype, "_frameCurveMacro", void 0);
|
|
34092
|
+
__decorate([
|
|
34093
|
+
ignoreClone
|
|
34094
|
+
], TextureSheetAnimationModule.prototype, "_onTilingChanged", null);
|
|
34012
34095
|
|
|
34013
34096
|
/**
|
|
34014
34097
|
* Velocity over lifetime module.
|
|
@@ -36398,6 +36481,13 @@ AudioManager._isResuming = false;
|
|
|
36398
36481
|
};
|
|
36399
36482
|
/**
|
|
36400
36483
|
* @internal
|
|
36484
|
+
*/ _proto._cloneTo = function _cloneTo(target, srcRoot, targetRoot) {
|
|
36485
|
+
var _target__clip;
|
|
36486
|
+
(_target__clip = target._clip) == null ? void 0 : _target__clip._addReferCount(1);
|
|
36487
|
+
target._gainNode.gain.setValueAtTime(target._volume, AudioManager.getContext().currentTime);
|
|
36488
|
+
};
|
|
36489
|
+
/**
|
|
36490
|
+
* @internal
|
|
36401
36491
|
*/ _proto._onEnable = function _onEnable() {
|
|
36402
36492
|
this.playOnEnabled && this.play();
|
|
36403
36493
|
};
|
|
@@ -36547,32 +36637,35 @@ __decorate([
|
|
|
36547
36637
|
ignoreClone
|
|
36548
36638
|
], AudioSource.prototype, "_isPlaying", void 0);
|
|
36549
36639
|
__decorate([
|
|
36550
|
-
|
|
36640
|
+
assignmentClone
|
|
36551
36641
|
], AudioSource.prototype, "_clip", void 0);
|
|
36552
36642
|
__decorate([
|
|
36553
|
-
|
|
36643
|
+
ignoreClone
|
|
36554
36644
|
], AudioSource.prototype, "_gainNode", void 0);
|
|
36555
36645
|
__decorate([
|
|
36556
36646
|
ignoreClone
|
|
36557
36647
|
], AudioSource.prototype, "_sourceNode", void 0);
|
|
36558
36648
|
__decorate([
|
|
36559
|
-
|
|
36649
|
+
ignoreClone
|
|
36560
36650
|
], AudioSource.prototype, "_pausedTime", void 0);
|
|
36561
36651
|
__decorate([
|
|
36562
36652
|
ignoreClone
|
|
36563
36653
|
], AudioSource.prototype, "_playTime", void 0);
|
|
36564
36654
|
__decorate([
|
|
36565
|
-
|
|
36655
|
+
assignmentClone
|
|
36566
36656
|
], AudioSource.prototype, "_volume", void 0);
|
|
36567
36657
|
__decorate([
|
|
36568
|
-
|
|
36658
|
+
assignmentClone
|
|
36569
36659
|
], AudioSource.prototype, "_lastVolume", void 0);
|
|
36570
36660
|
__decorate([
|
|
36571
|
-
|
|
36661
|
+
assignmentClone
|
|
36572
36662
|
], AudioSource.prototype, "_playbackRate", void 0);
|
|
36573
36663
|
__decorate([
|
|
36574
|
-
|
|
36664
|
+
assignmentClone
|
|
36575
36665
|
], AudioSource.prototype, "_loop", void 0);
|
|
36666
|
+
__decorate([
|
|
36667
|
+
ignoreClone
|
|
36668
|
+
], AudioSource.prototype, "_onPlayEnd", null);
|
|
36576
36669
|
|
|
36577
36670
|
/**
|
|
36578
36671
|
* @internal
|