enchant.js

A simple JavaScript framework for creating games and apps

  • 所有者: wise9/enchant.js
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Build Status Built with Grunt

Download

This is a repository for development. Refer to uei/enchant.js-builds for download pre-built files.

Download Zip file

Documentation

Design

  • Compact
  • Standalone
  • Graphics Object Tree
  • Event Driven

Platform

  • Chrome
  • Safari
  • Firefox
  • IE9
  • iOS
  • Android 2.1+

License

MIT License

Usage

<script src='./enchant.js'></script>
<script>
    enchant();
    window.onload = function(){
        var game = new Game(320, 320); 

        var label = new Label('Hello, enchant.js!');
        game.rootScene.addChild(label);

        game.start();
    }
</script>

More examples and references: enchantjs.com

How to build

Source code is divided into class files (dev/src/*.js). These files include multi-language comments. You can build enchant.js with 'grunt' command from these files.
If you want to send a pull request or join development enchant.js, please edit files under dev/src, use this build tool and commit the built work tree.

To setup grunt.js (build tool for node.js) as npm package, type:

npm install -g grunt-cli
npm install

You additionally need phantomjs to run qunit test in grunt.js.

Build Tasks

  • grunt do default tasks (jshint concat uglify qunit exec:lang)
  • grunt watch watch dev/src/*.js and exec grunt concat uglify lang when something is modified
  • grunt jshint check sourcecode in dev/classes/*.js with jshint
  • grunt concat generate dev/enchant.js from dev/classes/*.js
  • grunt uglify generate enchant.min.js from dev/enchant.js
  • grunt exec:lang generate enchant.js (English comment only) from dev/enchant.js
  • grunt qunit do qunit tests with phantomjs (headless browser)
  • grunt mocha do mocha tests with phantomjs (headless browser)

If you wish to send your codes to github repos, don't forget to run grunt command before you commit your change!

How to contribute

If you found issues or improved codes, please write issues or send pull request to wise9/enchant.js:develop.

主要指标

概览
名称与所有者wise9/enchant.js
主编程语言JavaScript
编程语言CoffeeScript (语言数: 5)
平台
许可证MIT License
所有者活动
创建于2011-04-18 06:17:24
推送于2022-07-27 21:04:03
最后一次提交2016-01-04 20:52:07
发布数21
最新版本名称v0.8.3 (发布于 )
第一版名称v0.3 (发布于 )
用户参与
星数1.7k
关注者数154
派生数311
提交数1.7k
已启用问题?
问题数194
打开的问题数42
拉请求数99
打开的拉请求数3
关闭的拉请求数33
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?