Jump to content

Primitives, Circle, Rectangle - not working


ddennis
 Share

Recommended Posts

Hi 

 

First of all thanks for a great engine.

 

This should be very basic,

I would expect that i could make a circle or a rectangle like this:

var circle = new PIXI.Circle(10,10,50)stage.addChild(circle))
 
but that throws the following error:
  1. Uncaught TypeError: Cannot set property '_iPrev' of undefined pixi.js:1324
    1. PIXI.DisplayObjectContainer.addChildpixi.js:1324
    2. (anonymous function)index.html:36
  1. Uncaught TypeError: Cannot read property '_iNext' of undefined pixi.js:5712
    1. PIXI.WebGLRenderGroup.addDisplayObjectAndChildrenpixi.js:5712
    2. PIXI.WebGLRenderGroup.setRenderablepixi.js:5282
    3. PIXI.WebGLRenderer.renderpixi.js:4441
    4. animate
    5.  
 
The only way that works for me is like this, which seem like a work around.
var g = new PIXI.Graphics()
g.beginFill(0xFFCC00, 1)
g.drawCircle(100,100,50)
stage.addChild(g)
 
 

If everything works as intended i am missing a comment/hint in the code that they shoud not be instantiated directly.

 

Thanks again for a great engine.

/Dennis 

 

 

 

Link to comment
Share on other sites

  • 3 weeks later...

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