Showing the changes to tutorial/ACAudioSearchAndInject_tutorial.js (1 of 1 file). Show all
Unified · Split
| @@ -1,4 +1,5 @@ | |||
| 1 | "use strict"; | 1 | "use strict"; |
| 2 | |||
| 2 | /*jslint nomen: true, plusplus: true, vars: true*/ | 3 | /*jslint nomen: true, plusplus: true, vars: true*/ |
| 3 | /*global AvatarList, Entities, EntityViewer, Script, SoundCache, Audio, print, randFloat*/ | 4 | /*global AvatarList, Entities, EntityViewer, Script, SoundCache, Audio, print, randFloat*/ |
| 4 | // | 5 | // |
| @@ -41,7 +42,6 @@ var DEFAULT_SOUND_DATA = { · 36 unmodified lines | |||
| 41 | //var isACScript = this.EntityViewer !== undefined; | 42 | //var isACScript = this.EntityViewer !== undefined; |
| 42 | var isACScript = true; | 43 | var isACScript = true; |
| 43 | 44 | ||
| 44 | Script.include("http://hifi-content.s3.amazonaws.com/ryan/development/utils_ryan.js"); | ||
| 45 | if (isACScript) { | 45 | if (isACScript) { |
| 46 | Agent.isAvatar = true; // This puts a robot at 0,0,0, but is currently necessary in order to use AvatarList. | 46 | Agent.isAvatar = true; // This puts a robot at 0,0,0, but is currently necessary in order to use AvatarList. |
| 47 | Avatar.skeletonModelURL = "http://hifi-content.s3.amazonaws.com/ozan/dev/avatars/invisible_avatar/invisible_avatar.fst"; | 47 | Avatar.skeletonModelURL = "http://hifi-content.s3.amazonaws.com/ozan/dev/avatars/invisible_avatar/invisible_avatar.fst"; |
| @@ -51,6 +51,10 @@ function debug() { // Display the arguments not just [Object object]. · 3 unmodified lines | |||
| 51 | //print.apply(null, [].map.call(arguments, JSON.stringify)); | 51 | //print.apply(null, [].map.call(arguments, JSON.stringify)); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | function randFloat(low, high) { | ||
| 55 | return low + Math.random() * (high - low); | ||
| 56 | } | ||
| 57 | |||
| 54 | if (isACScript) { | 58 | if (isACScript) { |
| 55 | EntityViewer.setCenterRadius(QUERY_RADIUS); | 59 | EntityViewer.setCenterRadius(QUERY_RADIUS); |
| 56 | } | 60 | } |