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
// test script to transform controller data from avatar space into sensor space. | |
var rightTriggerJustPressed = false; | |
var rightTriggerJustReleased = false; | |
var rightTriggerPressed = false; | |
var rightTriggerWasPressed = false; | |
var CONTROLLER_MAPPING_NAME = "myControllerMapping"; | |
var controllerMapping = Controller.newMapping(CONTROLLER_MAPPING_NAME); | |
controllerMapping.from(Controller.Standard.RT).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
// draw a line ruler next to the avatar. | |
Script.include("/~/system/libraries/Xform.js"); | |
/* global Xform */ | |
var RED = {x: 1, y: 0, z: 0, w: 1}; | |
var GREEN = {x: 0, y: 1, z: 0, w: 1}; | |
var BLUE = {x: 0, y: 0, z: 1, w: 1}; | |
var CYAN = {x: 0, y: 1, z: 1, w: 1}; |
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 ORIGIN = {x: 0, y: 0, z: 0}; | |
var MUSIC_URL = "http://localhost:8000/pinkroom-ambix.wav"; | |
var musicSound = SoundCache.getSound(MUSIC_URL); | |
var musicInjector; | |
print("AJT: starting blacklodge ac.js"); | |
function update(dt) { | |
if (musicSound.downloaded) { |
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
// | |
// up-gravity-entity-script.js | |
// | |
(function() { | |
var _this = this; | |
_this.preload = function (entityID) { | |
_this.entityID = entityID; | |
Script.update.connect(_this.update); |
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 EPSILON = 0.0001; | |
var SPHERE_ORIGIN = { x: 0, y: 0, z: 0 }; | |
function v3len(v) { | |
return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z); | |
} | |
function v3add(a, b) { | |
return { x: a.x + b.x, y: a.y + b.y, z: a.z + b.z }; | |
} |
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
// | |
// blendshapetest.js | |
// | |
/* eslint indent: ["error", 4, { "outerIIFEBody": 0 }] */ | |
(function() { // BEGIN LOCAL_SCOPE | |
var TABLET_BUTTON_NAME = "BLENDSHAPE"; | |
var HTML_URL = "https://s3.amazonaws.com/hifi-public/tony/html/blendshapetest.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
{ | |
"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
// | |
// gravity.js | |
// | |
// Created by Alan-Michael Moody on 7/24/17 | |
// Copyright 2017 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 | |
// |
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
// | |
// Clipboard.js | |
// | |
// Created by Anthony J. Thibault on 8/8/2017 | |
// Copyright 2017 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 | |
// |
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 AVATAR_URL = "https://highfidelity.com/api/v1/marketplace/items?category=avatars&sort=likes"; | |
var HTTP_GET_TIMEOUT = 15000; // 15 seconds | |
// helper function to wrap an HTTP get request. | |
function XHR(url, successCb, failureCb, TIMEOUT) { | |
print("XHR: request url = " + url); | |
var self = this; | |
this.url = url; | |
this.successCb = successCb; | |
this.failureCb = failureCb; |