sottolio 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +0 -5
- data/lib/sottolio/version.rb +1 -1
- data/opal/sottolio/wrapper/image.rb +11 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a2bbfd7861b599ec96ba13cec50a24646223d20
|
4
|
+
data.tar.gz: 03f6041c3a0b834e26be3f4da961a00857026479
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02573a9fbb94f4a0bf0206e1c5c492522ec93249388e50f694047437e6fd38082b785a418844e0fe4bc166d4607185715d7a643cace1f848e464ff5b45f5736b
|
7
|
+
data.tar.gz: a8eb6f6aa726802af102c4775fbdeeff13d9e96d14e3d3efd6fde4de2aaaeac8d302915ebf480a12ba39fd01c5f164fce1159269048c5a46bba2828eab599203
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -24,8 +24,3 @@ sottolio will generate `example/game/sottolio.js` and `example/game/sottolio.min
|
|
24
24
|
You're now ready to open `example/game/index.html` in your browser!
|
25
25
|
|
26
26
|
The [demo](http://www.giovannicapuano.net/sottolio/) is also available in the web, as well the [video gameplay](http://www.youtube.com/watch?v=djV_Z5OeBmg&feature=youtu.be) (it's a bit old tho).
|
27
|
-
|
28
|
-
FAQ
|
29
|
-
===
|
30
|
-
**Q**: I can't see one or more assets (girls, images, sounds or whatever) on Chrome
|
31
|
-
*R*: This is a well known bug. Please refresh the page thrice.
|
data/lib/sottolio/version.rb
CHANGED
@@ -18,26 +18,26 @@
|
|
18
18
|
#++
|
19
19
|
module Sottolio
|
20
20
|
class Image < Canvas
|
21
|
-
attr_accessor :
|
21
|
+
attr_accessor :id
|
22
22
|
|
23
23
|
def initialize(element, image, id, x = 0, y = 0)
|
24
24
|
super element
|
25
25
|
|
26
|
-
@image
|
27
|
-
|
26
|
+
@image = `new Image()`
|
27
|
+
@image_src = image
|
28
28
|
|
29
|
-
@id
|
30
|
-
@x
|
31
|
-
@y
|
29
|
+
@id = id
|
30
|
+
@x = x
|
31
|
+
@y = y
|
32
32
|
end
|
33
33
|
|
34
34
|
def on_load(callback)
|
35
|
-
`#@image.onload = callback
|
35
|
+
`#@image.onload = callback;`
|
36
|
+
`#@image.src = #@image_src;`
|
36
37
|
end
|
37
38
|
|
38
39
|
def draw_image(*args)
|
39
|
-
image = args
|
40
|
-
x, y, width, height = args
|
40
|
+
image, x, y = args
|
41
41
|
`#@canvas.drawImage(image, x, y)`
|
42
42
|
end
|
43
43
|
|
@@ -51,7 +51,8 @@ module Sottolio
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def out?
|
54
|
-
|
54
|
+
position = @width + @x
|
55
|
+
position < 0 || position > 1276
|
55
56
|
end
|
56
57
|
|
57
58
|
def slide(pre_callback = nil, callback = nil, to = :right, speed = 1)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sottolio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Giovanni Capuano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
version_requirements: !ruby/object:Gem::Requirement
|