"COCOS2D-JS official Documents" 22, Project.json

Source: Internet
Author: User

Overview

Project-related configuration, transferred from the original cocos2d.js to project.json Medium, the file needs to be in the same class as the index.html general recommendation under the root directory.

cocos2d.js changed to project.json are as follows:

    • The original mixed cocos2d.js with some logic code, it is not very good to reflect that it is as a project configuration file.

    • It is more friendly to use the JSON format as a configuration file. You can also make, cocos-console cocos-utils and even user-defined script tools that use the same configuration file.

Field Description DebugMode

Equivalent to the original COCOS2D_DEBUG , wherein:

0 means that debug mode is turned off, and 1 means that log,2 means that warn,3 indicates that error,5 represents logforwebpage,6 warnforwebpage,7.

Rendermode

Same as the original configuration, indicating the rendering mode. 0 is the default, and 1 is canvas,2 for WebGL.

Showfps

Same as the original configuration, indicates whether the frame rate display is turned on. The default is False.

Framerate

Same as the original configuration, indicating the set frame rate. The default is 60.

Enginedir

Same as the original configuration, used to specify the engine directory. The difference is that, in the V2 version, the point is **/cocos2d-html5/cocos2d , but in the V3 version, just point to the **/cocos2d-html5 line. The default is "FRAMEWORKS/COCOS2D-HTML5".

Jslist

Equivalent to the original appFiles , used to enumerate the list of JS.

Id

Equivalent to the original tag , which specifies the ID of the canvas.

Modules

In the V2 version, only through loadextension , box2d , chipmunk , pluginx and other switches to specify whether a module should be used.

In the V3 version, the use of modules fields, flexible configuration, which can also better support the future of the engine module clipping. The configuration is as follows:

"modules" : ["extensions", "pluginx", "box2d", "chipmunk"]

If you want to know what modules are specifically provided in the engine, see moduleConfig.json The fields in the file module .


reprinted from: http://www.cocos2dx.net/post/250

"COCOS2D-JS official Documents" 22, Project.json

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.