@galacean/engine 1.3.5 → 1.3.7
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/browser.js +42 -26
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/miniprogram.js +1 -1
- package/dist/module.js +1 -1
- package/package.json +5 -5
package/dist/browser.js
CHANGED
|
@@ -7138,7 +7138,7 @@
|
|
|
7138
7138
|
var rotation_over_lifetime_module = "#define GLSLIFY 1\n#if defined(RENDERER_ROL_CONSTANT_MODE) || defined(RENDERER_ROL_CURVE_MODE)\n#ifdef RENDERER_ROL_CURVE_MODE\nuniform vec2 renderer_ROLMaxCurveZ[4];\n#ifdef RENDERER_ROL_IS_RANDOM_TWO\nuniform vec2 renderer_ROLMinCurveZ[4];\n#endif\n#else\nuniform vec3 renderer_ROLMaxConst;\n#ifdef RENDERER_ROL_IS_RANDOM_TWO\nuniform vec3 renderer_ROLMinConst;\n#endif\n#endif\n#endif\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\nfloat lifeRotation=evaluateParticleCurveCumulative(renderer_ROLMaxCurveZ,normalizedAge);\n#ifdef RENDERER_ROL_IS_RANDOM_TWO\nlifeRotation=mix(evaluateParticleCurveCumulative(renderer_ROLMinCurveZ,normalizedAge),lifeRotation,a_Random0.w);\n#endif\nrotation+=lifeRotation*a_ShapePositionStartLifeTime.w;\n#else\nfloat lifeRotation=renderer_ROLMaxConst.z;\n#ifdef RENDERER_ROL_IS_RANDOM_TWO\nlifeRotation=mix(renderer_ROLMinConst.z,lifeRotation,a_Random0.w);\n#endif\nrotation+=lifeRotation*age;\n#endif\n#endif\nreturn rotation;}\n#if defined(RENDERER_MODE_MESH) && (defined(ROTATION_OVER_LIFETIME) || defined(ROTATION_OVER_LIFETIME_SEPARATE))\nvec3 computeParticleRotationVec3(in vec3 rotation,in float age,in float normalizedAge){\n#ifdef ROTATION_OVER_LIFETIME\n#ifdef ROTATION_OVER_LIFETIME_CONSTANT\nfloat ageRot=u_ROLAngularVelocityConst*age;rotation+=ageRot;\n#endif\n#ifdef ROTATION_OVER_LIFETIME_CURVE\nrotation+=getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient,normalizedAge);\n#endif\n#ifdef ROTATION_OVER_LIFETIME_RANDOM_CONSTANTS\nfloat ageRot=mix(u_ROLAngularVelocityConst,u_ROLAngularVelocityConstMax,a_Random0.w)*age;rotation+=ageRot;\n#endif\n#ifdef ROTATION_OVER_LIFETIME_RANDOM_CURVES\nrotation+=mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMax,normalizedAge),a_Random0.w);\n#endif\n#endif\n#ifdef ROTATION_OVER_LIFETIME_SEPARATE\n#ifdef ROTATION_OVER_LIFETIME_CONSTANT\nvec3 ageRot=u_ROLAngularVelocityConstSeparate*age;rotation+=ageRot;\n#endif\n#ifdef ROTATION_OVER_LIFETIME_CURVE\nrotation+=vec3(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientX,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientY,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,normalizedAge));\n#endif\n#ifdef ROTATION_OVER_LIFETIME_RANDOM_CONSTANTS\nvec3 ageRot=mix(u_ROLAngularVelocityConstSeparate,renderer_ROLMaxConst,a_Random0.w)*age;rotation+=ageRot;\n#endif\n#ifdef ROTATION_OVER_LIFETIME_RANDOM_CURVES\nrotation+=vec3(mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientX,normalizedAge),getTotalValueFromGradientFloat(renderer_ROLMaxCurveX,normalizedAge),a_Random0.w),mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientY,normalizedAge),getTotalValueFromGradientFloat(renderer_ROLMaxCurveY,normalizedAge),a_Random0.w),mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,normalizedAge),getTotalValueFromGradientFloat(renderer_ROLMaxCurveZ,normalizedAge),a_Random0.w));\n#endif\n#endif\nreturn rotation;}\n#endif\n"; // eslint-disable-line
|
|
7139
7139
|
var size_over_lifetime_module = "#define GLSLIFY 1\n#ifdef RENDERER_SOL_CURVE_MODE\nuniform vec2 renderer_SOLMaxCurveX[4];\n#ifdef RENDERER_SOL_IS_SEPARATE\nuniform vec2 renderer_SOLMaxCurveY[4];uniform vec2 renderer_SOLMaxCurveZ[4];\n#endif\n#ifdef RENDERER_SOL_IS_RANDOM_TWO\nuniform vec2 renderer_SOLMinCurveX[4];\n#ifdef RENDERER_SOL_IS_SEPARATE\nuniform vec2 renderer_SOLMinCurveY[4];uniform vec2 renderer_SOLMinCurveZ[4];\n#endif\n#endif\n#endif\nvec2 computeParticleSizeBillboard(in vec2 size,in float normalizedAge){\n#ifdef RENDERER_SOL_CURVE_MODE\nfloat lifeSizeX=evaluateParticleCurve(renderer_SOLMaxCurveX,normalizedAge);\n#ifdef RENDERER_SOL_IS_RANDOM_TWO\nlifeSizeX=mix(evaluateParticleCurve(renderer_SOLMinCurveX,normalizedAge),lifeSizeX,a_Random0.z);\n#endif\n#ifdef RENDERER_SOL_IS_SEPARATE\nfloat lifeSizeY=evaluateParticleCurve(renderer_SOLMaxCurveY,normalizedAge);\n#ifdef RENDERER_SOL_IS_RANDOM_TWO\nlifeSizeY=mix(evaluateParticleCurve(renderer_SOLMinCurveY,normalizedAge),lifeSizeY,a_Random0.z);\n#endif\nsize*=vec2(lifeSizeX,lifeSizeY);\n#else\nsize*=lifeSizeX;\n#endif\n#endif\nreturn size;}\n#ifdef RENDERER_MODE_MESH\nvec3 computeParticleSizeMesh(in vec3 size,in float normalizedAge){\n#ifdef RENDERER_SOL_CURVE\nsize*=evaluateParticleCurve(renderer_SOLMaxCurveX,normalizedAge);\n#endif\n#ifdef RENDERER_SOL_RANDOM_CURVES\nsize*=mix(evaluateParticleCurve(renderer_SOLMaxCurveX,normalizedAge),evaluateParticleCurve(u_SOLSizeGradientMax,normalizedAge),a_Random0.z);\n#endif\n#ifdef RENDERER_SOL_CURVE_SEPARATE\nsize*=vec3(evaluateParticleCurve(renderer_SOLMinCurveX,normalizedAge),evaluateParticleCurve(renderer_SOLMinCurveY,normalizedAge),evaluateParticleCurve(renderer_SOLMinCurveZ,normalizedAge));\n#endif\n#ifdef RENDERER_SOL_RANDOM_CURVES_SEPARATE\nsize*=vec3(mix(evaluateParticleCurve(renderer_SOLMinCurveX,normalizedAge),evaluateParticleCurve(renderer_SOLMaxCurveX,normalizedAge),a_Random0.z),mix(evaluateParticleCurve(renderer_SOLMinCurveY,normalizedAge),evaluateParticleCurve(renderer_SOLMaxCurveY,normalizedAge),a_Random0.z),mix(evaluateParticleCurve(renderer_SOLMinCurveZ,normalizedAge),evaluateParticleCurve(renderer_SOLMaxCurveZ,normalizedAge),a_Random0.z));\n#endif\nreturn size;}\n#endif\n"; // eslint-disable-line
|
|
7140
7140
|
var color_over_lifetime_module = "#define GLSLIFY 1\n#if defined(RENDERER_COL_GRADIENT) || defined(RENDERER_COL_RANDOM_GRADIENTS)\nuniform vec4 renderer_COLMaxGradientColor[4];uniform vec2 renderer_COLMaxGradientAlpha[4];\n#ifdef RENDERER_COL_RANDOM_GRADIENTS\nuniform vec4 renderer_COLMinGradientColor[4];uniform vec2 renderer_COLMinGradientAlpha[4];\n#endif\nuniform vec4 renderer_COLGradientKeysMaxTime;\n#endif\n#if defined(RENDERER_COL_GRADIENT) || defined(RENDERER_COL_RANDOM_GRADIENTS)\nvec4 evaluateParticleGradient(in vec4 colorKeys[4],in float colorKeysMaxTime,in vec2 alphaKeys[4],in float alphaKeysMaxTime,in float normalizedAge){vec4 value;float alphaAge=min(normalizedAge,alphaKeysMaxTime);for(int i=0;i<4;i++){vec2 key=alphaKeys[i];float time=key.x;if(alphaAge<=time){if(i==0){value.a=alphaKeys[0].y;}else{vec2 lastKey=alphaKeys[i-1];float lastTime=lastKey.x;float age=(alphaAge-lastTime)/(time-lastTime);value.a=mix(lastKey.y,key.y,age);}break;}}float colorAge=min(normalizedAge,colorKeysMaxTime);for(int i=0;i<4;i++){vec4 key=colorKeys[i];float time=key.x;if(colorAge<=time){if(i==0){value.rgb=colorKeys[0].yzw;}else{vec4 lastKey=colorKeys[i-1];float lastTime=lastKey.x;float age=(colorAge-lastTime)/(time-lastTime);value.rgb=mix(lastKey.yzw,key.yzw,age);}break;}}return value;}\n#endif\nvec4 computeParticleColor(in vec4 color,in float normalizedAge){\n#if defined(RENDERER_COL_GRADIENT) || defined(RENDERER_COL_RANDOM_GRADIENTS)\nvec4 gradientColor=evaluateParticleGradient(renderer_COLMaxGradientColor,renderer_COLGradientKeysMaxTime.z,renderer_COLMaxGradientAlpha,renderer_COLGradientKeysMaxTime.w,normalizedAge);\n#endif\n#ifdef RENDERER_COL_RANDOM_GRADIENTS\ngradientColor=mix(evaluateParticleGradient(renderer_COLMinGradientColor,renderer_COLGradientKeysMaxTime.x,renderer_COLMinGradientAlpha,renderer_COLGradientKeysMaxTime.y,normalizedAge),gradientColor,a_Random0.y);\n#endif\n#if defined(RENDERER_COL_GRADIENT) || defined(RENDERER_COL_RANDOM_GRADIENTS)\ncolor*=gradientColor;\n#endif\nreturn color;}"; // eslint-disable-line
|
|
7141
|
-
var texture_sheet_animation_module = "#define GLSLIFY 1\n#if defined(RENDERER_TSA_FRAME_CURVE) || defined(RENDERER_TSA_FRAME_RANDOM_CURVES)\nuniform float renderer_TSACycles;uniform vec3 renderer_TSATillingParams;uniform vec2 renderer_TSAFrameMaxCurve[4];\n#
|
|
7141
|
+
var texture_sheet_animation_module = "#define GLSLIFY 1\n#if defined(RENDERER_TSA_FRAME_CURVE) || defined(RENDERER_TSA_FRAME_RANDOM_CURVES)\nuniform float renderer_TSACycles;uniform vec3 renderer_TSATillingParams;uniform vec2 renderer_TSAFrameMaxCurve[4];\n#ifdef RENDERER_TSA_FRAME_RANDOM_CURVES\nuniform vec2 renderer_TSAFrameMinCurve[4];\n#endif\n#endif\nvec2 computeParticleUV(in vec2 uv,in float normalizedAge){\n#if defined(RENDERER_TSA_FRAME_CURVE) || defined(RENDERER_TSA_FRAME_RANDOM_CURVES)\nfloat scaledNormalizedAge=normalizedAge*renderer_TSACycles;float cycleNormalizedAge=scaledNormalizedAge-floor(scaledNormalizedAge);float normalizedFrame=evaluateParticleCurve(renderer_TSAFrameMaxCurve,cycleNormalizedAge);\n#ifdef RENDERER_TSA_FRAME_RANDOM_CURVES\nnormalizedFrame=mix(evaluateParticleCurve(renderer_TSAFrameMinCurve,cycleNormalizedAge),normalizedFrame,a_Random1.x);\n#endif\nfloat frame=floor(normalizedFrame*renderer_TSATillingParams.z);float tileRow=frame*renderer_TSATillingParams.x;float floorTotalULength=floor(tileRow);uv.x+=tileRow-tileRowIndex;uv.y+=tileRowIndex*renderer_TSATillingParams.y;\n#endif\nreturn uv;}"; // eslint-disable-line
|
|
7142
7142
|
var sphere_billboard = "#define GLSLIFY 1\n#ifdef RENDERER_MODE_SPHERE_BILLBOARD\nvec2 corner=a_CornerTextureCoordinate.xy+renderer_PivotOffset.xy;vec3 sideVector=normalize(cross(camera_Forward,camera_Up));vec3 upVector=normalize(cross(sideVector,camera_Forward));corner*=computeParticleSizeBillboard(a_StartSize.xy,normalizedAge);\n#if defined(RENDERER_ROL_CONSTANT_MODE) || defined(RENDERER_ROL_CURVE_MODE)\nif(renderer_ThreeDStartRotation){vec3 rotation=vec3(a_StartRotation0.xy,computeParticleRotationFloat(a_StartRotation0.z,age,normalizedAge));center+=renderer_SizeScale.xzy*rotationByEuler(corner.x*sideVector+corner.y*upVector,rotation);}else{float rot=computeParticleRotationFloat(a_StartRotation0.x,age,normalizedAge);float c=cos(rot);float s=sin(rot);mat2 rotation=mat2(c,-s,s,c);corner=rotation*corner;center+=renderer_SizeScale.xzy*(corner.x*sideVector+corner.y*upVector);}\n#else\nif(renderer_ThreeDStartRotation){center+=renderer_SizeScale.xzy*rotationByEuler(corner.x*sideVector+corner.y*upVector,a_StartRotation0);}else{float c=cos(a_StartRotation0.x);float s=sin(a_StartRotation0.x);mat2 rotation=mat2(c,-s,s,c);corner=rotation*corner;center+=renderer_SizeScale.xzy*(corner.x*sideVector+corner.y*upVector);}\n#endif\n#endif\n"; // eslint-disable-line
|
|
7143
7143
|
var stretched_billboard = "#define GLSLIFY 1\n#ifdef RENDERER_MODE_STRETCHED_BILLBOARD\nvec2 corner=a_CornerTextureCoordinate.xy+renderer_PivotOffset.xy;vec3 velocity;\n#if defined(RENDERER_VOL_CONSTANT) || defined(RENDERER_VOL_CURVE) || defined(RENDERER_VOL_RANDOM_CONSTANT) || defined(RENDERER_VOL_RANDOM_CURVE)\nif(renderer_VOLSpace==0){velocity=rotationByQuaternions(renderer_SizeScale*(startVelocity+lifeVelocity),worldRotation)+gravityVelocity;}else{velocity=rotationByQuaternions(renderer_SizeScale*startVelocity,worldRotation)+lifeVelocity+gravityVelocity;}\n#else\nvelocity=rotationByQuaternions(renderer_SizeScale*startVelocity,worldRotation)+gravityVelocity;\n#endif\nvec3 cameraUpVector=normalize(velocity);vec3 direction=normalize(center-camera_Position);vec3 sideVector=normalize(cross(direction,normalize(velocity)));sideVector=renderer_SizeScale.xzy*sideVector;cameraUpVector=length(vec3(renderer_SizeScale.x,0.0,0.0))*cameraUpVector;vec2 size=computeParticleSizeBillboard(a_StartSize.xy,normalizedAge);const mat2 rotationZHalfPI=mat2(0.0,-1.0,1.0,0.0);corner=rotationZHalfPI*corner;corner.y=corner.y-abs(corner.y);float speed=length(velocity);center+=sign(renderer_SizeScale.x)*(sign(renderer_StretchedBillboardLengthScale)*size.x*corner.x*sideVector+(speed*renderer_StretchedBillboardSpeedScale+size.y*renderer_StretchedBillboardLengthScale)*corner.y*cameraUpVector);\n#endif\n"; // eslint-disable-line
|
|
7144
7144
|
var vertical_billboard = "#define GLSLIFY 1\n#ifdef RENDERER_MODE_VERTICAL_BILLBOARD\nvec2 corner=a_CornerTextureCoordinate.xy+renderer_PivotOffset.xy;const vec3 cameraUpVector=vec3(0.0,1.0,0.0);vec3 sideVector=normalize(cross(camera_Forward,cameraUpVector));float rot=computeParticleRotationFloat(a_StartRotation0.x,age,normalizedAge);float c=cos(rot);float s=sin(rot);mat2 rotation=mat2(c,-s,s,c);corner=rotation*corner*cos(0.78539816339744830961566084581988);corner*=computeParticleSizeBillboard(a_StartSize.xy,normalizedAge);center+=renderer_SizeScale.xzy*(corner.x*sideVector+corner.y*cameraUpVector);\n#endif\n"; // eslint-disable-line
|
|
@@ -15560,6 +15560,9 @@
|
|
|
15560
15560
|
__decorate$1([
|
|
15561
15561
|
assignmentClone
|
|
15562
15562
|
], SpriteMask.prototype, "influenceLayers", void 0);
|
|
15563
|
+
__decorate$1([
|
|
15564
|
+
ignoreClone
|
|
15565
|
+
], SpriteMask.prototype, "_renderElement", void 0);
|
|
15563
15566
|
__decorate$1([
|
|
15564
15567
|
ignoreClone
|
|
15565
15568
|
], SpriteMask.prototype, "_subChunk", void 0);
|
|
@@ -25645,6 +25648,8 @@
|
|
|
25645
25648
|
_this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
|
|
25646
25649
|
//@ts-ignore
|
|
25647
25650
|
_this._upDirection._onValueChanged = _this._setUpDirection;
|
|
25651
|
+
// sync world position to physical space
|
|
25652
|
+
_this._onUpdate();
|
|
25648
25653
|
return _this;
|
|
25649
25654
|
};
|
|
25650
25655
|
_inherits$2(CharacterController, Collider1);
|
|
@@ -25656,7 +25661,9 @@
|
|
|
25656
25661
|
* @param elapsedTime - Time elapsed since last call
|
|
25657
25662
|
* @return flags - The ControllerCollisionFlag
|
|
25658
25663
|
*/ _proto.move = function move(disp, minDist, elapsedTime) {
|
|
25659
|
-
|
|
25664
|
+
var flags = this._nativeCollider.move(disp, minDist, elapsedTime);
|
|
25665
|
+
this._syncWorldPositionFromPhysicalSpace();
|
|
25666
|
+
return flags;
|
|
25660
25667
|
};
|
|
25661
25668
|
/**
|
|
25662
25669
|
* Add collider shape on this controller.
|
|
@@ -25692,8 +25699,7 @@
|
|
|
25692
25699
|
/**
|
|
25693
25700
|
* @internal
|
|
25694
25701
|
*/ _proto._onLateUpdate = function _onLateUpdate() {
|
|
25695
|
-
|
|
25696
|
-
this._nativeCollider.getWorldPosition(position);
|
|
25702
|
+
this._syncWorldPositionFromPhysicalSpace();
|
|
25697
25703
|
this._updateFlag.flag = false;
|
|
25698
25704
|
};
|
|
25699
25705
|
/**
|
|
@@ -25716,6 +25722,9 @@
|
|
|
25716
25722
|
physics._removeColliderShape(shapes[i]);
|
|
25717
25723
|
}
|
|
25718
25724
|
};
|
|
25725
|
+
_proto._syncWorldPositionFromPhysicalSpace = function _syncWorldPositionFromPhysicalSpace() {
|
|
25726
|
+
this._nativeCollider.getWorldPosition(this.entity.transform.worldPosition);
|
|
25727
|
+
};
|
|
25719
25728
|
_proto._setUpDirection = function _setUpDirection() {
|
|
25720
25729
|
this._nativeCollider.setUpDirection(this._upDirection);
|
|
25721
25730
|
};
|
|
@@ -33270,7 +33279,9 @@
|
|
|
33270
33279
|
// Precalculate to get the transition
|
|
33271
33280
|
srcPlayData.update(playDeltaTime);
|
|
33272
33281
|
var clipTime = srcPlayData.clipTime, isForwards = srcPlayData.isForwards;
|
|
33273
|
-
var
|
|
33282
|
+
var transitions = state.transitions;
|
|
33283
|
+
var anyStateTransitions = layer.stateMachine.anyStateTransitions;
|
|
33284
|
+
var transition = anyStateTransitions.length && this._applyTransitionsByCondition(layerIndex, layerData, layer, state, anyStateTransitions, aniUpdate) || transitions.length && this._applyStateTransitions(layerIndex, layerData, layer, isForwards, srcPlayData, transitions, lastClipTime, clipTime, playDeltaTime, aniUpdate);
|
|
33274
33285
|
var playCostTime;
|
|
33275
33286
|
if (transition) {
|
|
33276
33287
|
var clipDuration = state.clip.length;
|
|
@@ -33352,7 +33363,7 @@
|
|
|
33352
33363
|
dstPlayCostTime = // > transition: The time that will be played is enough to finish the transition
|
|
33353
33364
|
playedTime - dstPlayDeltaTime > transitionDuration ? playedTime - transitionDuration : dstPlayDeltaTime;
|
|
33354
33365
|
}
|
|
33355
|
-
var actualCostTime = dstPlaySpeed === 0 ?
|
|
33366
|
+
var actualCostTime = dstPlaySpeed === 0 ? deltaTime : dstPlayCostTime / dstPlaySpeed;
|
|
33356
33367
|
var srcPlayCostTime = actualCostTime * srcPlaySpeed;
|
|
33357
33368
|
srcPlayData.update(srcPlayCostTime);
|
|
33358
33369
|
destPlayData.update(dstPlayCostTime);
|
|
@@ -33360,6 +33371,7 @@
|
|
|
33360
33371
|
(crossWeight >= 1.0 - MathUtil.zeroTolerance || transitionDuration === 0) && (crossWeight = 1.0);
|
|
33361
33372
|
var crossFadeFinished = crossWeight === 1.0;
|
|
33362
33373
|
if (crossFadeFinished) {
|
|
33374
|
+
srcPlayData.playState = AnimatorStatePlayState.Finished;
|
|
33363
33375
|
this._preparePlayOwner(layerData, destState);
|
|
33364
33376
|
this._evaluatePlayingState(destPlayData, weight, additive, aniUpdate);
|
|
33365
33377
|
} else {
|
|
@@ -33412,7 +33424,7 @@
|
|
|
33412
33424
|
dstPlayCostTime = // > transition: The time that will be played is enough to finish the transition
|
|
33413
33425
|
playedTime - playDeltaTime > transitionDuration ? playedTime - transitionDuration : playDeltaTime;
|
|
33414
33426
|
}
|
|
33415
|
-
var actualCostTime = playSpeed === 0 ?
|
|
33427
|
+
var actualCostTime = playSpeed === 0 ? deltaTime : dstPlayCostTime / playSpeed;
|
|
33416
33428
|
destPlayData.update(dstPlayCostTime);
|
|
33417
33429
|
var crossWeight = Math.abs(destPlayData.frameTime) / transitionDuration;
|
|
33418
33430
|
(crossWeight >= 1.0 - MathUtil.zeroTolerance || transitionDuration === 0) && (crossWeight = 1.0);
|
|
@@ -33452,14 +33464,16 @@
|
|
|
33452
33464
|
}
|
|
33453
33465
|
};
|
|
33454
33466
|
_proto._updateFinishedState = function _updateFinishedState(layerIndex, layerData, layer, weight, additive, deltaTime, aniUpdate) {
|
|
33455
|
-
|
|
33467
|
+
layer.stateMachine;
|
|
33456
33468
|
var playData = layerData.srcPlayData;
|
|
33457
33469
|
var state = playData.state;
|
|
33458
33470
|
var actualSpeed = state.speed * this.speed;
|
|
33459
33471
|
var actualDeltaTime = actualSpeed * deltaTime;
|
|
33460
33472
|
playData.updateOrientation(actualDeltaTime);
|
|
33461
33473
|
var clipTime = playData.clipTime, isForwards = playData.isForwards;
|
|
33462
|
-
var
|
|
33474
|
+
var transitions = state.transitions;
|
|
33475
|
+
var anyStateTransitions = layer.stateMachine.anyStateTransitions;
|
|
33476
|
+
var transition = anyStateTransitions.length && this._applyTransitionsByCondition(layerIndex, layerData, layer, state, anyStateTransitions, aniUpdate) || transitions.length && this._applyStateTransitions(layerIndex, layerData, layer, isForwards, playData, transitions, clipTime, clipTime, actualDeltaTime, aniUpdate);
|
|
33463
33477
|
if (transition) {
|
|
33464
33478
|
this._updateState(layerIndex, layerData, layer, deltaTime, aniUpdate);
|
|
33465
33479
|
} else {
|
|
@@ -36745,7 +36759,6 @@
|
|
|
36745
36759
|
var TextureSheetAnimationModule = function TextureSheetAnimationModule() {
|
|
36746
36760
|
var _this;
|
|
36747
36761
|
_this = ParticleGeneratorModule1.apply(this, arguments) || this;
|
|
36748
|
-
/** Start frame of the texture sheet. */ _this.startFrame = new ParticleCompositeCurve(0);
|
|
36749
36762
|
/** Frame over time curve of the texture sheet. */ _this.frameOverTime = new ParticleCompositeCurve(new ParticleCurve(new CurveKey(0, 0), new CurveKey(1, 1)));
|
|
36750
36763
|
/** Texture sheet animation type. */ _this.type = /** Animate over the whole texture sheet from left to right, top to bottom. */ 0;
|
|
36751
36764
|
/** Cycle count. */ _this.cycleCount = 1;
|
|
@@ -36776,7 +36789,7 @@
|
|
|
36776
36789
|
shaderData.setVector3(TextureSheetAnimationModule._tillingParamsProperty, this._tillingInfo);
|
|
36777
36790
|
}
|
|
36778
36791
|
}
|
|
36779
|
-
this.
|
|
36792
|
+
this._frameCurveMacro = this._enableMacro(shaderData, this._frameCurveMacro, frameMacro);
|
|
36780
36793
|
};
|
|
36781
36794
|
/**
|
|
36782
36795
|
* @internal
|
|
@@ -36806,20 +36819,17 @@
|
|
|
36806
36819
|
TextureSheetAnimationModule._frameRandomCurvesMacro = ShaderMacro.getByName("RENDERER_TSA_FRAME_RANDOM_CURVES");
|
|
36807
36820
|
})();
|
|
36808
36821
|
(function() {
|
|
36809
|
-
TextureSheetAnimationModule.
|
|
36822
|
+
TextureSheetAnimationModule._frameMinCurveProperty = ShaderProperty.getByName("renderer_TSAFrameMinCurve");
|
|
36810
36823
|
})();
|
|
36811
36824
|
(function() {
|
|
36812
|
-
TextureSheetAnimationModule.
|
|
36825
|
+
TextureSheetAnimationModule._frameMaxCurveProperty = ShaderProperty.getByName("renderer_TSAFrameMaxCurve");
|
|
36813
36826
|
})();
|
|
36814
36827
|
(function() {
|
|
36815
|
-
TextureSheetAnimationModule.
|
|
36828
|
+
TextureSheetAnimationModule._cycleCountProperty = ShaderProperty.getByName("renderer_TSACycles");
|
|
36816
36829
|
})();
|
|
36817
36830
|
(function() {
|
|
36818
|
-
TextureSheetAnimationModule.
|
|
36831
|
+
TextureSheetAnimationModule._tillingParamsProperty = ShaderProperty.getByName("renderer_TSATillingParams");
|
|
36819
36832
|
})();
|
|
36820
|
-
__decorate$1([
|
|
36821
|
-
deepClone
|
|
36822
|
-
], TextureSheetAnimationModule.prototype, "startFrame", void 0);
|
|
36823
36833
|
__decorate$1([
|
|
36824
36834
|
deepClone
|
|
36825
36835
|
], TextureSheetAnimationModule.prototype, "frameOverTime", void 0);
|
|
@@ -36834,7 +36844,7 @@
|
|
|
36834
36844
|
], TextureSheetAnimationModule.prototype, "_tiling", void 0);
|
|
36835
36845
|
__decorate$1([
|
|
36836
36846
|
ignoreClone
|
|
36837
|
-
], TextureSheetAnimationModule.prototype, "
|
|
36847
|
+
], TextureSheetAnimationModule.prototype, "_frameCurveMacro", void 0);
|
|
36838
36848
|
var TextureSheetAnimationType;
|
|
36839
36849
|
(function(TextureSheetAnimationType) {
|
|
36840
36850
|
TextureSheetAnimationType[TextureSheetAnimationType["WholeSheet"] = 0] = "WholeSheet";
|
|
@@ -37566,12 +37576,18 @@
|
|
|
37566
37576
|
instanceVertices[offset + 33] = rot.w;
|
|
37567
37577
|
}
|
|
37568
37578
|
// Simulation UV
|
|
37569
|
-
if (
|
|
37570
|
-
var
|
|
37571
|
-
|
|
37572
|
-
|
|
37573
|
-
|
|
37574
|
-
|
|
37579
|
+
if (textureSheetAnimation.enabled) {
|
|
37580
|
+
var frameOverTime = textureSheetAnimation.frameOverTime;
|
|
37581
|
+
var _textureSheetAnimation__tillingInfo = textureSheetAnimation._tillingInfo, x = _textureSheetAnimation__tillingInfo.x, y = _textureSheetAnimation__tillingInfo.y, z = _textureSheetAnimation__tillingInfo.z;
|
|
37582
|
+
var tileRow = 0;
|
|
37583
|
+
if (frameOverTime.mode === exports.ParticleCurveMode.Constant || frameOverTime.mode === exports.ParticleCurveMode.TwoConstants) {
|
|
37584
|
+
tileRow = Math.floor(frameOverTime.evaluate(undefined, textureSheetAnimation._frameOverTimeRand.random()) * z) * x;
|
|
37585
|
+
}
|
|
37586
|
+
var tileRowIndex = Math.floor(tileRow);
|
|
37587
|
+
instanceVertices[offset + ParticleBufferUtils.simulationUVOffset] = x;
|
|
37588
|
+
instanceVertices[offset + 35] = y;
|
|
37589
|
+
instanceVertices[offset + 36] = tileRow - tileRowIndex;
|
|
37590
|
+
instanceVertices[offset + 37] = tileRowIndex * y;
|
|
37575
37591
|
} else {
|
|
37576
37592
|
instanceVertices[offset + ParticleBufferUtils.simulationUVOffset] = 1;
|
|
37577
37593
|
instanceVertices[offset + 35] = 1;
|
|
@@ -48072,7 +48088,7 @@
|
|
|
48072
48088
|
], EXT_texture_webp);
|
|
48073
48089
|
|
|
48074
48090
|
//@ts-ignore
|
|
48075
|
-
var version = "1.3.
|
|
48091
|
+
var version = "1.3.7";
|
|
48076
48092
|
console.log("Galacean engine version: " + version);
|
|
48077
48093
|
for(var key in CoreObjects){
|
|
48078
48094
|
Loader.registerClass(key, CoreObjects[key]);
|