Fixed a bug in the sin and cos functions
Added offset for the webgame