(function () { return { preload: function(entityID) { this.animationProperties = JSON.parse(Entities.getEntityProperties(entityID, 'userData').userData).animation; }, clickDownOnEntity: function() { this.dancing = !this.dancing; if (this.dancing) { /*this.animationProperties = { url: "https://hifi-content.s3.amazonaws.com/animations/Dancing.fbx", fps: 34, loop: true, firstFrame: 0, lastFrame: 243 };*/ MyAvatar.overrideAnimation(this.animationProperties.url, this.animationProperties.fps, this.animationProperties.loop, this.animationProperties.firstFrame, this.animationProperties.lastFrame); } else { MyAvatar.restoreAnimation(); } } }; });