mirror of
https://github.com/ad044/lainTSX.git
synced 2024-10-22 23:19:06 +00:00
node pulse animation changed
This commit is contained in:
parent
b24f54f934
commit
2abaeea1f7
1 changed files with 2 additions and 4 deletions
|
@ -102,12 +102,10 @@ const Node = memo((props: NodeContructorProps) => {
|
||||||
|
|
||||||
varying vec2 vUv;
|
varying vec2 vUv;
|
||||||
|
|
||||||
#define M_PI 3.1415926535897932384626433832795
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
vec4 t1 = texture2D(tex1,vUv);
|
vec4 t1 = texture2D(tex1,vUv);
|
||||||
vec4 t2 = texture2D(tex2,vUv);
|
vec4 t2 = texture2D(tex2,vUv);
|
||||||
float bias = abs(sin(timeMSeconds / (1.6 / M_PI)));
|
float bias = (1.0 - timeMSeconds) - floor(1.0 - timeMSeconds);
|
||||||
gl_FragColor = mix(t1, t2, bias);
|
gl_FragColor = mix(t1, t2, bias);
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -162,7 +160,7 @@ const Node = memo((props: NodeContructorProps) => {
|
||||||
useFrame(() => {
|
useFrame(() => {
|
||||||
if (materialRef.current) {
|
if (materialRef.current) {
|
||||||
materialRef.current.uniforms.timeMSeconds.value =
|
materialRef.current.uniforms.timeMSeconds.value =
|
||||||
(Date.now() % (Math.PI * 2000)) / 1000.0;
|
(Date.now() % 3000) / 1500.0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue