{"action":"created","issue":{"url":"https://api.github.com/repos/photonstorm/phaser/issues/4071","repository_url":"https://api.github.com/repos/photonstorm/phaser","labels_url":"https://api.github.com/repos/photonstorm/phaser/issues/4071/labels{/name}","comments_url":"https://api.github.com/repos/photonstorm/phaser/issues/4071/comments","events_url":"https://api.github.com/repos/photonstorm/phaser/issues/4071/events","html_url":"https://github.com/photonstorm/phaser/issues/4071","id":364187157,"node_id":"MDU6SXNzdWUzNjQxODcxNTc=","number":4071,"title":"Masking stops working when adding to child of container.","user":{"login":"Restrictment","id":933890,"node_id":"MDQ6VXNlcjkzMzg5MA==","avatar_url":"https://avatars0.githubusercontent.com/u/933890?v=4","gravatar_id":"","url":"https://api.github.com/users/Restrictment","html_url":"https://github.com/Restrictment","followers_url":"https://api.github.com/users/Restrictment/followers","following_url":"https://api.github.com/users/Restrictment/following{/other_user}","gists_url":"https://api.github.com/users/Restrictment/gists{/gist_id}","starred_url":"https://api.github.com/users/Restrictment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Restrictment/subscriptions","organizations_url":"https://api.github.com/users/Restrictment/orgs","repos_url":"https://api.github.com/users/Restrictment/repos","events_url":"https://api.github.com/users/Restrictment/events{/privacy}","received_events_url":"https://api.github.com/users/Restrictment/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-26T20:01:51Z","updated_at":"2018-09-26T20:15:02Z","closed_at":"2018-09-26T20:14:40Z","author_association":"NONE","body":"<!--\r\nThank you for taking the time to contribute towards Phaser. Before submitting your issue, check the following:\r\n\r\n1. This repo is for Phaser 3 only. Phaser 2.x issues should be raised in the [Phaser CE](https://github.com/photonstorm/phaser-ce) repo.\r\n\r\n2. This repo should not be used for technical support. If you're struggling to use Phaser then post your question to the [forum](http://www.html5gamedevs.com/forum/33-phaser-3/), [Slack](https://phaser.io/community/slack) or [Discord](https://phaser.io/community/discord) channels. GitHub Issues are for bugs and feature requests only.\r\n\r\n3. Make sure your issue isn't a duplicate, or has already been fixed.\r\n\r\n4. If your issue contains _any_ form of hostility it will be closed and you will be blocked from access to all our repos. Be nice. We do this for free.\r\n\r\n5. If all the above is ok, fill out the template below.\r\n-->\r\n\r\n\r\n## Version\r\n\r\n* Phaser Version: 3.12\r\n\r\n## Operating System\r\n* Operating system: Windows 10 x64\r\n\r\n## Browser\r\n* Browser: Chrome\r\n\r\n\r\n## Description\r\n\r\nWhen adding either a bitmap mask or a geometry mask, the masking stops when applied to an element of a container.\r\n\r\n\r\n## Example Test Code\r\n\r\n```\r\nlet rec = this.add.graphics({ fillStyle: { color: color }});\r\nrec.displayOriginX = width * .5;\r\nrec.displayOriginY = height * .5;\r\nrec.fillRectShape(new Phaser.Geom.Rectangle(x, y, width, height));\r\n\r\n let mask = new Phaser.Display.Masks.BitmapMask(this, rec);\r\nmaskedChild.setMask(mask);\r\n\r\nlet container = new Phaser.GameObjects.Container(this);\r\nthis.add(container);\r\ncontainer.add(maskedChild); \r\n```\r\n\r\n\r\n<bountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/63923429-masking-stops-working-when-adding-to-child-of-container?utm_campaign=plugin&utm_content=tracker%2F283654&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F283654&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/photonstorm/phaser/issues/comments/424854461","html_url":"https://github.com/photonstorm/phaser/issues/4071#issuecomment-424854461","issue_url":"https://api.github.com/repos/photonstorm/phaser/issues/4071","id":424854461,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDg1NDQ2MQ==","user":{"login":"Restrictment","id":933890,"node_id":"MDQ6VXNlcjkzMzg5MA==","avatar_url":"https://avatars0.githubusercontent.com/u/933890?v=4","gravatar_id":"","url":"https://api.github.com/users/Restrictment","html_url":"https://github.com/Restrictment","followers_url":"https://api.github.com/users/Restrictment/followers","following_url":"https://api.github.com/users/Restrictment/following{/other_user}","gists_url":"https://api.github.com/users/Restrictment/gists{/gist_id}","starred_url":"https://api.github.com/users/Restrictment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Restrictment/subscriptions","organizations_url":"https://api.github.com/users/Restrictment/orgs","repos_url":"https://api.github.com/users/Restrictment/repos","events_url":"https://api.github.com/users/Restrictment/events{/privacy}","received_events_url":"https://api.github.com/users/Restrictment/received_events","type":"User","site_admin":false},"created_at":"2018-09-26T20:15:02Z","updated_at":"2018-09-26T20:15:02Z","author_association":"NONE","body":"Turns out this just does not work with the Phaser.image class."}}
{"actor":{"display_login":"Restrictment"}}