mittsu 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build-workflow.yml +71 -0
- data/.gitignore +1 -0
- data/Gemfile +0 -3
- data/LICENSE.txt +1 -1
- data/README.md +6 -8
- data/Rakefile +1 -0
- data/install-glfw.ps1 +13 -0
- data/lib/mittsu/cameras/camera.rb +0 -2
- data/lib/mittsu/cameras/cube_camera.rb +0 -2
- data/lib/mittsu/cameras/orthographic_camera.rb +2 -4
- data/lib/mittsu/cameras/perspective_camera.rb +4 -5
- data/lib/mittsu/core/buffer_attribute.rb +12 -0
- data/lib/mittsu/core/buffer_geometry.rb +3 -3
- data/lib/mittsu/core/geometry.rb +2 -4
- data/lib/mittsu/core/object_3d.rb +9 -7
- data/lib/mittsu/core/raycaster.rb +0 -2
- data/lib/mittsu/extras/geometries/circle_geometry.rb +3 -3
- data/lib/mittsu/extras/geometries/cylinder_geometry.rb +5 -5
- data/lib/mittsu/extras/geometries/dodecahedron_geometry.rb +2 -2
- data/lib/mittsu/extras/geometries/icosahedron_geometry.rb +2 -2
- data/lib/mittsu/extras/geometries/lathe_geometry.rb +3 -3
- data/lib/mittsu/extras/geometries/parametric_geometry.rb +19 -19
- data/lib/mittsu/extras/geometries/polyhedron_geometry.rb +6 -7
- data/lib/mittsu/extras/geometries/ring_geometry.rb +4 -4
- data/lib/mittsu/extras/geometries/sphere_geometry.rb +4 -4
- data/lib/mittsu/extras/geometries/torus_geometry.rb +7 -7
- data/lib/mittsu/extras/geometries/torus_knot_buffer_geometry.rb +9 -9
- data/lib/mittsu/extras/helpers/camera_helper.rb +38 -38
- data/lib/mittsu/extras/image_utils.rb +1 -1
- data/lib/mittsu/lights/directional_light.rb +9 -5
- data/lib/mittsu/lights/spot_light.rb +1 -1
- data/lib/mittsu/loaders/loader.rb +2 -2
- data/lib/mittsu/loaders/obj_loader.rb +4 -0
- data/lib/mittsu/materials/material.rb +6 -3
- data/lib/mittsu/math/box2.rb +0 -2
- data/lib/mittsu/math/box3.rb +0 -2
- data/lib/mittsu/math/color.rb +3 -4
- data/lib/mittsu/math/euler.rb +25 -26
- data/lib/mittsu/math/frustum.rb +0 -2
- data/lib/mittsu/math/line3.rb +0 -2
- data/lib/mittsu/math/matrix3.rb +0 -2
- data/lib/mittsu/math/matrix4.rb +10 -12
- data/lib/mittsu/math/plane.rb +0 -2
- data/lib/mittsu/math/quaternion.rb +18 -20
- data/lib/mittsu/math/ray.rb +1 -3
- data/lib/mittsu/math/sphere.rb +1 -3
- data/lib/mittsu/math/spline.rb +0 -2
- data/lib/mittsu/math/triangle.rb +1 -3
- data/lib/mittsu/math/vector.rb +3 -3
- data/lib/mittsu/math/vector2.rb +0 -1
- data/lib/mittsu/math/vector3.rb +108 -1
- data/lib/mittsu/math/vector4.rb +8 -9
- data/lib/mittsu/math.rb +0 -5
- data/lib/mittsu/objects/line.rb +0 -1
- data/lib/mittsu/renderers/glfw_lib.rb +24 -3
- data/lib/mittsu/renderers/glfw_window.rb +6 -2
- data/lib/mittsu/renderers/opengl/core/object_3d.rb +1 -1
- data/lib/mittsu/renderers/opengl/lights/spot_light.rb +1 -1
- data/lib/mittsu/renderers/opengl/opengl_geometry_group.rb +1 -0
- data/lib/mittsu/renderers/opengl/opengl_program.rb +1 -2
- data/lib/mittsu/renderers/opengl/textures/texture.rb +2 -2
- data/lib/mittsu/renderers/opengl_renderer.rb +9 -14
- data/lib/mittsu/scenes/scene.rb +0 -2
- data/lib/mittsu/textures/texture.rb +4 -2
- data/lib/mittsu/utils.rb +15 -0
- data/lib/mittsu/version.rb +1 -2
- data/lib/mittsu.rb +1 -16
- data/mittsu.gemspec +14 -13
- metadata +60 -47
- data/.circleci/config.yml +0 -87
- data/.circleci/images/primary/Dockerfile +0 -10
- data/appveyor.yml +0 -23
- data/install_glfw.ps1 +0 -11
metadata
CHANGED
@@ -1,154 +1,167 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mittsu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Danielle Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opengl-bindings
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ffi
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: chunky_png
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: minitest
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: minitest-reporters
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: pry
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0
|
117
|
+
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0
|
124
|
+
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: benchmark-ips
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.17.1
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.17.1
|
139
153
|
description: Mittsu makes 3D graphics easier by providing an abstraction over OpenGL,
|
140
154
|
and is based heavily off of THREE.js. No more weird pointers and wondering about
|
141
155
|
the difference between a VAO and a VBO (besides the letter). Simply think of something
|
142
156
|
awesome and make it!
|
143
157
|
email:
|
144
|
-
-
|
158
|
+
- danini@hey.com
|
145
159
|
executables: []
|
146
160
|
extensions: []
|
147
161
|
extra_rdoc_files: []
|
148
162
|
files:
|
149
|
-
- ".circleci/config.yml"
|
150
|
-
- ".circleci/images/primary/Dockerfile"
|
151
163
|
- ".codeclimate.yml"
|
164
|
+
- ".github/workflows/build-workflow.yml"
|
152
165
|
- ".gitignore"
|
153
166
|
- ".rubocop.yml"
|
154
167
|
- CODE_OF_CONDUCT.md
|
@@ -156,10 +169,9 @@ files:
|
|
156
169
|
- LICENSE.txt
|
157
170
|
- README.md
|
158
171
|
- Rakefile
|
159
|
-
- appveyor.yml
|
160
172
|
- bin/console
|
161
173
|
- bin/setup
|
162
|
-
-
|
174
|
+
- install-glfw.ps1
|
163
175
|
- lib/mittsu.rb
|
164
176
|
- lib/mittsu/cameras.rb
|
165
177
|
- lib/mittsu/cameras/camera.rb
|
@@ -391,13 +403,14 @@ files:
|
|
391
403
|
- lib/mittsu/textures/data_texture.rb
|
392
404
|
- lib/mittsu/textures/texture.rb
|
393
405
|
- lib/mittsu/textures/video_texture.rb
|
406
|
+
- lib/mittsu/utils.rb
|
394
407
|
- lib/mittsu/version.rb
|
395
408
|
- mittsu.gemspec
|
396
|
-
homepage: https://github.com/
|
409
|
+
homepage: https://github.com/danini-the-panini/mittsu
|
397
410
|
licenses:
|
398
411
|
- MIT
|
399
412
|
metadata:
|
400
|
-
bug_tracker: https://github.com/
|
413
|
+
bug_tracker: https://github.com/danini-the-panini/mittsu/issues
|
401
414
|
post_install_message:
|
402
415
|
rdoc_options: []
|
403
416
|
require_paths:
|
@@ -414,7 +427,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
414
427
|
version: '0'
|
415
428
|
requirements:
|
416
429
|
- OpenGL 3.3+ capable hardware and drivers
|
417
|
-
rubygems_version: 3.
|
430
|
+
rubygems_version: 3.3.7
|
418
431
|
signing_key:
|
419
432
|
specification_version: 4
|
420
433
|
summary: 3D Graphics Library for Ruby
|
data/.circleci/config.yml
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
version: 2
|
2
|
-
jobs:
|
3
|
-
test-macos:
|
4
|
-
macos:
|
5
|
-
xcode: "9.4.1"
|
6
|
-
working_directory: ~/mittsu
|
7
|
-
steps:
|
8
|
-
- checkout
|
9
|
-
|
10
|
-
- restore_cache:
|
11
|
-
keys:
|
12
|
-
- mittsu-brew-v1-{{ .Branch }}
|
13
|
-
- mittsu-brew-v1-
|
14
|
-
- run: brew install glfw
|
15
|
-
- save_cache:
|
16
|
-
key: mittsu-brew-v1-{{ .Branch }}
|
17
|
-
paths:
|
18
|
-
- /usr/local/Homebrew
|
19
|
-
|
20
|
-
- restore_cache:
|
21
|
-
keys:
|
22
|
-
- mittsu-bundler-v2-{{ .Branch }}-{{ checksum "Gemfile" }}-{{ checksum "mittsu.gemspec" }}
|
23
|
-
- mittsu-bundler-v2-{{ .Branch }}-
|
24
|
-
- mittsu-bundler-v2-
|
25
|
-
- run: bundle install --path vendor/bundle
|
26
|
-
- save_cache:
|
27
|
-
key: mittsu-bundler-v2-{{ .Branch }}-{{ checksum "Gemfile" }}-{{ checksum "mittsu.gemspec" }}
|
28
|
-
paths:
|
29
|
-
- vendor/bundle
|
30
|
-
|
31
|
-
## TEST
|
32
|
-
- run:
|
33
|
-
name: Run tests
|
34
|
-
command: bundle exec rake test
|
35
|
-
environment:
|
36
|
-
MITTSU_LIBGLFW_PATH: /usr/local/lib
|
37
|
-
MITTSU_LIBGLFW_FILE: libglfw.dylib
|
38
|
-
MINITEST_REPORTER: JUnitReporter
|
39
|
-
|
40
|
-
## COLLECT RESULTS
|
41
|
-
- run: bundle exec codeclimate-test-reporter
|
42
|
-
- store_test_results:
|
43
|
-
path: test/reports
|
44
|
-
|
45
|
-
test-linux:
|
46
|
-
docker:
|
47
|
-
- image: dansmith45/circleci-ruby-glfw:2.5.1
|
48
|
-
environment:
|
49
|
-
MITTSU_LIBGLFW_PATH: /usr/local/lib
|
50
|
-
MITTSU_LIBGLFW_FILE: libglfw.so
|
51
|
-
MINITEST_REPORTER: JUnitReporter
|
52
|
-
working_directory: ~/mittsu
|
53
|
-
steps:
|
54
|
-
- checkout
|
55
|
-
|
56
|
-
- restore_cache:
|
57
|
-
keys:
|
58
|
-
- mittsu-linux-bundler-v2-{{ .Branch }}-{{ checksum "Gemfile" }}-{{ checksum "mittsu.gemspec" }}
|
59
|
-
- mittsu-linux-bundler-v2-{{ .Branch }}-
|
60
|
-
- mittsu-linux-bundler-v2-
|
61
|
-
- run: bundle install --path vendor/bundle
|
62
|
-
- save_cache:
|
63
|
-
key: mittsu-linux-bundler-v2-{{ .Branch }}-{{ checksum "Gemfile" }}-{{ checksum "mittsu.gemspec" }}
|
64
|
-
paths:
|
65
|
-
- vendor/bundle
|
66
|
-
|
67
|
-
## TEST
|
68
|
-
- run:
|
69
|
-
name: Run tests
|
70
|
-
command: bundle exec rake test
|
71
|
-
environment:
|
72
|
-
MITTSU_LIBGLFW_PATH: /usr/local/lib
|
73
|
-
MITTSU_LIBGLFW_FILE: libglfw.dylib
|
74
|
-
MINITEST_REPORTER: JUnitReporter
|
75
|
-
|
76
|
-
## COLLECT RESULTS
|
77
|
-
- run: bundle exec codeclimate-test-reporter
|
78
|
-
- store_test_results:
|
79
|
-
path: test/reports
|
80
|
-
|
81
|
-
workflows:
|
82
|
-
version: 2
|
83
|
-
|
84
|
-
test:
|
85
|
-
jobs:
|
86
|
-
- test-macos
|
87
|
-
- test-linux
|
@@ -1,10 +0,0 @@
|
|
1
|
-
FROM circleci/ruby:2.5.1
|
2
|
-
|
3
|
-
RUN sudo apt-get update; sudo apt-get install cmake xorg-dev libgl1-mesa-dev
|
4
|
-
|
5
|
-
RUN wget https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip -O /tmp/glfw.zip
|
6
|
-
RUN unzip /tmp/glfw.zip -d /tmp
|
7
|
-
WORKDIR /tmp/glfw-3.1.2/
|
8
|
-
RUN cmake -D BUILD_SHARED_LIBS=ON .
|
9
|
-
RUN make
|
10
|
-
RUN sudo make install
|
data/appveyor.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
version: '{build}'
|
2
|
-
|
3
|
-
clone_folder: c:\projects\mittsu
|
4
|
-
|
5
|
-
environment:
|
6
|
-
MITTSU_LIBGLFW_FILE: c:\projects\mittsu\glfw-3.2.1.bin.WIN32\lib-mingw\glfw3.dll
|
7
|
-
|
8
|
-
install:
|
9
|
-
- ps: c:\projects\mittsu\install_glfw.ps1
|
10
|
-
- set PATH=C:\Ruby22\bin;%PATH%
|
11
|
-
- bundle install
|
12
|
-
|
13
|
-
build: off
|
14
|
-
|
15
|
-
|
16
|
-
before_test:
|
17
|
-
- dir c:\projects\mittsu\glfw-3.2.1.bin.WIN32
|
18
|
-
- ruby -v
|
19
|
-
- gem -v
|
20
|
-
- bundle -v
|
21
|
-
|
22
|
-
test_script:
|
23
|
-
- bundle exec rake test
|
data/install_glfw.ps1
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Invoke-WebRequest https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.bin.WIN32.zip -OutFile "$pwd\glfw-3.2.1.bin.WIN32.zip"
|
2
|
-
|
3
|
-
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
4
|
-
function Unzip
|
5
|
-
{
|
6
|
-
param([string]$zipfile, [string]$outpath)
|
7
|
-
|
8
|
-
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
|
9
|
-
}
|
10
|
-
|
11
|
-
Unzip "$pwd\glfw-3.2.1.bin.WIN32.zip" "$pwd"
|