Want to check cc.Vec2.ZERO implementation

Want to check cc.Vec2.ZERO implementation
0.0 0

#1

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.
-Hiroki


#2

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.

Thanks,


#3

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?


#4

Check engine/Core/value-types


#5

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.