Bug: TypeError: cc.c4FFromccc3B is not a function


When running on iOS, the function to convert a cc3b to cc4f but its not working, anyone knows how to fix this?

From CCTypes.js (line 307):

cc.c4FFromccc3B = function © {
return new cc.Color4F(c.r / 255.0, c.g / 255.0, c.b / 255.0, 1.0);


There are no ‘CCTypes.js’ file on JSB.


What do I do then??

Isn’t the code written in javascript meant to work anywhere without modifications?


There still some differences between JSB and Html5. For example, there are not cc.Color4B cc.RectMake in JSB, instead, you could use cc.cc4b and cc.rect for both JSB and Html5.
The reason was a long history. :frowning: