Frontend/Cocos2D JS

[Cocos2D - JS] 프로젝트 환경설정하기

에반황 2017. 1. 2. 17:44

 

 


이 글은 PC 버전 TISTORY에 최적화 되어있습니다.

 
 

project.json 파일

 Cocos2D - JS 는 여타(Phaser, CreateJS 등) HTML5 게임 개발 라이브러리와 다르게 프로젝트 환경설정을 html파일이나 js파일에서가 아닌 project.json이라는 파일에서 설정합니다.

 

 

 

 

 

 

 

 

 

속성 값은 아래의 표를 참고하세요.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

속성명

옵션

설명
debugMode 0, 1, 2, 3, 4, 5, 6 0: close all 1: info level 2: warn level 3: error level 4: info level with web page 5: warn level with web page 6: error level with web page
showFPS true or false toggle FPS visibility
id "gameCanvas" the dom element to run cocos2d on
frameRate a positive number above 24, usually between 30 and 60 adjust the frame rate of your game
renderMode 0, 1, 2 Choose of RenderMode: 0(default), 1(Canvas only), 2(WebGL only)
engineDir the engine directory related for your project specify the directory the engine code
modules engine modules you could customize your engine using modules. Module names are in moduleConfig.json which is located in root of the frameorks/Cocos2d-html5 directory
jsList a list of your game source code add your own file lists after app.js

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

반응형