Skip to content
Browse files

Merge branch 'zzarcon/add_clarity_to_gruntfile' into v1.0.1

Conflicts:
	README.md
	license.txt
  • Loading branch information...
2 parents 70ae1b5 + 7c3d34b commit 4c9ed809ff49ca4eb80da066fda91871929bd274 @BenjaminHarding BenjaminHarding committed
Showing with 346 additions and 168 deletions.
  1. +63 −0 .gitattributes
  2. +1 −0 .gitignore
  3. +210 −88 README.md
  4. +1 −0 build/kiwi.js
  5. +1 −1 docs/classes/Kiwi.Game.html
  6. +1 −1 docs/data.json
  7. +1 −0 docs/files/src_core_Game.ts.html
  8. +1 −1 examples/Transform/Rotation.ts
  9. +1 −0 examples/kiwi.js
  10. +61 −74 gruntfile.js
  11. +1 −2 license.txt
  12. +2 −1 package.json
  13. +1 −0 src/core/Game.ts
  14. +1 −0 templateGame/lib/kiwi.js
View
63 .gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
View
1 .gitignore
@@ -45,5 +45,6 @@ _ReSharper*/
!/templategame/*/*/*.js
/node_modules
/GLTests
+/testgl
tscommand.tmp.txt
.tscache/build/*
View
298 README.md
@@ -1,125 +1,121 @@
-Kiwi.JS 1.0.0
+Kiwi.js 1.0
============
-![Splash](docstyles/splash.png)
+![Splash](http://kiwi-js.s3.amazonaws.com/wounds-with-friends.jpg)
-Kiwi.JS is the worlds easiest to use Open Source HTML5 game framework for making both mobile and desktop browser games. Our focus is blazingly fast WebGL and Canvas rendering. Our mission is to foster an open source community and democratize game creation!!
-- [Getting Started Tutorials](http://www.kiwijs.org/documentation/getting-started/)
-- [Code Examples](http://www.kiwijs.org/examples/)
-- [API Documentation](http://api.kiwijs.org/)
-- [Contact](http://www.kiwijs.org/help/)
+Kiwi.js is the worlds easiest to use Open Source HTML5 game framework for making both mobile and desktop HTML5 browser games.
-Visit our homepage [www.kiwijs.org](http://kiwijs.org) for more information about using Kiwi.JS to build your next game, on our site you'll find plenty of examples and tutorials to get you started.
-
-##Release - Version 1.0.0
+Our focus is blazingly fast WebGL rendering and complimentary tools to make professional quality serious games. We use [CocoonJS](https://www.ludei.com/) for publishing games and App creation.
-- This is the first major version of Kiwi.js.
+Version: 1.0 "Iwatani"
-##Welcome to Kiwi.JS!!
+- Visit the [Official Website](http://www.kiwijs.org/documentation/getting-started/)
+- Follow us on [Twitter](http://www.twitter.com/kiwijsengine)
+- Explore Source code for [Kiwi.js examples](http://www.kiwijs.org/examples/)
+- Read our [API Documentation](http://api.kiwijs.org/)
+- Browse our Plugin Repository
+- [Contact](http://www.kiwijs.org/help/) us for more information
-Kiwi.js is the core opensource HTML5 game framework that is at the center of a game creation ecosystem.
-The Kiwi framework features the support for regular canvas rendering, but also blazing fast hardware accelerated WebGL rendering.
+##Welcome to Kiwi!
-As you'd expect your games can be deployed to desktop or mobile browsers, however they can also be deployed to mobile devices as native apps, using the Cocoon.js framework.
-This means you can use Javascript to write native mobile games that take advantage of hardware accelerated WebGL.
+Born out of a desire to democratize HTML5 game development and to make something that we love available to the masses, we bring you Kiwi.js.
-Kiwi.js is highly extendable and flexible
+We don’t mean to brag (too much), but Kiwi.js is fast. With hardware accelerated WebGL rendering, you can expect your games to be easily deployed across mobile and desktop browsers. But wait, they can also be deployed to mobile devices as native apps, using the [CocoonJS](https://www.ludei.com/) framework.
+
+Our mission is to follow the best open source community practices. We’re backing that up by providing professional support when its needed, so everyone — commercial developers as well as indies — feel the love.
+
+And we do think you’re going to feel the love. What couldn’t you love about a game engine that is named after a fluffy adorable bird *and* one of the world’s greatest game inventors?
+
+
+##How to Guides
+
+Have you ever been trying to figure out how to do something on a website and the help pages resemble a [Goosebumps](https://en.wikipedia.org/wiki/Goosebumps) choose your own adventure book? So have we, which is why we have spent literally hundreds of hours writing good help documents for Kiwi.js developers.
+
+Our [Official Documentation Codex](http://www.kiwijs.org/documentation/getting-started/) is here if you do get stuck.
##Features
-###Powerful Rendering
-Kiwi.js uses a built in WebGL rendering system for targetting desktop browsers and mobile apps(through Cocoon.js). The system is pluggable and extendable, meaning contributors can write there own powerful rendering extensions using WebGL Shaders. For instance the WebGL Particle plugin creates stunning special FX using this systme.
+####Powerful Rendering
+Kiwi uses a custom built WebGL rendering system for targetting modern mobile and desktop browsers as well as mobile apps through [CocoonJS](https://www.ludei.com/).
-Of course, you can render to canvas too, which means older browsers, and mobile browsers, don't miss out.
+Not only is Kiwi lightning quick but it is also extendable, meaning that fellow contributors can easily write there own powerful rendering Plugins and Add-ons using WebGL Shaders. For instance our WebGL Particle Plugin creates stunning special FX using this systmem.
-###Cocoon.js - Publish to Mobile
+Of course, you can render to canvas too, which means older browsers, and mobile browsers, don't miss out.
Kiwi.js is closely aligned with Ludei's Cocoon.js system. You can use cocoon to wrap up your game and play it on iOS or Android devices.
-###State Management
-A state management system lets you easily move between and manage game states. Each state has an optional preloader phase, a create phase, an update loop, and a destroy phaase. Each of the phases are highly configurable.
+####Mobile Publishing
+Kiwi.js is closely aligned with Ludei's [CocoonJS](https://www.ludei.com/). You can use Cocoon to wrap up your game and play it on iOS or Android devices.
+
+####State Management
+A state management system lets you easily move between and manage game states. Each state has an optional preloader phase, a create phase, an update loop, and a destroy phase. Each of the phases are highly configurable.
-###Flexible Asset Loading and Management
-It's easy to load in images, sound and data. You can decide when you want it to load (eg in a single payload at the beginning, or on a per state basis). When your assets are loaded they're super easy to access from data libraries.
+####Flexible Asset Loading and Management
+It's easy to load in images, sound and data. You can decide when you want it to load (e.g. in a single payload at the beginning, or on a per state basis). When your assets are loaded they're super easy to access from data libraries.
-###Gameobjects - Sprites, Images, Textfields
+####Gameobjects - Sprites, Images, Textfields
Gameobjects are objects that get rendered in your game. Whether they're frame-based sprites, webGL particles, static images or textfields, they all can be moved in the game world and placed in the scene graph.
-###Entity/Component system
-Each gameobject is an "Entity" and can have "components" which attached to it. Components are small pieces of code that do something useful. For instance the arcade physics system is implmented as a component. If you want your game object to use physics, simply attach a physics component to it. Some of the standard gameobjects have components such as physics already attached. You can also write your own components.
+####Entity/Component system
+Each gameobject is an "Entity" and can have "components" attached to it. Components are small pieces of code that do something useful. For instance the arcade physics system is implmented as a component. If you want your game object to use physics, simply attach a physics component to it. Some of the standard gameobjects have components such as animation already attached. You can also write your own components.
-###Scenegraph (Grouping objects)
-The scenegraph represents all of the gameobjects that visible in your gameworld. You can group objects, and place groups within groups. You ca animate and move your objects and groups and they'll behave in a consistent manner depending on how they are nested.
+####Scenegraph (Grouping objects)
+The scenegraph represents all of the gameobjects that visible in your gameworld. You can group objects, and place groups within groups. You can animate and move your objects and groups and they'll behave in a consistent manner depending on how they are nested.
-###Animation
-Sprites have an animation component that enables frame by animation from spritesheets and texture atlases. You can easily define frame sequences and frame lengths, play, pause, loop and reverse animations.
-There is also a built in tweening system.
+####Animation
+Sprites have an animation component that enables frame by animation from spritesheets and texture atlases. You can easily define frame sequences and frame lengths, play, pause, loop and reverse animations. There is also a built in tweening system.
-###Input (Including Touch)
+####Input (Including Touch)
Kiwi.js supports input for mouse, keyboard and of course touch. Mouse and touch events are easily handled by Kiwi.js pointer objects, so in most cases you don't have to worry about where the input is coming from.
-###Camera
+####Camera
Your game world is viewed through a controllable camera, which you can move and spin.
-###Tilemaps
+####Tilemaps
Kiwi.js has support for tilemaps, including multiple tile layers. The Tiled map data format is supported, including isometric tiles. You can programatically generate tile maps, and once a tile map is created you can easily manipulate the data to change the tilemap dynamically.
-###Audio
-Kiwi.js supports the WebAudio api, and falls back to using <audio> tage when it is not available. Audio sprites are also supported.
-
-###Plugin System
-The plugin system lets developers extend many aspects of Kiwi.js. The rules around creating them are unobtrusive, making them easy to both create and attach. Plugins can also be sold in the Kiwi.js marketplace.
-
-###Integration with powerful tools
-Kiwi.js is part of a larger ecosystem of products which will enable you to create games and game content using specialised tools such as the Gamefroot cloud based game making system.
-
-
-
+####Audio
+Kiwi.js supports the WebAudio api, and falls back to using <audio> tag when it is not available. Audio sprites are also supported, unless of course your device happens to be some weird futuristic gheto blaster.
+####Monitization
+As fellow game developers we know what it is like to be hungry, shivering on the corner holding a can of change in one hand and a damp “will code for cash” cardboard sign in the other.
+Because of this, creating an In-App Purchasing Plugin to allow you to monetize your games was a top priority and is available now.
-##Lots of ways to get started
+[CocoonJS](https://www.ludei.com/) users can easily sell add a virtual currency to consumable goods via the AppStore
-There are several ways to get started with a blank game template (see below), but if you want to get up and running even faster, Kiwi.js is building a library of "blueprint" games that will get your game building experience off to a flying start.
-Blueprints are well on the way for genres such as
-- platformer
-- match-three
-- top-down
-- breakout,
-- crossword
-- distance flyer
-- dressup
-- endless runner
-- hidden object
-- tower defence
-- poker
+####Plugin System
+As part of our dedication to open source principles, the plugin system lets developers extend many aspects of Kiwi.js. The rules around creating them are unobtrusive, making plugins easy to create and attach. Plugins will soon be able to be sold in the upcoming Kiwi.js marketplace.
-There will be an ever increasing library of free and premium blueprints to get you started.
+####Integration with powerful tools
+Kiwi.js is part of a larger ecosystem of products which will enable you to create games and game content using specialised tools such as the Gamefroot cloud based game building solution. [Because you can never get enough power](https://www.youtube.com/watch?v=YQwYNca4iog)
-###Lots of ways to extend
-Kiwi.js is built from the ground up as a plugable system. You can add multiple plugins to your game, or write plugins yourself. You'll even be able to sell your own plugins in the Kiwi.js marketplace.
-Kiwi.js is built in such a way that your plugins can do very simple or very powerful things. For example
+##Getting Started
-- A utility plugin, such as an inventory for keeping track of items a player has collected.
-- A gameobject plugin, that creates programmable tower defence unit.
-- A component plugin, such as a specialised physics system that can be applied to any gameobject.
-- A rendering plugin, that creates new renderers and WebGL shaders that give your game an entirely different look.
-- A service plugin, such as an ad-network or in-app purchasing system.
+![Splash](http://kiwi-js.s3.amazonaws.com/html5-conference-game.png)
-To learn about building plugins view the tutorials on [kiwijs.org](http://www.kiwijs.org/documentation/tutorials/what-are-plugins-in-kiwi-js/)
+There are several ways to get started, starting from scratch is the generally accepted way to go about this, but if you want to get up and running even faster, Kiwi.js "Blueprint" games will help get your game building experience off to a flying start.
-You can also get started with plugins using the Kiwi.js plugin [Yeoman Generator](https://github.com/gamelab/generator-kiwiplugin).
+Choose from any of the following:
+- HTML5 match-three game
+- HTML5 top-down game
+- HTML5 dressup game
+- HTML5 breakout game
+- HTML5 roguelike game
+- HTML5 platform game (in dev coming soon)
+- HTML5 crossword (in dev coming soon)
+- HTML5 hidden object (in dev coming soon)
+- HTML5 tower defense (in dev coming soon)
+- HTML5 poker game (in dev coming soon)
-<p align="center">
- <img src="docstyles/rocket.png"/>
-</p>
+There will be an ever increasing library of free and premium blueprints to get you started.
-##Creating a blank game
+##Starting from scratch
The easiest way to start with a blank game is to take a copy of the `/gameTemplate` folder. This contains a recommnded folder structure and all default files already in place.
@@ -127,16 +123,28 @@ You will need to use a web server to open the index file.
A more advanced, but still simple, way to create a blank game is to use the [Kiwi.js Yeoman Generator](https://github.com/gamelab/generator-kiwigame). This will create build files and other goodies for you as well.
-##Viewing the examples
+
+
+###Viewing the examples
The `/examples` folder contains a number of basic examples for you to try and to view the source code. In the next minor version of Kiwi.js these will be moved to a separate repo.
You will need to use a php web server to open the index file in the examples folder. This is a temporary arrangement, and when the examples are moved this will no longer be the case.
-##What's in this repo?
+
+###What's in this repo?
Note: If you just want to use the framework, the kiwi.js and kiwi.min.js files are located in the `/build` folder, and the docs in the `/docs` folder, and there is a template game in the `/templateGame` folder. You probably don't need to worry about the rest of the repo!
+###Folders
+
+* build - The kiwi.js and kiwi.min.js files
+* src - The kiwi.js framework source code
+* docs - API documentation on the Kiwi.JS framework.
+* docstyles - Used to store assets for building docs.
+* examples - These examples are soon to moved to a new repo and updated (See more info below)
+Note: If you just want to use the framework, the kiwi.js and kiwi.min.js files are located in the `/build` folder, and the docs in the `/docs` folder, and there is a template game in the `/templateGame` folder. You probably don't need to worry about the rest of the repo!
+
### Folders.
* build - The kiwi.js and kiwi.min.js files
@@ -146,7 +154,7 @@ Note: If you just want to use the framework, the kiwi.js and kiwi.min.js files a
* examples - These examples are soon to moved to a new repo and updated (See more info below)
* templateGame - An example TemplateGame to help you on your way to developing a Kiwi.JS game.
-### Files
+###Files
* .gitignore - mask files from git
* bower.json - see below about bower installation
@@ -201,23 +209,137 @@ The csproj and grunt compilation methods both output a single kiwi.js file in `/
Grunt will also create a min.js version and also output a kiwi.d.ts definition file in `/build` as well
-##Contribute
-We'd love you to get involved in making the Kiwi.JS game engine the best damn game framework in the world! If you'd like to contribute please get in touch, fork/clone the repo and have a dig around. Make pull requests on the dev branch.
+* .gitignore - mask files from git
+* bower.json - see below about bower installation
+* grunfile.js - used for building the framework
+* license.txt - The MIT license
+* package.json - the npm package used for installing dev dependencies
+* README.md - this file!
+* tslint.json - the tslint configuration file
+
+
+![Splash](http://html5experts.jp/wp-content/uploads/2013/11/image05.png)
+
+##Getting and building the library
+
+###Bower
+If you use the [Bower](http://bower.io/) package manager you can install kiwi.js with
+```
+bower install kiwijs
+```
+
+###Yeoman
+If you use the [Yeoman](https://github.com/gamelab/generator-kiwigame) scaffolding system you can install a blank kiwi.js game with
+
+```
+yo kiwijs
+```
+
+It's best to look at our Yeoman Game Generator repo for full details.
+
+
+###Using Grunt
+
+
+This requires installing node.js, and the grunt CLI package.
+There are a few thing you can do with grunt, including linting and compiling the typescript, uglifying the result and compiling the docs.
+
+To build, lint and uglify use the default
+```
+grunt
+```
+
+To do all of the above plus compile the docs
+```
+grunt full
+```
+
+To just build the docs
+```
+grunt docs
+```
+
+The csproj and grunt compilation methods both output a single kiwi.js file in `/build`
+Grunt will also create a min.js version and also output a kiwi.d.ts definition file in `/build` as well
+
+###Building Kiwi manually
+
+You don't need to build the library to use it. The repo has prebuilt files in the `/build` folder.
+
+Kiwi.js is currently using Typescript 0.9.5
+Either - use Visual Studio/TS extension. There are csproj files for both the main project and also the examples.
+
+##Extending Kiwi.js
+
+You want Plugins? [We got Plugins!](http://www.kiwijs.org/documentation/kiwi-js-plugin-tutorials/).
+
+The concept of Plugins, and how they might apply to game creation, is something we're very interested in. Years of working in the open source space and hacking open source tools has provided us with the qualifications necessary to create a system that works for you.
+
+We built from the ground up as a plugable system. You can add multiple plugins to your game, or write plugins yourself. Soon, you'll even be able to sell your own plugins in the Kiwi.js marketplace.
+
+Kiwi.js is built in such a way that your plugins can do very simple or very powerful things. For example:
+
+
+- A utility plugin, such as an inventory for keeping track of items a player has collected.
+- A gameobject plugin, that creates programmable tower defense unit.
+- A component plugin, such as a specialised physics system that can be applied to any gameobject.
+- A rendering plugin, that creates new renderers and WebGL shaders that give your game an entirely different look.
+- A service plugin, such as an ad-network or in-app purchasing system.
+- Stop your bathtub from automatically draining whenever you try to take a bath.
+
+To learn about building Plugins view the tutorials on [kiwijs.org](http://www.kiwijs.org/documentation/tutorials/what-are-plugins-in-kiwi-js/). You can also get started with Plugins using the Kiwi.js [Yeoman Plugin Generator](https://github.com/gamelab/generator-kiwiplugin).
+
-If you discover a bug or find yourself just wanting to jump on in and help make this blueprint even better please file an issue and get stuck in. We're a friendly bunch and hope people find themselves wanting to get involved.
+##Tools
+
+### Visual Game Maker
+Gamefroot is the worlds most powerful and easy to use browser-based game editor.
+
+We've partnered with [Gamefroot](http://gamefroot.com/leveleditor) and we're pleased to let you know that Kiwi.js integration is in development and coming your way soon.
+
+Stay tuned for more updates and more tools!
+
+##Roadmap
+
+Here are some of the features planned for future release.
+
+####Version 2.0 "Bushnell"
+
+- Multiplayer capability (yup, thats right!)
+- WebGL lighting
+- Tools!
+- New Physics engine
+
+##Contributing
+
+We'd love for you to get involved and help make Kiwi.js the best damn game framework in the world! If you'd like to contribute please get in touch, fork/clone the repo and have a dig around.
+
+- If you find a bug then please report it on GitHub issues
+- If you have feature request, or have written a game or demo that shows Kiwi in use then please get in touch. We'd love to hear from you! Please email: dan@gamefroot.com
+- If you have a pull request for Kiwi, please only do so against the dev branch and not against the master branch.
+- Before submitting a Pull Request please run your code through JSHint to check for stylistic or formatting errors.
+
+##Bugs?
+
+If you discover a bug and find yourself wanting to jump in and help make the world of HTML5 gaming a better, less buggy, place, please add said bug to our issues tracker with as much information as possible, especially source code demonstrating the issue.
https://github.com/gamelab/kiwi.js/issues/new
-##Core Contributors
+##Community
+
+A massive shoutout to our contributors!
-Ross Kettle
-Ben Harding
-Richard Davey
+- Ross Kettle
+- Ben Harding
+- Phil Wickliffe
+- Zach Frieberg
+- Locky Reid
+- Ido Yehieli
-Kiwi.JS also uses code from a number of open source projects. Effort has been made to clearly identify authors in the code comments. If you notice and missing or incorrect attribution please let us know.
+*Kiwi.js also uses code from a number of open source projects. Effort has been made to clearly identify authors in the code comments. If you notice and missing or incorrect attribution please let us know.*
##License
-* MIT
+* MIT
View
1 build/kiwi.js
@@ -425,6 +425,7 @@ var Kiwi;
return _this._loop();
});
this.raf.start();
+
if (this.bootCallbackOption) {
console.log(" Kiwi.Game: invoked boot callback");
this.bootCallbackOption();
View
2 docs/classes/Kiwi.Game.html
@@ -850,7 +850,7 @@ <h3 class="name"><code>_loop</code></h3>
- <a href="../files/src_core_Game.ts.html#l494"><code>src\core\Game.ts:494</code></a>
+ <a href="../files/src_core_Game.ts.html#l495"><code>src\core\Game.ts:495</code></a>
</p>
View
2 docs/data.json
@@ -12908,7 +12908,7 @@
},
{
"file": "src\\core\\Game.ts",
- "line": 494,
+ "line": 495,
"description": "The game loop.",
"itemtype": "method",
"name": "_loop",
View
1 docs/files/src_core_Game.ts.html
@@ -835,6 +835,7 @@ <h1 class="file-heading">File: src\core\Game.ts</h1>
this.raf = new Kiwi.Utils.RequestAnimationFrame(() =&gt; this._loop());
this.raf.start();
+
if (this.bootCallbackOption) {
console.log(&quot; Kiwi.Game: invoked boot callback&quot;);
this.bootCallbackOption();
View
2 examples/Transform/Rotation.ts
@@ -22,7 +22,7 @@ class Rotation extends Kiwi.State {
create() {
- this.game.stage.resize(800, 250);
+ this.game.stage.resize(800, 250);
/**
* When you want to scale an entity down you can access the transform property that is located on every entity.
View
1 examples/kiwi.js
@@ -425,6 +425,7 @@ var Kiwi;
return _this._loop();
});
this.raf.start();
+
if (this.bootCallbackOption) {
console.log(" Kiwi.Game: invoked boot callback");
this.bootCallbackOption();
View
135 gruntfile.js
@@ -1,5 +1,7 @@
module.exports = function(grunt) {
+ require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
+
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
@@ -7,53 +9,53 @@ module.exports = function(grunt) {
BASE_PATH: '',
DEVELOPMENT_PATH: '',
- ts: {
- build: {
- src: ["./src/**/*.ts"],
- out: './build/kiwi.js',
-
- options: {
- target: 'es5',
- module: 'commonjs',
- sourcemap: false,
- declaration: true,
- comments: true
- },
- }
+ ts: {
+ build: {
+ src: ["./src/**/*.ts"],
+ out: './build/kiwi.js',
+
+ options: {
+ target: 'es5',
+ module: 'commonjs',
+ sourcemap: false,
+ declaration: true,
+ comments: true
+ },
+ }
},
yuidoc: {
- compile: {
- name: '<%= pkg.name %>',
- description: '<%= pkg.description %>',
- version: '<%= pkg.version %>',
- url: '<%= pkg.homepage %>',
- options: {
- extension: '.ts',
- paths: '<%= DEVELOPMENT_PATH %>' + 'src/',
- outdir: '<%= BASE_PATH %>' + 'docs/'
- }
- }
- },
+ compile: {
+ name: '<%= pkg.name %>',
+ description: '<%= pkg.description %>',
+ version: '<%= pkg.version %>',
+ url: '<%= pkg.homepage %>',
+
+ options: {
+ extension: '.ts',
+ paths: '<%= DEVELOPMENT_PATH %>' + 'src/',
+ outdir: '<%= BASE_PATH %>' + 'docs/'
+ }
+ }
+ },
uglify: {
- build: {
- files: {
- 'build/kiwi.min.js': ['build/kiwi.js']
- }
+ build: {
+ files: {
+ 'build/kiwi.min.js': ['build/kiwi.js']
}
+ }
},
concat: {
- build: {
- src:['build/kiwi.js','src/gl-matrix-min.js'],
- dest: 'build/kiwi.js'
- },
- buildmin: {
- src:['build/kiwi.min.js','src/gl-matrix-min.js'],
- dest: 'build/kiwi.min.js'
- }
-
+ build: {
+ src: ['build/kiwi.js', 'src/gl-matrix-min.js'],
+ dest: 'build/kiwi.js'
+ },
+ buildmin: {
+ src: ['build/kiwi.min.js', 'src/gl-matrix-min.js'],
+ dest: 'build/kiwi.min.js'
+ }
},
tslint: {
@@ -66,46 +68,31 @@ module.exports = function(grunt) {
},
copy: {
- doclogo: {
- src: 'docstyles/logo.png',
- dest: 'docs/assets/css/logo.png'
- },
-
- docstyles: {
- src: 'docstyles/main.css',
- dest: 'docs/assets/css/main.css'
- },
-
- templateGame: {
- src: './build/kiwi.js',
- dest: './templateGame/lib/kiwi.js'
- },
-
- example: {
- src: './build/kiwi.js',
- dest: './examples/kiwi.js'
- }
-
- }
-
-
- });
-
- grunt.loadNpmTasks("grunt-ts");
-
- grunt.loadNpmTasks('grunt-contrib-uglify');
+ doclogo: {
+ src: 'docstyles/logo.png',
+ dest: 'docs/assets/css/logo.png'
+ },
- grunt.loadNpmTasks('grunt-contrib-yuidoc');
+ docstyles: {
+ src: 'docstyles/main.css',
+ dest: 'docs/assets/css/main.css'
+ },
- grunt.loadNpmTasks('grunt-contrib-copy');
+ templateGame: {
+ src: './build/kiwi.js',
+ dest: './templateGame/lib/kiwi.js'
+ },
- grunt.loadNpmTasks('grunt-tslint');
-
- grunt.loadNpmTasks('grunt-contrib-concat');
+ example: {
+ src: './build/kiwi.js',
+ dest: './examples/kiwi.js'
+ }
+ }
+ });
- grunt.registerTask("default", ["ts:build", "tslint","concat:build","uglify:build","copy:templateGame","copy:example"]);
- grunt.registerTask("full", ["ts:build","concat:build","uglify:build","yuidoc:compile","copy:templateGame","copy:example","copy:doclogo","copy:docstyles"]);
- grunt.registerTask("docs", ["yuidoc:compile","copy:doclogo","copy:docstyles"]);
+ grunt.registerTask("default", ["ts:build", "tslint", "concat:build", "uglify:build", "copy:templateGame", "copy:example"]);
+ grunt.registerTask("full", ["ts:build", "concat:build", "uglify:build", "yuidoc:compile", "copy:templateGame", "copy:example", "copy:doclogo", "copy:docstyles"]);
+ grunt.registerTask("docs", ["yuidoc:compile", "copy:doclogo", "copy:docstyles"]);
grunt.registerTask("join", ["concat:build"]);
};
View
3 license.txt
@@ -1,7 +1,6 @@
-Kiwi.js is releases under the MIT license
The MIT License (MIT)
-Copyright (c) 2014 GameLab
+Copyright (c) 2014 Gamelab
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
View
3 package.json
@@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "Kiwi.js is a Javascript/Typescript library for creating HTML5 games.",
"author": "GameLab",
-
+
"homepage": "http://kiwijs.org/",
"bugs": "https://github.com/gamelab/kiwi.js/issues?state=open",
"license": "MIT",
@@ -18,6 +18,7 @@
"dependencies": {},
"devDependencies": {
+ "matchdep": "~0.1.2",
"grunt": "~0.4.x",
"grunt-contrib-uglify": "0.2.x",
"typescript": "0.9.5",
View
1 src/core/Game.ts
@@ -485,6 +485,7 @@ module Kiwi {
this.raf = new Kiwi.Utils.RequestAnimationFrame(() => this._loop());
this.raf.start();
+
if (this.bootCallbackOption) {
console.log(" Kiwi.Game: invoked boot callback");
this.bootCallbackOption();
View
1 templateGame/lib/kiwi.js
@@ -425,6 +425,7 @@ var Kiwi;
return _this._loop();
});
this.raf.start();
+
if (this.bootCallbackOption) {
console.log(" Kiwi.Game: invoked boot callback");
this.bootCallbackOption();

0 comments on commit 4c9ed80

Please sign in to comment.
Something went wrong with that request. Please try again.