{"action":"opened","issue":{"url":"https://api.github.com/repos/miiGit/miinieble-server/issues/3","repository_url":"https://api.github.com/repos/miiGit/miinieble-server","labels_url":"https://api.github.com/repos/miiGit/miinieble-server/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/miiGit/miinieble-server/issues/3/comments","events_url":"https://api.github.com/repos/miiGit/miinieble-server/issues/3/events","html_url":"https://github.com/miiGit/miinieble-server/issues/3","id":177870173,"number":3,"title":"Alpha Mask Filter","user":{"login":"miiGit","id":20678789,"avatar_url":"https://avatars.githubusercontent.com/u/20678789?v=3","gravatar_id":"","url":"https://api.github.com/users/miiGit","html_url":"https://github.com/miiGit","followers_url":"https://api.github.com/users/miiGit/followers","following_url":"https://api.github.com/users/miiGit/following{/other_user}","gists_url":"https://api.github.com/users/miiGit/gists{/gist_id}","starred_url":"https://api.github.com/users/miiGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miiGit/subscriptions","organizations_url":"https://api.github.com/users/miiGit/orgs","repos_url":"https://api.github.com/users/miiGit/repos","events_url":"https://api.github.com/users/miiGit/events{/privacy}","received_events_url":"https://api.github.com/users/miiGit/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/miiGit/miinieble-server/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"miiGit","id":20678789,"avatar_url":"https://avatars.githubusercontent.com/u/20678789?v=3","gravatar_id":"","url":"https://api.github.com/users/miiGit","html_url":"https://github.com/miiGit","followers_url":"https://api.github.com/users/miiGit/followers","following_url":"https://api.github.com/users/miiGit/following{/other_user}","gists_url":"https://api.github.com/users/miiGit/gists{/gist_id}","starred_url":"https://api.github.com/users/miiGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miiGit/subscriptions","organizations_url":"https://api.github.com/users/miiGit/orgs","repos_url":"https://api.github.com/users/miiGit/repos","events_url":"https://api.github.com/users/miiGit/events{/privacy}","received_events_url":"https://api.github.com/users/miiGit/received_events","type":"User","site_admin":false},"assignees":[{"login":"miiGit","id":20678789,"avatar_url":"https://avatars.githubusercontent.com/u/20678789?v=3","gravatar_id":"","url":"https://api.github.com/users/miiGit","html_url":"https://github.com/miiGit","followers_url":"https://api.github.com/users/miiGit/followers","following_url":"https://api.github.com/users/miiGit/following{/other_user}","gists_url":"https://api.github.com/users/miiGit/gists{/gist_id}","starred_url":"https://api.github.com/users/miiGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miiGit/subscriptions","organizations_url":"https://api.github.com/users/miiGit/orgs","repos_url":"https://api.github.com/users/miiGit/repos","events_url":"https://api.github.com/users/miiGit/events{/privacy}","received_events_url":"https://api.github.com/users/miiGit/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/miiGit/miinieble-server/milestones/1","html_url":"https://github.com/miiGit/miinieble-server/milestones/Developing","labels_url":"https://api.github.com/repos/miiGit/miinieble-server/milestones/1/labels","id":2014761,"number":1,"title":"Developing","description":null,"creator":{"login":"miiGit","id":20678789,"avatar_url":"https://avatars.githubusercontent.com/u/20678789?v=3","gravatar_id":"","url":"https://api.github.com/users/miiGit","html_url":"https://github.com/miiGit","followers_url":"https://api.github.com/users/miiGit/followers","following_url":"https://api.github.com/users/miiGit/following{/other_user}","gists_url":"https://api.github.com/users/miiGit/gists{/gist_id}","starred_url":"https://api.github.com/users/miiGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miiGit/subscriptions","organizations_url":"https://api.github.com/users/miiGit/orgs","repos_url":"https://api.github.com/users/miiGit/repos","events_url":"https://api.github.com/users/miiGit/events{/privacy}","received_events_url":"https://api.github.com/users/miiGit/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-09-19T19:08:42Z","updated_at":"2016-09-19T19:09:53Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-09-19T19:09:53Z","updated_at":"2016-09-19T19:09:53Z","closed_at":null,"body":"var stage;\r\nvar isDrawing;\r\nvar drawingCanvas;\r\nvar oldPt;\r\nvar oldMidPt;\r\nvar displayCanvas;\r\nvar image;\r\nvar bitmap;\r\nvar maskFilter;\r\nvar cursor;\r\nvar text;\r\nvar blur;\r\n\r\nfunction init() {\r\n\texamples.showDistractor();\r\n\r\n\timage = new Image();\r\n\timage.onload = handleComplete;\r\n\timage.src = \"../_assets/art/flowers.jpg\";\r\n\r\n\tstage = new createjs.Stage(\"testCanvas\");\r\n\ttext = new createjs.Text(\"Loading...\", \"20px Arial\", \"#FFF\");\r\n\ttext.set({x: stage.canvas.width / 2, y: stage.canvas.height - 40});\r\n\ttext.textAlign = \"center\";\r\n}\r\n\r\nfunction handleComplete() {\r\n\texamples.hideDistractor();\r\n\tcreatejs.Touch.enable(stage);\r\n\tstage.enableMouseOver();\r\n\r\n\tstage.addEventListener(\"stagemousedown\", handleMouseDown);\r\n\tstage.addEventListener(\"stagemouseup\", handleMouseUp);\r\n\tstage.addEventListener(\"stagemousemove\", handleMouseMove);\r\n\tdrawingCanvas = new createjs.Shape();\r\n\tbitmap = new createjs.Bitmap(image);\r\n\r\n\tblur = new createjs.Bitmap(image);\r\n\tblur.filters = [new createjs.BlurFilter(24, 24, 2), new createjs.ColorMatrixFilter(new createjs.ColorMatrix(60))];\r\n\tblur.cache(0, 0, 960, 400);\r\n\r\n\ttext.text = \"Click and Drag to Reveal the Image.\";\r\n\r\n\tstage.addChild(blur, text, bitmap);\r\n\tupdateCacheImage(false);\r\n\r\n\tcursor = new createjs.Shape(new createjs.Graphics().beginFill(\"#FFFFFF\").drawCircle(0, 0, 25));\r\n\tcursor.cursor = \"pointer\";\r\n\r\n\tstage.addChild(cursor);\r\n}\r\n\r\nfunction handleMouseDown(event) {\r\n\toldPt = new createjs.Point(stage.mouseX, stage.mouseY);\r\n\toldMidPt = oldPt;\r\n\tisDrawing = true;\r\n}\r\n\r\nfunction handleMouseMove(event) {\r\n\tcursor.x = stage.mouseX;\r\n\tcursor.y = stage.mouseY;\r\n\r\n\tif (!isDrawing) {\r\n\t\tstage.update();\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar midPoint = new createjs.Point(oldPt.x + stage.mouseX >> 1, oldPt.y + stage.mouseY >> 1);\r\n\r\n\tdrawingCanvas.graphics.setStrokeStyle(40, \"round\", \"round\")\r\n\t\t\t.beginStroke(\"rgba(0,0,0,0.2)\")\r\n\t\t\t.moveTo(midPoint.x, midPoint.y)\r\n\t\t\t.curveTo(oldPt.x, oldPt.y, oldMidPt.x, oldMidPt.y);\r\n\r\n\toldPt.x = stage.mouseX;\r\n\toldPt.y = stage.mouseY;\r\n\r\n\toldMidPt.x = midPoint.x;\r\n\toldMidPt.y = midPoint.y;\r\n\r\n\tupdateCacheImage(true);\r\n}\r\n\r\nfunction handleMouseUp(event) {\r\n\tupdateCacheImage(true);\r\n\tisDrawing = false;\r\n}\r\n\r\nfunction updateCacheImage(update) {\r\n\tif (update) {\r\n\t\tdrawingCanvas.updateCache();\r\n\t} else {\r\n\t\tdrawingCanvas.cache(0, 0, image.width, image.height);\r\n\t}\r\n\r\n\tmaskFilter = new createjs.AlphaMaskFilter(drawingCanvas.cacheCanvas);\r\n\r\n\tbitmap.filters = [maskFilter];\r\n\tif (update) {\r\n\t\tbitmap.updateCache(0, 0, image.width, image.height);\r\n\t} else {\r\n\t\tbitmap.cache(0, 0, image.width, image.height);\r\n\t}\r\n\r\n\tstage.update();\r\n}"}}
{"actor":{"display_login":"miiGit"}}