Want to check cc.Vec2.ZERO implementation

Want to check cc.Vec2.ZERO implementation
0.0 0


I’m learning cocos creator now. But I don’t know how to check cocos engine code yet.
Can anybody tell me how to check " cc.Vec2.ZERO" implementation, for example?

I believe it will be under here,

but I can’t find it.

There should be a proper and an efficient search method, I believe.
If I can find the way, I can learn faster.
Thanks in advance.


If you are using mac, follow these steps :

  1. Right click Cocos creator.app -> show package contents.
  2. Navigate to Contents/Resources/engine

Now you have whole engine code.



Thank you for the information. I was able to open engine folder.
After that, how can I find the right file and right position of cc.Vec2.ZERO?


Check engine/Core/value-types


Thank you very much rahul2526!
With your advice, I can understand how to check code, and how to implement static get and set through vec2.