Cocos Creator Drawing

I’m trying to draw circles in Cocos creator using Graphics API but unfortunately all the results look very chunky, it’s like they are not anti-aliased at all. Here are a few previews:


Untitled-2

Does anyone know how I can solve this?

I replied to your other thread as well. I’ll ask Engineering.

1 Like

Are you using 1.8.2?

@jare, no, 1.9

Ok, it is because we changed the default value of “antialias”.
For 1.8.2/1.9.0, please search the engine source and remove the antialias option before calling cc.create3DContext.

@jare Ok, I can’t seem to find it for now, as far as I know it used to be in CCBoot.js(at least for cocos2d-js, not sure about Creator) but it doesn’t seem to be there.
Anyway I’ll search some more when I have time(or if you can give me some extra hints it would be great), but shouldn’t this be something that can be changed from the project and not engine?
I’m asking because in case of collaborative work on different machines this will have to be manually changed on each one(can’t just push a change on git and make it work everywhere).

It’s in “CCGame.js”
We will expose a new argument to make it configable in 1.9.1.

2 Likes

@jare Sounds great, will check this manual solution later and let you know how it works. Thanks!

1 Like

@jare, @slackmoehrle I found the place and changed it but it’s not working out of the box, I probably need to rebuild the engine somehow but I’m not sure how(can someone give me a hint?).

Also as a suggestion, I think it would be a good idea to have the option to integrate the engine into the project, such that when a new project is created the user will have the option to copy engine files into project directory. Again, for collaborative work, this would be very useful in case someone does some changes inside engine files.

You can rebuild engine this way: http://www.cocos2d-x.org/docs/creator/manual/en/advanced-topics/engine-customization.html
Yes, we will provide some option to integrate the changes.

@jare I’ve managed to rebuild the engine embedded in Creator(without cloning and setting a different path) and it all works. Thank you very much for your time!

Also, if there already is the option to keep the engine outside Creator’s installation folder(and just set up the path in Creator’s preferences) then probably what I said earlier about the possibility of adding engine folder into project folder is irrelevant.

1 Like