I’m trying to convert my project using Cocos Creator, which seems to be a great tool, thanks for making this possible!
However, I’m having some troubles using ‘simple’ components like cc.LayerColor: how can I create one using Cocos Creator?
Also, all exemples are using black backgrounds, including browser borders, and I want all to be white => is there any way to change the default settings, to have:
preview display white borders ?
generated index.html use my own preferences, instead of having to modify it at every build?
Found some answers, putting them here in case someone else is interrested.
After some digging (by the way, tutorial is great, as is doc in general, including invaluable API reference: http://cocos2d-x.org/docs/api-ref/creator/v0.71/), it seems there is no more layer in Cocos Creator.
I didn’t found drawing primitives, like drawRect, so how are we supposed to draw simple stuff like lines, circles, rectangles?
About modifying background color, this does the trick (it modify the color used when clearing screen):
cc.director.setClearColor(cc.Color.WHITE);
About the last part of my question, I didn’t found where are located the templates used by Cocos Creator (I’m using Mac Version).
Did you tried to put your actual device screen size into main canvas design resolution?
(it is 960x640 by default, but you can put the values you want)
Yes, I did change the value. I don’t think it help either. There are too many types of devices out there with different screen size. For example, iPhone 5 with longer screen size will have black border space.
Actually I am looking for exact_fit to fill all the screen to remove the border space but there is no option for this.