It was working smoothly in Unity but I don't know what happened to it when I exported it as WebGL :D.