GitHub PullRequestReviewCommentEvent at 2014-01-16 23:21:32
Repository: melonJS
Actor: insidiator
Payload: {"comment":{"url":"https://api.github.com/repos/melonjs/melonJS/pulls/comments/8952027","id":8952027,"diff_hunk":"@@ -65,33 +61,84 @@\n             /** @ignore */\n         _enabled: false,\n \n+        // Emitter will always update\n+\t\tisRenderable : false,\n \n         /**\n          * @ignore\n          */\n         init: function(x, y, image) {\n-            // Emitter will always update\n-            this.alwaysUpdate = true;\n-\n-            // Cache the emitter start pos\n-            this._defaultPos = new me.Vector2d(x, y);\n+            // call the parent constructor\n+\t\t\tthis.parent(\n+\t\t\t\t\tnew me.Vector2d(x, y),\n+\t\t\t\t\tInfinity, \n+\t\t\t\t\tInfinity \n+\t\t\t\t);\n \n             // Cache the emitter start image\n             this._defaultImage = image;\n \n+            // don't sort the particles by z-index\n+            this.autoSort = false;\n+\n+            this.container = new me.ParticleContainer(this);\n+\n             // Reset the emitter to defaults\n             this.reset();\n \n             /**\n-             * Z-order for particles <br>\n-             * default value : 0\n+             * Z-order for particles, value is forwarded to the particle container <br>\n              * @type Number\n              * @name z\n              * @memberOf me.ParticleEmitter\n              */\n-            this.z = 0;\n+            Object.defineProperty(this, \"z\", {","path":"src/particles/emitter.js","position":67,"original_position":67,"commit_id":"304745e9e67edac7f2e1fecf4f6500386b1b51bd","original_commit_id":"304745e9e67edac7f2e1fecf4f6500386b1b51bd","user":{"login":"insidiator","id":2485812,"avatar_url":"https://gravatar.com/avatar/0f2ed8b762cb8f5a34f150ebe3440017?d=https%3A%2F%2Fidenticons.github.com%2F9bf6a6ad70f2b5d78b6ecc867fbc8984.png&r=x","gravatar_id":"0f2ed8b762cb8f5a34f150ebe3440017","url":"https://api.github.com/users/insidiator","html_url":"https://github.com/insidiator","followers_url":"https://api.github.com/users/insidiator/followers","following_url":"https://api.github.com/users/insidiator/following{/other_user}","gists_url":"https://api.github.com/users/insidiator/gists{/gist_id}","starred_url":"https://api.github.com/users/insidiator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/insidiator/subscriptions","organizations_url":"https://api.github.com/users/insidiator/orgs","repos_url":"https://api.github.com/users/insidiator/repos","events_url":"https://api.github.com/users/insidiator/events{/privacy}","received_events_url":"https://api.github.com/users/insidiator/received_events","type":"User","site_admin":false},"body":"Maybe this should be removed and only accessible directly on the container?\r\nIt's also quite useless without calling sort on the world, as the container is already added to the world when this is called.","created_at":"2014-01-16T23:21:32Z","updated_at":"2014-01-16T23:21:32Z","html_url":"https://github.com/melonjs/melonJS/pull/372#discussion_r8952027","pull_request_url":"https://api.github.com/repos/melonjs/melonJS/pulls/372","_links":{"self":{"href":"https://api.github.com/repos/melonjs/melonJS/pulls/comments/8952027"},"html":{"href":"https://github.com/melonjs/melonJS/pull/372#discussion_r8952027"},"pull_request":{"href":"https://api.github.com/repos/melonjs/melonJS/pulls/372"}}}}