Hello, friends. There was such a task. Start up one! a wave over a sphere, which, as it were, looks like a map of the planet, which (map) in turn is generated from planeBufferGeometry and then these geometries are combined using
THREE.BufferGeometryUtils.mergeBufferGeometries(geometries, false);
Code of vertex shader:
vertexShader:`
varying vec2 vUv;
uniform float time;
void main(){
vUv=uv;
vec3 newposition = position + position*sin(position.z*12.)*0.03;
gl_Position = projectionMatrix * modelViewMatrix * vec4( newposition, 1. );
}
`,
The question is how to make only this one “wave”, i.e. so that sin does not go over the entire sphere, but only in the middle, for example. And further. How can I change the direction of this “wave”, now it comes from the Z coordinate of this sphere, I need it to go from the position I have defined (for example, approximate coordinates of London).
screenshot