content/hifi-content/wadewatts/animations/run 1/app animation run.js
2022-02-14 02:04:11 +01:00

28 lines
913 B
JavaScript

//WW
var URL = 'https://hifi-content.s3.amazonaws.com/wadewatts/animations/run%201/run_anime.fbx';
var CONFIG = {
text: 'Run',
icon: "https://hifi-content.s3.amazonaws.com/wadewatts/animations/run%201/power-button-icon-off.svg",
activeIcon: "https://hifi-content.s3.amazonaws.com/wadewatts/animations/run%201/power-button-icon-on.svg"
};
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"),
button = tablet.addButton(CONFIG);
button.clicked.connect(function() {
this.a = !this.a;
button.editProperties({ isActive: this.a });
if (this.a)
MyAvatar.overrideAnimation(URL, 30, true, 019);
else
MyAvatar.restoreAnimation();
});
Script.scriptEnding.connect(function() { tablet.removeButton(button); });