Here It is the explaination:
- a NodeJs service is running listening to a port (i.e. 8888)
- the Android app we wrote sends the Gyroscope infos (X,Y,Z) to the socket on the machine (IP:8888)
- the nodeJs service sends (async) updates on the webpage carrying the gyroscope infos every N milliseconds
- the 3D cube takes as the X,Y and Z orientation every N milliseconds ,so this makes the rotation effect.