mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 12:33:27 +02:00
29 lines
799 B
JavaScript
29 lines
799 B
JavaScript
//
|
|
// moveJoints.js
|
|
// examples/utilities/diagnostics
|
|
//
|
|
// Created by Stephen Birarda on 05/01/15.
|
|
// Copyright 2015 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
Script.include("../../libraries/globals.js");
|
|
|
|
var testAnimation = HIFI_PUBLIC_BUCKET + "ozan/animations/forStephen/sniperJump.fbx";
|
|
|
|
var FRAME_RATE = 24.0; // frames per second
|
|
var isAnimating = false;
|
|
|
|
Controller.keyPressEvent.connect(function(event) {
|
|
if (event.text == "SHIFT") {
|
|
if (isAnimating) {
|
|
isAnimating = false;
|
|
MyAvatar.stopAnimation(testAnimation);
|
|
} else {
|
|
isAnimating = true;
|
|
MyAvatar.startAnimation(testAnimation, FRAME_RATE, 1.0, true, false);
|
|
}
|
|
}
|
|
});
|