motion plann in javascript