Design Build Play Posted June 19, 2013 Share Posted June 19, 2013 How would I go about rendering to a stage that is defined on the html page, as in the <canvas> tag or id within other elements on the page. The examples render directly to the HTML page and not to s specified id area Quote Link to comment Share on other sites More sharing options...
Ezelia Posted June 19, 2013 Share Posted June 19, 2013 what Pixi do is just creating the canvas object for you.if you want to use your own canvas you need to specify the canvas element while creating pixi renderer.suppose you have this canvas in your html document <canvas id="myCanvas" width="400" height="400"></canvas> you can tell Pixi to use it by calling var myView = document.getElementById('myCanvas');var renderer = PIXI.autoDetectRenderer(400, 400, myView); instead of var renderer = PIXI.autoDetectRenderer(400, 400); Quote Link to comment Share on other sites More sharing options...
soylomass Posted October 20, 2018 Share Posted October 20, 2018 Edit: Wrong thread Quote Link to comment Share on other sites More sharing options...
KanikaMehra Posted April 17, 2019 Share Posted April 17, 2019 Hi I tried using but not much of a success. I am trying to create an html input box so that i can take user inputs as pixi.js doesn't provide one! So i tried to create a canvas along withy pixi app but the canvas shifts the rest of the view of the app: which was earlier something like this: Please help! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 18, 2019 Share Posted April 18, 2019 @KanikaMehra That's thread of 2013 year and very old pixiJS version. If you searched some more time you could stumble across modern PixiJS docs: http://pixijs.download/dev/docs/PIXI.Renderer.html and "view" parameter. Please, before you do that again, read the docs and wiki: https://github.com/pixijs/pixi.js/wiki, and next time specify PixiJS version that you are using, and don't bump 5 year old threads. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.