raylib-bindings 0.0.5 → 0.0.9
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/ChangeLog +30 -0
- data/README.md +53 -20
- data/lib/libraylib.dll +0 -0
- data/lib/libraylib.dylib +0 -0
- data/lib/physac.dll +0 -0
- data/lib/physac.dylib +0 -0
- data/lib/physac.rb +22 -23
- data/lib/raygui.dll +0 -0
- data/lib/raygui.dylib +0 -0
- data/lib/raygui.rb +270 -267
- data/lib/raylib_main.rb +59 -33
- data/lib/raymath.rb +43 -3
- data/lib/rlgl.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ae2ed8883b7178ae1ba22db3f15ebad4a38c43958211feb7af947c2ed66869f
|
4
|
+
data.tar.gz: e8cec377cb402a7e4ef9b6625628fc13ccac1c2d82b46a9285094ceac8c06a11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a283d8d05d6b3be982147569bca5384b46d192a3232131b6385f4596bcb285be8c07553646261180ea85437bfa3978ff3557b56adf95a26526fb1925e895a53d
|
7
|
+
data.tar.gz: 86be92151b1a124a90f82471dce30e97d621681fe6c97991cda889be13944d5e3d68a6052f7acd1e229f2f72586d2442550b68be45a6c8d5132d10b55adf3f58
|
data/ChangeLog
CHANGED
@@ -1,3 +1,33 @@
|
|
1
|
+
2022-07-18 vaiorabbit <http://twitter.com/vaiorabbit>
|
2
|
+
|
3
|
+
* examples/core_storage_values.rb: Removed ( see https://github.com/raysan5/raylib/commit/e722a8dbef59cf0ecccf141af61e1e1c8a24849f )
|
4
|
+
* examples/core_drop_files.rb: Updated ( see https://github.com/raysan5/raylib/commit/b8f67c628553cb9199f51efc9b20eb5991d58e8f )
|
5
|
+
* Updated DLLs
|
6
|
+
* examples/textures_sprite_anim.rb: Added
|
7
|
+
* examples/textures_gif_player.rb: Added
|
8
|
+
|
9
|
+
2022-07-17 vaiorabbit <http://twitter.com/vaiorabbit>
|
10
|
+
|
11
|
+
* Pulled latest raylib ( https://github.com/raysan5/raylib/commit/49a534b5d478fd2f195380143ded4f0ab764c228 ) / and raygui ( https://github.com/raysan5/raygui/commit/9c826f213f5b287159a0b0e1a0670a27c09dcc7e )
|
12
|
+
* physac_dll now refers new repository ( https://github.com/raysan5/physac )
|
13
|
+
|
14
|
+
2022-06-08 vaiorabbit <http://twitter.com/vaiorabbit>
|
15
|
+
|
16
|
+
* Pulled latest raylib ( https://github.com/raysan5/raylib/commit/70ec71a373db426685590127122e77bfd66cbf69 ) / and raygui ( https://github.com/raysan5/raygui/commit/47269f30ce55f0399096d1bee4188b8b8c0d7186 )
|
17
|
+
* Updated submodules appropriately
|
18
|
+
|
19
|
+
2022-04-29 vaiorabbit <http://twitter.com/vaiorabbit>
|
20
|
+
|
21
|
+
* script/rebuild_libs_windows.cmd: Added
|
22
|
+
* Pulled latest raylib ( https://github.com/raysan5/raylib/commit/5c66cc1c9bb4a3ae4af7cc6f82a521137ed5484d ) / Updated submodules appropriately
|
23
|
+
* [Windows] Updated DLLs with the latest raylib ( https://github.com/raysan5/raylib/commit/5c66cc1c9bb4a3ae4af7cc6f82a521137ed5484d ) and raygui ( https://github.com/raysan5/raygui/commit/865bb293764073c01e74314ef647464f1f10fd96 )
|
24
|
+
* [macOS] Updated DLLs with the latest raylib
|
25
|
+
|
26
|
+
2022-04-24 vaiorabbit <http://twitter.com/vaiorabbit>
|
27
|
+
|
28
|
+
* Pulled latest raylib ( https://github.com/raysan5/raylib/commit/233cf3970c9148c4963cfdea20e49e761104f9de ) and raygui ( https://github.com/raysan5/raygui/commit/865bb293764073c01e74314ef647464f1f10fd96 )
|
29
|
+
* examples/models_mesh_picking.rb: Applied changes done by https://github.com/raysan5/raylib/commit/90fc7c0376f39d7b19d632e1d69dec715ec3f2a8
|
30
|
+
|
1
31
|
2022-02-26 vaiorabbit <http://twitter.com/vaiorabbit>
|
2
32
|
|
3
33
|
* Pulled latest raylib ( https://github.com/raysan5/raylib/commit/ead8003044aab21f8d155b91ec0bce90cd193500 ), raygui ( https://github.com/raysan5/raygui/commit/c8d8fb5a865a6730cec2c609704333577463feb1 ) and Physac ( https://github.com/victorfisac/Physac/commit/c9c6b3e7054d609e93e52e70f17d5b4dd043575d )
|
data/README.md
CHANGED
@@ -2,10 +2,17 @@
|
|
2
2
|
|
3
3
|
# Yet another raylib wrapper for Ruby #
|
4
4
|
|
5
|
-
Provides latest [raylib](https://github.com/raysan5/raylib) API for Ruby
|
6
|
-
|
7
5
|
* Created : 2021-10-17
|
8
|
-
* Last modified : 2022-
|
6
|
+
* Last modified : 2022-07-18
|
7
|
+
|
8
|
+
Provides Ruby bindings for raylib-related libraries including:
|
9
|
+
|
10
|
+
* [raylib](https://github.com/raysan5/raylib)
|
11
|
+
* raylib
|
12
|
+
* raymath
|
13
|
+
* rlgl
|
14
|
+
* [raygui](https://github.com/raysan5/raygui)
|
15
|
+
* [Physac](https://github.com/raysan5/physac)
|
9
16
|
|
10
17
|
## Features ##
|
11
18
|
|
@@ -15,6 +22,32 @@ Provides latest [raylib](https://github.com/raysan5/raylib) API for Ruby
|
|
15
22
|
|
16
23
|
## Prerequisites ##
|
17
24
|
|
25
|
+
* Ruby interpreter
|
26
|
+
* Tested on:
|
27
|
+
* [macOS]
|
28
|
+
* ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
|
29
|
+
* [Windows] https://rubyinstaller.org/downloads/ Ruby+Devkit
|
30
|
+
* ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]
|
31
|
+
|
32
|
+
* Compiler
|
33
|
+
* Tested on:
|
34
|
+
* [macOS] clang
|
35
|
+
|
36
|
+
$ clang --version
|
37
|
+
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
|
38
|
+
Target: arm64-apple-darwin21.5.0
|
39
|
+
Thread model: posix
|
40
|
+
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
41
|
+
|
42
|
+
* [Windows] gcc
|
43
|
+
|
44
|
+
gcc (Rev10, Built by MSYS2 project) 11.2.0
|
45
|
+
|
46
|
+
* CMake https://cmake.org/download/
|
47
|
+
|
48
|
+
<details>
|
49
|
+
<summary>Older versions</summary>
|
50
|
+
|
18
51
|
* Ruby interpreter
|
19
52
|
* Tested on:
|
20
53
|
* [macOS]
|
@@ -37,7 +70,7 @@ Provides latest [raylib](https://github.com/raysan5/raylib) API for Ruby
|
|
37
70
|
|
38
71
|
gcc (Rev9, Built by MSYS2 project) 11.2.0
|
39
72
|
|
40
|
-
|
73
|
+
</details>
|
41
74
|
|
42
75
|
## Limitation ##
|
43
76
|
|
@@ -60,24 +93,24 @@ Shared libraries in `lib` directory are built on top of these products and are a
|
|
60
93
|
|
61
94
|
All ruby codes here are available under the terms of the zlib/libpng License ( http://opensource.org/licenses/Zlib ).
|
62
95
|
|
63
|
-
Ruby-raylib : Yet another raylib wrapper for Ruby
|
64
|
-
Copyright (c) 2021-2022 vaiorabbit <http://twitter.com/vaiorabbit>
|
96
|
+
Ruby-raylib : Yet another raylib wrapper for Ruby
|
97
|
+
Copyright (c) 2021-2022 vaiorabbit <http://twitter.com/vaiorabbit>
|
65
98
|
|
66
|
-
This software is provided 'as-is', without any express or implied
|
67
|
-
warranty. In no event will the authors be held liable for any damages
|
68
|
-
arising from the use of this software.
|
99
|
+
This software is provided 'as-is', without any express or implied
|
100
|
+
warranty. In no event will the authors be held liable for any damages
|
101
|
+
arising from the use of this software.
|
69
102
|
|
70
|
-
Permission is granted to anyone to use this software for any purpose,
|
71
|
-
including commercial applications, and to alter it and redistribute it
|
72
|
-
freely, subject to the following restrictions:
|
103
|
+
Permission is granted to anyone to use this software for any purpose,
|
104
|
+
including commercial applications, and to alter it and redistribute it
|
105
|
+
freely, subject to the following restrictions:
|
73
106
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
107
|
+
1. The origin of this software must not be misrepresented; you must not
|
108
|
+
claim that you wrote the original software. If you use this software
|
109
|
+
in a product, an acknowledgment in the product documentation would be
|
110
|
+
appreciated but is not required.
|
78
111
|
|
79
|
-
|
80
|
-
|
112
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
113
|
+
misrepresented as being the original software.
|
81
114
|
|
82
|
-
|
83
|
-
|
115
|
+
3. This notice may not be removed or altered from any source
|
116
|
+
distribution.
|
data/lib/libraylib.dll
CHANGED
Binary file
|
data/lib/libraylib.dylib
CHANGED
Binary file
|
data/lib/physac.dll
CHANGED
Binary file
|
data/lib/physac.dylib
CHANGED
Binary file
|
data/lib/physac.rb
CHANGED
@@ -13,7 +13,6 @@ module Raylib
|
|
13
13
|
PHYSAC_MAX_BODIES = 64
|
14
14
|
PHYSAC_MAX_MANIFOLDS = 4096
|
15
15
|
PHYSAC_MAX_VERTICES = 24
|
16
|
-
PHYSAC_CIRCLE_VERTICES = 24
|
17
16
|
PHYSAC_COLLISION_ITERATIONS = 100
|
18
17
|
PHYSAC_PENETRATION_ALLOWANCE = 0.05
|
19
18
|
PHYSAC_PENETRATION_CORRECTION = 0.4
|
@@ -32,7 +31,7 @@ module Raylib
|
|
32
31
|
|
33
32
|
# Struct
|
34
33
|
|
35
|
-
class
|
34
|
+
class Matrix2x2 < FFI::Struct
|
36
35
|
layout(
|
37
36
|
:m00, :float,
|
38
37
|
:m01, :float,
|
@@ -41,7 +40,7 @@ module Raylib
|
|
41
40
|
)
|
42
41
|
end
|
43
42
|
|
44
|
-
class
|
43
|
+
class PhysicsVertexData < FFI::Struct
|
45
44
|
layout(
|
46
45
|
:vertexCount, :uint,
|
47
46
|
:positions, [Vector2, 24],
|
@@ -53,9 +52,9 @@ module Raylib
|
|
53
52
|
layout(
|
54
53
|
:type, :int,
|
55
54
|
:body, :pointer,
|
55
|
+
:vertexData, PhysicsVertexData,
|
56
56
|
:radius, :float,
|
57
|
-
:transform,
|
58
|
-
:vertexData, PolygonData,
|
57
|
+
:transform, Matrix2x2,
|
59
58
|
)
|
60
59
|
end
|
61
60
|
|
@@ -104,66 +103,66 @@ module Raylib
|
|
104
103
|
def self.setup_physac_symbols()
|
105
104
|
symbols = [
|
106
105
|
:InitPhysics,
|
107
|
-
:
|
106
|
+
:UpdatePhysics,
|
107
|
+
:ResetPhysics,
|
108
|
+
:ClosePhysics,
|
108
109
|
:SetPhysicsTimeStep,
|
109
|
-
:IsPhysicsEnabled,
|
110
110
|
:SetPhysicsGravity,
|
111
111
|
:CreatePhysicsBodyCircle,
|
112
112
|
:CreatePhysicsBodyRectangle,
|
113
113
|
:CreatePhysicsBodyPolygon,
|
114
|
+
:DestroyPhysicsBody,
|
114
115
|
:PhysicsAddForce,
|
115
116
|
:PhysicsAddTorque,
|
116
117
|
:PhysicsShatter,
|
117
|
-
:
|
118
|
+
:SetPhysicsBodyRotation,
|
118
119
|
:GetPhysicsBody,
|
120
|
+
:GetPhysicsBodiesCount,
|
119
121
|
:GetPhysicsShapeType,
|
120
122
|
:GetPhysicsShapeVerticesCount,
|
121
123
|
:GetPhysicsShapeVertex,
|
122
|
-
:SetPhysicsBodyRotation,
|
123
|
-
:DestroyPhysicsBody,
|
124
|
-
:ClosePhysics,
|
125
124
|
]
|
126
125
|
args = {
|
127
126
|
:InitPhysics => [],
|
128
|
-
:
|
127
|
+
:UpdatePhysics => [],
|
128
|
+
:ResetPhysics => [],
|
129
|
+
:ClosePhysics => [],
|
129
130
|
:SetPhysicsTimeStep => [:double],
|
130
|
-
:IsPhysicsEnabled => [],
|
131
131
|
:SetPhysicsGravity => [:float, :float],
|
132
132
|
:CreatePhysicsBodyCircle => [Vector2.by_value, :float, :float],
|
133
133
|
:CreatePhysicsBodyRectangle => [Vector2.by_value, :float, :float, :float],
|
134
134
|
:CreatePhysicsBodyPolygon => [Vector2.by_value, :float, :int, :float],
|
135
|
+
:DestroyPhysicsBody => [:pointer],
|
135
136
|
:PhysicsAddForce => [:pointer, Vector2.by_value],
|
136
137
|
:PhysicsAddTorque => [:pointer, :float],
|
137
138
|
:PhysicsShatter => [:pointer, Vector2.by_value, :float],
|
138
|
-
:
|
139
|
+
:SetPhysicsBodyRotation => [:pointer, :float],
|
139
140
|
:GetPhysicsBody => [:int],
|
141
|
+
:GetPhysicsBodiesCount => [],
|
140
142
|
:GetPhysicsShapeType => [:int],
|
141
143
|
:GetPhysicsShapeVerticesCount => [:int],
|
142
144
|
:GetPhysicsShapeVertex => [:pointer, :int],
|
143
|
-
:SetPhysicsBodyRotation => [:pointer, :float],
|
144
|
-
:DestroyPhysicsBody => [:pointer],
|
145
|
-
:ClosePhysics => [],
|
146
145
|
}
|
147
146
|
retvals = {
|
148
147
|
:InitPhysics => :void,
|
149
|
-
:
|
148
|
+
:UpdatePhysics => :void,
|
149
|
+
:ResetPhysics => :void,
|
150
|
+
:ClosePhysics => :void,
|
150
151
|
:SetPhysicsTimeStep => :void,
|
151
|
-
:IsPhysicsEnabled => :bool,
|
152
152
|
:SetPhysicsGravity => :void,
|
153
153
|
:CreatePhysicsBodyCircle => :pointer,
|
154
154
|
:CreatePhysicsBodyRectangle => :pointer,
|
155
155
|
:CreatePhysicsBodyPolygon => :pointer,
|
156
|
+
:DestroyPhysicsBody => :void,
|
156
157
|
:PhysicsAddForce => :void,
|
157
158
|
:PhysicsAddTorque => :void,
|
158
159
|
:PhysicsShatter => :void,
|
159
|
-
:
|
160
|
+
:SetPhysicsBodyRotation => :void,
|
160
161
|
:GetPhysicsBody => :pointer,
|
162
|
+
:GetPhysicsBodiesCount => :int,
|
161
163
|
:GetPhysicsShapeType => :int,
|
162
164
|
:GetPhysicsShapeVerticesCount => :int,
|
163
165
|
:GetPhysicsShapeVertex => Vector2.by_value,
|
164
|
-
:SetPhysicsBodyRotation => :void,
|
165
|
-
:DestroyPhysicsBody => :void,
|
166
|
-
:ClosePhysics => :void,
|
167
166
|
}
|
168
167
|
symbols.each do |sym|
|
169
168
|
begin
|
data/lib/raygui.dll
CHANGED
Binary file
|
data/lib/raygui.dylib
CHANGED
Binary file
|