Javascript force simulator