mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 04:03:59 +02:00
add script to move joints for av rate testing
This commit is contained in:
parent
67efa7796f
commit
7a2a391852
1 changed files with 29 additions and 0 deletions
29
examples/utilities/diagnostics/moveJoints.js
Normal file
29
examples/utilities/diagnostics/moveJoints.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
});
|
Loading…
Reference in a new issue