opal-phaser 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e78699bcf6efc6c0806584d265da70faf71241d
4
- data.tar.gz: e491344e6cfc27faa65fc2e6b1a3b1e51a8db31f
3
+ metadata.gz: 0815d03446aaf12d64e17701fc4a1a0ab9ddda49
4
+ data.tar.gz: 6518fa60e436642621096f885edcdc42ff24782b
5
5
  SHA512:
6
- metadata.gz: c5677cd0dcdb5108f67a0e6975b85b5c346803fb369798f2793dcf0d5c66f256d6168d7b31bad9f564478a7dfb0ea92983e857a6b0835ad5c8e4e92d708def77
7
- data.tar.gz: 193107f75c41d0366cf4c4d90718acefdd9465343f8cd575241e00bfdbad63023aef5d7f16e558618f87fc9eb2ef4a625214fcc77e66111e6ec7e79a377340e1
6
+ metadata.gz: 656b0144cc26e3f91c58ce0b034277ae4ab1a92db3063a2abafed3c426fc68ec5ce1b79752da9226ac44c9b75a0a4a2a57380b32b9adb86393bcfc41e3adce8b
7
+ data.tar.gz: 5f77e66a7b496b45d3d8b083e760c6bc7129712c22bdb1be255b6f12e01c4fba5092d34f61df807ad75d7872b39c1cdb3bc03d469a7685ee2f36bc04cf78ce14
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <img align="right" width="250" src="https://raw.githubusercontent.com/orbitalimpact/opal-phaser/master/common/images/logo.png">
6
6
 
7
- The goal of this project is to completely wrap the Phaser api in opal, to allow developers to write HTML5 and WebGL games entirely from ruby code.
7
+ The goal of this project is to completely wrap the Phaser API in Opal, to allow developers to write HTML5 and WebGL games entirely from Ruby code.
8
8
 
9
9
  If you have not heard of Phaser, check out these links:
10
10
 
data/demo/app/main.rb CHANGED
@@ -62,15 +62,15 @@ class Game
62
62
  end
63
63
 
64
64
  state.update do |game|
65
- game.physics.arcade.collide(@player, @platforms);
66
- game.physics.arcade.collide(@stars, @platforms);
65
+ game.physics.arcade.collide(@player, @platforms)
66
+ game.physics.arcade.collide(@stars, @platforms)
67
67
 
68
68
  collectStar = proc do |player, star|
69
69
  %x{ star.kill() }
70
70
  @score += 10
71
71
  @scoreText.text = "Score: #@score"
72
72
  end
73
- game.physics.arcade.overlap(@player, @stars, collectStar, nil, self);
73
+ game.physics.arcade.overlap(@player, @stars, collectStar, nil, self)
74
74
 
75
75
  @player.body.velocity.x = 0
76
76
 
data/lib/opal/phaser.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  if RUBY_ENGINE == 'opal'
2
2
  require 'opal/phaser/core'
3
- require 'opal/phaser/physics'
4
3
  else
5
4
  require 'opal'
6
5
  require 'opal/phaser/version'
@@ -1,2 +1,3 @@
1
1
  require 'opal/phaser/core/state'
2
2
  require 'opal/phaser/core/game'
3
+ require 'opal/phaser/core/physics'
@@ -1,6 +1,8 @@
1
1
  require 'native'
2
2
  module Phaser
3
3
  AUTO = %x{ Phaser.AUTO }
4
+ WEBGL = %x{ Phaser.WEBGL }
5
+ CANVAS = %x{ Phaser.CANVAS }
4
6
 
5
7
  class Game
6
8
  include ::Native
@@ -29,6 +31,7 @@ module Phaser
29
31
  alias_native :add, :add
30
32
  alias_native :world, :world
31
33
  alias_native :physics, :physics
34
+ alias_native :debug, :debug
32
35
  alias_native :input, :input
33
36
 
34
37
  end
File without changes
@@ -1,5 +1,5 @@
1
1
  module Opal
2
2
  module Phaser
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-phaser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Plymale
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-27 00:00:00.000000000 Z
11
+ date: 2015-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
@@ -73,18 +73,15 @@ files:
73
73
  - demo/assets/platform.png
74
74
  - demo/assets/sky.png
75
75
  - demo/assets/star.png
76
- - demo/block.png
77
76
  - demo/config.ru
78
77
  - demo/index.html
79
- - demo/main.js
80
- - demo/phaser.png
81
78
  - demo/style.css
82
79
  - lib/opal-phaser.rb
83
80
  - lib/opal/phaser.rb
84
81
  - lib/opal/phaser/core.rb
85
82
  - lib/opal/phaser/core/game.rb
83
+ - lib/opal/phaser/core/physics.rb
86
84
  - lib/opal/phaser/core/state.rb
87
- - lib/opal/phaser/physics.rb
88
85
  - lib/opal/phaser/version.rb
89
86
  - opal-phaser.gemspec
90
87
  homepage: http://github.com/orbitalimpact/opal-phaser
data/demo/block.png DELETED
Binary file
data/demo/main.js DELETED
@@ -1,15 +0,0 @@
1
- // This file is just a sanity check to see if this demo works in plain JS
2
-
3
- function Game () {
4
- this.game = new Phaser.Game(800, 600, Phaser.AUTO, "", { preload: preload, create: create });
5
-
6
- function preload () {
7
- this.game.load.image("logo", "phaser.png");
8
- }
9
-
10
- function create () {
11
- this.logo = this.game.add.sprite(100, 100, "logo");
12
- }
13
- }
14
-
15
- phaserGame = new Game();
data/demo/phaser.png DELETED
Binary file