it depends on what building and what level earthquake
There are different kinds of waves... sound, ocean, surface, longitudinal, and transverse.
wavelength
frequencies.
P waves do not cause significant damage to buildings, due to their bigger amplitudes.
There are two main types of EM waves. Magnetic waves and Electronic waves. They exist at orthogonal relationships with M waves and E waves at 90 degrees to each other.
There are different kinds of wave, such as sound waves, electromagnetic waves, water waves etc. So the first property I would describe as the wave medium. Then you would have the additional properties of amplitude and frequency.
Light waves do diffract, but the effect is very very small. In general diffraction effects are important when the object interacting with the wave has dimensions that are comparable to the wavelength of the wave. Light waves have much shorter wavelength compared to the radio waves. Hence the effect. (It should also be noted that radio waves penetrate buildings much better than light waves, but that leads to a more nuanced discussion of diffraction effects.)
triangle waves
Although surface waves travel more slowly than S-waves, they can be much larger in amplitude and can be the most destructive type of seismic wave. There are two basic kinds of surface waves: Rayleigh waves, also called ground roll, travel as ripples similar to those on the surface of water.
The seismic waves affect tall buildings more. It is because shaking may cause them to collide.
There are many different kinds of waves, and many different kinds of wave energy, and many different kinds of equipment used to produce such energy. For example, a lightbulb, since light is a form of electromagnetic wave.
Surface waves