@zhangxm OK, thanks for this information. It is really a vscode limitation because webstorm is able to do autocomplete and cmd+click directly from .js files for cocos2d-js, without needing any configuration or TS definitions.
Does the team plan to add similar comments and TS definitions support for the standalone cocos2d-js engine?
I tried to look at the cocos2d-js engine in cocos creator and there are some interesting changes and improvements in the engine, like in the way classes are defined. For a new cocos2d-js project, should we use standalone cocos2d-js engine or the engine in cocos creator (as a standalone engine without creator)?
We are not using Creator due to how we have implemented our project in C++ and we plan to follow similar structure with JS. For example, we need device orientation change support and defining sprite position and sizes based on physical screen size. We dynamically calculate the sprite size/position values using device DPI and screen size, and we change the design resolution to match screen size on orientation change or browser resize. It looks like with cocos creator we will need to choose a fixed design resolution and specify sprite size/position in pixels. In code we can specify things like “sprite.y = winSize.y-10;” or more complicated calculations based on device DPI.
As in our case all size/positions are to be set in code, then I am not sure if using creator will help because we won’t be able to use it for designing etc. I am slightly confused by all the ‘good’ options that cocos2d family gives. Our current project is in cocos2dx c++ and we are reimplementing it in cocos2dx-js for web support using the standalone js engine. Should we instead use the 1) creator or 2) the creator’s js engine (as a standalone engine without using the creator IDE)?