Showing the changes to scripts/tutorials/entity_scripts (4 of 52 files). Show all
Unified · Split
| @@ -24,7 +24,7 @@ · 23 unmodified lines | |||
| 24 | (function(){ | 24 | (function(){ |
| 25 | // This sample clip and range will be used if you don't add userData to the entity (see above) | 25 | // This sample clip and range will be used if you don't add userData to the entity (see above) |
| 26 | var DEFAULT_RANGE = 100; | 26 | var DEFAULT_RANGE = 100; |
| 27 | var DEFAULT_URL = "http://hifi-content.s3.amazonaws.com/ken/samples/forest_ambiX.wav"; | 27 | var DEFAULT_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/ken/samples/forest_ambiX.wav"); |
| 28 | var DEFAULT_VOLUME = 1.0; | 28 | var DEFAULT_VOLUME = 1.0; |
| 29 | 29 | ||
| 30 | var DEFAULT_USERDATA = { | 30 | var DEFAULT_USERDATA = { |
| @@ -8,7 +8,7 @@ · 7 unmodified lines | |||
| 8 | // Copyright 2015 High Fidelity, Inc. | 8 | // Copyright 2015 High Fidelity, Inc. |
| 9 | // | 9 | // |
| 10 | // This is a toy script that can be added to the Flashlight model entity: | 10 | // This is a toy script that can be added to the Flashlight model entity: |
| 11 | // "https://hifi-public.s3.amazonaws.com/models/props/flashlight.fbx" | 11 | // ExternalResource.getUrl(ExternalResource.HF_Public, "/models/props/flashlight.fbx") |
| 12 | // that creates a spotlight attached with the flashlight model while the entity is grabbed | 12 | // that creates a spotlight attached with the flashlight model while the entity is grabbed |
| 13 | // | 13 | // |
| 14 | // Distributed under the Apache License, Version 2.0. | 14 | // Distributed under the Apache License, Version 2.0. |
| @@ -17,8 +17,8 @@ · 2 unmodified lines | |||
| 17 | 17 | ||
| 18 | (function() { | 18 | (function() { |
| 19 | 19 | ||
| 20 | var ON_SOUND_URL = 'http://hifi-public.s3.amazonaws.com/sounds/Switches%20and%20sliders/flashlight_on.wav'; | 20 | var ON_SOUND_URL = ExternalResource.getUrl(ExternalResource.HF_Public, '/sounds/Switches%20and%20sliders/flashlight_on.wav'); |
| 21 | var OFF_SOUND_URL = 'http://hifi-public.s3.amazonaws.com/sounds/Switches%20and%20sliders/flashlight_off.wav'; | 21 | var OFF_SOUND_URL = ExternalResource.getUrl(ExternalResource.HF_Public, '/sounds/Switches%20and%20sliders/flashlight_off.wav'); |
| 22 | 22 | ||
| 23 | //we are creating lights that we don't want to get stranded so lets make sure that we can get rid of them | 23 | //we are creating lights that we don't want to get stranded so lets make sure that we can get rid of them |
| 24 | //if you're going to be using this in a dungeon or something and holding it for a long time, increase this lifetime value. | 24 | //if you're going to be using this in a dungeon or something and holding it for a long time, increase this lifetime value. |
| @@ -16,7 +16,7 @@ · 15 unmodified lines | |||
| 16 | (function() { | 16 | (function() { |
| 17 | 17 | ||
| 18 | var _this; | 18 | var _this; |
| 19 | var LANTERN_MODEL_URL = "http://hifi-content.s3.amazonaws.com/DomainContent/Welcome%20Area/Models/chinaLantern_capsule.fbx"; | 19 | var LANTERN_MODEL_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/DomainContent/Welcome%20Area/Models/chinaLantern_capsule.fbx"); |
| 20 | var LANTERN_SCRIPT_URL = Script.resolvePath("floatingLantern.js?v=" + Date.now()); | 20 | var LANTERN_SCRIPT_URL = Script.resolvePath("floatingLantern.js?v=" + Date.now()); |
| 21 | var LIFETIME = 120; | 21 | var LIFETIME = 120; |
| 22 | var RESPAWN_INTERVAL = 1000; | 22 | var RESPAWN_INTERVAL = 1000; |
| @@ -18,7 +18,7 @@ · 17 unmodified lines | |||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | var SETTING_KEY = "com.highfidelity.avatar.isSitting"; | 20 | var SETTING_KEY = "com.highfidelity.avatar.isSitting"; |
| 21 | var ANIMATION_URL = "https://s3-us-west-1.amazonaws.com/hifi-content/clement/production/animations/sitting_idle.fbx"; | 21 | var ANIMATION_URL = ExternalResource.getUrl(ExternalResource.HF_Content, "/clement/production/animations/sitting_idle.fbx"); |
| 22 | var ANIMATION_FPS = 30; | 22 | var ANIMATION_FPS = 30; |
| 23 | var ANIMATION_FIRST_FRAME = 1; | 23 | var ANIMATION_FIRST_FRAME = 1; |
| 24 | var ANIMATION_LAST_FRAME = 10; | 24 | var ANIMATION_LAST_FRAME = 10; |