Jump to content

Other HTML not rendering with Pixi


Recommended Posts

You are right, it's just a styles issue.  I guess one thing I still don't understand is how you control where the game renders with PIXI.  Right now it just puts the game above any html content I have in my body.  Is there any way to place the game in a specific position on the screen with HTML surrounding it?


Thanks for your help

Link to comment
Share on other sites

var renderer = PIXI.autoDetectRenderer( width, height, { backgroundColor : 0xffffff } ) // create renderer

renderer.view // references the actual canvas element created

somewherenInDOM.appendChild(renderer.view); // you can add the canvas wherever you like in your HTML DOM structure, assign class names with something like .setAttribute('class', 'myclass') etc.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...