Update the rest of non /script-archive/ script URLs.

This commit is contained in:
Kalila L 2020-09-21 00:14:22 -04:00
parent aeae078b67
commit d3a97832a3
52 changed files with 115 additions and 118 deletions

View file

@ -82,13 +82,13 @@ var mappingJson = {
// //
var TABLET_BUTTON_NAME = "ACCFILT"; var TABLET_BUTTON_NAME = "ACCFILT";
var HTML_URL = "https://s3.amazonaws.com/hifi-public/tony/html/accelerationFilterApp.html?2"; var HTML_URL = ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/html/accelerationFilterApp.html?2");
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
var tabletButton = tablet.addButton({ var tabletButton = tablet.addButton({
text: TABLET_BUTTON_NAME, text: TABLET_BUTTON_NAME,
icon: "https://s3.amazonaws.com/hifi-public/tony/icons/tpose-i.svg", icon: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/tpose-i.svg"),
activeIcon: "https://s3.amazonaws.com/hifi-public/tony/icons/tpose-a.svg" activeIcon: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/tpose-a.svg")
}); });
tabletButton.clicked.connect(function () { tabletButton.clicked.connect(function () {

View file

@ -39,8 +39,8 @@
var LookAtDebugger = function() { var LookAtDebugger = function() {
var self = this; var self = this;
var IMAGE_DIMENSIONS = {x: 0.2, y: 0.2, z:0.2}; var IMAGE_DIMENSIONS = {x: 0.2, y: 0.2, z:0.2};
var TARGET_ICON_PATH = "https://hifi-content.s3.amazonaws.com/luis/test_scripts/LookAtApp/eyeFocus.png"; var TARGET_ICON_PATH = ExternalResource.getUrl(ExternalResource.HF_Content, "/luis/test_scripts/LookAtApp/eyeFocus.png");
var INFINITY_ICON_PATH = "https://hifi-content.s3.amazonaws.com/luis/test_scripts/LookAtApp/noFocus.png"; var INFINITY_ICON_PATH = ExternalResource.getUrl(ExternalResource.HF_Content, "/luis/test_scripts/LookAtApp/noFocus.png");
this.items = {}; this.items = {};
this.active = false; this.active = false;

View file

@ -89,13 +89,13 @@ var mappingJson = {
// //
var TABLET_BUTTON_NAME = "EXPFILT"; var TABLET_BUTTON_NAME = "EXPFILT";
var HTML_URL = "https://s3.amazonaws.com/hifi-public/tony/html/exponentialFilterApp.html?7"; var HTML_URL = ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/html/exponentialFilterApp.html?7");
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
var tabletButton = tablet.addButton({ var tabletButton = tablet.addButton({
text: TABLET_BUTTON_NAME, text: TABLET_BUTTON_NAME,
icon: "https://s3.amazonaws.com/hifi-public/tony/icons/tpose-i.svg", icon: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/tpose-i.svg"),
activeIcon: "https://s3.amazonaws.com/hifi-public/tony/icons/tpose-a.svg" activeIcon: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/tpose-a.svg")
}); });
tabletButton.clicked.connect(function () { tabletButton.clicked.connect(function () {

View file

@ -20,8 +20,8 @@
var TRANSITION_TIME_SECONDS = 0.25; var TRANSITION_TIME_SECONDS = 0.25;
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
var icon = "https://hifi-content.s3.amazonaws.com/elisalj/emoji_scripts/icons/emoji-i.svg"; var icon = ExternalResource.getUrl(ExternalResource.HF_Content, "/elisalj/emoji_scripts/icons/emoji-i.svg");
var activeIcon = "https://hifi-content.s3.amazonaws.com/elisalj/emoji_scripts/icons/emoji-a.svg"; var activeIcon = ExternalResource.getUrl(ExternalResource.HF_Content, "/elisalj/emoji_scripts/icons/emoji-a.svg");
var isActive = true; var isActive = true;
var controllerMappingName; var controllerMappingName;

View file

@ -7,7 +7,7 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
var SOUND_DATA = { url: "http://hifi-content.s3.amazonaws.com/howard/sounds/piano1.wav" }; var SOUND_DATA = { url: ExternalResource.getUrl(ExternalResource.HF_Content, "/howard/sounds/piano1.wav") };
// getSound function from crowd-agent.js // getSound function from crowd-agent.js
function getSound(data, callback) { // callback(sound) when downloaded (which may be immediate). function getSound(data, callback) { // callback(sound) when downloaded (which may be immediate).

View file

@ -76,20 +76,20 @@ var buttonPositionX = windowDimensions.x - BUTTON_PADDING - BUTTON_WIDTH;
var buttonPositionY = (windowDimensions.y - BUTTON_HEIGHT) / 2 - (BUTTON_HEIGHT + BUTTON_PADDING); var buttonPositionY = (windowDimensions.y - BUTTON_HEIGHT) / 2 - (BUTTON_HEIGHT + BUTTON_PADDING);
var hatButton = new ToggleButtonBuddy(buttonPositionX, buttonPositionY, BUTTON_WIDTH, BUTTON_HEIGHT, { var hatButton = new ToggleButtonBuddy(buttonPositionX, buttonPositionY, BUTTON_WIDTH, BUTTON_HEIGHT, {
up: "https://s3.amazonaws.com/hifi-public/tony/icons/hat-up.svg", up: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/hat-up.svg"),
down: "https://s3.amazonaws.com/hifi-public/tony/icons/hat-down.svg" down: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/hat-down.svg")
}); });
buttonPositionY += BUTTON_HEIGHT + BUTTON_PADDING; buttonPositionY += BUTTON_HEIGHT + BUTTON_PADDING;
var coatButton = new ToggleButtonBuddy(buttonPositionX, buttonPositionY, BUTTON_WIDTH, BUTTON_HEIGHT, { var coatButton = new ToggleButtonBuddy(buttonPositionX, buttonPositionY, BUTTON_WIDTH, BUTTON_HEIGHT, {
up: "https://s3.amazonaws.com/hifi-public/tony/icons/coat-up.svg", up: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/coat-up.svg"),
down: "https://s3.amazonaws.com/hifi-public/tony/icons/coat-down.svg" down: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/coat-down.svg")
}); });
buttonPositionY += BUTTON_HEIGHT + BUTTON_PADDING; buttonPositionY += BUTTON_HEIGHT + BUTTON_PADDING;
var coatButton2 = new ToggleButtonBuddy(buttonPositionX, buttonPositionY, BUTTON_WIDTH, BUTTON_HEIGHT, { var coatButton2 = new ToggleButtonBuddy(buttonPositionX, buttonPositionY, BUTTON_WIDTH, BUTTON_HEIGHT, {
up: "https://s3.amazonaws.com/hifi-public/tony/icons/coat-up.svg", up: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/coat-up.svg"),
down: "https://s3.amazonaws.com/hifi-public/tony/icons/coat-down.svg" down: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/coat-down.svg")
}); });
var AVATAR_ATTACHMENT = 0; var AVATAR_ATTACHMENT = 0;
@ -97,7 +97,7 @@ var AVATAR_SOFT_ATTACHMENT = 1;
var ENTITY_ATTACHMENT = 2; var ENTITY_ATTACHMENT = 2;
var HAT_ATTACHMENT = { var HAT_ATTACHMENT = {
modelURL: "https://s3.amazonaws.com/hifi-public/tony/cowboy-hat.fbx", modelURL: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/cowboy-hat.fbx"),
jointName: "Head", jointName: "Head",
translation: {"x": 0, "y": 0.25, "z": 0.03}, translation: {"x": 0, "y": 0.25, "z": 0.03},
rotation: {"x": 0, "y": 0, "z": 0, "w": 1}, rotation: {"x": 0, "y": 0, "z": 0, "w": 1},
@ -106,7 +106,7 @@ var HAT_ATTACHMENT = {
}; };
var COAT_ATTACHMENT = { var COAT_ATTACHMENT = {
modelURL: "https://hifi-content.s3.amazonaws.com/ozan/dev/clothes/coat/coat_rig.fbx", modelURL: ExternalResource.getUrl(ExternalResource.HF_Content, "/ozan/dev/clothes/coat/coat_rig.fbx"),
jointName: "Hips", jointName: "Hips",
translation: {"x": 0, "y": 0, "z": 0}, translation: {"x": 0, "y": 0, "z": 0},
rotation: {"x": 0, "y": 0, "z": 0, "w": 1}, rotation: {"x": 0, "y": 0, "z": 0, "w": 1},
@ -115,7 +115,7 @@ var COAT_ATTACHMENT = {
}; };
var COAT_ENTITY_ATTACHMENT = { var COAT_ENTITY_ATTACHMENT = {
modelURL: "https://hifi-content.s3.amazonaws.com/ozan/dev/clothes/coat/coat_rig.fbx", modelURL: ExternalResource.getUrl(ExternalResource.HF_Content, "/ozan/dev/clothes/coat/coat_rig.fbx"),
jointName: "Hips", jointName: "Hips",
translation: {"x": 0, "y": 0, "z": 0}, translation: {"x": 0, "y": 0, "z": 0},
rotation: {"x": 0, "y": 0, "z": 0, "w": 1}, rotation: {"x": 0, "y": 0, "z": 0, "w": 1},

View file

@ -7,7 +7,7 @@
var _this; var _this;
BatonSoundEntity = function() { BatonSoundEntity = function() {
_this = this; _this = this;
_this.drumSound = SoundCache.getSound("https://s3.amazonaws.com/hifi-public/sounds/Drums/deepdrum1.wav"); _this.drumSound = SoundCache.getSound(ExternalResource.getUrl(ExternalResource.HF_Public, "/sounds/Drums/deepdrum1.wav"));
_this.injectorOptions = {position: MyAvatar.position, loop: false, volume: 1}; _this.injectorOptions = {position: MyAvatar.position, loop: false, volume: 1};
_this.soundIntervalConnected = false; _this.soundIntervalConnected = false;
_this.batonDebugModel = Entities.addEntity({ _this.batonDebugModel = Entities.addEntity({

View file

@ -17,14 +17,14 @@ Script.include("/~/system/libraries/Xform.js");
(function() { // BEGIN LOCAL_SCOPE (function() { // BEGIN LOCAL_SCOPE
var TABLET_BUTTON_NAME = "PUCKATTACH"; var TABLET_BUTTON_NAME = "PUCKATTACH";
var TABLET_APP_URL = "https://s3.amazonaws.com/hifi-public/tony/html/filtered-puck-attach.html?2"; var TABLET_APP_URL = ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/html/filtered-puck-attach.html?2");
var NUM_TRACKED_OBJECTS = 16; var NUM_TRACKED_OBJECTS = 16;
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
var tabletButton = tablet.addButton({ var tabletButton = tablet.addButton({
text: TABLET_BUTTON_NAME, text: TABLET_BUTTON_NAME,
icon: "https://s3.amazonaws.com/hifi-public/tony/icons/puck-i.svg", icon: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/puck-i.svg"),
activeIcon: "https://s3.amazonaws.com/hifi-public/tony/icons/puck-a.svg" activeIcon: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/puck-a.svg")
}); });
var shown = false; var shown = false;
@ -87,7 +87,7 @@ function entityExists(entityID) {
return Object.keys(Entities.getEntityProperties(entityID)).length > 0; return Object.keys(Entities.getEntityProperties(entityID)).length > 0;
} }
var VIVE_PUCK_MODEL = "https://s3.amazonaws.com/hifi-public/tony/vive_tracker_puck_y180z180.obj"; var VIVE_PUCK_MODEL = ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/vive_tracker_puck_y180z180.obj");
var VIVE_PUCK_DIMENSIONS = { x: 0.0945, y: 0.0921, z: 0.0423 }; // 1/1000th scale of model var VIVE_PUCK_DIMENSIONS = { x: 0.0945, y: 0.0921, z: 0.0423 }; // 1/1000th scale of model
var VIVE_PUCK_SEARCH_DISTANCE = 1.5; // metres var VIVE_PUCK_SEARCH_DISTANCE = 1.5; // metres
var VIVE_PUCK_SPAWN_DISTANCE = 0.5; // metres var VIVE_PUCK_SPAWN_DISTANCE = 0.5; // metres

View file

@ -9,7 +9,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
var soundURL = "http://hifi-public.s3.amazonaws.com/birarda/medium-crowd.wav"; var soundURL = ExternalResource.getUrl(ExternalResource.HF_Public, "/birarda/medium-crowd.wav");
var audioOptions = { var audioOptions = {
position: { x: 0.0, y: 0.0, z: 0.0 }, position: { x: 0.0, y: 0.0, z: 0.0 },
volume: 0.5 volume: 0.5

View file

@ -26,12 +26,12 @@ var MINIMUM_AVATARS = 25; // changeable by prompt
var SPREAD_TIME_MS = 500; var SPREAD_TIME_MS = 500;
var DENSITY = 0.3; // square meters per person. Some say 10 sq ft is arm's length (0.9m^2), 4.5 is crowd (0.4m^2), 2.5 is mosh pit (0.2m^2). var DENSITY = 0.3; // square meters per person. Some say 10 sq ft is arm's length (0.9m^2), 4.5 is crowd (0.4m^2), 2.5 is mosh pit (0.2m^2).
var SOUND_DATA = {url: "http://hifi-content.s3.amazonaws.com/howard/sounds/piano1.wav"}; var SOUND_DATA = {url: ExternalResource.getUrl(ExternalResource.HF_Content, "/howard/sounds/piano1.wav"};
var AVATARS_CHATTERING_AT_ONCE = 4; // How many of the agents should we request to play SOUND at once. var AVATARS_CHATTERING_AT_ONCE = 4; // How many of the agents should we request to play SOUND at once.
var NEXT_SOUND_SPREAD = 500; // millisecond range of how long to wait after one sound finishes, before playing the next var NEXT_SOUND_SPREAD = 500; // millisecond range of how long to wait after one sound finishes, before playing the next
var ANIMATION_DATA = { var ANIMATION_DATA = {
"url": "http://hifi-content.s3.amazonaws.com/howard/resources/avatar/animations/idle.fbx", "url": ExternalResource.getUrl(ExternalResource.HF_Content, "/howard/resources/avatar/animations/idle.fbx"),
// "url": "http://hifi-content.s3.amazonaws.com/howard/resources/avatar/animations/walk_fwd.fbx", // alternative example // "url": ExternalResource.getUrl(ExternalResource.HF_Content, "/howard/resources/avatar/animations/walk_fwd.fbx"), // alternative example
"startFrame": 0.0, "startFrame": 0.0,
"endFrame": 300.0, "endFrame": 300.0,
"timeScale": 1.0, "timeScale": 1.0,
@ -128,7 +128,7 @@ function messageHandler(channel, messageString, senderID) {
orientation: Quat.fromPitchYawRollDegrees(0, Quat.safeEulerAngles(MyAvatar.orientation).y + (turnSpread * (Math.random() - 0.5)), 0), orientation: Quat.fromPitchYawRollDegrees(0, Quat.safeEulerAngles(MyAvatar.orientation).y + (turnSpread * (Math.random() - 0.5)), 0),
soundData: chatter && SOUND_DATA, soundData: chatter && SOUND_DATA,
listen: true, listen: true,
skeletonModelURL: "http://hifi-content.s3.amazonaws.com/howard/resources/meshes/defaultAvatar_full.fst", skeletonModelURL: ExternalResource.getUrl(ExternalResource.HF_Content, "/howard/resources/meshes/defaultAvatar_full.fst"),
animationData: ANIMATION_DATA animationData: ANIMATION_DATA
}); });
} }
@ -278,7 +278,7 @@ function doRender(continuation) {
if (MINIMUM_AVATARS && !fail) { if (MINIMUM_AVATARS && !fail) {
if (0 === summonedAgents.length) { if (0 === summonedAgents.length) {
fail = "FAIL: No agents reported.\nPlease run " + MINIMUM_AVATARS + " instances of\n\ fail = "FAIL: No agents reported.\nPlease run " + MINIMUM_AVATARS + " instances of\n\
http://hifi-content.s3.amazonaws.com/howard/scripts/tests/performance/crowd-agent.js?v=3\n\ https://cdn-1.vircadia.com/eu-c-1/howard/scripts/tests/performance/crowd-agent.js?v=3\n\
on your domain server."; on your domain server.";
} else if (total < MINIMUM_AVATARS) { } else if (total < MINIMUM_AVATARS) {
fail = "FAIL: Only " + summonedAgents.length + " agents reported. Now missing " + (MINIMUM_AVATARS - total) + " avatars, total."; fail = "FAIL: Only " + summonedAgents.length + " agents reported. Now missing " + (MINIMUM_AVATARS - total) + " avatars, total.";

View file

@ -22,7 +22,7 @@ var EXPECTED_INTERSECTIONS = 1286 * OUTER_LOOPS;
var center = Vec3.sum(MyAvatar.position, Vec3.multiply(3, Quat.getFront(Camera.getOrientation()))); var center = Vec3.sum(MyAvatar.position, Vec3.multiply(3, Quat.getFront(Camera.getOrientation())));
var model_url = "http://hifi-content.s3.amazonaws.com/caitlyn/production/Scansite/buddhaReduced.fbx"; var model_url = ExternalResource.getUrl(ExternalResource.HF_Content, "/caitlyn/production/Scansite/buddhaReduced.fbx");
var rayPickOverlays = Array(); var rayPickOverlays = Array();

View file

@ -31,11 +31,11 @@ debug('startup seeking:', MINIMUM_AVATARS, 'listening:', N_LISTENING, 'chatterin
var SPREAD_TIME_MS = 500; var SPREAD_TIME_MS = 500;
var DENSITY = 0.3; // square meters per person. Some say 10 sq ft is arm's length (0.9m^2), 4.5 is crowd (0.4m^2), 2.5 is mosh pit (0.2m^2). var DENSITY = 0.3; // square meters per person. Some say 10 sq ft is arm's length (0.9m^2), 4.5 is crowd (0.4m^2), 2.5 is mosh pit (0.2m^2).
var SOUND_DATA = {url: "http://hifi-content.s3.amazonaws.com/howard/sounds/piano1.wav"}; var SOUND_DATA = {url: ExternalResource.getUrl(ExternalResource.HF_Content, "/howard/sounds/piano1.wav")};
var NEXT_SOUND_SPREAD = 500; // millisecond range of how long to wait after one sound finishes, before playing the next var NEXT_SOUND_SPREAD = 500; // millisecond range of how long to wait after one sound finishes, before playing the next
var ANIMATION_DATA = { var ANIMATION_DATA = {
"url": "http://hifi-content.s3.amazonaws.com/howard/resources/avatar/animations/idle.fbx", "url": ExternalResource.getUrl(ExternalResource.HF_Content, "/howard/resources/avatar/animations/idle.fbx"),
// "url": "http://hifi-content.s3.amazonaws.com/howard/resources/avatar/animations/walk_fwd.fbx", // alternative example // "url": ExternalResource.getUrl(ExternalResource.HF_Content, "/howard/resources/avatar/animations/walk_fwd.fbx"), // alternative example
"startFrame": 0.0, "startFrame": 0.0,
"endFrame": 300.0, "endFrame": 300.0,
"timeScale": 1.0, "timeScale": 1.0,
@ -100,7 +100,7 @@ function messageHandler(channel, messageString, senderID) {
orientation: Quat.fromPitchYawRollDegrees(0, Quat.safeEulerAngles(MyAvatar.orientation).y + (turnSpread * (Math.random() - 0.5)), 0), orientation: Quat.fromPitchYawRollDegrees(0, Quat.safeEulerAngles(MyAvatar.orientation).y + (turnSpread * (Math.random() - 0.5)), 0),
soundData: chatter && SOUND_DATA, soundData: chatter && SOUND_DATA,
listen: listen, listen: listen,
skeletonModelURL: "http://hifi-content.s3.amazonaws.com/howard/resources/meshes/defaultAvatar_full.fst", skeletonModelURL: ExternalResource.getUrl(ExternalResource.HF_Content, "/howard/resources/meshes/defaultAvatar_full.fst"),
animationData: ANIMATION_DATA animationData: ANIMATION_DATA
}); });
} }
@ -148,7 +148,7 @@ Script.setTimeout(function () {
var total = AvatarList.getAvatarIdentifiers().length; var total = AvatarList.getAvatarIdentifiers().length;
if (0 === summonedAgents.length) { if (0 === summonedAgents.length) {
Window.alert("No agents reported.\n\Please run " + MINIMUM_AVATARS + " instances of\n\ Window.alert("No agents reported.\n\Please run " + MINIMUM_AVATARS + " instances of\n\
http://hifi-content.s3.amazonaws.com/howard/scripts/tests/performance/crowd-agent.js?v=someDate\n\ https://cdn-1.vircadia.com/eu-c-1/howard/scripts/tests/performance/crowd-agent.js?v=someDate\n\
on your domain server."); on your domain server.");
} else if (total < MINIMUM_AVATARS) { } else if (total < MINIMUM_AVATARS) {
Window.alert("Only " + summonedAgents.length + " agents reported. Now missing " + (MINIMUM_AVATARS - total) + " avatars, total."); Window.alert("Only " + summonedAgents.length + " agents reported. Now missing " + (MINIMUM_AVATARS - total) + " avatars, total.");

View file

@ -17,13 +17,13 @@ Script.include("/~/system/libraries/Xform.js");
(function() { // BEGIN LOCAL_SCOPE (function() { // BEGIN LOCAL_SCOPE
var TABLET_BUTTON_NAME = "PUCKTACH"; var TABLET_BUTTON_NAME = "PUCKTACH";
var TABLET_APP_URL = "https://hifi-content.s3.amazonaws.com/seefo/production/puck-attach/puck-attach.html"; var TABLET_APP_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/seefo/production/puck-attach/puck-attach.html");
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
var tabletButton = tablet.addButton({ var tabletButton = tablet.addButton({
text: TABLET_BUTTON_NAME, text: TABLET_BUTTON_NAME,
icon: "https://s3.amazonaws.com/hifi-public/tony/icons/puck-i.svg", icon: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/puck-i.svg"),
activeIcon: "https://s3.amazonaws.com/hifi-public/tony/icons/puck-a.svg" activeIcon: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/puck-a.svg")
}); });
var shown = false; var shown = false;
@ -85,7 +85,7 @@ function entityExists(entityID) {
return Object.keys(Entities.getEntityProperties(entityID)).length > 0; return Object.keys(Entities.getEntityProperties(entityID)).length > 0;
} }
var VIVE_PUCK_MODEL = "https://s3.amazonaws.com/hifi-public/tony/vive_tracker_puck_y180z180.obj"; var VIVE_PUCK_MODEL = ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/vive_tracker_puck_y180z180.obj");
var VIVE_PUCK_DIMENSIONS = { x: 0.0945, y: 0.0921, z: 0.0423 }; // 1/1000th scale of model var VIVE_PUCK_DIMENSIONS = { x: 0.0945, y: 0.0921, z: 0.0423 }; // 1/1000th scale of model
var VIVE_PUCK_SEARCH_DISTANCE = 1.5; // metres var VIVE_PUCK_SEARCH_DISTANCE = 1.5; // metres
var VIVE_PUCK_SPAWN_DISTANCE = 0.5; // metres var VIVE_PUCK_SPAWN_DISTANCE = 0.5; // metres

View file

@ -25,8 +25,8 @@ centerUp.y += 0.5;
var centerDown = Vec3.sum(MyAvatar.position, Vec3.multiply(3, Quat.getForward(orientation))); var centerDown = Vec3.sum(MyAvatar.position, Vec3.multiply(3, Quat.getForward(orientation)));
centerDown.y -= 0.5; centerDown.y -= 0.5;
var ENTITY_SHADER_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/shaders/uniformTest.fs"; var ENTITY_SHADER_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/eric/shaders/uniformTest.fs");
var SKYBOX_SHADER_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/eric/shaders/timerTest.fs"; var SKYBOX_SHADER_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/eric/shaders/timerTest.fs");
var entityData = { var entityData = {
ProceduralEntity: { ProceduralEntity: {

View file

@ -56,7 +56,7 @@ function getFrame(callback) {
function prefetch(callback) { function prefetch(callback) {
// A folder full of individual frames. // A folder full of individual frames.
var MOVIE_URL = "http://hifi-content.s3.amazonaws.com/james/vidtest/"; var MOVIE_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/james/vidtest/");
var frames = []; var frames = [];

View file

@ -27,7 +27,7 @@ var PX_RGBA_URL = Script.resolvePath('px_rgba.fs');
var PX_TEX_URL = Script.resolvePath('px_tex.fs'); var PX_TEX_URL = Script.resolvePath('px_tex.fs');
var PX_TEX_RGBA_URL = Script.resolvePath('px_tex_rgba.fs'); var PX_TEX_RGBA_URL = Script.resolvePath('px_tex_rgba.fs');
var TEX_URL = 'https://hifi-public.s3.amazonaws.com/alan/Playa/Skies/Test-Sky_out.png'; var TEX_URL = ExternalResource.getUrl(ExternalResource.HF_Public, "/alan/Playa/Skies/Test-Sky_out.png");
var NO_TEX = ''; var NO_TEX = '';
var COLOR = { red: 255, green: 0, blue: 255 }; var COLOR = { red: 255, green: 0, blue: 255 };

View file

@ -17,13 +17,13 @@
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
var tabletButton = tablet.addButton({ var tabletButton = tablet.addButton({
text: "SOUNDS", text: "SOUNDS",
icon: "http://s3.amazonaws.com/hifi-public/tony/icons/trombone-i.png", icon: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/trombone-i.png"),
activeIcon: "http://s3.amazonaws.com/hifi-public/tony/icons/trombone-a.png" activeIcon: ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/icons/trombone-a.png")
}); });
var WEB_BRIDGE_TEST_HTML = "https://s3.amazonaws.com/hifi-public/tony/webBridgeTest.html?2"; var WEB_BRIDGE_TEST_HTML = ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/webBridgeTest.html?2");
var TROMBONE_URL = "https://s3.amazonaws.com/hifi-public/tony/audio/sad-trombone.wav"; var TROMBONE_URL = ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/audio/sad-trombone.wav");
var SCREAM_URL = "https://s3.amazonaws.com/hifi-public/tony/audio/wilhelm-scream.wav"; var SCREAM_URL = ExternalResource.getUrl(ExternalResource.HF_Public, "/tony/audio/wilhelm-scream.wav");
tabletButton.clicked.connect(function () { tabletButton.clicked.connect(function () {
if (shown) { if (shown) {

View file

@ -15,7 +15,7 @@ var skeletonModelURL = "";
var jointCount = 0; var jointCount = 0;
var excludedRoles = ["rightHandGraspOpen", "rightHandGraspClosed", "leftHandGraspOpen", "leftHandGraspClosed"]; var excludedRoles = ["rightHandGraspOpen", "rightHandGraspClosed", "leftHandGraspOpen", "leftHandGraspClosed"];
var IDLE_URL = "http://hifi-content.s3.amazonaws.com/ozan/dev/anim/standard_anims_160127/idle.fbx"; var IDLE_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/ozan/dev/anim/standard_anims_160127/idle.fbx");
function overrideAnims() { function overrideAnims() {
var roles = MyAvatar.getAnimationRoles(); var roles = MyAvatar.getAnimationRoles();

View file

@ -85,7 +85,7 @@ function addObject(a, b, c, lifetime) {
rotation: stageOrientation, rotation: stageOrientation,
dimensions: OBJECT_DIM, dimensions: OBJECT_DIM,
lifetime: (lifetime === undefined) ? DEFAULT_LIFETIME : lifetime, lifetime: (lifetime === undefined) ? DEFAULT_LIFETIME : lifetime,
modelURL: "https://hifi-content.s3.amazonaws.com/jimi/props/cones/trafficCone.fbx", modelURL: ExternalResource.getUrl(ExternalResource.HF_Content, "/jimi/props/cones/trafficCone.fbx"),
shapeType:shapeTypes[4], shapeType:shapeTypes[4],
dynamic: true, dynamic: true,
gravity:{"x":0,"y":-9.8,"z":0}, gravity:{"x":0,"y":-9.8,"z":0},

View file

@ -14,7 +14,7 @@
(function() { // BEGIN LOCAL_SCOPE (function() { // BEGIN LOCAL_SCOPE
var TABLET_BUTTON_NAME = "AUDIO"; var TABLET_BUTTON_NAME = "AUDIO";
var HOME_BUTTON_TEXTURE = "http://hifi-content.s3.amazonaws.com/alan/dev/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png"; var HOME_BUTTON_TEXTURE = ExternalResource.getUrl(ExternalResource.HF_Content, "/alan/dev/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png");
var AUDIO_QML_SOURCE = "hifi/audio/Audio.qml"; var AUDIO_QML_SOURCE = "hifi/audio/Audio.qml";
var MUTE_ICONS = { var MUTE_ICONS = {

View file

@ -20,8 +20,8 @@ var beacons = {};
// List of .fst files used by AC scripts, that should be ignored in the script in case TRY_TO_IGNORE_AC_AGENTS is enabled // List of .fst files used by AC scripts, that should be ignored in the script in case TRY_TO_IGNORE_AC_AGENTS is enabled
var POSSIBLE_AC_AVATARS = [ var POSSIBLE_AC_AVATARS = [
'http://hifi-content.s3.amazonaws.com/ozan/dev/avatars/invisible_avatar/invisible_avatar.fst', ExternalResource.getUrl(ExternalResource.HF_Content, "/ozan/dev/avatars/invisible_avatar/invisible_avatar.fst"),
'http://hifi-content.s3.amazonaws.com/ozan/dev/avatars/camera_man/pod/_latest/camera_man_pod.fst' ExternalResource.getUrl(ExternalResource.HF_Content, "/ozan/dev/avatars/camera_man/pod/_latest/camera_man_pod.fst")
]; ];
AvatarFinderBeacon = function(avatar) { AvatarFinderBeacon = function(avatar) {

View file

@ -338,7 +338,7 @@ var SEND_MONEY_PARTICLE_PROPERTIES = {
radiusSpread: 0, radiusSpread: 0,
radiusStart: 0.2, radiusStart: 0.2,
speedSpread: 0, speedSpread: 0,
textures: "http://hifi-content.s3.amazonaws.com/alan/dev/Particles/Bokeh-Particle-HFC.png", textures: ExternalResource.getUrl(ExternalResource.HF_Content, "/alan/dev/Particles/Bokeh-Particle-HFC.png"),
type: 'ParticleEffect' type: 'ParticleEffect'
}; };

View file

@ -20,7 +20,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js");
Script.include("/~/system/libraries/utils.js"); Script.include("/~/system/libraries/utils.js");
var DEFAULT_SPHERE_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/equip-Fresnel-3.fbx"; var DEFAULT_SPHERE_MODEL_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/alan/dev/equip-Fresnel-3.fbx");
var EQUIP_SPHERE_SCALE_FACTOR = 0.65; var EQUIP_SPHERE_SCALE_FACTOR = 0.65;

View file

@ -164,8 +164,8 @@ var beacon = {
}; };
// TODO: play sounds again when we aren't leaking AudioInjector threads // TODO: play sounds again when we aren't leaking AudioInjector threads
// var grabSound = SoundCache.getSound("https://hifi-public.s3.amazonaws.com/eric/sounds/CloseClamp.wav"); // var grabSound = SoundCache.getSound(ExternalResource.getUrl(ExternalResource.HF_Public, "/eric/sounds/CloseClamp.wav"));
// var releaseSound = SoundCache.getSound("https://hifi-public.s3.amazonaws.com/eric/sounds/ReleaseClamp.wav"); // var releaseSound = SoundCache.getSound(ExternalResource.getUrl(ExternalResource.HF_Public, "/eric/sounds/ReleaseClamp.wav"));
// var VOLUME = 0.0; // var VOLUME = 0.0;

View file

@ -37,7 +37,7 @@ var TABLET_NATURAL_DIMENSIONS = {x: 32.083, y: 48.553, z: 2.269};
var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "images/button-close.png"; var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "images/button-close.png";
// var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-close.png"; // var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-close.png";
// var TABLET_MODEL_PATH = "http://hifi-content.s3.amazonaws.com/alan/dev/tablet-with-home-button.fbx"; // var TABLET_MODEL_PATH = ExternalResource.getUrl(ExternalResource.HF_Content, "/alan/dev/tablet-with-home-button.fbx");
var LOCAL_TABLET_MODEL_PATH = Script.resourcesPath() + "meshes/tablet-with-home-button-small-bezel.fbx"; var LOCAL_TABLET_MODEL_PATH = Script.resourcesPath() + "meshes/tablet-with-home-button-small-bezel.fbx";
var HIGH_PRIORITY = 1; var HIGH_PRIORITY = 1;

View file

@ -10,8 +10,8 @@
var INTERFACE_METADATA_SOURCE = "https://cdn.vircadia.com/dist/launcher/vircadiaMeta.json"; var INTERFACE_METADATA_SOURCE = "https://cdn.vircadia.com/dist/launcher/vircadiaMeta.json";
// Base CDN URLs // Base CDN URLs
var CONTENT_CDN_URL = "https://content.highfidelity.com/"; // "https://content.vircadia.com/"; var CONTENT_CDN_URL = ExternalResource.HF_Content; // "https://cdn-1.vircadia.com/" + usCDN;
var PUBLIC_BUCKET_CDN_URL = "http://s3.amazonaws.com/hifi-public/"; var PUBLIC_BUCKET_CDN_URL = ExternalResource.HF_Public;
var euCDN = "eu-c-1/"; var euCDN = "eu-c-1/";
var usCDN = "us-c-1/"; var usCDN = "us-c-1/";

View file

@ -35,8 +35,8 @@
var CONNECTING_TIME = 100; // ms One interval. var CONNECTING_TIME = 100; // ms One interval.
var PARTICLE_RADIUS = 0.15; // m var PARTICLE_RADIUS = 0.15; // m
var PARTICLE_ANGLE_INCREMENT = 360 / 45; // 1hz var PARTICLE_ANGLE_INCREMENT = 360 / 45; // 1hz
var HANDSHAKE_SOUND_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/davidkelly/production/audio/4beat_sweep.wav"; var HANDSHAKE_SOUND_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/davidkelly/production/audio/4beat_sweep.wav");
var SUCCESSFUL_HANDSHAKE_SOUND_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/davidkelly/production/audio/3rdbeat_success_bell.wav"; var SUCCESSFUL_HANDSHAKE_SOUND_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/davidkelly/production/audio/3rdbeat_success_bell.wav");
var PREFERRER_HAND_JOINT_POSTFIX_ORDER = ['Middle1', 'Index1', '']; var PREFERRER_HAND_JOINT_POSTFIX_ORDER = ['Middle1', 'Index1', ''];
var HAPTIC_DATA = { var HAPTIC_DATA = {
initial: { duration: 20, strength: 0.6 }, // duration is in ms initial: { duration: 20, strength: 0.6 }, // duration is in ms
@ -60,7 +60,7 @@
"radiusStart": 0.0025, "radiusStart": 0.0025,
"emitSpeed": 0.02, "emitSpeed": 0.02,
"speedSpread": 0.015, "speedSpread": 0.015,
"textures": "http://hifi-content.s3.amazonaws.com/alan/dev/Particles/Bokeh-Particle.png", "textures": ExternalResource.getUrl(ExternalResource.HF_Content, "/alan/dev/Particles/Bokeh-Particle.png"),
"color": {"red": 255, "green": 255, "blue": 255}, "color": {"red": 255, "green": 255, "blue": 255},
"colorFinish": {"red": 0, "green": 164, "blue": 255}, "colorFinish": {"red": 0, "green": 164, "blue": 255},
"colorStart": {"red": 255, "green": 255, "blue": 255}, "colorStart": {"red": 255, "green": 255, "blue": 255},
@ -92,7 +92,7 @@
"radiusStart": 0.04, "radiusStart": 0.04,
"speedSpread": 0.00, "speedSpread": 0.00,
"radiusSpread": 0.0, "radiusSpread": 0.0,
"textures": "http://hifi-content.s3.amazonaws.com/alan/dev/Particles/Bokeh-Particle.png", "textures": ExternalResource.getUrl(ExternalResource.HF_Content, "/alan/dev/Particles/Bokeh-Particle.png"),
"color": {"red": 200, "green": 170, "blue": 255}, "color": {"red": 200, "green": 170, "blue": 255},
"colorFinish": {"red": 0, "green": 134, "blue": 255}, "colorFinish": {"red": 0, "green": 134, "blue": 255},
"colorStart": {"red": 185, "green": 222, "blue": 255}, "colorStart": {"red": 185, "green": 222, "blue": 255},

View file

@ -13,7 +13,7 @@
/* global Script, HMD, Tablet, Entities */ /* global Script, HMD, Tablet, Entities */
var HOME_BUTTON_TEXTURE = "http://hifi-content.s3.amazonaws.com/alan/dev/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png"; var HOME_BUTTON_TEXTURE = ExternalResource.getUrl(ExternalResource.HF_Content, "/alan/dev/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png");
// var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png"; // var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png";
(function() { (function() {

View file

@ -271,7 +271,7 @@ function onMessage(message) {
} }
var POLAROID_PRINT_SOUND = SoundCache.getSound(Script.resourcesPath() + "sounds/snapshot/sound-print-photo.wav"); var POLAROID_PRINT_SOUND = SoundCache.getSound(Script.resourcesPath() + "sounds/snapshot/sound-print-photo.wav");
var POLAROID_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/alan/dev/Test/snapshot.fbx'; var POLAROID_MODEL_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/alan/dev/Test/snapshot.fbx");
var POLAROID_RATE_LIMIT_MS = 1000; var POLAROID_RATE_LIMIT_MS = 1000;
var polaroidPrintingIsRateLimited = false; var polaroidPrintingIsRateLimited = false;

View file

@ -11,7 +11,7 @@
// //
(function() { // BEGIN LOCAL_SCOPE (function() { // BEGIN LOCAL_SCOPE
var USERS_URL = "https://hifi-content.s3.amazonaws.com/faye/tablet-dev/users.html"; var USERS_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/faye/tablet-dev/users.html");
var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png"; var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png";
var FRIENDS_WINDOW_URL = Account.metaverseServerURL + "/user/friends"; var FRIENDS_WINDOW_URL = Account.metaverseServerURL + "/user/friends";

View file

@ -13,8 +13,8 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
var COMPOUND_SHAPE_URL = "http://hifi-content.s3.amazonaws.com/Examples%20Content/production/maracas/woodenCrate_phys.obj"; var COMPOUND_SHAPE_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/Examples%20Content/production/maracas/woodenCrate_phys.obj");
var MODEL_URL = "http://hifi-content.s3.amazonaws.com/Examples%20Content/production/maracas/woodenCrate_VR.fbx"; var MODEL_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/Examples%20Content/production/maracas/woodenCrate_VR.fbx");
var SCRIPT_URL = Script.resolvePath("./entity_scripts/floatingLanternBox.js?v=" + Date.now()); var SCRIPT_URL = Script.resolvePath("./entity_scripts/floatingLanternBox.js?v=" + Date.now());
var START_POSITION = Vec3.sum(MyAvatar.position, Vec3.multiply(Quat.getFront(MyAvatar.orientation), 2)); var START_POSITION = Vec3.sum(MyAvatar.position, Vec3.multiply(Quat.getFront(MyAvatar.orientation), 2));
START_POSITION.y -= .6; START_POSITION.y -= .6;

View file

@ -24,7 +24,7 @@ var ACTION_DISTANCE = 0.35;
var ACTION_TIMESCALE = 0.035; var ACTION_TIMESCALE = 0.035;
var MAX_DISTANCE_MULTIPLIER = 4; var MAX_DISTANCE_MULTIPLIER = 4;
var STICK_SCRIPT_URL = Script.resolvePath("./entity_scripts/tetherballStick.js"); var STICK_SCRIPT_URL = Script.resolvePath("./entity_scripts/tetherballStick.js");
var STICK_MODEL_URL = "http://hifi-content.s3.amazonaws.com/caitlyn/production/raveStick/newRaveStick2.fbx"; var STICK_MODEL_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/caitlyn/production/raveStick/newRaveStick2.fbx");
var COLLISION_SOUND_URL = "http://public.highfidelity.io/sounds/Footsteps/FootstepW3Left-12db.wav"; var COLLISION_SOUND_URL = "http://public.highfidelity.io/sounds/Footsteps/FootstepW3Left-12db.wav";
var avatarOrientation = MyAvatar.orientation; var avatarOrientation = MyAvatar.orientation;
@ -37,7 +37,7 @@ var ballStartPosition = Vec3.sum(stickStartPosition, Vec3.multiply(0.36, front))
var ballID = Entities.addEntity({ var ballID = Entities.addEntity({
type: "Model", type: "Model",
modelURL: "http://hifi-content.s3.amazonaws.com/Examples%20Content/production/marblecollection/Star.fbx", modelURL: ExternalResource.getUrl(ExternalResource.HF_Content, "/Examples%20Content/production/marblecollection/Star.fbx"),
name: "TetherballStick Ball", name: "TetherballStick Ball",
shapeType: "Sphere", shapeType: "Sphere",
position: ballStartPosition, position: ballStartPosition,
@ -70,7 +70,7 @@ var lineID = Entities.addEntity({
green: 120, green: 120,
blue: 250 blue: 250
}, },
textures: "https://hifi-public.s3.amazonaws.com/alan/Particles/Particle-Sprite-Smoke-1.png", textures: ExternalResource.getUrl(ExternalResource.HF_Public, "/alan/Particles/Particle-Sprite-Smoke-1.png"),
position: ballStartPosition, position: ballStartPosition,
dimensions: { dimensions: {
x: 10, x: 10,

View file

@ -24,7 +24,7 @@
(function(){ (function(){
// This sample clip and range will be used if you don't add userData to the entity (see above) // This sample clip and range will be used if you don't add userData to the entity (see above)
var DEFAULT_RANGE = 100; var DEFAULT_RANGE = 100;
var DEFAULT_URL = "http://hifi-content.s3.amazonaws.com/ken/samples/forest_ambiX.wav"; var DEFAULT_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/ken/samples/forest_ambiX.wav");
var DEFAULT_VOLUME = 1.0; var DEFAULT_VOLUME = 1.0;
var DEFAULT_USERDATA = { var DEFAULT_USERDATA = {

View file

@ -8,7 +8,7 @@
// Copyright 2015 High Fidelity, Inc. // Copyright 2015 High Fidelity, Inc.
// //
// This is a toy script that can be added to the Flashlight model entity: // This is a toy script that can be added to the Flashlight model entity:
// "https://hifi-public.s3.amazonaws.com/models/props/flashlight.fbx" // ExternalResource.getUrl(ExternalResource.HF_Public, "/models/props/flashlight.fbx")
// that creates a spotlight attached with the flashlight model while the entity is grabbed // that creates a spotlight attached with the flashlight model while the entity is grabbed
// //
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
@ -17,8 +17,8 @@
(function() { (function() {
var ON_SOUND_URL = 'http://hifi-public.s3.amazonaws.com/sounds/Switches%20and%20sliders/flashlight_on.wav'; var ON_SOUND_URL = ExternalResource.getUrl(ExternalResource.HF_Public, '/sounds/Switches%20and%20sliders/flashlight_on.wav');
var OFF_SOUND_URL = 'http://hifi-public.s3.amazonaws.com/sounds/Switches%20and%20sliders/flashlight_off.wav'; var OFF_SOUND_URL = ExternalResource.getUrl(ExternalResource.HF_Public, '/sounds/Switches%20and%20sliders/flashlight_off.wav');
//we are creating lights that we don't want to get stranded so lets make sure that we can get rid of them //we are creating lights that we don't want to get stranded so lets make sure that we can get rid of them
//if you're going to be using this in a dungeon or something and holding it for a long time, increase this lifetime value. //if you're going to be using this in a dungeon or something and holding it for a long time, increase this lifetime value.

View file

@ -16,7 +16,7 @@
(function() { (function() {
var _this; var _this;
var LANTERN_MODEL_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/Welcome%20Area/Models/chinaLantern_capsule.fbx"; var LANTERN_MODEL_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/DomainContent/Welcome%20Area/Models/chinaLantern_capsule.fbx");
var LANTERN_SCRIPT_URL = Script.resolvePath("floatingLantern.js?v=" + Date.now()); var LANTERN_SCRIPT_URL = Script.resolvePath("floatingLantern.js?v=" + Date.now());
var LIFETIME = 120; var LIFETIME = 120;
var RESPAWN_INTERVAL = 1000; var RESPAWN_INTERVAL = 1000;

View file

@ -18,7 +18,7 @@
} }
var SETTING_KEY = "com.highfidelity.avatar.isSitting"; var SETTING_KEY = "com.highfidelity.avatar.isSitting";
var ANIMATION_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/clement/production/animations/sitting_idle.fbx"; var ANIMATION_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/clement/production/animations/sitting_idle.fbx");
var ANIMATION_FPS = 30; var ANIMATION_FPS = 30;
var ANIMATION_FIRST_FRAME = 1; var ANIMATION_FIRST_FRAME = 1;
var ANIMATION_LAST_FRAME = 10; var ANIMATION_LAST_FRAME = 10;

View file

@ -18,8 +18,8 @@ var bodies = [];
var n = 3; var n = 3;
var radius = 0.1; var radius = 0.1;
var G = 0.25; var G = 0.25;
var EARTH = "https://s3-us-west-1.amazonaws.com/hifi-content/seth/production/NBody/earth.fbx"; var EARTH = ExternalResource.getUrl(ExternalResource.HF_Content, "/seth/production/NBody/earth.fbx");
var MOON = "https://s3-us-west-1.amazonaws.com/hifi-content/seth/production/NBody/moon.fbx"; var MOON = ExternalResource.getUrl(ExternalResource.HF_Content, "/seth/production/NBody/moon.fbx");
var COLOR1 = { red: 51, green: 51, blue: 255 }; var COLOR1 = { red: 51, green: 51, blue: 255 };
var COLOR2 = { red: 51, green: 51, blue: 255 }; var COLOR2 = { red: 51, green: 51, blue: 255 };

View file

@ -10,7 +10,7 @@
// //
(function () { (function () {
var NOMNOM_SOUND = SoundCache.getSound('http://hifi-content.s3.amazonaws.com/DomainContent/production/audio/vegcrunch.wav'); var NOMNOM_SOUND = SoundCache.getSound(ExternalResource.getUrl(ExternalResource.HF_Content, "/DomainContent/production/audio/vegcrunch.wav"));
var _entityID; var _entityID;

View file

@ -67,7 +67,7 @@
animation: { animation: {
// Providing actual model fbx for animation used to work, now contorts doll into a weird ball // Providing actual model fbx for animation used to work, now contorts doll into a weird ball
// See bug: https://app.asana.com/0/26225263936266/70097355490098 // See bug: https://app.asana.com/0/26225263936266/70097355490098
// url: "http://hifi-public.s3.amazonaws.com/models/Bboys/bboy2/bboy2.fbx", // url: ExternalResource.getUrl(ExternalResource.HF_Public, '/models/Bboys/bboy2/bboy2.fbx"),
running: false, running: false,
} }
}); });

View file

@ -8,7 +8,7 @@
// Copyright 2015 High Fidelity, Inc. // Copyright 2015 High Fidelity, Inc.
// //
// This is a toy script that can be added to the Flashlight model entity: // This is a toy script that can be added to the Flashlight model entity:
// "https://hifi-public.s3.amazonaws.com/models/props/flashlight.fbx" // ExternalResource.getUrl(ExternalResource.HF_Public, "/models/props/flashlight.fbx")
// that creates a spotlight attached with the flashlight model while the entity is grabbed // that creates a spotlight attached with the flashlight model while the entity is grabbed
// //
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.

View file

@ -266,7 +266,7 @@
"alphaStart": 0, "alphaStart": 0,
"alphaFinish": 0, "alphaFinish": 0,
"additiveBlending": 0, "additiveBlending": 0,
"textures": "https://hifi-public.s3.amazonaws.com/alan/Particles/Particle-Sprite-Smoke-1.png" "textures": ExternalResource.getUrl(ExternalResource.HF_Public, "/alan/Particles/Particle-Sprite-Smoke-1.png")
}); });
Script.setTimeout(function() { Script.setTimeout(function() {
Entities.editEntity(smoke, { Entities.editEntity(smoke, {

View file

@ -15,9 +15,9 @@
(function () { (function () {
var APP_NAME = "BLOCKS"; var APP_NAME = "BLOCKS";
var APP_URL = "https://poly.google.com/"; var APP_URL = "https://poly.google.com/";
var APP_OUTDATED_URL = "https://hifi-content.s3.amazonaws.com/elisalj/blocks/updateToBlocks.html"; var APP_OUTDATED_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/elisalj/blocks/updateToBlocks.html");
var APP_ICON = "https://hifi-content.s3.amazonaws.com/elisalj/blocks/blocks-i.svg"; var APP_ICON = ExternalResource.getUrl(ExternalResource.HF_Content, "/elisalj/blocks/blocks-i.svg");
var APP_ICON_ACTIVE = "https://hifi-content.s3.amazonaws.com/elisalj/blocks/blocks-a.svg"; var APP_ICON_ACTIVE = ExternalResource.getUrl(ExternalResource.HF_Content, "/elisalj/blocks/blocks-a.svg");
try { try {
print("Current Interface version: " + Window.checkVersion()); print("Current Interface version: " + Window.checkVersion());

View file

@ -11,7 +11,6 @@
/* globals LookAtTarget */ /* globals LookAtTarget */
(function() { (function() {
var SFX_PREFIX = 'https://hifi-content.s3-us-west-1.amazonaws.com/caitlyn/production/elBoppo/sfx/';
var CHANNEL_PREFIX = 'io.highfidelity.boppo_server_'; var CHANNEL_PREFIX = 'io.highfidelity.boppo_server_';
var PUNCH_SOUNDS = [ var PUNCH_SOUNDS = [
'punch_1.wav', 'punch_1.wav',
@ -41,7 +40,7 @@
var BoppoClownEntity = function () { var BoppoClownEntity = function () {
_this = this; _this = this;
PUNCH_SOUNDS.forEach(function(punch) { PUNCH_SOUNDS.forEach(function(punch) {
_punchSounds.push(SoundCache.getSound(SFX_PREFIX + punch)); _punchSounds.push(SoundCache.getSound(ExternalResource.getUrl(ExternalResource.HF_Content, '/caitlyn/production/elBoppo/sfx/' + punch)));
}); });
}; };

View file

@ -9,7 +9,6 @@
// //
(function() { (function() {
var SFX_PREFIX = 'https://hifi-content.s3-us-west-1.amazonaws.com/caitlyn/production/elBoppo/sfx/';
var CLOWN_LAUGHS = [ var CLOWN_LAUGHS = [
'clown_laugh_1.wav', 'clown_laugh_1.wav',
'clown_laugh_2.wav', 'clown_laugh_2.wav',
@ -168,12 +167,12 @@
_boppoClownID = null; _boppoClownID = null;
_coolDown = false; _coolDown = false;
CLOWN_LAUGHS.forEach(function(clownLaugh) { CLOWN_LAUGHS.forEach(function(clownLaugh) {
_clownLaughs.push(SoundCache.getSound(SFX_PREFIX + clownLaugh)); _clownLaughs.push(SoundCache.getSound(ExternalResource.getUrl(ExternalResource.HF_Content, + clownLaugh)));
}); });
_tickTockSound = SoundCache.getSound(SFX_PREFIX + TICK_TOCK_SOUND); _tickTockSound = SoundCache.getSound(ExternalResource.getUrl(ExternalResource.HF_Content, TICK_TOCK_SOUND));
_boxingBellRingStart = SoundCache.getSound(SFX_PREFIX + BOXING_RING_BELL_START); _boxingBellRingStart = SoundCache.getSound(ExternalResource.getUrl(ExternalResource.HF_Content, BOXING_RING_BELL_START));
_boxingBellRingEnd = SoundCache.getSound(SFX_PREFIX + BOXING_RING_BELL_END); _boxingBellRingEnd = SoundCache.getSound(ExternalResource.getUrl(ExternalResource.HF_Content, BOXING_RING_BELL_END));
_music = SoundCache.getSound(SFX_PREFIX + BOPPO_MUSIC); _music = SoundCache.getSound(ExternalResource.getUrl(ExternalResource.HF_Content, BOPPO_MUSIC));
_boppoEntities = {}; _boppoEntities = {};
}; };
@ -200,9 +199,9 @@
var boppoBaseProperties = Entities.getEntityProperties(_entityID, ['position', 'rotation']); var boppoBaseProperties = Entities.getEntityProperties(_entityID, ['position', 'rotation']);
_boppoClownID = Entities.addEntity({ _boppoClownID = Entities.addEntity({
angularDamping: 0.0, angularDamping: 0.0,
collisionSoundURL: 'https://hifi-content.s3.amazonaws.com/caitlyn/production/elBoppo/51460__andre-rocha-nascimento__basket-ball-01-bounce.wav', collisionSoundURL: ExternalResource.getUrl(ExternalResource.HF_Content, 'caitlyn/production/elBoppo/51460__andre-rocha-nascimento__basket-ball-01-bounce.wav'),
collisionsWillMove: true, collisionsWillMove: true,
compoundShapeURL: 'https://hifi-content.s3.amazonaws.com/caitlyn/production/elBoppo/bopo_phys.obj', compoundShapeURL: ExternalResource.getUrl(ExternalResource.HF_Content, 'caitlyn/production/elBoppo/bopo_phys.obj'),
damping: 1.0, damping: 1.0,
density: 10000, density: 10000,
dimensions: { dimensions: {
@ -217,7 +216,7 @@
y: -25, y: -25,
z: 0 z: 0
}, },
modelURL: 'https://hifi-content.s3.amazonaws.com/caitlyn/production/elBoppo/elBoppo3_VR.fbx', modelURL: ExternalResource.getUrl(ExternalResource.HF_Content, 'caitlyn/production/elBoppo/elBoppo3_VR.fbx'),
name: 'El Boppo the Punching Bag Clown', name: 'El Boppo the Punching Bag Clown',
registrationPoint: { registrationPoint: {
x: 0.5, x: 0.5,

View file

@ -35,7 +35,7 @@
y: -9.8, y: -9.8,
z: 0 z: 0
}, },
modelURL: "https://hifi-content.s3.amazonaws.com/caitlyn/production/elBoppo/LFT_glove_VR3.fbx", modelURL: ExternalResource.getUrl(ExternalResource.HF_Content, "/caitlyn/production/elBoppo/LFT_glove_VR3.fbx"),
name: "Boxing Glove - Left", name: "Boxing Glove - Left",
registrationPoint: { registrationPoint: {
x: 0.5, x: 0.5,
@ -76,7 +76,7 @@
y: -9.8, y: -9.8,
z: 0 z: 0
}, },
modelURL: "https://hifi-content.s3.amazonaws.com/caitlyn/production/elBoppo/RT_glove_VR2.fbx", modelURL: ExternalResource.getUrl(ExternalResource.HF_Content, "/caitlyn/production/elBoppo/RT_glove_VR2.fbx"),
name: "Boxing Glove - Right", name: "Boxing Glove - Right",
registrationPoint: { registrationPoint: {
x: 0.5, x: 0.5,

View file

@ -10,12 +10,11 @@
/* globals SCRIPT_IMPORT_PROPERTIES */ /* globals SCRIPT_IMPORT_PROPERTIES */
var MODELS_PATH = 'https://hifi-content.s3.amazonaws.com/DomainContent/Welcome%20Area/production/models/boxingRing/';
var WANT_CLEANUP_ON_SCRIPT_ENDING = false; var WANT_CLEANUP_ON_SCRIPT_ENDING = false;
var getScriptPath = function(localPath) { var getScriptPath = function(localPath) {
if (this.isCleanupAndSpawnScript) { if (this.isCleanupAndSpawnScript) {
return 'https://hifi-content.s3.amazonaws.com/DomainContent/Welcome%20Area/Scripts/boppo/' + localPath; return ExternalResource.getUrl(ExternalResource.HF_Content, 'DomainContent/Welcome%20Area/Scripts/boppo/' + localPath);
} }
return Script.resolvePath(localPath); return Script.resolvePath(localPath);
}; };
@ -34,7 +33,7 @@ var boxingRing = Entities.addEntity({
y: 4.0418000221252441, y: 4.0418000221252441,
z: 3.0490000247955322 z: 3.0490000247955322
}, },
modelURL: MODELS_PATH + 'assembled/boppoBoxingRingAssembly.fbx', modelURL: ExternalResource.getUrl(ExternalResource.HF_Content, 'DomainContent/Welcome%20Area/production/models/boxingRing/assembled/boppoBoxingRingAssembly.fbx'),
name: 'Boxing Ring Assembly', name: 'Boxing Ring Assembly',
rotation: { rotation: {
w: 0.9996337890625, w: 0.9996337890625,
@ -62,7 +61,7 @@ var boppoEntities = [
y: 0.25536194443702698, y: 0.25536194443702698,
z: 0.059455446898937225 z: 0.059455446898937225
}, },
modelURL: MODELS_PATH + 'boxingGameSign/boppoSignFrame.fbx', modelURL: ExternalResource.getUrl(ExternalResource.HF_Content, 'DomainContent/Welcome%20Area/production/models/boxingGameSign/boppoSignFrame.fbx'),
parentID: boxingRing, parentID: boxingRing,
localPosition: { localPosition: {
x: -1.0251024961471558, x: -1.0251024961471558,
@ -150,7 +149,7 @@ var boppoEntities = [
y: 0.1884911060333252, y: 0.1884911060333252,
z: 0.059455446898937225 z: 0.059455446898937225
}, },
modelURL: MODELS_PATH + 'boxingGameSign/boppoSignFrame.fbx', modelURL: ExternalResource.getUrl(ExternalResource.HF_Content, 'DomainContent/Welcome%20Area/production/models/boxingGameSign/boppoSignFrame.fbx'),
parentID: boxingRing, parentID: boxingRing,
localPosition: { localPosition: {
x: -0.78200173377990723, x: -0.78200173377990723,

View file

@ -10,7 +10,7 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
var MODEL_URL = "https://hifi-content.s3.amazonaws.com/wadewatts/dart.fbx"; var MODEL_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/wadewatts/dart.fbx");
var SCRIPT_URL = Script.resolvePath("./dart.js?v=" + Date.now()); var SCRIPT_URL = Script.resolvePath("./dart.js?v=" + Date.now());
var START_POSITION = Vec3.sum(MyAvatar.position, Vec3.multiply(Quat.getFront(MyAvatar.orientation), 0.75)); var START_POSITION = Vec3.sum(MyAvatar.position, Vec3.multiply(Quat.getFront(MyAvatar.orientation), 0.75));
var START_ROTATION = MyAvatar.orientation var START_ROTATION = MyAvatar.orientation

View file

@ -12,7 +12,7 @@
(function() { (function() {
var THROW_FACTOR = 3; var THROW_FACTOR = 3;
var DART_SOUND_URL = Script.resolvePath('https://hifi-content.s3.amazonaws.com/wadewatts/dart.wav?v=' + Date.now()); var DART_SOUND_URL = Script.resolvePath(ExternalResource.getUrl(ExternalResource.HF_Content, '/wadewatts/dart.wav?v=') + "?" + Date.now());
var Dart = function() {}; var Dart = function() {};

View file

@ -12,13 +12,13 @@
/// http://creativecommons.org/licenses/ /// http://creativecommons.org/licenses/
/// ///
var lib = Script.require("https://hifi-content.s3.amazonaws.com/elisalj/emoji_scripts/emojiLib.js?" + Date.now()); var lib = Script.require(ExternalResource.getUrl(ExternalResource.HF_Content, "/elisalj/emoji_scripts/emojiLib.js") + "?" + Date.now());
(function() { (function() {
var APP_NAME = "EMOJIS"; var APP_NAME = "EMOJIS";
var APP_URL = "https://hifi-content.s3.amazonaws.com/elisalj/emoji_scripts/emojiTabletUI.html?" + Date.now(); var APP_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/elisalj/emoji_scripts/emojiTabletUI.html") + "?" + Date.now();
var APP_ICON = "https://hifi-content.s3.amazonaws.com/elisalj/emoji_scripts/icons/emoji-i.svg"; var APP_ICON = ExternalResource.getUrl(ExternalResource.HF_Content, "/elisalj/emoji_scripts/icons/emoji-i.svg");
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
var button = tablet.addButton({ var button = tablet.addButton({

View file

@ -13,8 +13,8 @@
var _this; var _this;
var MAPPING_NAME = "hifi-gametable-cards-dev-" + Math.random(); var MAPPING_NAME = "hifi-gametable-cards-dev-" + Math.random();
var PLAYING_CARD_SCRIPT_URL = Script.resolvePath('playingCard.js'); var PLAYING_CARD_SCRIPT_URL = Script.resolvePath('playingCard.js');
var PLAYING_CARD_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/thoys/production/gameTable/assets/deckOfCards/playing_card.fbx'; var PLAYING_CARD_MODEL_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/thoys/production/gameTable/assets/deckOfCards/playing_card.fbx");
var PLAYING_CARD_BACK_IMAGE_URL = "http://hifi-content.s3.amazonaws.com/thoys/production/gameTable/assets/deckOfCards/back.jpg"; var PLAYING_CARD_BACK_IMAGE_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/thoys/production/gameTable/assets/deckOfCards/back.jpg");
var PLAYING_CARD_DIMENSIONS = { var PLAYING_CARD_DIMENSIONS = {
x: 0.2621, x: 0.2621,
y: 0.1, y: 0.1,

View file

@ -13,9 +13,9 @@
var _this; var _this;
var CARD_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/thoys/production/gameTable/assets/deckOfCards/playing_card.fbx'; var CARD_MODEL_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/thoys/production/gameTable/assets/deckOfCards/playing_card.fbx");
var CARD_BACK_IMAGE_URL = "http://hifi-content.s3.amazonaws.com/thoys/production/gameTable/assets/deckOfCards/images/back.jpg"; var CARD_BACK_IMAGE_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/thoys/production/gameTable/assets/deckOfCards/images/back.jpg");
var CARD_IMAGE_BASE_URL = "http://hifi-content.s3.amazonaws.com/thoys/production/gameTable/assets/deckOfCards/images/playingcard_old-"; var CARD_IMAGE_BASE_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/thoys/production/gameTable/assets/deckOfCards/images/playingcard_old-");
function PlayingCard() { function PlayingCard() {
_this = this; _this = this;

View file

@ -110,7 +110,7 @@
"y": 0.80860012769699097, "y": 0.80860012769699097,
"z": -0.23394235968589783 "z": -0.23394235968589783
}, },
"textures": "https://hifi-public.s3.amazonaws.com/alan/Particles/Particle-Sprite-Smoke-1.png", "textures": ExternalResource.getUrl(ExternalResource.HF_Public, "/alan/Particles/Particle-Sprite-Smoke-1.png"),
"type": "ParticleEffect" "type": "ParticleEffect"
}; };