mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
Update tutorial http references to atp
This commit is contained in:
parent
9c7ea6ac7c
commit
6924040d82
7 changed files with 38 additions and 47 deletions
|
@ -20,7 +20,7 @@ birdFirework1 = {
|
|||
"z": 0
|
||||
},
|
||||
"id": "{1c4061bc-b2e7-4435-bc47-3fcc39ae6624}",
|
||||
"modelURL": "http://hifi-content.s3.amazonaws.com/jimi/tutorialroom/birdStatue15.fbx",
|
||||
"modelURL": "atp:/tutorial_models/birdStatue15.fbx",
|
||||
"owningAvatarID": "{00000000-0000-0000-0000-000000000000}",
|
||||
"position": {
|
||||
"x": 0.11612319946289062,
|
||||
|
@ -66,7 +66,7 @@ birdFirework2 = {
|
|||
"z": 0
|
||||
},
|
||||
"id": "{ba067084-8d0f-4eeb-a8a1-c6814527c1bb}",
|
||||
"modelURL": "http://hifi-content.s3.amazonaws.com/DomainContent/Tutorial/Models/statuebird4.fbx",
|
||||
"modelURL": "atp:/tutorial_models/statuebird4.fbx",
|
||||
"owningAvatarID": "{00000000-0000-0000-0000-000000000000}",
|
||||
"position": {
|
||||
"x": 0,
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
var fuseSound = SoundCache.getSound("https://hifi-content.s3.amazonaws.com/DomainContent/Tutorial/Sounds/fuse.wav");
|
||||
var fuseSound = SoundCache.getSound("atp:/tutorial_sounds/fuse.wav");
|
||||
function getChildProperties(entityID, propertyNames) {
|
||||
var childEntityIDs = Entities.getChildrenIDs(entityID);
|
||||
var results = {}
|
||||
|
@ -44,7 +44,7 @@
|
|||
currentFrame: 1,
|
||||
lastFrame: 150,
|
||||
running: 1,
|
||||
url: "https://hifi-content.s3.amazonaws.com/ozan/dev/anim/fuse/fuse.fbx",
|
||||
url: "atp:/tutorial_models/fuse.fbx",
|
||||
loop: 0
|
||||
},
|
||||
});
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
var _this;
|
||||
|
||||
function getResourceURL(file) {
|
||||
return 'http://hifi-content.s3.amazonaws.com/DomainContent/Tutorial/' + file;
|
||||
return 'atp:/' + file;
|
||||
};
|
||||
|
||||
const LIGHTER_ON_SOUND_URL = getResourceURL('Sounds/lighter_on.wav');
|
||||
const BUTANE_SOUND_URL = getResourceURL('Sounds/butane.wav');
|
||||
const LIGHTER_ON_SOUND_URL = getResourceURL('tutorial_sounds/lighter_on.wav');
|
||||
const BUTANE_SOUND_URL = getResourceURL('tutorial_sound/butane.wav');
|
||||
|
||||
// TODO: fix this in the client, changing the sound volume while a sound is playing doesn't seem to work right now
|
||||
const DYNAMIC_SOUND_VOLUME = false;
|
||||
|
@ -151,11 +151,12 @@
|
|||
var flameProperties = Entities.getEntityProperties(_this.lighterParticleEntity, ['position', 'rotation']);
|
||||
var pickRay = {
|
||||
origin: flameProperties.position,
|
||||
direction: Quat.getFront(flameProperties.rotation)
|
||||
direction: Quat.inverse(Quat.getFront(flameProperties.rotation))
|
||||
}
|
||||
var intersection = Entities.findRayIntersection(pickRay, true);
|
||||
if (intersection.intersects) {
|
||||
debugPrint(JSON.stringify(intersection));
|
||||
var intersection = Entities.findRayIntersection(pickRay, true, [], [_this.entityID, _this.lighterParticleEntity]);
|
||||
if (intersection.intersects && intersection.distance <= FLAME_LENGTH && intersection.properties.script !== '') {
|
||||
Entities.callEntityMethod(intersection.properties.id, 'onLit', [_this.triggerValue]);
|
||||
debugPrint('Light it up! found: ' + intersection.properties.id);
|
||||
}
|
||||
},
|
||||
releaseEquip: function(entityID, args) {
|
||||
|
|
|
@ -7,12 +7,7 @@
|
|||
//
|
||||
|
||||
const TEST_MODE = false;
|
||||
const SCRIPT_URL = 'https://dl.dropboxusercontent.com/u/14997455/hifi/butaneLighter/butaneLighter.js?v=' + Date.now();
|
||||
//const SCRIPT_URL = Script.resolvePath("butaneLighter.js");
|
||||
|
||||
function getResourceURL(file) {
|
||||
return 'http://hifi-content.s3.amazonaws.com/DomainContent/Tutorial/' + file;
|
||||
};
|
||||
const SCRIPT_URL = 'atp:/tutorial/lighter/butaneLighter.js';
|
||||
|
||||
//Creates an entity and returns a mixed object of the creation properties and the assigned entityID
|
||||
var createEntity = function(entityProperties, parent) {
|
||||
|
@ -53,7 +48,7 @@ createButaneLighter = function(transform) {
|
|||
y: -0.01,
|
||||
z: 0
|
||||
},
|
||||
modelURL: getResourceURL('Models/lighterIceCreamSandwich.fbx'),
|
||||
modelURL: 'atp:/tutorial_models/lighterIceCreamSandwich.fbx',
|
||||
name: 'BrutaneLighter',
|
||||
shapeType: 'simple-compound',
|
||||
type: 'Model',
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
var spinnerSound = SoundCache.getSound("http://hifi-content.s3.amazonaws.com/DomainContent/Tutorial/Sounds/Pinwheel.L.wav");
|
||||
var spinnerSound = SoundCache.getSound("atp:/tutorial_sounds/Pinwheel.L.wav");
|
||||
var Spinner = function() {
|
||||
};
|
||||
function getChildProperties(entityID, propertyNames) {
|
||||
|
|
|
@ -55,9 +55,6 @@ function info() {
|
|||
}
|
||||
}
|
||||
|
||||
var BASKET_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/Trach-Can-3.fbx";
|
||||
var BASKET_COLLIDER_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/Trash-Can-4.obj";
|
||||
|
||||
var NEAR_BOX_SPAWN_NAME = "tutorial/nearGrab/box_spawn";
|
||||
var FAR_BOX_SPAWN_NAME = "tutorial/farGrab/box_spawn";
|
||||
var NEAR_BASKET_COLLIDER_NAME = "tutorial/nearGrab/basket_collider";
|
||||
|
@ -66,7 +63,7 @@ var GUN_BASKET_COLLIDER_NAME = "tutorial/equip/basket_collider";
|
|||
var GUN_SPAWN_NAME = "tutorial/gun_spawn";
|
||||
var TELEPORT_PAD_NAME = "tutorial/teleport/pad"
|
||||
|
||||
var successSound = SoundCache.getSound("http://hifi-content.s3.amazonaws.com/DomainContent/Tutorial/Sounds/good_one.L.wav");
|
||||
var successSound = SoundCache.getSound("atp:/tutorial_sounds/good_one.L.wav");
|
||||
|
||||
function beginsWithFilter(value, key) {
|
||||
return value.indexOf(properties[key]) == 0;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
var viveModelURL = "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive2.fbx";
|
||||
|
||||
var LEFT_JOINT_INDEX = MyAvatar.getJointIndex("_CONTROLLER_LEFTHAND");
|
||||
var RIGHT_JOINT_INDEX = MyAvatar.getJointIndex("_CONTROLLER_RIGHTHAND");
|
||||
|
||||
|
@ -42,8 +40,8 @@ var viveNaturalPosition = {
|
|||
z: 0.06380049744620919
|
||||
};
|
||||
|
||||
var viveModelURL = "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_body.fbx";
|
||||
var viveTipsModelURL = "https://hifi-content.s3.amazonaws.com/DomainContent/Tutorial/Models/vive_tips.fbx"
|
||||
var viveModelURL = "atp:/controller/vive_body.fbx";
|
||||
var viveTipsModelURL = "atp:/controller/vive_tips.fbx"
|
||||
|
||||
VIVE_CONTROLLER_CONFIGURATION = {
|
||||
name: "Vive",
|
||||
|
@ -89,7 +87,7 @@ VIVE_CONTROLLER_CONFIGURATION = {
|
|||
// and swaps in textures based on the thumb position.
|
||||
touchpad: {
|
||||
type: "touchpad",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_trackpad.fbx",
|
||||
modelURL: "atp:/controller/vive_trackpad.fbx",
|
||||
visibleInput: "Vive.RSTouch",
|
||||
xInput: "Vive.LX",
|
||||
yInput: "Vive.LY",
|
||||
|
@ -103,20 +101,20 @@ VIVE_CONTROLLER_CONFIGURATION = {
|
|||
disable_defaultTextureLayer: "blank",
|
||||
disable_textureLayers: {
|
||||
blank: {
|
||||
defaultTextureURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_trackpad.fbx/Touchpad.fbm/touchpad-blank.jpg",
|
||||
defaultTextureURL: "atp:/controller/vive_trackpad.fbx/Touchpad.fbm/touchpad-blank.jpg",
|
||||
},
|
||||
teleport: {
|
||||
defaultTextureURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_trackpad.fbx/Touchpad.fbm/touchpad-teleport-active-LG.jpg",
|
||||
defaultTextureURL: "atp:/controller/vive_trackpad.fbx/Touchpad.fbm/touchpad-teleport-active-LG.jpg",
|
||||
},
|
||||
arrows: {
|
||||
defaultTextureURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_trackpad.fbx/Touchpad.fbm/touchpad-look-arrows.jpg",
|
||||
defaultTextureURL: "atp:/controller/vive_trackpad.fbx/Touchpad.fbm/touchpad-look-arrows.jpg",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
trigger: {
|
||||
type: "rotational",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_trigger.fbx",
|
||||
modelURL: "atp:/controller/vive_trigger.fbx",
|
||||
input: Controller.Standard.LT,
|
||||
naturalPosition: {"x":0.000004500150680541992,"y":-0.027690507471561432,"z":0.04830199480056763},
|
||||
origin: { x: 0, y: -0.015, z: -0.00 },
|
||||
|
@ -128,30 +126,30 @@ VIVE_CONTROLLER_CONFIGURATION = {
|
|||
|
||||
l_grip: {
|
||||
type: "static",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_l_grip.fbx",
|
||||
modelURL: "atp:/controller/vive_l_grip.fbx",
|
||||
naturalPosition: {"x":-0.01720449887216091,"y":-0.014324013143777847,"z":0.08714400231838226},
|
||||
},
|
||||
|
||||
r_grip: {
|
||||
type: "static",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_r_grip.fbx",
|
||||
modelURL: "atp:/controller/vive_r_grip.fbx",
|
||||
naturalPosition: {"x":0.01720449887216091,"y":-0.014324013143777847,"z":0.08714400231838226},
|
||||
},
|
||||
|
||||
sys_button: {
|
||||
type: "static",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_sys_button.fbx",
|
||||
modelURL: "atp:/controller/vive_sys_button.fbx",
|
||||
naturalPosition: {"x":0,"y":0.0020399854984134436,"z":0.08825899660587311},
|
||||
},
|
||||
|
||||
button: {
|
||||
type: "static",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_button.fbx",
|
||||
modelURL: "atp:/controller/vive_button.fbx",
|
||||
naturalPosition: {"x":0,"y":0.005480996798723936,"z":0.019918499514460564}
|
||||
},
|
||||
button2: {
|
||||
type: "static",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_button.fbx",
|
||||
modelURL: "atp:/controller/vive_button.fbx",
|
||||
naturalPosition: {"x":0,"y":0.005480996798723936,"z":0.019918499514460564}
|
||||
},
|
||||
},
|
||||
|
@ -207,7 +205,7 @@ VIVE_CONTROLLER_CONFIGURATION = {
|
|||
// and swaps in textures based on the thumb position.
|
||||
touchpad: {
|
||||
type: "touchpad",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_trackpad.fbx",
|
||||
modelURL: "atp:/controller/vive_trackpad.fbx",
|
||||
visibleInput: "Vive.RSTouch",
|
||||
xInput: "Vive.RX",
|
||||
yInput: "Vive.RY",
|
||||
|
@ -221,20 +219,20 @@ VIVE_CONTROLLER_CONFIGURATION = {
|
|||
disable_defaultTextureLayer: "blank",
|
||||
disable_textureLayers: {
|
||||
blank: {
|
||||
defaultTextureURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_trackpad.fbx/Touchpad.fbm/touchpad-blank.jpg",
|
||||
defaultTextureURL: "atp:/controller/vive_trackpad.fbx/Touchpad.fbm/touchpad-blank.jpg",
|
||||
},
|
||||
teleport: {
|
||||
defaultTextureURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_trackpad.fbx/Touchpad.fbm/touchpad-teleport-active-LG.jpg",
|
||||
defaultTextureURL: "atp:/controller/vive_trackpad.fbx/Touchpad.fbm/touchpad-teleport-active-LG.jpg",
|
||||
},
|
||||
arrows: {
|
||||
defaultTextureURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_trackpad.fbx/Touchpad.fbm/touchpad-look-arrows-active.jpg",
|
||||
defaultTextureURL: "atp:/controller/vive_trackpad.fbx/Touchpad.fbm/touchpad-look-arrows-active.jpg",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
trigger: {
|
||||
type: "rotational",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_trigger.fbx",
|
||||
modelURL: "atp:/controller/vive_trigger.fbx",
|
||||
input: Controller.Standard.RT,
|
||||
naturalPosition: {"x":0.000004500150680541992,"y":-0.027690507471561432,"z":0.04830199480056763},
|
||||
origin: { x: 0, y: -0.015, z: -0.00 },
|
||||
|
@ -246,30 +244,30 @@ VIVE_CONTROLLER_CONFIGURATION = {
|
|||
|
||||
l_grip: {
|
||||
type: "static",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_l_grip.fbx",
|
||||
modelURL: "atp:/controller/vive_l_grip.fbx",
|
||||
naturalPosition: {"x":-0.01720449887216091,"y":-0.014324013143777847,"z":0.08714400231838226},
|
||||
},
|
||||
|
||||
r_grip: {
|
||||
type: "static",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_r_grip.fbx",
|
||||
modelURL: "atp:/controller/vive_r_grip.fbx",
|
||||
naturalPosition: {"x":0.01720449887216091,"y":-0.014324013143777847,"z":0.08714400231838226},
|
||||
},
|
||||
|
||||
sys_button: {
|
||||
type: "static",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_sys_button.fbx",
|
||||
modelURL: "atp:/controller/vive_sys_button.fbx",
|
||||
naturalPosition: {"x":0,"y":0.0020399854984134436,"z":0.08825899660587311},
|
||||
},
|
||||
|
||||
button: {
|
||||
type: "static",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_button.fbx",
|
||||
modelURL: "atp:/controller/vive_button.fbx",
|
||||
naturalPosition: {"x":0,"y":0.005480996798723936,"z":0.019918499514460564}
|
||||
},
|
||||
button2: {
|
||||
type: "static",
|
||||
modelURL: "https://hifi-public.s3.amazonaws.com/huffman/controllers/vive_button.fbx",
|
||||
modelURL: "atp:/controller/vive_button.fbx",
|
||||
naturalPosition: {"x":0,"y":0.005480996798723936,"z":0.019918499514460564}
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue