I want to use the canvas that already exist to initialize PIXI, what should I do?
You can pass canvas in application or renderer constructor
var renderer = new PIXI.WebGLRenderer(800, 600, { view: myCanvas });
Next time look in docs or sources first , that way you wont have to wait my answer for 5 hours :)
http://pixijs.download/dev/docs/PIXI.Application.html
http://pixijs.download/dev/docs/PIXI.WebGLRenderer.html
https://github.com/pixijs/pixi.js/blob/dev/src/core/renderers/SystemRenderer.js#L92
thank you so much!!
发自我的 iPhone
在 2018年3月26日,15:28,Ivan Popelyshev <[email protected]notifications@github.com> 写道:
You can pass canvas in application or renderer constructor
var renderer = new PIXI.WebGLRenderer(800, 600, { view: myCanvas });
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_pixijs_pixi.js_issues_4798-23issuecomment-2D376071343&d=DwMCaQ&c=qwStF0e4-YFyvjCeML3ehA&r=9YmZOUbmRfascuRWKcpwbS4ZNj47egp7RbZQxDzS38Q&m=R74Hp15asqYZEVHopR0EoyYhdaIzxn8pxa0SwldlyPY&s=2zmdcPjRON9036pT67NPjV0e-PKNCpTiU2zDklPLY4I&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AJ-2DwG-2DddYixfS9dQK5vSDM6pE03WD-2DiMks5tiJiogaJpZM4S6cha&d=DwMCaQ&c=qwStF0e4-YFyvjCeML3ehA&r=9YmZOUbmRfascuRWKcpwbS4ZNj47egp7RbZQxDzS38Q&m=R74Hp15asqYZEVHopR0EoyYhdaIzxn8pxa0SwldlyPY&s=2hW7QBMhdeXoqja7ZjWiJGjUx5L74LnYeSDwBvvtDLw&e=.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Next time look in docs or sources first , that way you wont have to wait my answer for 5 hours :)
http://pixijs.download/dev/docs/PIXI.Application.html
http://pixijs.download/dev/docs/PIXI.WebGLRenderer.html
https://github.com/pixijs/pixi.js/blob/dev/src/core/renderers/SystemRenderer.js#L92