raylib-bindings 0.5.8pre1-x86_64-linux → 0.6.1-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +436 -399
- data/LICENSE.txt +1 -1
- data/README.md +191 -176
- data/examples/template.rb +144 -143
- data/lib/config.rb +103 -103
- data/lib/libraylib.x86_64.so +0 -0
- data/lib/physac.rb +322 -322
- data/lib/physac.x86_64.so +0 -0
- data/lib/raygui.x86_64.so +0 -0
- data/lib/raygui_helper.rb +127 -127
- data/lib/raygui_main.rb +890 -890
- data/lib/raylib.rb +62 -62
- data/lib/raylib_helper.rb +412 -400
- data/lib/raylib_main.rb +5125 -5088
- data/lib/raymath.rb +845 -845
- data/lib/rcamera.rb +117 -117
- data/lib/rlgl.rb +1327 -1311
- metadata +5 -19
data/LICENSE.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Ruby-raylib : Yet another raylib wrapper for Ruby
|
2
|
-
Copyright (c) 2021-
|
2
|
+
Copyright (c) 2021-2024 vaiorabbit <http://twitter.com/vaiorabbit>
|
3
3
|
|
4
4
|
This software is provided 'as-is', without any express or implied
|
5
5
|
warranty. In no event will the authors be held liable for any damages
|
data/README.md
CHANGED
@@ -1,176 +1,191 @@
|
|
1
|
-
<!-- -*- mode:markdown; coding:utf-8; -*- -->
|
2
|
-
|
3
|
-
# Yet another raylib wrapper for Ruby #
|
4
|
-
|
5
|
-
* Created : 2021-10-17
|
6
|
-
* Last modified :
|
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)
|
16
|
-
|
17
|
-
<img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/bitmap_font_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/game_of_life_simple_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/lissajous_curve_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/procedural_texture_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/reversi_board_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/utf8_font_rb.png" width="125">
|
18
|
-
|
19
|
-
## Features ##
|
20
|
-
|
21
|
-
* Generated semi-automatically
|
22
|
-
* Based on Ruby/FFI ( https://github.com/ffi/ffi )
|
23
|
-
* Pre-built binaries are inside:
|
24
|
-
* Windows (x86_64)
|
25
|
-
* macOS (x86_64, ARM64)
|
26
|
-
* Linux (x86_64
|
27
|
-
|
28
|
-
## Quick Start ##
|
29
|
-
|
30
|
-
```
|
31
|
-
D:\> gem install raylib-bindings
|
32
|
-
Fetching raylib-bindings-...
|
33
|
-
...
|
34
|
-
1 gem installed
|
35
|
-
|
36
|
-
D:\> ruby -r raylib -e 'Raylib.template'
|
37
|
-
[Info] Raylib.template : C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/raylib-bindings-0.0.11/examples/template.rb => d://template.rb
|
38
|
-
[Info] Raylib.template : Done
|
39
|
-
|
40
|
-
D:\> ruby template.rb
|
41
|
-
```
|
42
|
-
↓
|
43
|
-
|
44
|
-
<img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/template_screenshot.png" width="400">
|
45
|
-
|
46
|
-
## Prerequisites ##
|
47
|
-
|
48
|
-
* Ruby interpreter
|
49
|
-
* Tested on:
|
50
|
-
* [macOS] https://rvm.io
|
51
|
-
* ruby 3.
|
52
|
-
* [Windows] https://rubyinstaller.org/downloads/ Ruby+Devkit
|
53
|
-
* ruby 3.
|
54
|
-
* [Linux/x86_64 WSL] https://github.com/rvm/ubuntu_rvm
|
55
|
-
* ruby 3.2.0preview1 (2022-04-03 master f801386f0c) [x86_64-linux]
|
56
|
-
* [Linux/ARM64 Chromebook] https://github.com/rvm/ubuntu_rvm
|
57
|
-
* ruby 3.
|
58
|
-
|
59
|
-
* If you need to build DLLs/shared libralies for your own runtime envrioenment (Linux, etc.):
|
60
|
-
* CMake https://cmake.org/download/
|
61
|
-
* C Compiler
|
62
|
-
* Tested compilers:
|
63
|
-
* [macOS] clang
|
64
|
-
|
65
|
-
$ clang --version
|
66
|
-
Apple clang version
|
67
|
-
Target: arm64-apple-
|
68
|
-
Thread model: posix
|
69
|
-
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
70
|
-
|
71
|
-
* [Windows] gcc
|
72
|
-
|
73
|
-
gcc (
|
74
|
-
|
75
|
-
* [Linux] gcc, clang
|
76
|
-
|
77
|
-
(x86_64) Ubuntu clang version 14.0.0-1ubuntu1
|
78
|
-
(arm64)
|
79
|
-
|
80
|
-
<details>
|
81
|
-
<summary>Older versions</summary>
|
82
|
-
|
83
|
-
* Ruby interpreter
|
84
|
-
* Tested on:
|
85
|
-
* [macOS]
|
86
|
-
* ruby 3.2.
|
87
|
-
* ruby 3.
|
88
|
-
* ruby 3.1.
|
89
|
-
* ruby 3.
|
90
|
-
|
91
|
-
|
92
|
-
* ruby 3.
|
93
|
-
* ruby 3.
|
94
|
-
|
95
|
-
*
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
*
|
145
|
-
|
146
|
-
|
147
|
-
*
|
148
|
-
*
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
1
|
+
<!-- -*- mode:markdown; coding:utf-8; -*- -->
|
2
|
+
|
3
|
+
# Yet another raylib wrapper for Ruby #
|
4
|
+
|
5
|
+
* Created : 2021-10-17
|
6
|
+
* Last modified : 2024-01-07
|
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)
|
16
|
+
|
17
|
+
<img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/bitmap_font_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/game_of_life_simple_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/lissajous_curve_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/procedural_texture_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/reversi_board_rb.png" width="125"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/utf8_font_rb.png" width="125">
|
18
|
+
|
19
|
+
## Features ##
|
20
|
+
|
21
|
+
* Generated semi-automatically
|
22
|
+
* Based on Ruby/FFI ( https://github.com/ffi/ffi )
|
23
|
+
* Pre-built binaries are inside:
|
24
|
+
* Windows (x86_64)
|
25
|
+
* macOS (x86_64, ARM64)
|
26
|
+
* Linux (x86_64, ARM64)
|
27
|
+
|
28
|
+
## Quick Start ##
|
29
|
+
|
30
|
+
```
|
31
|
+
D:\> gem install raylib-bindings
|
32
|
+
Fetching raylib-bindings-...
|
33
|
+
...
|
34
|
+
1 gem installed
|
35
|
+
|
36
|
+
D:\> ruby -r raylib -e 'Raylib.template'
|
37
|
+
[Info] Raylib.template : C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/raylib-bindings-0.0.11/examples/template.rb => d://template.rb
|
38
|
+
[Info] Raylib.template : Done
|
39
|
+
|
40
|
+
D:\> ruby template.rb
|
41
|
+
```
|
42
|
+
↓
|
43
|
+
|
44
|
+
<img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings/main/doc/template_screenshot.png" width="400">
|
45
|
+
|
46
|
+
## Prerequisites ##
|
47
|
+
|
48
|
+
* Ruby interpreter
|
49
|
+
* Tested on:
|
50
|
+
* [macOS] https://rvm.io
|
51
|
+
* ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
|
52
|
+
* [Windows] https://rubyinstaller.org/downloads/ Ruby+Devkit
|
53
|
+
* ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x64-mingw-ucrt]
|
54
|
+
* [Linux/x86_64 WSL] https://github.com/rvm/ubuntu_rvm
|
55
|
+
* ruby 3.2.0preview1 (2022-04-03 master f801386f0c) [x86_64-linux]
|
56
|
+
* [Linux/ARM64 Chromebook] https://github.com/rvm/ubuntu_rvm
|
57
|
+
* ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [aarch64-linux]
|
58
|
+
|
59
|
+
* If you need to build DLLs/shared libralies for your own runtime envrioenment (Linux, etc.):
|
60
|
+
* CMake https://cmake.org/download/
|
61
|
+
* C Compiler
|
62
|
+
* Tested compilers:
|
63
|
+
* [macOS] clang
|
64
|
+
|
65
|
+
$ clang --version
|
66
|
+
Apple clang version 15.0.0 (clang-1500.0.40.1)
|
67
|
+
Target: arm64-apple-darwin23.0.0
|
68
|
+
Thread model: posix
|
69
|
+
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
70
|
+
|
71
|
+
* [Windows] gcc
|
72
|
+
|
73
|
+
gcc (Rev3, Built by MSYS2 project) 13.2.0
|
74
|
+
|
75
|
+
* [Linux] gcc, clang
|
76
|
+
|
77
|
+
(x86_64) Ubuntu clang version 14.0.0-1ubuntu1
|
78
|
+
(arm64) Debian clang version 14.0.6
|
79
|
+
|
80
|
+
<details>
|
81
|
+
<summary>Older versions</summary>
|
82
|
+
|
83
|
+
* Ruby interpreter
|
84
|
+
* Tested on:
|
85
|
+
* [macOS]
|
86
|
+
* ruby 3.2.1 (2023-02-08 revision 31819e82c8) [arm64-darwin22]
|
87
|
+
* ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin21]
|
88
|
+
* ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
|
89
|
+
* ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
|
90
|
+
* ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]
|
91
|
+
* [Windows] https://rubyinstaller.org/downloads/ Ruby+Devkit
|
92
|
+
* ruby 3.2.0 (2022-12-25 revision a528908271) [x64-mingw-ucrt]
|
93
|
+
* ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]
|
94
|
+
* ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x64-mingw-ucrt]
|
95
|
+
* ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]
|
96
|
+
* [Linux/ARM64 Chromebook] https://github.com/rvm/ubuntu_rvm
|
97
|
+
* ruby 3.2.0 (2022-12-25 revision a528908271) [aarch64-linux]
|
98
|
+
|
99
|
+
* Compiler
|
100
|
+
* Tested on:
|
101
|
+
* [macOS] clang
|
102
|
+
|
103
|
+
$ clang --version
|
104
|
+
Apple clang version 14.0.0 (clang-1400.0.29.202)
|
105
|
+
Target: arm64-apple-darwin22.2.0
|
106
|
+
Thread model: posix
|
107
|
+
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
108
|
+
|
109
|
+
$ clang --version
|
110
|
+
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
|
111
|
+
Target: arm64-apple-darwin21.5.0
|
112
|
+
Thread model: posix
|
113
|
+
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
114
|
+
|
115
|
+
$ clang --version
|
116
|
+
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
|
117
|
+
Target: arm64-apple-darwin21.5.0
|
118
|
+
Thread model: posix
|
119
|
+
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
120
|
+
|
121
|
+
Apple clang version 13.0.0 (clang-1300.0.29.3)
|
122
|
+
Target: arm64-apple-darwin20.6.0
|
123
|
+
Thread model: posix
|
124
|
+
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
|
125
|
+
|
126
|
+
* [Windows] gcc
|
127
|
+
|
128
|
+
gcc (Rev7, Built by MSYS2 project) 12.2.0
|
129
|
+
gcc (Rev10, Built by MSYS2 project) 11.2.0
|
130
|
+
gcc (Rev9, Built by MSYS2 project) 11.2.0
|
131
|
+
|
132
|
+
</details>
|
133
|
+
|
134
|
+
## Projects ##
|
135
|
+
|
136
|
+
See the projects below to learn how to use this library:
|
137
|
+
|
138
|
+
* Whac-a-Mole! : Ruby raylib bindings demo
|
139
|
+
* <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings-whacamole/main/doc/screenshot_00.png" width="300"> <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings-whacamole/main/doc/screenshot_01.png" width="300">
|
140
|
+
* <https://github.com/vaiorabbit/raylib-bindings-whacamole>
|
141
|
+
|
142
|
+
* 1D dot eater : Ruby raylib bindings demo
|
143
|
+
* <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings-pacone/main/doc/screenshot_00.png" width="600">
|
144
|
+
* <https://github.com/vaiorabbit/raylib-bindings-pacone>
|
145
|
+
|
146
|
+
* flapper.rb : Ruby raylib bindings demo
|
147
|
+
* <img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings-flapper/main/doc/screenshot_01.png" width="150">
|
148
|
+
* <https://github.com/vaiorabbit/raylib-bindings-flapper>
|
149
|
+
|
150
|
+
## Limitation ##
|
151
|
+
|
152
|
+
* `SetTraceLogCallback` and `TraceLogCallback` are unusable since Ruby-FFI does not support `:varargs` parameter in callbacks (`Proc`, etc.)
|
153
|
+
* Ref.: https://ffi.github.io/ruby-ffi-archive/messages/20130214-%5Bruby-ffi%5D%20Re_%20Callback%20Function%20with%20varargs-345.html
|
154
|
+
|
155
|
+
## License ##
|
156
|
+
|
157
|
+
Shared libraries in `lib` directory are built on top of these products and are available under the terms of these licenses:
|
158
|
+
|
159
|
+
* `libraylib.arm64.dylib`, `libraylib.x86_64.dylib`, `libraylib.dll`, `libraylib.aarch64.so`, `libraylib.x86_64.so`
|
160
|
+
* raylib ( https://github.com/raysan5/raylib )
|
161
|
+
* zlib License https://github.com/raysan5/raylib/blob/master/LICENSE
|
162
|
+
* `raygui.arm64.dylib`, `raygui.x86_64.dylib`, `raygui.dll`, `raygui.aarch64.so`, `raygui.x86_64.so`
|
163
|
+
* raygui ( https://github.com/raysan5/raygui )
|
164
|
+
* zlib License https://github.com/raysan5/raygui/blob/master/LICENSE
|
165
|
+
* `physac.arm64.dylib`, `physac.x86_64.dylib`, `physac.dll`, `physac.aarch64.so`, `physac.x86_64.so`
|
166
|
+
* Physac ( https://github.com/raysan5/physac )
|
167
|
+
* LICENSE: zlib/libpng https://github.com/raysan5/physac/blob/4a8e17f263fb8e1150b3fbafc96f880c7d7a4833/src/physac.h#L51-L68
|
168
|
+
|
169
|
+
All ruby codes here are available under the terms of the zlib/libpng License ( http://opensource.org/licenses/Zlib ).
|
170
|
+
|
171
|
+
Ruby-raylib : Yet another raylib wrapper for Ruby
|
172
|
+
Copyright (c) 2021-2024 vaiorabbit <http://twitter.com/vaiorabbit>
|
173
|
+
|
174
|
+
This software is provided 'as-is', without any express or implied
|
175
|
+
warranty. In no event will the authors be held liable for any damages
|
176
|
+
arising from the use of this software.
|
177
|
+
|
178
|
+
Permission is granted to anyone to use this software for any purpose,
|
179
|
+
including commercial applications, and to alter it and redistribute it
|
180
|
+
freely, subject to the following restrictions:
|
181
|
+
|
182
|
+
1. The origin of this software must not be misrepresented; you must not
|
183
|
+
claim that you wrote the original software. If you use this software
|
184
|
+
in a product, an acknowledgment in the product documentation would be
|
185
|
+
appreciated but is not required.
|
186
|
+
|
187
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
188
|
+
misrepresented as being the original software.
|
189
|
+
|
190
|
+
3. This notice may not be removed or altered from any source
|
191
|
+
distribution.
|