The reason why it works with the LEGO is because the clearances (i.e. the gaps between the worm and the spur gear) are sufficiently large so that the lead angle of the worm is not significant in preventing the two from meshing. In low load capacity where smooth power transmission is not required, this is okay. However, it is worth noting this is a sort of "illegal" mesh, illegal in the sense that spur gears are not designed to be used with cylindrical worms, except if the worm is oriented at an angle to the spur gear equal to the lead angle. Instead helical gears (at the least, for simple cylindrical worm drives*) are to be used. The region of contact will be considerably smaller for the "illegal" mesh compared to normal worm drives, so the contact stresses will be much higher, and so this illegal mesh is very unsuitable for high load capacity scenarios.
Due to the unsuitability of spur gears with worm drives with orthogonal shafts, you will be hard pressed to find any design equations; it just isn't a suitable configuration to design with. However, one natural consequence that still arises, despite the illegal mesh, is that the transmission ratio (ratio of turns of the worm to turns of the spur gear) is given by the number of teeth on the spur gear divided by the number of starts (i.e. number of unique threads) of the worm. This is quite an intuitive result to come across.
In my opinion, if you are just using the worm drive for kinematic purposes (e.g. precision alignment), under light loads, and you want to keep things cheap, then this soft of illegal mesh is reasonable; just don't expect the working life of the drive to be very high. It will be a matter of trial and error to design an operating drive. If, however, the machine is subject to high loads or requires smooth power transmission, I would highly suggest sticking to conventional worm gearing with existing design standards.
*More advanced worm drives exist. "Single envelope" worm gearing has a worm gear (not worm) as a modified "helical" gear, where the worm gear wraps around the worm more in an attempt to increase the area of contact. "Double envelope" is similar, except the worm gets more narrow in the middle so that its shape wraps around the worm gear more, further increasing contact area. These are often favoured over even simple cylindrical worm drives due to their higher load capacity. The more you know!