// 2017.09.09 Hand Wave Animation Button by Wade and HT var ANIMATION_URL = 'https://s3-us-west-2.amazonaws.com/highfidelityvr/waving.fbx'; var tablet = Tablet.getTablet('com.highfidelity.interface.tablet.system'), button = tablet.addButton({ text: 'Wave', icon: Script.resolvePath('wave-icon-off.svg'), activeIcon: Script.resolvePath('wave-icon-on.svg'), }); Script.scriptEnding.connect(function() { tablet.removeButton(button); }); var HelpingHand = Script.require('../HelpingHand.js'); var handJob = new HelpingHand({ url: ANIMATION_URL, raise: { fps: 30, loop: false, firstFrame: 1, lastFrame: 70, }, hover: { fps: 30, loop: true, firstFrame: 45, lastFrame: 65, }, }); Script.scriptEnding.connect(handJob, 'lower'); button.clicked.connect(function() { button.editProperties({ isActive: handJob.toggle() }); });