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
// | |
// debugatar.js | |
// | |
/* eslint indent: ["error", 4, { "outerIIFEBody": 0 }] */ | |
(function() { // BEGIN LOCAL_SCOPE | |
var TABLET_BUTTON_NAME = "DEBUGATAR"; | |
var DEBUG_AVATAR_URL = "https://s3.amazonaws.com/hifi-public/tony/html/debugAvatar.html?2"; |
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
(require 'cl-lib) | |
;; quaternions are expected to be a list of four elements | |
;; '(x y z w), w is the real part of the quaternion and | |
;; x y z are the i j k imaginary elements | |
(defun ajt-quat-to-axis-angle (q) | |
(let ((qx (car q)) (qy (cadr q)) (qz (caddr q)) (qw (cadddr q))) | |
(let ((angle (* 2.0 (acos qw))) | |
(s (- 1.0 (* qw qw)))) |
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 WHITE = {x: 1, y: 1, z: 1, w: 1}; | |
var IDENT = {x: 0, y: 0, z: 0, w: 1}; | |
function drawOtherAvatarHands() { | |
var avatars = AvatarList.getAvatarIdentifiers(); | |
avatars.forEach(function (id) { | |
var avatar = AvatarList.getAvatar(id); | |
if (MyAvatar.sessionUUID !== avatar.sessionUUID) { |
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 triggerPressHandled = false; | |
var rightTriggerPressed = false; | |
var leftTriggerPressed = false; | |
var TRIGGER_MAPPING_NAME = "com.highfidelity.headTrace.triggers"; | |
var triggerMapping = Controller.newMapping(TRIGGER_MAPPING_NAME); | |
triggerMapping.from([Controller.Standard.RTClick]).peek().to(function (value) { | |
rightTriggerPressed = (value !== 0) ? true : false; | |
}); | |
triggerMapping.from([Controller.Standard.LTClick]).peek().to(function (value) { |
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 ANIM_VARS = [ | |
"isTalking", | |
"isNotMoving", | |
"isMovingForward", | |
"isMovingBackward", | |
"isMovingRight", | |
"isMovingLeft", |
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
https://hifi-content.s3.amazonaws.com/ozan/dev/avatars/hifi_team/philip/sss/philip.fst |
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
// | |
// Interaction.js | |
// scripts/interaction | |
// | |
// Created by Trevor Berninger on 3/20/17. | |
// Copyright 2017 Limitless ltd. | |
// | |
// Distributed under the Apache License, Version 2.0. | |
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | |
// |
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
// | |
// NPCHelpers.js | |
// scripts/interaction | |
// | |
// Created by Trevor Berninger on 3/20/17. | |
// Copyright 2017 Limitless ltd. | |
// | |
// Distributed under the Apache License, Version 2.0. | |
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | |
// |
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
// | |
// NPC_AC.js | |
// scripts/interaction | |
// | |
// Created by Trevor Berninger on 3/20/17. | |
// Copyright 2017 Limitless ltd. | |
// | |
// Distributed under the Apache License, Version 2.0. | |
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | |
// |
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 mirrorRot(q) { | |
return {x: q.x, y: -q.y, z: -q.z, w: q.w}; | |
} | |
function mirrorPos(p) { | |
return {x: -p.x, y: p.y, z: p.z} | |
} | |
var mirrorMapping = Controller.newMapping(); |