Skip to content

Commit

Permalink
Merge pull request #49 from schadocalex/master
Browse files Browse the repository at this point in the history
Version 4.1.2
  • Loading branch information
schadocalex committed Feb 24, 2015
2 parents 0f7656d + bc4be59 commit ef22e7a
Show file tree
Hide file tree
Showing 63 changed files with 119 additions and 107 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#### 4.1.2 (24/02/2015)
Correction de bugs :
* Mots mal détruits

#### 4.1.1 (24/02/2015)
Fonctionnalités :
* Ajout du son ambiant à nouveau (+ version mp3)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Application - La Séparation v4.1.1
Application - La Séparation v4.1.2
=======

Application web et tablette sur la poésie à deux mi-mots
1 change: 0 additions & 1 deletion build/res/img

This file was deleted.

Binary file added build/res/img/editeur/add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/font/centrale_b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/font/centrale_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/font/centrale_h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/font/demibas_b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/font/demibas_h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/font/demihaut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/font/demihaut_b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/font/demihaut_h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/arrow_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/arrow_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/cross.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/hand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/logo_miniature.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/logo_miniature_old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/roll_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/roll_down_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/roll_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/roll_up_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/sauvegarde.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/scroll_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/scroll_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/scroll_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/gui/scroll_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/res/img/logo/logo.png
Binary file added build/res/img/logo/logo_central.png
Binary file added build/res/img/logo/logo_down.png
Binary file added build/res/img/logo/logo_up.png
Binary file added build/res/img/menu_labo/checkbox.png
Binary file added build/res/img/menu_labo/checkbox_valid.png
Binary file added build/res/img/menu_labo/input_text.png
Binary file added build/res/img/menu_labo/input_text_working_on.png
Binary file added build/res/img/menu_recit/erase.png
Binary file added build/res/img/menu_recit/vignette.png
Binary file added build/res/img/menu_recit/vignette_working_on.png
Binary file added build/res/img/ombre/CYGNE.png
Binary file added build/res/img/ombre/OMBRE.png
Binary file added build/res/img/ombre/shading.png
Binary file added build/res/img/ombre/slicing.png
1 change: 0 additions & 1 deletion build/res/sound/ambiant.mp3

This file was deleted.

Binary file added build/res/sound/ambiant.mp3
Binary file not shown.
1 change: 0 additions & 1 deletion build/res/sound/ambiant.ogg

This file was deleted.

Binary file added build/res/sound/ambiant.ogg
Binary file not shown.
1 change: 0 additions & 1 deletion build/res/story

This file was deleted.

15 changes: 15 additions & 0 deletions build/res/story/stories.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file removed res/sound/cut.ogg
Empty file.
Binary file removed res/sound/cut_old.ogg
Binary file not shown.
Empty file removed res/sound/rub1.ogg
Empty file.
Binary file removed res/sound/rub1_old.ogg
Binary file not shown.
Empty file removed res/sound/rub2.ogg
Empty file.
Binary file removed res/sound/rub2_old.ogg
Binary file not shown.
Empty file removed res/sound/tap.ogg
Empty file.
Binary file removed res/sound/tap_old.ogg
Binary file not shown.
Empty file removed res/sound/tear.ogg
Empty file.
Empty file removed res/sound/tear1.ogg
Empty file.
Binary file removed res/sound/tear1_old.ogg
Binary file not shown.
Empty file removed res/sound/tear2.ogg
Empty file.
Binary file removed res/sound/tear2_old.ogg
Binary file not shown.
Binary file removed res/sound/tear_old.ogg
Binary file not shown.
195 changes: 96 additions & 99 deletions src/lib_separation/event/event.js
Original file line number Diff line number Diff line change
@@ -1,111 +1,108 @@
/*
Namespace Event
*/
var Event = Event || {};
(function () {
"use strict";

var old_touch_move = {x:-1, y:-1};
Event.events = {
tap : (appOnDevice_real() ? 'click' : 'click'),
touchmove : (appOnDevice_real() ? 'touchmove' : 'mousemove'),
touchend : (appOnDevice_real() ? 'touchend' : 'mouseleave'),
dbltap : (appOnDevice_real() ? 'dblclick' : 'dblclick'),
};

Event.getMousePos = function(event) {
// event de createJS 'click'
return { x: event.stageX, y: event.stageY };
};

Event.getMousePosMove = function(event) {
// event classique HTML
if(!appOnDevice_real()) {
return { x: event.clientX, y: event.clientY };
}
else {
return {
x: event.touches[0].clientX,
y: event.touches[0].clientY
};
}
};

Event.getTouchPos = function(event) {
return Event.getMousePos(event);
};

Event.getTouchMove = function(event) {
var new_touch_move = Event.getMousePosMove(event);

if(old_touch_move.x == -1 && old_touch_move.y == -1)
old_touch_move = new_touch_move;

var coords = {
x1: old_touch_move.x,
y1: old_touch_move.y,
x2: new_touch_move.x,
y2: new_touch_move.y,
var Event = {};

var old_touch_move = {x:-1, y:-1};
Event.events = {
tap : (appOnDevice_real() ? 'click' : 'click'),
touchmove : (appOnDevice_real() ? 'touchmove' : 'mousemove'),
touchend : (appOnDevice_real() ? 'touchend' : 'mouseleave'),
dbltap : (appOnDevice_real() ? 'dblclick' : 'dblclick'),
};

Event.getMousePos = function(event) {
// event de createJS 'click'
return { x: event.stageX, y: event.stageY };
};

Event.getMousePosMove = function(event) {
// event classique HTML
if(!appOnDevice_real()) {
return { x: event.clientX, y: event.clientY };
}
else {
return {
x: event.touches[0].clientX,
y: event.touches[0].clientY
};
old_touch_move = new_touch_move;

return coords;
};
}
};

Event.invertTouchmoveXY = function(coords) {
var temp1 = coords.x1, temp2 = coords.x2;
Event.getTouchPos = function(event) {
return Event.getMousePos(event);
};

coords.x1 = coords.y1;
coords.x2 = coords.y2;
coords.y1 = temp1;
coords.y2 = temp2;

return coords;
};

Event.touchmove = function(event) {
event.preventDefault();
var coords = Event.getTouchMove(event);
Event.getTouchMove = function(event) {
var new_touch_move = Event.getMousePosMove(event);

Event.cut(coords);
Event.erase(coords);
Event.open(Event.invertTouchmoveXY(coords));
};
if(old_touch_move.x == -1 && old_touch_move.y == -1)
old_touch_move = new_touch_move;

Event.touchend = function(event) {
old_touch_move = {x:-1, y:-1};
Event.touchMoveAbortAll(Event.cut_obj);
Event.touchMoveAbortAll(Event.erase_obj);
Event.touchMoveAbortAll(Event.open_obj);
var coords = {
x1: old_touch_move.x,
y1: old_touch_move.y,
x2: new_touch_move.x,
y2: new_touch_move.y,
};

Event.destroy = function(id, type) {
if(type !== undefined) {
switch(type) {
case 'tap' : Event.destroyTap(id); break;
case 'dbltap' : Event.destroyDbltap(id); break;
case 'cut' : Event.destroyCut(id); break;
case 'erase' : Event.destroyErase(id); break;
case 'open' : Event.destroyOpen(id); break;
default: alert('"' + type + '" inconnu dans Event.destroy()');
}
}
else {
Event.destroyTap(id);
Event.destroyDbltap(id);
Event.destroyCut(id);
Event.destroyErase(id);
Event.destroyOpen(id);
old_touch_move = new_touch_move;

return coords;
};

Event.invertTouchmoveXY = function(coords) {
var temp1 = coords.x1, temp2 = coords.x2;

coords.x1 = coords.y1;
coords.x2 = coords.y2;
coords.y1 = temp1;
coords.y2 = temp2;

return coords;
};

Event.touchmove = function(event) {
event.preventDefault();
var coords = Event.getTouchMove(event);

Event.cut(coords);
Event.erase(coords);
Event.open(Event.invertTouchmoveXY(coords));
};

Event.touchend = function(event) {
old_touch_move = {x:-1, y:-1};
Event.touchMoveAbortAll(Event.cut_obj);
Event.touchMoveAbortAll(Event.erase_obj);
Event.touchMoveAbortAll(Event.open_obj);
};

Event.destroy = function(id, type) {
if(type !== undefined) {
switch(type) {
case 'tap' : Event.destroyTap(id); break;
case 'dbltap' : Event.destroyDbltap(id); break;
case 'cut' : Event.destroyCut(id); break;
case 'erase' : Event.destroyErase(id); break;
case 'open' : Event.destroyOpen(id); break;
default: alert('"' + type + '" inconnu dans Event.destroy()');
}
};

Event.destroyAll = function() {
Destroy.list(Event.tap_obj);
Destroy.list(Event.dbltap_obj);
Destroy.list(Event.cut_obj);
Destroy.list(Event.erase_obj);
Destroy.list(Event.open_obj);
};
})();
}
else {
Event.destroyTap(id);
Event.destroyDbltap(id);
Event.destroyCut(id);
Event.destroyErase(id);
Event.destroyOpen(id);
}
};

Event.destroyAll = function() {
Destroy.list(Event.tap_obj);
Destroy.list(Event.dbltap_obj);
Destroy.list(Event.cut_obj);
Destroy.list(Event.erase_obj);
Destroy.list(Event.open_obj);
};

scriptLoaded('scripts/libs/separation_toolkit/event/event.js');
8 changes: 3 additions & 5 deletions src/lib_separation/word/word.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,16 @@ function Word(value, next_value, police, code, autoAddGesture) {
}

Word.prototype.done = function(fct_done) {
if(this.list_done[fct_done] !== undefined)
if(this.list_done[fct_done] !== undefined) {
this.list_done[fct_done]();
}
};

Word.prototype.generate = function() {

var new_code, new_value, new_next_value;

if(!this.font) {
if(!!this.font) {
this.destroy();
}

Expand Down Expand Up @@ -126,9 +127,6 @@ Word.prototype.displayGUI = function() {

Word.prototype.destroy = function() {
this.destroyTimeouts();



Event.destroy(this.getId());
for(var i = 0; i < this.tween.length; i++) {
this.tween[i].pause();
Expand Down

0 comments on commit ef22e7a

Please sign in to comment.