{"action":"created","comment":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/39087525","id":39087525,"diff_hunk":"@@ -5,48 +5,140 @@\n //  Copyright 2015 High Fidelity, Inc.\n //\n //  example of a nested entity. it doesn't do much now besides delete itself if it collides with something (bubbles are fragile!  it would be cool if it sometimes merged with other bubbbles it hit)\n-//  todo: play bubble sounds from the bubble itself instead of the wand. \n+//  todo: play bubble sounds & particle bursts from the bubble itself instead of the wand. \n //  blocker: needs some sound fixes and a way to find its own position before unload for spatialization\n //\n //  Distributed under the Apache License, Version 2.0.\n //  See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html\n \n-\n (function() {\n-    // Script.include(\"https://raw.githubusercontent.com/highfidelity/hifi/master/examples/utilities.js\");\n-    // Script.include(\"https://raw.githubusercontent.com/highfidelity/hifi/master/examples/libraries/utils.js\");\n+    Script.include(\"https://raw.githubusercontent.com/highfidelity/hifi/master/examples/utilities.js\");\n+    Script.include(\"https://raw.githubusercontent.com/highfidelity/hifi/master/examples/libraries/utils.js\");\n+\n+    var POP_SOUNDS = [\n+        SoundCache.getSound(\"http://hifi-public.s3.amazonaws.com/james/bubblewand/sounds/pop0.wav\"),\n+        SoundCache.getSound(\"http://hifi-public.s3.amazonaws.com/james/bubblewand/sounds/pop1.wav\"),\n+        SoundCache.getSound(\"http://hifi-public.s3.amazonaws.com/james/bubblewand/sounds/pop2.wav\"),\n+        SoundCache.getSound(\"http://hifi-public.s3.amazonaws.com/james/bubblewand/sounds/pop3.wav\")\n+    ]\n \n-    //var popSound;\n+    BUBBLE_PARTICLE_COLOR = {\n+        red: 0,\n+        green: 40,\n+        blue: 255,\n+    }\n+\n+    var properties;\n+    var checkPositionInterval;\n     this.preload = function(entityID) {\n         //  print('bubble preload')\n-        this.entityID = entityID;\n-      //  popSound = SoundCache.getSound(\"http://hifi-public.s3.amazonaws.com/james/bubblewand/sounds/pop.wav\");\n+        // var _t = this;\n+        // _t.entityID = entityID;\n+        // properties = Entities.getEntityProperties(entityID);\n+        // checkPositionInterval = Script.setInterval(function() {","path":"examples/toys/bubblewand/bubble.js","position":41,"original_position":41,"commit_id":"da90b7ff087d7daa87c1e59ce0a090ad8839f1fd","original_commit_id":"da90b7ff087d7daa87c1e59ce0a090ad8839f1fd","user":{"login":"ZappoMan","id":2093195,"avatar_url":"https://avatars.githubusercontent.com/u/2093195?v=3","gravatar_id":"","url":"https://api.github.com/users/ZappoMan","html_url":"https://github.com/ZappoMan","followers_url":"https://api.github.com/users/ZappoMan/followers","following_url":"https://api.github.com/users/ZappoMan/following{/other_user}","gists_url":"https://api.github.com/users/ZappoMan/gists{/gist_id}","starred_url":"https://api.github.com/users/ZappoMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZappoMan/subscriptions","organizations_url":"https://api.github.com/users/ZappoMan/orgs","repos_url":"https://api.github.com/users/ZappoMan/repos","events_url":"https://api.github.com/users/ZappoMan/events{/privacy}","received_events_url":"https://api.github.com/users/ZappoMan/received_events","type":"User","site_admin":false},"body":"although you have this code commented out, I can see what you're attempting to do here... since timers don't seem to be working properly (known bug) you could just use an update signal to do this same work... since that seems to be working pretty well.","created_at":"2015-09-09T19:49:44Z","updated_at":"2015-09-09T19:49:44Z","html_url":"https://github.com/highfidelity/hifi/pull/5751#discussion_r39087525","pull_request_url":"https://api.github.com/repos/highfidelity/hifi/pulls/5751","_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/39087525"},"html":{"href":"https://github.com/highfidelity/hifi/pull/5751#discussion_r39087525"},"pull_request":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5751"}}},"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/5751","id":44574251,"html_url":"https://github.com/highfidelity/hifi/pull/5751","diff_url":"https://github.com/highfidelity/hifi/pull/5751.diff","patch_url":"https://github.com/highfidelity/hifi/pull/5751.patch","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/5751","number":5751,"state":"open","locked":false,"title":"Update bubblewand to not use overlays by default","user":{"login":"imgntn","id":843228,"avatar_url":"https://avatars.githubusercontent.com/u/843228?v=3","gravatar_id":"","url":"https://api.github.com/users/imgntn","html_url":"https://github.com/imgntn","followers_url":"https://api.github.com/users/imgntn/followers","following_url":"https://api.github.com/users/imgntn/following{/other_user}","gists_url":"https://api.github.com/users/imgntn/gists{/gist_id}","starred_url":"https://api.github.com/users/imgntn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imgntn/subscriptions","organizations_url":"https://api.github.com/users/imgntn/orgs","repos_url":"https://api.github.com/users/imgntn/repos","events_url":"https://api.github.com/users/imgntn/events{/privacy}","received_events_url":"https://api.github.com/users/imgntn/received_events","type":"User","site_admin":false},"body":"Updates: \r\n- Fixes an issue where overlays were on & conflicting with other toys with overlays.  This one doesn't really need the overlays -- when it's near your avatar's head, you can make bubbles by blowing into the microphone. \r\n- Custom collision hull for wand, so that the tip doesn't impact bubbles.\r\n- Moves particles, sound into bubble.js\r\n- Still needs physics, sound, particles to work.","created_at":"2015-09-09T16:52:19Z","updated_at":"2015-09-09T19:49:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8fe0834f34d91d36d8c343bde1904a48e1be001","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/highfidelity/hifi/pulls/5751/commits","review_comments_url":"https://api.github.com/repos/highfidelity/hifi/pulls/5751/comments","review_comment_url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/5751/comments","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/da90b7ff087d7daa87c1e59ce0a090ad8839f1fd","head":{"label":"imgntn:bubblewand_hotfix_2","ref":"bubblewand_hotfix_2","sha":"da90b7ff087d7daa87c1e59ce0a090ad8839f1fd","user":{"login":"imgntn","id":843228,"avatar_url":"https://avatars.githubusercontent.com/u/843228?v=3","gravatar_id":"","url":"https://api.github.com/users/imgntn","html_url":"https://github.com/imgntn","followers_url":"https://api.github.com/users/imgntn/followers","following_url":"https://api.github.com/users/imgntn/following{/other_user}","gists_url":"https://api.github.com/users/imgntn/gists{/gist_id}","starred_url":"https://api.github.com/users/imgntn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imgntn/subscriptions","organizations_url":"https://api.github.com/users/imgntn/orgs","repos_url":"https://api.github.com/users/imgntn/repos","events_url":"https://api.github.com/users/imgntn/events{/privacy}","received_events_url":"https://api.github.com/users/imgntn/received_events","type":"User","site_admin":false},"repo":{"id":41923670,"name":"hifi","full_name":"imgntn/hifi","owner":{"login":"imgntn","id":843228,"avatar_url":"https://avatars.githubusercontent.com/u/843228?v=3","gravatar_id":"","url":"https://api.github.com/users/imgntn","html_url":"https://github.com/imgntn","followers_url":"https://api.github.com/users/imgntn/followers","following_url":"https://api.github.com/users/imgntn/following{/other_user}","gists_url":"https://api.github.com/users/imgntn/gists{/gist_id}","starred_url":"https://api.github.com/users/imgntn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imgntn/subscriptions","organizations_url":"https://api.github.com/users/imgntn/orgs","repos_url":"https://api.github.com/users/imgntn/repos","events_url":"https://api.github.com/users/imgntn/events{/privacy}","received_events_url":"https://api.github.com/users/imgntn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/imgntn/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":true,"url":"https://api.github.com/repos/imgntn/hifi","forks_url":"https://api.github.com/repos/imgntn/hifi/forks","keys_url":"https://api.github.com/repos/imgntn/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/imgntn/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/imgntn/hifi/teams","hooks_url":"https://api.github.com/repos/imgntn/hifi/hooks","issue_events_url":"https://api.github.com/repos/imgntn/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/imgntn/hifi/events","assignees_url":"https://api.github.com/repos/imgntn/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/imgntn/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/imgntn/hifi/tags","blobs_url":"https://api.github.com/repos/imgntn/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/imgntn/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/imgntn/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/imgntn/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/imgntn/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/imgntn/hifi/languages","stargazers_url":"https://api.github.com/repos/imgntn/hifi/stargazers","contributors_url":"https://api.github.com/repos/imgntn/hifi/contributors","subscribers_url":"https://api.github.com/repos/imgntn/hifi/subscribers","subscription_url":"https://api.github.com/repos/imgntn/hifi/subscription","commits_url":"https://api.github.com/repos/imgntn/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/imgntn/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/imgntn/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/imgntn/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/imgntn/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/imgntn/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/imgntn/hifi/merges","archive_url":"https://api.github.com/repos/imgntn/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/imgntn/hifi/downloads","issues_url":"https://api.github.com/repos/imgntn/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/imgntn/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/imgntn/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/imgntn/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/imgntn/hifi/labels{/name}","releases_url":"https://api.github.com/repos/imgntn/hifi/releases{/id}","created_at":"2015-09-04T15:35:51Z","updated_at":"2015-09-04T15:35:56Z","pushed_at":"2015-09-09T16:54:01Z","git_url":"git://github.com/imgntn/hifi.git","ssh_url":"git@github.com:imgntn/hifi.git","clone_url":"https://github.com/imgntn/hifi.git","svn_url":"https://github.com/imgntn/hifi","homepage":"","size":174416,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"highfidelity:master","ref":"master","sha":"74c92af8e00fe93dd9c66f3610d7b164010f0092","user":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"repo":{"id":5372872,"name":"hifi","full_name":"highfidelity/hifi","owner":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/highfidelity/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":false,"url":"https://api.github.com/repos/highfidelity/hifi","forks_url":"https://api.github.com/repos/highfidelity/hifi/forks","keys_url":"https://api.github.com/repos/highfidelity/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/highfidelity/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/highfidelity/hifi/teams","hooks_url":"https://api.github.com/repos/highfidelity/hifi/hooks","issue_events_url":"https://api.github.com/repos/highfidelity/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/highfidelity/hifi/events","assignees_url":"https://api.github.com/repos/highfidelity/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/highfidelity/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/highfidelity/hifi/tags","blobs_url":"https://api.github.com/repos/highfidelity/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/highfidelity/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/highfidelity/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/highfidelity/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/highfidelity/hifi/languages","stargazers_url":"https://api.github.com/repos/highfidelity/hifi/stargazers","contributors_url":"https://api.github.com/repos/highfidelity/hifi/contributors","subscribers_url":"https://api.github.com/repos/highfidelity/hifi/subscribers","subscription_url":"https://api.github.com/repos/highfidelity/hifi/subscription","commits_url":"https://api.github.com/repos/highfidelity/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/highfidelity/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/highfidelity/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/highfidelity/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/highfidelity/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/highfidelity/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/highfidelity/hifi/merges","archive_url":"https://api.github.com/repos/highfidelity/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/highfidelity/hifi/downloads","issues_url":"https://api.github.com/repos/highfidelity/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/highfidelity/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/highfidelity/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/highfidelity/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/highfidelity/hifi/labels{/name}","releases_url":"https://api.github.com/repos/highfidelity/hifi/releases{/id}","created_at":"2012-08-10T18:26:22Z","updated_at":"2015-09-05T22:24:14Z","pushed_at":"2015-09-09T19:42:10Z","git_url":"git://github.com/highfidelity/hifi.git","ssh_url":"git@github.com:highfidelity/hifi.git","clone_url":"https://github.com/highfidelity/hifi.git","svn_url":"https://github.com/highfidelity/hifi","homepage":"","size":232713,"stargazers_count":303,"watchers_count":303,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":176,"mirror_url":null,"open_issues_count":57,"forks":176,"open_issues":57,"watchers":303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5751"},"html":{"href":"https://github.com/highfidelity/hifi/pull/5751"},"issue":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/5751"},"comments":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/5751/comments"},"review_comments":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5751/comments"},"review_comment":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5751/commits"},"statuses":{"href":"https://api.github.com/repos/highfidelity/hifi/statuses/da90b7ff087d7daa87c1e59ce0a090ad8839f1fd"}}}}