AngularJS directive to control the physical world