entityjs 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/bin/entityjs +1 -1
- data/entityjs.gemspec +3 -2
- data/lib/entityjs.rb +13 -1
- data/lib/entityjs/command.rb +22 -16
- data/lib/entityjs/commands/build.rb +96 -48
- data/lib/entityjs/commands/eunit.rb +1 -1
- data/lib/entityjs/commands/html.rb +31 -0
- data/lib/entityjs/commands/min.rb +37 -0
- data/lib/entityjs/commands/new.rb +3 -0
- data/lib/entityjs/commands/server.rb +9 -3
- data/lib/entityjs/config.rb +163 -59
- data/lib/entityjs/dirc.rb +28 -0
- data/lib/entityjs/page.rb +73 -34
- data/lib/entityjs/version.rb +1 -1
- data/public/favicon.ico +0 -0
- data/public/play.html +33 -28
- data/public/qunit/qunit.entity.js +56 -6
- data/public/qunit/qunit.input.js +5 -5
- data/public/test.html +49 -0
- data/spec/javascripts/src/core/comp_spec.js +17 -6
- data/spec/javascripts/src/core/entity_spec.js +4 -5
- data/spec/javascripts/src/core/query_spec.js +25 -0
- data/spec/javascripts/src/core/re_spec.js +3 -3
- data/spec/javascripts/src/cycle/update_spec.js +8 -8
- data/spec/javascripts/src/display/align_spec.js +2 -2
- data/spec/javascripts/src/display/el_spec.js +17 -0
- data/spec/javascripts/src/input/keyboard_spec.js +4 -4
- data/spec/javascripts/src/input/mouse_spec.js +8 -7
- data/spec/javascripts/src/math/random_spec.js +8 -0
- data/spec/javascripts/src/util/clone_spec.js +20 -0
- data/spec/lib/entityjs/commands/build_spec.rb +3 -8
- data/spec/lib/entityjs/commands/html_spec.rb +27 -0
- data/spec/lib/entityjs/commands/min_spec.rb +30 -0
- data/spec/lib/entityjs/config_spec.rb +6 -0
- data/spec/lib/entityjs/page_spec.rb +4 -4
- data/src/core/comp.js +87 -31
- data/src/core/entity.js +38 -43
- data/src/core/load.js +2 -8
- data/src/core/query.js +17 -5
- data/src/core/re.js +1 -1
- data/src/core/system.js +8 -11
- data/src/cycle/drawlist.js +11 -11
- data/src/cycle/update.js +5 -5
- data/src/display/align.js +10 -3
- data/src/display/animate.js +26 -12
- data/src/display/el.js +99 -0
- data/src/input/keyboard.js +5 -5
- data/src/input/mouse.js +16 -11
- data/src/math/bisect.js +1 -1
- data/src/math/force.js +4 -4
- data/src/math/hitmap.js +2 -1
- data/src/math/iso.js +1 -1
- data/src/math/random.js +17 -2
- data/src/math/tile.js +1 -1
- data/src/media/sound.js +1 -1
- data/src/pattern/pathfind.js +2 -4
- data/src/save/storage.js +1 -1
- data/src/util/clone.js +12 -0
- data/src/util/scene.js +21 -16
- data/templates/circle/game.json +16 -0
- data/templates/circle/scripts/displays/circle.js +40 -0
- data/templates/circle/scripts/scenes/home.js +8 -17
- data/templates/circle/tests/scenes/home_test.js +3 -11
- data/templates/dom/game.json +6 -0
- data/templates/dom/scripts/els/btn.js +5 -0
- data/templates/dom/scripts/els/contain.js +5 -0
- data/templates/dom/scripts/els/header.js +5 -0
- data/templates/{animation → dom}/scripts/init.js +0 -0
- data/templates/dom/scripts/scenes/home.js +22 -0
- data/templates/{animation → dom}/scripts/scenes/load.js +0 -0
- data/templates/dom/tests/scenes/home_test.js +9 -0
- data/templates/{animation → dom}/tests/scenes/load_test.js +0 -0
- data/templates/isometric/game.json +16 -0
- data/templates/platform/game.json +18 -0
- data/templates/platform/scripts/displays/hero.js +1 -1
- data/templates/platform/scripts/items/coin.js +1 -1
- data/templates/platform/scripts/items/spring.js +1 -1
- data/templates/platform/tests/displays/hero_test.js +4 -4
- data/templates/platform/tests/factories.js +1 -1
- data/templates/platform/tests/items/coin_test.js +1 -1
- data/templates/pong/game.json +16 -0
- data/templates/tiltmaze/game.json +16 -0
- data/templates/tiltmaze/scripts/structs/level.js +1 -1
- data/templates/tiltmaze/scripts/tiles/walltile.js +1 -1
- metadata +45 -32
- data/.rspec +0 -2
- data/public/tests.html +0 -31
- data/src/cycle/worker.js +0 -9
- data/templates/animation/assets/images/hero.png +0 -0
- data/templates/animation/scripts/scenes/home.js +0 -41
- data/templates/animation/tests/init_test.js +0 -4
- data/templates/animation/tests/scenes/home_test.js +0 -15
- data/templates/arrow_keys/assets/images/arrow.png +0 -0
- data/templates/arrow_keys/config.yml +0 -22
- data/templates/arrow_keys/readme.txt +0 -9
- data/templates/arrow_keys/scripts/displays/arrow.js +0 -69
- data/templates/arrow_keys/scripts/init.js +0 -10
- data/templates/arrow_keys/scripts/inputs/controls.js +0 -35
- data/templates/arrow_keys/scripts/scenes/home.js +0 -20
- data/templates/arrow_keys/scripts/scenes/load.js +0 -57
- data/templates/arrow_keys/tests/displays/arrow_test.js +0 -29
- data/templates/arrow_keys/tests/init_test.js +0 -4
- data/templates/arrow_keys/tests/inputs/controls_test.js +0 -32
- data/templates/arrow_keys/tests/scenes/home_test.js +0 -0
- data/templates/arrow_keys/tests/scenes/load_test.js +0 -18
- data/templates/circle/config.yml +0 -22
- data/templates/isometric/config.yml +0 -22
- data/templates/platform/config.yml +0 -23
- data/templates/pong/config.yml +0 -22
- data/templates/tiltmaze/config.yml +0 -25
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Configure your game settings
|
|
2
|
-
|
|
3
|
-
width: 500
|
|
4
|
-
height: 400
|
|
5
|
-
canvas-id: game-canvas
|
|
6
|
-
|
|
7
|
-
#files to ignore in /scripts
|
|
8
|
-
scripts-ignore:
|
|
9
|
-
|
|
10
|
-
#specify files to be loaded first in /scripts
|
|
11
|
-
order:
|
|
12
|
-
|
|
13
|
-
#components to ignore in the entityjs source
|
|
14
|
-
#reduce file size by ignoring unused components
|
|
15
|
-
entity-ignore:
|
|
16
|
-
socket
|
|
17
|
-
wait
|
|
18
|
-
group
|
|
19
|
-
|
|
20
|
-
#ignore tests in /tests
|
|
21
|
-
tests-ignore:
|
|
22
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Configure your game settings
|
|
2
|
-
|
|
3
|
-
width: 500
|
|
4
|
-
height: 400
|
|
5
|
-
canvas-id: game-canvas
|
|
6
|
-
|
|
7
|
-
#files to ignore in /scripts
|
|
8
|
-
scripts-ignore:
|
|
9
|
-
|
|
10
|
-
#specify files to be loaded first in /scripts
|
|
11
|
-
order:
|
|
12
|
-
.*\.js
|
|
13
|
-
|
|
14
|
-
#components to ignore in the entityjs source
|
|
15
|
-
#reduce file size by ignoring unused components
|
|
16
|
-
entity-ignore:
|
|
17
|
-
socket
|
|
18
|
-
wait
|
|
19
|
-
group
|
|
20
|
-
|
|
21
|
-
#ignore tests in /tests
|
|
22
|
-
tests-ignore:
|
|
23
|
-
|
data/templates/pong/config.yml
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Configure your game settings
|
|
2
|
-
|
|
3
|
-
width: 400
|
|
4
|
-
height: 300
|
|
5
|
-
canvas-id: game-canvas
|
|
6
|
-
|
|
7
|
-
#files to ignore in /scripts
|
|
8
|
-
scripts-ignore:
|
|
9
|
-
|
|
10
|
-
#specify files to be loaded first in /scripts
|
|
11
|
-
order:
|
|
12
|
-
|
|
13
|
-
#components to ignore in the entityjs source
|
|
14
|
-
#reduce file size by ignoring unused components
|
|
15
|
-
entity-ignore:
|
|
16
|
-
socket
|
|
17
|
-
wait
|
|
18
|
-
group
|
|
19
|
-
|
|
20
|
-
#ignore tests in /tests
|
|
21
|
-
tests-ignore:
|
|
22
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Configure your game settings
|
|
2
|
-
|
|
3
|
-
width: 180
|
|
4
|
-
height: 180
|
|
5
|
-
canvas-id: game-canvas
|
|
6
|
-
|
|
7
|
-
canvas-border: false
|
|
8
|
-
|
|
9
|
-
#files to ignore in /scripts
|
|
10
|
-
scripts-ignore:
|
|
11
|
-
|
|
12
|
-
#specify files to be loaded first in /scripts
|
|
13
|
-
order:
|
|
14
|
-
/tile.js$
|
|
15
|
-
|
|
16
|
-
#components to ignore in the entityjs source
|
|
17
|
-
#reduce file size by ignoring unused components
|
|
18
|
-
entity-ignore:
|
|
19
|
-
socket
|
|
20
|
-
wait
|
|
21
|
-
group
|
|
22
|
-
|
|
23
|
-
#ignore tests in /tests
|
|
24
|
-
tests-ignore:
|
|
25
|
-
|