页面导航:首页 > 网络编程 > JavaScript > Cocos2d-JS全貌


来源: 作者: 时间:2016-02-20 09:49 【

Cocos2d-JS is Cocos2d-x engine s JavaScript version that includes Cocos2d-html5 and Cocos2d-x JavaScript Bindings It equips your game with cross-browser and cross-platform

Cocos2d-JS is Cocos2d-x engine's JavaScript version that includes Cocos2d-html5 and Cocos2d-x JavaScript Bindings. It equips your game with cross-browser and cross-platform abilities, accompanied by full Cocos2d-x features and simplified JavaScript friendly APIs.

Cocos2d-html5和Cocos2d-x JavaScript捆绑在一起组成的Cocos2d-JS是基于Cocos2d-x引擎的JavaScript版本。通过全面的Cocos2d-x特性和简洁优雅的javascript友好的应用程序接口,该框架可以让你的游戏拥有跨浏览器和平台的能力。

Cocos2d-JS reinvented workflows for all platforms in v3.0, it provides a consistent development experience for whichever platform you want to distribute to, no matter web and native. "Code once, run everywhere" is incredibly easy and natural in Cocos2d-JS. With one single JavaScript code base, you can run your game on all web browsers and native platforms including Mac OS, Windows, iOS and Android. This will bring your game great opportunities in almost all channels of distribution. On the other hand, if you are only interested in casual games on the web, you can embed directly in your web page the Cocos2d-JS Lite Version which is extremely easy to use and light as a feather.

从3.0版本开始,Cocos2d-JS为所有平台打造了了一种全新的工作流,它为任何一个你想分发的平台包括网络和本地提供了一个一致的开发模式。“一次编码,多处运行”在Cocos2d-JS这里显得非常容易和顺理成章。通过简单的JS基石,你开发的游戏可以很容易运行各系统,比如PC端的Mac, windows,移动端的IOS和Android的浏览器和本地平台。在几乎所有的渠道分发能给你游戏带来巨大的机会。另外,如果你仅仅是感兴趣于web端的游戏开发,你可以直接和引用精简版的(Lite Version)Cocos2d-JS版本在你的web页面中,这种方式是相当简单和轻量级的。

Furthermore, JavaScript friendly APIs make your game development experience a breeze - easy to code, test and distribute. In the meantime, Cocos2d-JS v3.0 is super powerful along with all these cool new features: Editors Support, Assets Manager, Object Pool, JS to Objective-C/JAVA reflection, etc.



  • Cross platforms developers can use Cocos Console to create projects, boost their development with web version engine and deploy games onto all native platforms and all browsers with Cocos Console.

  • Casual web game developers can download the Lite Version and start to develop just like using other web frameworks (e.g. jQuery).


跨平台者开发可通过Cocos 控制台,可建立项目,并使用web 版本引擎在开发中,同时部署游戏在本地平台和上面。


Download and API reference(下载和API引用)

  • Cocos2d-JS github repository
  • Cocos2d-JS Full Version Download
  • Cocos2d-JS Lite Version
  • Online API reference
  • Downloadable API reference
  • Online test cases

    Main features(主要特征)

    • Support All modern browsers and native platforms
    • 支持现代浏览器和本地平台
    • Scene management (workflow)
    • 场景控制器
    • Transitions between scenes
    • 场景切换
    • Sprites and Sprite Sheets
    • 精灵
    • Effects: Lens, Ripple, Waves, Liquid, etc.
    • 特效
    • Actions (behaviours):
    • 动作
      • Trasformation Actions: Move, Rotate, Scale, Fade, Tint, etc.
      • Composable actions: Sequence, Spawn, Repeat, Reverse
      • Ease Actions: Exp, Sin, Cubic, Elastic, etc.
      • Misc actions: CallFunc, OrbitCamera, Follow, Tween
      • Assets manager (hot update)
      • 资源管理
      • Basic menus and buttons
      • 基本菜单和按钮
      • Integrated with physics engines: Chipmunk and Box2d
      • 相互协调的物理引擎
      • Particle system
      • 颗粒系统
      • Skeleton Animations: Spine and Armature support
      • Fonts:
        • Fast font rendering using Fixed and Variable width fonts
        • Support for .ttf fonts
        • Tile Map support: Orthogonal, Isometric and Hexagonal
        • Parallax scrolling
        • Motion Streak
        • Render To Texture
        • Touch/Accelerometer on mobile devices
        • Touch/Mouse/Keyboard on desktop
        • Sound Engine support (CocosDenshion library) based on OpenAL or WebAudio on web
        • Integrated Slow motion/Fast forward
        • Fast and compressed textures: PVR compressed and uncompressed textures, ETC1 compressed textures, and more
        • Resolution Independence
        • Modularized engine for customization
        • Open Source Commercial Friendly: Compatible with open and closed source projects
        • OpenGL ES 2.0 (mobile) / OpenGL 2.1 (desktop) based
        • Full WebGL support and auto canvas fallback


          • Highlighted release note of Cocos2d-JS v3.1
          • Changelog of Cocos2d-JS v3.1
          • Upgrade guide to Cocos2d-JS v3.1
          • Startup

            • Lite Version workflow
            • Why use Cocos2d-html5 for Game Development
            • Resolution Policy Design for Cocos2d-JS
            • History release notes
            • New features and API changes in version 3.x:

              • New workflow with cocos console
              • Assets manager
              • New event manager
              • New property API
              • Game creation
              • Construction and inheritance
              • Simplified action APIs
              • Objects Pool
              • Bake Layer
              • Reflection from script to JAVA
              • Reflection from Javascript to Objective-C
              • Cocos2d-5 modulization
              • Pure configuration file
              • Basic data refactoration
              • Singleton objects refactoration
              • Loading resource with cc.loader
              • System information in cc.sys
              • Path management with cc.path
              • Asynchronised process with cc.async
              • Modification to cc.saxParser
              • Modification to cc.spriteFrameCache
              • About cc.FileUtils
              • About cc.log
              • Other change from v2.2.2 to v3.0
              • Facebook support for Cocos2d-JS

                • Cocos2d-x with Facebook
                • Facebook API Reference for Cocos2d-JS
                • Facebook integration instruction for Cocos2d-JS on
                • Facebook integration instruction for Cocos2d-JS on iOS
                • Facebook integration instruction for Cocos2d-JS on Web
                • How to integrate with Facebook - sample app
                • Advanced topics

                  • How to compile Cocos2d-JS project in Eclipse
                  • How to use extensions in JSB(Chinese version)
                  • How to use Plugin-x on Android
                  • Plugin-x architecture
                  • How to write your own Plugin for Android
                  • Use iOS IAP Plugin
                  • Tutorials

                    • Tutorial root



    最 近 更 新
    热 点 排 行