{"action":"closed","issue":{"url":"https://api.github.com/repos/melonjs/melonJS/issues/839","repository_url":"https://api.github.com/repos/melonjs/melonJS","labels_url":"https://api.github.com/repos/melonjs/melonJS/issues/839/labels{/name}","comments_url":"https://api.github.com/repos/melonjs/melonJS/issues/839/comments","events_url":"https://api.github.com/repos/melonjs/melonJS/issues/839/events","html_url":"https://github.com/melonjs/melonJS/issues/839","id":190772510,"number":839,"title":"WebGL / Canvas return true ambiguity ","user":{"login":"Dillybob92","id":10387670,"avatar_url":"https://avatars.githubusercontent.com/u/10387670?v=3","gravatar_id":"","url":"https://api.github.com/users/Dillybob92","html_url":"https://github.com/Dillybob92","followers_url":"https://api.github.com/users/Dillybob92/followers","following_url":"https://api.github.com/users/Dillybob92/following{/other_user}","gists_url":"https://api.github.com/users/Dillybob92/gists{/gist_id}","starred_url":"https://api.github.com/users/Dillybob92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dillybob92/subscriptions","organizations_url":"https://api.github.com/users/Dillybob92/orgs","repos_url":"https://api.github.com/users/Dillybob92/repos","events_url":"https://api.github.com/users/Dillybob92/events{/privacy}","received_events_url":"https://api.github.com/users/Dillybob92/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-21T16:45:17Z","updated_at":"2016-11-21T17:30:24Z","closed_at":"2016-11-21T17:30:24Z","body":"Return statement in question:\r\n\r\n`return this._super(me.Entity, 'update', [dt])`\r\n\r\nIf you use that for the WebGL Renderer, it makes the game extremely laggy when the **viewport is moving**.\r\n\r\nIf you use that for the CANVAS Renderer, **no problems, game doesn't lag**.\r\n\r\nTo fix the WebGL Render lag movement, you need to do, or have a entity somewhere that has return true....\r\n\r\n```\r\nthis._super(me.Entity, 'update', [dt])\r\nreturn true;\r\n```\r\nJust a heads up, I spent 3 + hours isolating this and I think it's important to note this in the docs somewhere.....\r\n\r\nFor example:\r\n\r\nhttp://melonjs.github.io/tutorial-platformer/\r\n\r\nLook here:\r\n```\r\n    // return true if we moved or if the renderable was updated\r\n    return (this._super(me.Entity, 'update', [dt]) || this.body.vel.x !== 0 || this.body.vel.y !== 0);\r\n```\r\n\r\nThis will not work for WebGL\r\n"}}
{"actor":{"display_login":"Dillybob92"}}