Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wise9/enchant.js
A simple JavaScript framework for creating games and apps
https://github.com/wise9/enchant.js
Last synced: about 2 months ago
JSON representation
A simple JavaScript framework for creating games and apps
- Host: GitHub
- URL: https://github.com/wise9/enchant.js
- Owner: wise9
- License: mit
- Created: 2011-04-18T06:17:24.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2022-07-27T21:04:03.000Z (about 2 years ago)
- Last Synced: 2024-07-19T03:38:22.026Z (2 months ago)
- Language: JavaScript
- Homepage: http://enchantjs.com
- Size: 20.9 MB
- Stars: 1,687
- Watchers: 155
- Forks: 315
- Open Issues: 45
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Build Status](https://secure.travis-ci.org/wise9/enchant.js.png)](https://travis-ci.org/wise9/enchant.js) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)
Download
--------This is a repository for development. Refer to [uei/enchant.js-builds](https://github.com/uei/enchant.js-builds) for download pre-built files.
[Download Zip file](https://github.com/uei/enchant.js-builds/archive/master.zip)
Documentation
-------------- English
-
- (with plugins)
- Deutsch (German)
-
- (with plugins)
- Japanese
-
- (with plugins)
- See also [enchantjs.com](http://enchantjs.com)Design
------- Compact
- Standalone
- Graphics Object Tree
- Event DrivenPlatform
--------- Chrome
- Safari
- Firefox
- IE9
- iOS
- Android 2.1+License
-------MIT License
Usage
-----
```htmlenchant();
window.onload = function(){
var game = new Game(320, 320);var label = new Label('Hello, enchant.js!');
game.rootScene.addChild(label);game.start();
}```
More examples and references: [enchantjs.com](http://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 installYou additionally need [phantomjs](http://code.google.com/p/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`.