{"action":"closed","issue":{"url":"https://api.github.com/repos/pixijs/pixi.js/issues/2596","repository_url":"https://api.github.com/repos/pixijs/pixi.js","labels_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2596/labels{/name}","comments_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2596/comments","events_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2596/events","html_url":"https://github.com/pixijs/pixi.js/issues/2596","id":156214576,"number":2596,"title":"WARNING: Too many active WebGL contexts. Oldest context will be lost.","user":{"login":"JsAaron","id":5181363,"avatar_url":"https://avatars.githubusercontent.com/u/5181363?v=3","gravatar_id":"","url":"https://api.github.com/users/JsAaron","html_url":"https://github.com/JsAaron","followers_url":"https://api.github.com/users/JsAaron/followers","following_url":"https://api.github.com/users/JsAaron/following{/other_user}","gists_url":"https://api.github.com/users/JsAaron/gists{/gist_id}","starred_url":"https://api.github.com/users/JsAaron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JsAaron/subscriptions","organizations_url":"https://api.github.com/users/JsAaron/orgs","repos_url":"https://api.github.com/users/JsAaron/repos","events_url":"https://api.github.com/users/JsAaron/events{/privacy}","received_events_url":"https://api.github.com/users/JsAaron/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-23T07:19:08Z","updated_at":"2016-06-11T19:14:16Z","closed_at":"2016-06-11T19:14:16Z","body":"Excuse me\r\nFirst of all, feel the author with such a good library. First time use have a few problems, problems to solve\r\n\r\nIn single-page applications using pixi. Js.  Now use the MovieClip and PIXI. Elves animated Sprite. \r\nA canvas corresponds to a PIXI object.  Due to performance issues.  I take multiple canvas element. Shared a requestAnimation. \r\n\r\nThe following code：\r\n\r\n```\r\nmaskSprite = new PIXI.Sprite(this.maskTexture[0]);\r\nstage1.addChild(this.maskSprite);\r\naddQueue(function() {\r\n    renderer.render(stage1);\r\n})\r\n\r\nmovie = new PIXI.extras.MovieClip(textures);\r\nstage2.addChild(movie.maskSprite);\r\naddQueue(function() {\r\n   renderer.render(stage2);\r\n})\r\n\r\naddQueue = function(fn) {\r\n    list.pust(fn)\r\n    requestAnimation(list)\r\n}\r\n```\r\nRunning is normal, But page will prompt error a few times,\r\n `WARNING: Too many active WebGL contexts. The Oldest context will be lost.`\r\n I don't know if I destroy mode has a problem.I only in the renderer method invoked on the destruction.\r\nThe following code：\r\n`renderer.destroy(true)`\r\n\r\nThe problem:\r\n> WARNING, because the wrong to destroy?\r\n\r\n![image](http://images.cnblogs.com/cnblogs_com/aaronjs/832802/o_4AB5688D-873E-4192-B14C-10078544441C.png)\r\n\r\nIf I didn't describe clearly, I send the source code\r\nsprite.js\r\n[https://github.com/JsAaron/es6-magazine/blob/master/src/lib/component/pixi/sprite.js](https://github.com/JsAaron/es6-magazine/blob/master/src/lib/component/pixi/sprite.js)\r\nqueue.js\r\n[https://github.com/JsAaron/es6-magazine/blob/master/src/lib/component/pixi/core/queue.js](https://github.com/JsAaron/es6-magazine/blob/master/src/lib/component/pixi/core/queue.js)\r\n\r\n\r\n"}}
{"actor":{"display_login":"GoodBoyDigital"}}