{"action":"created","comment":{"url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/comments/52202062","id":52202062,"diff_hunk":"@@ -0,0 +1,134 @@\n+package flixel.addons.effects;\n+\n+import flixel.FlxCamera;\n+import flixel.FlxSprite;\n+import flixel.graphics.FlxGraphic;\n+import flixel.graphics.frames.FlxFrame;\n+import flixel.math.FlxPoint;\n+import flixel.math.FlxRect;\n+import flixel.system.FlxAssets.FlxGraphicAsset;\n+import flixel.util.FlxColor;\n+import flixel.util.FlxDestroyUtil;\n+import openfl.display.BitmapData;\n+import openfl.display.Graphics;\n+import openfl.geom.Point;\n+\n+/**\n+ * Use this class to chain bitmap effects to your target FlxSprite frame.\n+ * @author adrianulima\n+ */\n+class FlxEffectSprite extends FlxSprite\n+{\n+\t/**\n+\t * Enables and disables the effects update loop.","path":"flixel/addons/effects/FlxEffectSprite.hx","position":23,"original_position":23,"commit_id":"94319257d0d0cbb28191b96e492de7d2d9b889e6","original_commit_id":"94319257d0d0cbb28191b96e492de7d2d9b889e6","user":{"login":"Gama11","id":2620907,"avatar_url":"https://avatars.githubusercontent.com/u/2620907?v=3","gravatar_id":"","url":"https://api.github.com/users/Gama11","html_url":"https://github.com/Gama11","followers_url":"https://api.github.com/users/Gama11/followers","following_url":"https://api.github.com/users/Gama11/following{/other_user}","gists_url":"https://api.github.com/users/Gama11/gists{/gist_id}","starred_url":"https://api.github.com/users/Gama11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gama11/subscriptions","organizations_url":"https://api.github.com/users/Gama11/orgs","repos_url":"https://api.github.com/users/Gama11/repos","events_url":"https://api.github.com/users/Gama11/events{/privacy}","received_events_url":"https://api.github.com/users/Gama11/received_events","type":"User","site_admin":false},"body":"Besides, is it really necessary to have this flag? There are already active and visible to control whether update and raw are run respectively.","created_at":"2016-02-08T18:00:03Z","updated_at":"2016-02-08T18:00:03Z","html_url":"https://github.com/HaxeFlixel/flixel-addons/pull/205#discussion_r52202062","pull_request_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/205","_links":{"self":{"href":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/comments/52202062"},"html":{"href":"https://github.com/HaxeFlixel/flixel-addons/pull/205#discussion_r52202062"},"pull_request":{"href":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/205"}}},"pull_request":{"url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/205","id":48759138,"html_url":"https://github.com/HaxeFlixel/flixel-addons/pull/205","diff_url":"https://github.com/HaxeFlixel/flixel-addons/pull/205.diff","patch_url":"https://github.com/HaxeFlixel/flixel-addons/pull/205.patch","issue_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/issues/205","number":205,"state":"open","locked":false,"title":"FlxEffectSprite effects refactor","user":{"login":"adrianulima","id":13324869,"avatar_url":"https://avatars.githubusercontent.com/u/13324869?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianulima","html_url":"https://github.com/adrianulima","followers_url":"https://api.github.com/users/adrianulima/followers","following_url":"https://api.github.com/users/adrianulima/following{/other_user}","gists_url":"https://api.github.com/users/adrianulima/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianulima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianulima/subscriptions","organizations_url":"https://api.github.com/users/adrianulima/orgs","repos_url":"https://api.github.com/users/adrianulima/repos","events_url":"https://api.github.com/users/adrianulima/events{/privacy}","received_events_url":"https://api.github.com/users/adrianulima/received_events","type":"User","site_admin":false},"body":"Refact how effects are applied to sprites, now it can easily chain effects and avoid a lot of `FlxSprite` instances.\r\n```haxe\r\nvar target:FlxSprite = new FlxSprite();\r\ntarget.makeGraphic(250, 250);\r\n\r\nvar obj:FlxEffectSprite = new FlxEffectSprite(target);\r\nadd(obj);\r\n\r\nvar eff1:FlxRainbowEffect = new FlxRainbowEffect(0.5);\t\t\r\nvar eff2:FlxWaveEffect = new FlxWaveEffect(FlxWaveMode.ALL, 40, -1, 5, 20);\r\nvar eff3:FlxGlitchEffect = new FlxGlitchEffect(10, 2, 0.1);\r\n\r\nobj.effects.push(eff1);\t\t\r\nobj.effects.push(eff2);\r\nobj.effects.push(eff3);\r\n```\r\n![capeffectalpha](https://cloud.githubusercontent.com/assets/13324869/10759532/e24993d4-7c9e-11e5-98cb-a59dee31f2c6.gif)\r\n\r\n```haxe\r\nFlxRainbowEffect, FlxOutlineEffect, FlxWaveEffect, FlxGlitchEffect, FlxShakeEffect, FlxTrailEffect\r\n```\r\n![capeffects_160](https://cloud.githubusercontent.com/assets/13324869/10818251/30cb1c92-7e27-11e5-908f-d37185b96fba.gif)","created_at":"2015-10-26T16:03:02Z","updated_at":"2016-02-08T18:00:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1344f5702814355c714e1f3386e46aad7aadeab1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/205/commits","review_comments_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/205/comments","review_comment_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/issues/205/comments","statuses_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/statuses/94319257d0d0cbb28191b96e492de7d2d9b889e6","head":{"label":"adrianulima:FlxEffectSprite_effects_refactor","ref":"FlxEffectSprite_effects_refactor","sha":"94319257d0d0cbb28191b96e492de7d2d9b889e6","user":{"login":"adrianulima","id":13324869,"avatar_url":"https://avatars.githubusercontent.com/u/13324869?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianulima","html_url":"https://github.com/adrianulima","followers_url":"https://api.github.com/users/adrianulima/followers","following_url":"https://api.github.com/users/adrianulima/following{/other_user}","gists_url":"https://api.github.com/users/adrianulima/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianulima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianulima/subscriptions","organizations_url":"https://api.github.com/users/adrianulima/orgs","repos_url":"https://api.github.com/users/adrianulima/repos","events_url":"https://api.github.com/users/adrianulima/events{/privacy}","received_events_url":"https://api.github.com/users/adrianulima/received_events","type":"User","site_admin":false},"repo":{"id":42744539,"name":"flixel-addons","full_name":"adrianulima/flixel-addons","owner":{"login":"adrianulima","id":13324869,"avatar_url":"https://avatars.githubusercontent.com/u/13324869?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianulima","html_url":"https://github.com/adrianulima","followers_url":"https://api.github.com/users/adrianulima/followers","following_url":"https://api.github.com/users/adrianulima/following{/other_user}","gists_url":"https://api.github.com/users/adrianulima/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianulima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianulima/subscriptions","organizations_url":"https://api.github.com/users/adrianulima/orgs","repos_url":"https://api.github.com/users/adrianulima/repos","events_url":"https://api.github.com/users/adrianulima/events{/privacy}","received_events_url":"https://api.github.com/users/adrianulima/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adrianulima/flixel-addons","description":"Additional classes for HaxeFlixel","fork":true,"url":"https://api.github.com/repos/adrianulima/flixel-addons","forks_url":"https://api.github.com/repos/adrianulima/flixel-addons/forks","keys_url":"https://api.github.com/repos/adrianulima/flixel-addons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adrianulima/flixel-addons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adrianulima/flixel-addons/teams","hooks_url":"https://api.github.com/repos/adrianulima/flixel-addons/hooks","issue_events_url":"https://api.github.com/repos/adrianulima/flixel-addons/issues/events{/number}","events_url":"https://api.github.com/repos/adrianulima/flixel-addons/events","assignees_url":"https://api.github.com/repos/adrianulima/flixel-addons/assignees{/user}","branches_url":"https://api.github.com/repos/adrianulima/flixel-addons/branches{/branch}","tags_url":"https://api.github.com/repos/adrianulima/flixel-addons/tags","blobs_url":"https://api.github.com/repos/adrianulima/flixel-addons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adrianulima/flixel-addons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adrianulima/flixel-addons/git/refs{/sha}","trees_url":"https://api.github.com/repos/adrianulima/flixel-addons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adrianulima/flixel-addons/statuses/{sha}","languages_url":"https://api.github.com/repos/adrianulima/flixel-addons/languages","stargazers_url":"https://api.github.com/repos/adrianulima/flixel-addons/stargazers","contributors_url":"https://api.github.com/repos/adrianulima/flixel-addons/contributors","subscribers_url":"https://api.github.com/repos/adrianulima/flixel-addons/subscribers","subscription_url":"https://api.github.com/repos/adrianulima/flixel-addons/subscription","commits_url":"https://api.github.com/repos/adrianulima/flixel-addons/commits{/sha}","git_commits_url":"https://api.github.com/repos/adrianulima/flixel-addons/git/commits{/sha}","comments_url":"https://api.github.com/repos/adrianulima/flixel-addons/comments{/number}","issue_comment_url":"https://api.github.com/repos/adrianulima/flixel-addons/issues/comments{/number}","contents_url":"https://api.github.com/repos/adrianulima/flixel-addons/contents/{+path}","compare_url":"https://api.github.com/repos/adrianulima/flixel-addons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adrianulima/flixel-addons/merges","archive_url":"https://api.github.com/repos/adrianulima/flixel-addons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adrianulima/flixel-addons/downloads","issues_url":"https://api.github.com/repos/adrianulima/flixel-addons/issues{/number}","pulls_url":"https://api.github.com/repos/adrianulima/flixel-addons/pulls{/number}","milestones_url":"https://api.github.com/repos/adrianulima/flixel-addons/milestones{/number}","notifications_url":"https://api.github.com/repos/adrianulima/flixel-addons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adrianulima/flixel-addons/labels{/name}","releases_url":"https://api.github.com/repos/adrianulima/flixel-addons/releases{/id}","deployments_url":"https://api.github.com/repos/adrianulima/flixel-addons/deployments","created_at":"2015-09-18T20:02:56Z","updated_at":"2015-09-18T20:02:57Z","pushed_at":"2016-02-08T17:11:23Z","git_url":"git://github.com/adrianulima/flixel-addons.git","ssh_url":"git@github.com:adrianulima/flixel-addons.git","clone_url":"https://github.com/adrianulima/flixel-addons.git","svn_url":"https://github.com/adrianulima/flixel-addons","homepage":"","size":1202,"stargazers_count":0,"watchers_count":0,"language":"Haxe","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"HaxeFlixel:dev","ref":"dev","sha":"cfa19169cdfdc7f3178589012eabc843d24688af","user":{"login":"HaxeFlixel","id":4309553,"avatar_url":"https://avatars.githubusercontent.com/u/4309553?v=3","gravatar_id":"","url":"https://api.github.com/users/HaxeFlixel","html_url":"https://github.com/HaxeFlixel","followers_url":"https://api.github.com/users/HaxeFlixel/followers","following_url":"https://api.github.com/users/HaxeFlixel/following{/other_user}","gists_url":"https://api.github.com/users/HaxeFlixel/gists{/gist_id}","starred_url":"https://api.github.com/users/HaxeFlixel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaxeFlixel/subscriptions","organizations_url":"https://api.github.com/users/HaxeFlixel/orgs","repos_url":"https://api.github.com/users/HaxeFlixel/repos","events_url":"https://api.github.com/users/HaxeFlixel/events{/privacy}","received_events_url":"https://api.github.com/users/HaxeFlixel/received_events","type":"Organization","site_admin":false},"repo":{"id":11217564,"name":"flixel-addons","full_name":"HaxeFlixel/flixel-addons","owner":{"login":"HaxeFlixel","id":4309553,"avatar_url":"https://avatars.githubusercontent.com/u/4309553?v=3","gravatar_id":"","url":"https://api.github.com/users/HaxeFlixel","html_url":"https://github.com/HaxeFlixel","followers_url":"https://api.github.com/users/HaxeFlixel/followers","following_url":"https://api.github.com/users/HaxeFlixel/following{/other_user}","gists_url":"https://api.github.com/users/HaxeFlixel/gists{/gist_id}","starred_url":"https://api.github.com/users/HaxeFlixel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaxeFlixel/subscriptions","organizations_url":"https://api.github.com/users/HaxeFlixel/orgs","repos_url":"https://api.github.com/users/HaxeFlixel/repos","events_url":"https://api.github.com/users/HaxeFlixel/events{/privacy}","received_events_url":"https://api.github.com/users/HaxeFlixel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HaxeFlixel/flixel-addons","description":"Additional classes for HaxeFlixel","fork":false,"url":"https://api.github.com/repos/HaxeFlixel/flixel-addons","forks_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/forks","keys_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/teams","hooks_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/hooks","issue_events_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/issues/events{/number}","events_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/events","assignees_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/assignees{/user}","branches_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/branches{/branch}","tags_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/tags","blobs_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/git/refs{/sha}","trees_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/statuses/{sha}","languages_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/languages","stargazers_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/stargazers","contributors_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/contributors","subscribers_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/subscribers","subscription_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/subscription","commits_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/commits{/sha}","git_commits_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/git/commits{/sha}","comments_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/comments{/number}","issue_comment_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/issues/comments{/number}","contents_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/contents/{+path}","compare_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/merges","archive_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/downloads","issues_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/issues{/number}","pulls_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls{/number}","milestones_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/milestones{/number}","notifications_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/labels{/name}","releases_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/releases{/id}","deployments_url":"https://api.github.com/repos/HaxeFlixel/flixel-addons/deployments","created_at":"2013-07-06T11:55:47Z","updated_at":"2016-02-01T21:45:32Z","pushed_at":"2016-02-08T17:11:24Z","git_url":"git://github.com/HaxeFlixel/flixel-addons.git","ssh_url":"git@github.com:HaxeFlixel/flixel-addons.git","clone_url":"https://github.com/HaxeFlixel/flixel-addons.git","svn_url":"https://github.com/HaxeFlixel/flixel-addons","homepage":"","size":1251,"stargazers_count":66,"watchers_count":66,"language":"Haxe","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":34,"forks":68,"open_issues":34,"watchers":66,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/205"},"html":{"href":"https://github.com/HaxeFlixel/flixel-addons/pull/205"},"issue":{"href":"https://api.github.com/repos/HaxeFlixel/flixel-addons/issues/205"},"comments":{"href":"https://api.github.com/repos/HaxeFlixel/flixel-addons/issues/205/comments"},"review_comments":{"href":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/205/comments"},"review_comment":{"href":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HaxeFlixel/flixel-addons/pulls/205/commits"},"statuses":{"href":"https://api.github.com/repos/HaxeFlixel/flixel-addons/statuses/94319257d0d0cbb28191b96e492de7d2d9b889e6"}}}}