24 lines
No EOL
860 B
JavaScript
24 lines
No EOL
860 B
JavaScript
// 2017.09.09 Hand Wave Animation Button by Wade and HT
|
|
|
|
var ANIMATION_URL = Script.resolvePath('run_anime.fbx');
|
|
var tablet = Tablet.getTablet('com.highfidelity.interface.tablet.system'),
|
|
button = tablet.addButton({
|
|
text: 'RUN 1',
|
|
icon: Script.resolvePath('power-button-icon-off.svg'),
|
|
activeIcon: Script.resolvePath('power-button-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: true, firstFrame: 1, lastFrame: 19, },
|
|
//hover: { fps: 30, loop: true, firstFrame: 129, lastFrame: 129, },
|
|
});
|
|
|
|
Script.scriptEnding.connect(handJob, 'lower');
|
|
|
|
button.clicked.connect(function() {
|
|
button.editProperties({ isActive: handJob.toggle() });
|
|
}); |