tiny_gltf 2.5.0.1 → 2.5.0.4
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.yml +17 -0
- data/Gemfile.lock +1 -1
- data/ext/tiny_gltf/rb_tiny_gltf_node.cpp +21 -21
- data/lib/tiny_gltf/version.rb +1 -1
- data/lib/tiny_gltf.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1393540549e7b8393d14ce780efab6209c9982ef70325d76082507e77400e3e
|
4
|
+
data.tar.gz: 777a314231d9f49332c7f495a5345fdec1dce94bba97eaf2e2ce1b54b3e3d51b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 500a3b47aecc3e32b638f4c815bafcaaed7b4281a3194bc161b6f901ba77a3454724e2a2f8c717db1fd1865a5194d064cf2533452ec5427167e8b26f48f9f44e
|
7
|
+
data.tar.gz: 422e1b4f4f21b9b6f95395ae5348877d5be06bc6130b764fdd445d50287ede9edfe74ba692509853dc9203e0821ced8b1d90ecfe3b58da1e949be9773668cf78
|
@@ -0,0 +1,17 @@
|
|
1
|
+
name: Build
|
2
|
+
on: [push, pull_request]
|
3
|
+
jobs:
|
4
|
+
test:
|
5
|
+
strategy:
|
6
|
+
fail-fast: false
|
7
|
+
matrix:
|
8
|
+
os: [ubuntu-latest, macos-latest]
|
9
|
+
ruby: [2.6, 2.7]
|
10
|
+
runs-on: ${{ matrix.os }}
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
- uses: ruby/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: ${{ matrix.ruby }}
|
16
|
+
bundler-cache: true
|
17
|
+
- run: bundle exec rake
|
data/Gemfile.lock
CHANGED
@@ -14,40 +14,40 @@ VALUE rNode_new(const Node *node, VALUE rmodel) {
|
|
14
14
|
|
15
15
|
VALUE rmatrix = Qnil, rrotation = Qnil, rtranslation = Qnil, rscale = Qnil;
|
16
16
|
if (node->matrix.size() == 0) {
|
17
|
+
rtranslation = rb_ary_new();
|
18
|
+
if (node->translation.size() == 0) {
|
19
|
+
rb_ary_push(rtranslation, DBL2NUM(0.0));
|
20
|
+
rb_ary_push(rtranslation, DBL2NUM(0.0));
|
21
|
+
rb_ary_push(rtranslation, DBL2NUM(0.0));
|
22
|
+
} else {
|
23
|
+
for (size_t i = 0; i < node->translation.size(); i++)
|
24
|
+
rb_ary_push(rtranslation, DBL2NUM(node->translation[i]));
|
25
|
+
}
|
26
|
+
|
17
27
|
rrotation = rb_ary_new();
|
18
28
|
if (node->rotation.size() == 0) {
|
19
|
-
rb_ary_push(rrotation,
|
20
|
-
rb_ary_push(rrotation,
|
21
|
-
rb_ary_push(rrotation,
|
22
|
-
rb_ary_push(rrotation,
|
29
|
+
rb_ary_push(rrotation, DBL2NUM(0.0));
|
30
|
+
rb_ary_push(rrotation, DBL2NUM(0.0));
|
31
|
+
rb_ary_push(rrotation, DBL2NUM(0.0));
|
32
|
+
rb_ary_push(rrotation, DBL2NUM(1.0));
|
23
33
|
} else {
|
24
34
|
for (size_t i = 0; i < node->rotation.size(); i++)
|
25
|
-
rb_ary_push(rrotation,
|
35
|
+
rb_ary_push(rrotation, DBL2NUM(node->rotation[i]));
|
26
36
|
}
|
27
37
|
|
28
38
|
rscale = rb_ary_new();
|
29
|
-
if (node->
|
30
|
-
rb_ary_push(rscale,
|
31
|
-
rb_ary_push(rscale,
|
32
|
-
rb_ary_push(rscale,
|
39
|
+
if (node->scale.size() == 0) {
|
40
|
+
rb_ary_push(rscale, DBL2NUM(1.0));
|
41
|
+
rb_ary_push(rscale, DBL2NUM(1.0));
|
42
|
+
rb_ary_push(rscale, DBL2NUM(1.0));
|
33
43
|
} else {
|
34
44
|
for (size_t i = 0; i < node->scale.size(); i++)
|
35
|
-
rb_ary_push(rscale,
|
36
|
-
}
|
37
|
-
|
38
|
-
rtranslation = rb_ary_new();
|
39
|
-
if (node->translation.size() == 0) {
|
40
|
-
rb_ary_push(rtranslation, INT2NUM(0));
|
41
|
-
rb_ary_push(rtranslation, INT2NUM(0));
|
42
|
-
rb_ary_push(rtranslation, INT2NUM(0));
|
43
|
-
} else {
|
44
|
-
for (size_t i = 0; i < node->translation.size(); i++)
|
45
|
-
rb_ary_push(rtranslation, INT2NUM(node->translation[i]));
|
45
|
+
rb_ary_push(rscale, DBL2NUM(node->scale[i]));
|
46
46
|
}
|
47
47
|
} else {
|
48
48
|
rmatrix = rb_ary_new();
|
49
49
|
for (size_t i = 0; i < node->matrix.size(); i++)
|
50
|
-
rb_ary_push(rmatrix,
|
50
|
+
rb_ary_push(rmatrix, DBL2NUM(node->matrix[i]));
|
51
51
|
}
|
52
52
|
|
53
53
|
rb_ivar_set(rnode, rb_intern("@model"), rmodel);
|
data/lib/tiny_gltf/version.rb
CHANGED
data/lib/tiny_gltf.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny_gltf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.0.
|
4
|
+
version: 2.5.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin MacKenzie IV
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -116,6 +116,7 @@ extensions:
|
|
116
116
|
- ext/tiny_gltf/extconf.rb
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
+
- ".github/workflows/build.yml"
|
119
120
|
- ".gitignore"
|
120
121
|
- ".gitmodules"
|
121
122
|
- ".travis.yml"
|