Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rtsan committed Jan 4, 2016
2 parents e422ff4 + 3a371f2 commit 593ab7c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 10 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,28 @@
# v0.8.3

- feature
- remove space key code from PREVENT_DEFAULT_KEY_CODES
- improve documentation translation (@thx tygerpatch)
- add telepathy plugin
- add enchant.ENV.COLOR_DETECTION_LEVEL

- bugfix
- fix map render lag
- Timeline#exec return this (thx @authorNari)
- fix error in WebAudioSound#play (thx @MaciejKus)
- reduce audio context creation
- improve touch detection precision

- plugins
- memory.enchant.js
- avoid JSON.parse bug in android (thx @hshimo)
- widget.enchant.js
- add LazyListView
- ui.enchant.js
- improve touch area (thx @cs8898)
- gl.enchant.js
- allow to change buffer type

# v0.8.2 # v0.8.2


- feature - feature
Expand Down
6 changes: 3 additions & 3 deletions dev/plugins/ui.enchant.js
Expand Up @@ -76,10 +76,10 @@ enchant.ui.Pad = enchant.Class.create(enchant.Sprite, {
}); });
}, },
_detectInput: function(x, y) { _detectInput: function(x, y) {
x -= this.width / 2; x -= this.width * 0.5;
y -= this.height / 2; y -= this.height * 0.5;
var input = { left: false, right: false, up: false, down: false }; var input = { left: false, right: false, up: false, down: false };
if (x * x + y * y > 200) { if (x * x + y * y <= 2500 && x * x + y * y > 200) {
if (x < 0 && y < x * x * 0.1 && y > x * x * -0.1) { if (x < 0 && y < x * x * 0.1 && y > x * x * -0.1) {
input.left = true; input.left = true;
} }
Expand Down
2 changes: 1 addition & 1 deletion dev/src/WebAudioSound.js
Expand Up @@ -51,7 +51,7 @@ enchant.WebAudioSound = enchant.Class.create(enchant.EventTarget, {
*/ */
play: function(dup) { play: function(dup) {
if (this._state === 1 && !dup) { if (this._state === 1 && !dup) {
this.src.disconnect(this.connectTarget); this.src.disconnect();
} }
if (this._state !== 2) { if (this._state !== 2) {
this._currentTime = 0; this._currentTime = 0;
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{ {
"name": "enchant.js", "name": "enchant.js",
"version": "0.8.2", "version": "0.8.3",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/wise9/enchant.js.git" "url": "https://github.com/wise9/enchant.js.git"
Expand Down
10 changes: 5 additions & 5 deletions tests/mocha/enchant.js/test_deferred.js
Expand Up @@ -19,14 +19,14 @@ describe("Deferred", function(){
result = true; result = true;
}); });
expect(result).to.be.false; expect(result).to.be.false;
setTimeout(done, 100); setTimeout(done, 150);
setTimeout(function(){ setTimeout(function(){
expect(result).to.be.true; expect(result).to.be.true;
}, 50); }, 50);
}); });


it("should execute chained Deferred", function(done){ it("should execute chained Deferred", function(done){
setTimeout(done, 100); setTimeout(done, 150);
var result1 = result2 = false; var result1 = result2 = false;
Deferred.next(function(){ Deferred.next(function(){
result1 = true; result1 = true;
Expand All @@ -41,7 +41,7 @@ describe("Deferred", function(){
}); });


it("should pass returned value to chained next Dererred", function(done) { it("should pass returned value to chained next Dererred", function(done) {
setTimeout(done, 100); setTimeout(done, 150);
var val; var val;
Deferred.next(function(){ Deferred.next(function(){
return 'foo'; return 'foo';
Expand All @@ -64,7 +64,7 @@ describe("Deferred", function(){
}); });


it("should handle the error", function(done){ it("should handle the error", function(done){
setTimeout(done, 100); setTimeout(done, 150);
var result1 = result2 = false; var result1 = result2 = false;
Deferred.next(function(){ Deferred.next(function(){
throw new Error('fail'); throw new Error('fail');
Expand Down Expand Up @@ -161,7 +161,7 @@ describe("Deferred", function(){
}); });


it("should handle the error when execute parallel", function(done){ it("should handle the error when execute parallel", function(done){
setTimeout(done, 100); setTimeout(done, 150);
var result = false, counter = 0; var result = false, counter = 0;
Deferred.parallel([ Deferred.parallel([
Deferred.next(function(){ Deferred.next(function(){
Expand Down

0 comments on commit 593ab7c

Please sign in to comment.