@galacean/engine-core 1.3.6 → 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/main.js +19 -17
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +19 -17
- package/dist/module.js +19 -17
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +3 -5
package/dist/miniprogram.js
CHANGED
|
@@ -2253,7 +2253,7 @@ var size_over_lifetime_module = "#define GLSLIFY 1\n#ifdef RENDERER_SOL_CURVE_MO
|
|
|
2253
2253
|
|
|
2254
2254
|
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
|
|
2255
2255
|
|
|
2256
|
-
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#
|
|
2256
|
+
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
|
|
2257
2257
|
|
|
2258
2258
|
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
|
|
2259
2259
|
|
|
@@ -32214,7 +32214,6 @@ __decorate([
|
|
|
32214
32214
|
function TextureSheetAnimationModule() {
|
|
32215
32215
|
var _this;
|
|
32216
32216
|
_this = ParticleGeneratorModule1.apply(this, arguments) || this;
|
|
32217
|
-
/** Start frame of the texture sheet. */ _this.startFrame = new ParticleCompositeCurve(0);
|
|
32218
32217
|
/** Frame over time curve of the texture sheet. */ _this.frameOverTime = new ParticleCompositeCurve(new ParticleCurve(new CurveKey(0, 0), new CurveKey(1, 1)));
|
|
32219
32218
|
/** Texture sheet animation type. */ _this.type = /** Animate over the whole texture sheet from left to right, top to bottom. */ 0;
|
|
32220
32219
|
/** Cycle count. */ _this.cycleCount = 1;
|
|
@@ -32244,7 +32243,7 @@ __decorate([
|
|
|
32244
32243
|
shaderData.setVector3(TextureSheetAnimationModule._tillingParamsProperty, this._tillingInfo);
|
|
32245
32244
|
}
|
|
32246
32245
|
}
|
|
32247
|
-
this.
|
|
32246
|
+
this._frameCurveMacro = this._enableMacro(shaderData, this._frameCurveMacro, frameMacro);
|
|
32248
32247
|
};
|
|
32249
32248
|
/**
|
|
32250
32249
|
* @internal
|
|
@@ -32274,20 +32273,17 @@ __decorate([
|
|
|
32274
32273
|
TextureSheetAnimationModule._frameRandomCurvesMacro = ShaderMacro.getByName("RENDERER_TSA_FRAME_RANDOM_CURVES");
|
|
32275
32274
|
})();
|
|
32276
32275
|
(function() {
|
|
32277
|
-
TextureSheetAnimationModule.
|
|
32276
|
+
TextureSheetAnimationModule._frameMinCurveProperty = ShaderProperty.getByName("renderer_TSAFrameMinCurve");
|
|
32278
32277
|
})();
|
|
32279
32278
|
(function() {
|
|
32280
|
-
TextureSheetAnimationModule.
|
|
32279
|
+
TextureSheetAnimationModule._frameMaxCurveProperty = ShaderProperty.getByName("renderer_TSAFrameMaxCurve");
|
|
32281
32280
|
})();
|
|
32282
32281
|
(function() {
|
|
32283
|
-
TextureSheetAnimationModule.
|
|
32282
|
+
TextureSheetAnimationModule._cycleCountProperty = ShaderProperty.getByName("renderer_TSACycles");
|
|
32284
32283
|
})();
|
|
32285
32284
|
(function() {
|
|
32286
|
-
TextureSheetAnimationModule.
|
|
32285
|
+
TextureSheetAnimationModule._tillingParamsProperty = ShaderProperty.getByName("renderer_TSATillingParams");
|
|
32287
32286
|
})();
|
|
32288
|
-
__decorate([
|
|
32289
|
-
deepClone
|
|
32290
|
-
], TextureSheetAnimationModule.prototype, "startFrame", void 0);
|
|
32291
32287
|
__decorate([
|
|
32292
32288
|
deepClone
|
|
32293
32289
|
], TextureSheetAnimationModule.prototype, "frameOverTime", void 0);
|
|
@@ -32302,7 +32298,7 @@ __decorate([
|
|
|
32302
32298
|
], TextureSheetAnimationModule.prototype, "_tiling", void 0);
|
|
32303
32299
|
__decorate([
|
|
32304
32300
|
ignoreClone
|
|
32305
|
-
], TextureSheetAnimationModule.prototype, "
|
|
32301
|
+
], TextureSheetAnimationModule.prototype, "_frameCurveMacro", void 0);
|
|
32306
32302
|
var TextureSheetAnimationType;
|
|
32307
32303
|
(function(TextureSheetAnimationType) {
|
|
32308
32304
|
TextureSheetAnimationType[TextureSheetAnimationType["WholeSheet"] = 0] = "WholeSheet";
|
|
@@ -33036,12 +33032,18 @@ __decorate([
|
|
|
33036
33032
|
instanceVertices[offset + 33] = rot.w;
|
|
33037
33033
|
}
|
|
33038
33034
|
// Simulation UV
|
|
33039
|
-
if (
|
|
33040
|
-
var
|
|
33041
|
-
|
|
33042
|
-
|
|
33043
|
-
|
|
33044
|
-
|
|
33035
|
+
if (textureSheetAnimation.enabled) {
|
|
33036
|
+
var frameOverTime = textureSheetAnimation.frameOverTime;
|
|
33037
|
+
var _textureSheetAnimation__tillingInfo = textureSheetAnimation._tillingInfo, x = _textureSheetAnimation__tillingInfo.x, y = _textureSheetAnimation__tillingInfo.y, z = _textureSheetAnimation__tillingInfo.z;
|
|
33038
|
+
var tileRow = 0;
|
|
33039
|
+
if (frameOverTime.mode === exports.ParticleCurveMode.Constant || frameOverTime.mode === exports.ParticleCurveMode.TwoConstants) {
|
|
33040
|
+
tileRow = Math.floor(frameOverTime.evaluate(undefined, textureSheetAnimation._frameOverTimeRand.random()) * z) * x;
|
|
33041
|
+
}
|
|
33042
|
+
var tileRowIndex = Math.floor(tileRow);
|
|
33043
|
+
instanceVertices[offset + ParticleBufferUtils.simulationUVOffset] = x;
|
|
33044
|
+
instanceVertices[offset + 35] = y;
|
|
33045
|
+
instanceVertices[offset + 36] = tileRow - tileRowIndex;
|
|
33046
|
+
instanceVertices[offset + 37] = tileRowIndex * y;
|
|
33045
33047
|
} else {
|
|
33046
33048
|
instanceVertices[offset + ParticleBufferUtils.simulationUVOffset] = 1;
|
|
33047
33049
|
instanceVertices[offset + 35] = 1;
|
package/dist/module.js
CHANGED
|
@@ -2248,7 +2248,7 @@ var size_over_lifetime_module = "#define GLSLIFY 1\n#ifdef RENDERER_SOL_CURVE_MO
|
|
|
2248
2248
|
|
|
2249
2249
|
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
|
|
2250
2250
|
|
|
2251
|
-
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#
|
|
2251
|
+
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
|
|
2252
2252
|
|
|
2253
2253
|
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
|
|
2254
2254
|
|
|
@@ -32209,7 +32209,6 @@ __decorate([
|
|
|
32209
32209
|
function TextureSheetAnimationModule() {
|
|
32210
32210
|
var _this;
|
|
32211
32211
|
_this = ParticleGeneratorModule1.apply(this, arguments) || this;
|
|
32212
|
-
/** Start frame of the texture sheet. */ _this.startFrame = new ParticleCompositeCurve(0);
|
|
32213
32212
|
/** Frame over time curve of the texture sheet. */ _this.frameOverTime = new ParticleCompositeCurve(new ParticleCurve(new CurveKey(0, 0), new CurveKey(1, 1)));
|
|
32214
32213
|
/** Texture sheet animation type. */ _this.type = /** Animate over the whole texture sheet from left to right, top to bottom. */ 0;
|
|
32215
32214
|
/** Cycle count. */ _this.cycleCount = 1;
|
|
@@ -32239,7 +32238,7 @@ __decorate([
|
|
|
32239
32238
|
shaderData.setVector3(TextureSheetAnimationModule._tillingParamsProperty, this._tillingInfo);
|
|
32240
32239
|
}
|
|
32241
32240
|
}
|
|
32242
|
-
this.
|
|
32241
|
+
this._frameCurveMacro = this._enableMacro(shaderData, this._frameCurveMacro, frameMacro);
|
|
32243
32242
|
};
|
|
32244
32243
|
/**
|
|
32245
32244
|
* @internal
|
|
@@ -32269,20 +32268,17 @@ __decorate([
|
|
|
32269
32268
|
TextureSheetAnimationModule._frameRandomCurvesMacro = ShaderMacro.getByName("RENDERER_TSA_FRAME_RANDOM_CURVES");
|
|
32270
32269
|
})();
|
|
32271
32270
|
(function() {
|
|
32272
|
-
TextureSheetAnimationModule.
|
|
32271
|
+
TextureSheetAnimationModule._frameMinCurveProperty = ShaderProperty.getByName("renderer_TSAFrameMinCurve");
|
|
32273
32272
|
})();
|
|
32274
32273
|
(function() {
|
|
32275
|
-
TextureSheetAnimationModule.
|
|
32274
|
+
TextureSheetAnimationModule._frameMaxCurveProperty = ShaderProperty.getByName("renderer_TSAFrameMaxCurve");
|
|
32276
32275
|
})();
|
|
32277
32276
|
(function() {
|
|
32278
|
-
TextureSheetAnimationModule.
|
|
32277
|
+
TextureSheetAnimationModule._cycleCountProperty = ShaderProperty.getByName("renderer_TSACycles");
|
|
32279
32278
|
})();
|
|
32280
32279
|
(function() {
|
|
32281
|
-
TextureSheetAnimationModule.
|
|
32280
|
+
TextureSheetAnimationModule._tillingParamsProperty = ShaderProperty.getByName("renderer_TSATillingParams");
|
|
32282
32281
|
})();
|
|
32283
|
-
__decorate([
|
|
32284
|
-
deepClone
|
|
32285
|
-
], TextureSheetAnimationModule.prototype, "startFrame", void 0);
|
|
32286
32282
|
__decorate([
|
|
32287
32283
|
deepClone
|
|
32288
32284
|
], TextureSheetAnimationModule.prototype, "frameOverTime", void 0);
|
|
@@ -32297,7 +32293,7 @@ __decorate([
|
|
|
32297
32293
|
], TextureSheetAnimationModule.prototype, "_tiling", void 0);
|
|
32298
32294
|
__decorate([
|
|
32299
32295
|
ignoreClone
|
|
32300
|
-
], TextureSheetAnimationModule.prototype, "
|
|
32296
|
+
], TextureSheetAnimationModule.prototype, "_frameCurveMacro", void 0);
|
|
32301
32297
|
var TextureSheetAnimationType;
|
|
32302
32298
|
(function(TextureSheetAnimationType) {
|
|
32303
32299
|
TextureSheetAnimationType[TextureSheetAnimationType["WholeSheet"] = 0] = "WholeSheet";
|
|
@@ -33031,12 +33027,18 @@ __decorate([
|
|
|
33031
33027
|
instanceVertices[offset + 33] = rot.w;
|
|
33032
33028
|
}
|
|
33033
33029
|
// Simulation UV
|
|
33034
|
-
if (
|
|
33035
|
-
var
|
|
33036
|
-
|
|
33037
|
-
|
|
33038
|
-
|
|
33039
|
-
|
|
33030
|
+
if (textureSheetAnimation.enabled) {
|
|
33031
|
+
var frameOverTime = textureSheetAnimation.frameOverTime;
|
|
33032
|
+
var _textureSheetAnimation__tillingInfo = textureSheetAnimation._tillingInfo, x = _textureSheetAnimation__tillingInfo.x, y = _textureSheetAnimation__tillingInfo.y, z = _textureSheetAnimation__tillingInfo.z;
|
|
33033
|
+
var tileRow = 0;
|
|
33034
|
+
if (frameOverTime.mode === ParticleCurveMode.Constant || frameOverTime.mode === ParticleCurveMode.TwoConstants) {
|
|
33035
|
+
tileRow = Math.floor(frameOverTime.evaluate(undefined, textureSheetAnimation._frameOverTimeRand.random()) * z) * x;
|
|
33036
|
+
}
|
|
33037
|
+
var tileRowIndex = Math.floor(tileRow);
|
|
33038
|
+
instanceVertices[offset + ParticleBufferUtils.simulationUVOffset] = x;
|
|
33039
|
+
instanceVertices[offset + 35] = y;
|
|
33040
|
+
instanceVertices[offset + 36] = tileRow - tileRowIndex;
|
|
33041
|
+
instanceVertices[offset + 37] = tileRowIndex * y;
|
|
33040
33042
|
} else {
|
|
33041
33043
|
instanceVertices[offset + ParticleBufferUtils.simulationUVOffset] = 1;
|
|
33042
33044
|
instanceVertices[offset + 35] = 1;
|