This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// pucks-sliding-fix1.js | |
// | |
// Script allows users in full body trackers to utilize High Fidelity's avatar | |
// movement animations. | |
// | |
// Created by Robin Wilson 6/20/2018 | |
// Copyright 2018 High Fidelity, Inc. | |
// | |
// Distributed under the Apache License, Version 2.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"DataVersion": 0, | |
"Entities": [ | |
{ | |
"clientOnly": false, | |
"color": { | |
"blue": 0, | |
"green": 0, | |
"red": 255 | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var loopTime = -1; // Loop for how long? -1 is always on. | |
var soundURL = null;//SoundCache.getSound(SOUND_URL); | |
var lastSoundURL = null; | |
var receiverName = ""; | |
var soundLoop = null; | |
var soundLocal = null; | |
var soundVolume = null; | |
var refreshInterval = 500; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Script.include("/~/system/libraries/Xform.js"); | |
var USE_CONTROLLERS_NOT_ANIM_VARS = true; | |
var BOX_HEIGHT = 0.1; | |
var cubes = []; | |
var handlerId; | |
var controllerMapping; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
/* globals Xform */ | |
// | |
// gestureRecorder.js | |
// examples | |
// | |
// Created by Anthony Thibault on 2016/06/30 | |
// Copyright 2016 High Fidelity, Inc. | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "1.0", | |
"root": { | |
"id": "userAnimStateMachine", | |
"type": "stateMachine", | |
"data": { | |
"currentState": "userAnimNone", | |
"states": [ | |
{ | |
"id": "userAnimNone", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var DOMAIN_GOTO = "hifi://dev-mobile-master" | |
var DOMAIN_CHANGE_TIME_MS = 2800; | |
var domainChanges = 0; | |
var comeBack = false; | |
var initialPos = MyAvatar.position; | |
var shouldStop = function() { | |
return Vec3.length(Vec3.subtract(initialPos, MyAvatar.position)) > 0.1; | |
} | |
var tick = Script.setInterval(function() { | |
console.log("Changing domains " + (++domainChanges) + " times"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "1.1", | |
"root": { | |
"id": "userAnimStateMachine", | |
"type": "stateMachine", | |
"data": { | |
"currentState": "userAnimNone", | |
"states": [ | |
{ | |
"id": "userAnimNone", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global Xform */ | |
Script.include("/~/system/libraries/Xform.js"); | |
var handlerId = MyAvatar.addAnimationStateHandler(function (props) { | |
if (HMD.active) { | |
var hmdWorld = new Xform(Quat.cancelOutRollAndPitch(HMD.rotation), HMD.position); | |
var avatarToWorld = new Xform(MyAvatar.orientation, MyAvatar.position); | |
var headIndex = MyAvatar.getJointIndex("Head"); | |
var headAvatar = new Xform(Quat.cancelOutRollAndPitch(MyAvatar.getAbsoluteJointRotationInObjectFrame(headIndex)), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "1.0", | |
"root": { | |
"id": "userAnimStateMachine", | |
"type": "stateMachine", | |
"data": { | |
"currentState": "userAnimNone", | |
"states": [ | |
{ | |
"id": "userAnimNone", |