chingu_vectors 0.0.4 → 1.0.1
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/README +13 -8
- metadata +18 -2
data/README
CHANGED
@@ -13,7 +13,7 @@ You know how you get it:
|
|
13
13
|
|
14
14
|
After
|
15
15
|
require "chingu_vectors"
|
16
|
-
The trait
|
16
|
+
The trait +:vectors+ is available:
|
17
17
|
|
18
18
|
class Player < Chingu::GameObject
|
19
19
|
|
@@ -27,18 +27,23 @@ The trait <i>:vectors</i> is available:
|
|
27
27
|
end
|
28
28
|
|
29
29
|
== Another example
|
30
|
-
This would be a method that lets a ball follow another ball ("follow") nice and smoothly
|
30
|
+
This would be a method that lets a ball follow another ball ("follow") nice and smoothly. See example b for how it looks
|
31
31
|
def update
|
32
|
-
|
32
|
+
radii = size + follow.size
|
33
33
|
link = (follow.position - position)
|
34
|
-
if link.length <
|
34
|
+
if link.length < radii
|
35
35
|
self.speed = Vector::ZERO
|
36
36
|
else
|
37
|
-
link = link - link.normalize *
|
37
|
+
link = link - link.normalize * radii # Connection between edges
|
38
38
|
self.speed = link * Game.speed
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
==
|
43
|
-
|
44
|
-
|
42
|
+
== Changelog
|
43
|
+
[1.0.0] * Vector no longer inherits from Array
|
44
|
+
* Vector is constructable via []
|
45
|
+
* Added debug mode
|
46
|
+
* Added example for debug mode
|
47
|
+
* General trimming of code
|
48
|
+
* Improved documentation by using YARD tags
|
49
|
+
* As indicated by version number not longer compatible with older versions 0.0.x
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chingu_vectors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chingu
|
@@ -27,6 +27,22 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 0.8.1
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: named_parameters
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 0.1.0
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.1.0
|
30
46
|
- !ruby/object:Gem::Dependency
|
31
47
|
name: rspec
|
32
48
|
requirement: !ruby/object:Gem::Requirement
|