Jump to content

Possible Bug with roundedRectangle and a height of 150 Pixel


Ironcheese
 Share

Recommended Posts

Hi everyone,

 

 

I just encountered a strange bug - but I am not sure if it is actually a bug.

In my game I have a rounded rectangle which I create like this:

this.speechbubble = this.game.add.graphics(10,35);this.speechbubble.beginFill(0xffffff, 1).drawRoundedRect(0,0,width,height,5);

If I set height to excatly 150 Pixel I get following error:

"TypeError: s is null" which is somewhere deep in phaser.min.js

 

This does not happen when using a height of 149 or 151 pixel.

 

 

Cheers

 

EDIT: It seems to connect with the roundness.... if I set the radius to something else than 5 it works with a width of 150.

Edited by Ironcheese
Link to comment
Share on other sites

  • 5 months later...
  • 4 years later...

phaser 3.22.0 |WebGl|Web Audio

an interesting bug indeed ... i get it on this.object.setStroke() after starting a scene and then starting the first one again. everything freezes and "s is null"

hard to re-create out of context, i got it fixed by making the update wait until the object was complete

when i logged it the object "this.quotation" seemed to have "scene" property undefined for a few cycles which made it crash on the first run , so i add in the update a check for typeof this.object.scene (until defined) ...

it works but im not sure what i do wrong here, it looks like the update() is running before create has finished when i re-start scene 1 after clicking back from scene2 ...

"it works" is fine but "i understand" would be better, lol ....

i thought scene.start means all the others quit and i thought scene.start means update stops running until load and create are done

but apparently that's not (always) so ... learn a little every day, i'll never get to three.js like this heh

 

still some of the most awesome stuff i found in the past years, kudos!!!!

 

if i knew what i was doing i'd feel like the ancients who had to wait for the scanlines on the screen now ... this beats tv during a zombie apocalypse by a few lightmiles at least ...

Edited by rudyardcatling
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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