Jump to content

Graphics API & WebGLRenderer


johnnyangel
 Share

Recommended Posts

Hi Folks.

 

I am running into an issue when I am using the WebGLRenderer and the drawing API for the Graphics class.  This only seems to manifest with the WebGLRenderer, not the CanvasRenderer.  Given an instance of the Graphics class, I run the following code:

var g = //instance of pixi.Graphicsg.clear()g.lineStyle(1, 0xffffff) //white lines against a black canvasg.moveTo(0, 0)g.lineTo( width, height ) //my current viewport's dimensions

and the result?

 

2014-12-09_1025.png

 

Obviously the diagonal line is desired but the arc is not.  A few things to note:

  • I have some code to detect the window resize to resize the renderer.  Sometimes after a resize the arc artifact is gone, most times however, it is not.
  • The current graphics in this example is nested in a few DisplayObjectContainers (which is the structure of my Viewport class).  That structure looks like this:
    • viewport.mainContainer (attached to the stage)
      • viewport.zoomContainer
        • viewport.contentContainer (where the graphics instance resides)
  • using the drawCircle API doesn't create the artifact.

Please advise.  Thank you.

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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