Skip to content
A simple JavaScript framework for creating games and apps
JavaScript Other
Branch: master
Clone or download
Latest commit 1606e5f Jan 4, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
build add build/ Apr 30, 2013
de add directories Aug 29, 2013
dev Merge branch 'master' into develop Jan 4, 2016
doc remove Rakefile Dec 17, 2013
examples changed corporate name Jan 4, 2016
images add effect image Nov 8, 2012
ja add directories Aug 29, 2013
libs recover external libraries Mar 28, 2014
plugins add directories Aug 29, 2013
tasks modify task script Jan 17, 2014
.gitignore add lang/*, "enchant.min.js", "enchant.js" to .gitignore Jul 1, 2014
.travis.yml update .travis.yml Sep 8, 2014 changed corporate name Jan 4, 2016
LICENSE.txt changed corporate name Jan 4, 2016 Merge branch 'feature/mocha' into develop Sep 11, 2014
component.json Adding component.json so bower ( can… Mar 10, 2013
enchant.png add tm mark Jun 12, 2013
package.json v0.8.3 Dec 28, 2015 fix (play mp3 using swf) Jul 1, 2011
sound.swf fix (play mp3 using swf) Jul 1, 2011


Build Status Built with Grunt


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

Download Zip file



  • Compact
  • Standalone
  • Graphics Object Tree
  • Event Driven


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


MIT License


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

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


More examples and references:

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.

You can’t perform that action at this time.