tiny_gltf 2.5.0.2 → 2.5.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b9ae5350e9f42508fe440b32420942fefdbb15ba4d87b2abbaecba926ef4323
4
- data.tar.gz: a25ba83d33d69911f2ccb2754d6d45870ad8372fef71d2509916b4e053338a4f
3
+ metadata.gz: 4e2ee4a6a043835d7b6861e5cb4e0e56ea750c9d7678246ed2f614189c045ccf
4
+ data.tar.gz: 8b904768a8c1d19cca92ccb58f669679520e12ebce7571610e3c1bb3fdc75d07
5
5
  SHA512:
6
- metadata.gz: bf81941cdb8ec2965691b49f9e59aec1b11c99120922f59452f44f4b37f67903f384c39625138d8830af5f26777f8f076f86ae6e09e3bce709c9c87f82e4dca5
7
- data.tar.gz: e50b1f3b7feedbf80a7adf7610970525373ed50cc0b2eff54e9d2a1167188404fbc9626053869d1d659a0c8f3735287500d3239816d3e524f665f4292094e1fc
6
+ metadata.gz: 7e693521d50716b62e729061072e6925a3881b1366cfe45c5e8e1cf40246df244543daf74aedcca84c32731e0a55b2a859c1e1ae8239d0e104ca97a20a674a82
7
+ data.tar.gz: 5ad2e959862525c34dd1027da96e8c7f43bfe28a50da2059ec3b3b144e111669f9b271611bba74f49c71362b1b63fa1291485223fdab08adcdc1da3e1cdf9805
@@ -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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tiny_gltf (2.5.0.2)
4
+ tiny_gltf (2.5.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,6 +14,16 @@ 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
29
  rb_ary_push(rrotation, DBL2NUM(0.0));
@@ -26,24 +36,14 @@ VALUE rNode_new(const Node *node, VALUE rmodel) {
26
36
  }
27
37
 
28
38
  rscale = rb_ary_new();
29
- if (node->rotation.size() == 0) {
30
- rb_ary_push(rscale, DBL2NUM(0.0));
31
- rb_ary_push(rscale, DBL2NUM(0.0));
32
- rb_ary_push(rscale, DBL2NUM(0.0));
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
45
  rb_ary_push(rscale, DBL2NUM(node->scale[i]));
36
46
  }
37
-
38
- rtranslation = rb_ary_new();
39
- if (node->translation.size() == 0) {
40
- rb_ary_push(rtranslation, DBL2NUM(0.0));
41
- rb_ary_push(rtranslation, DBL2NUM(0.0));
42
- rb_ary_push(rtranslation, DBL2NUM(0.0));
43
- } else {
44
- for (size_t i = 0; i < node->translation.size(); i++)
45
- rb_ary_push(rtranslation, DBL2NUM(node->translation[i]));
46
- }
47
47
  } else {
48
48
  rmatrix = rb_ary_new();
49
49
  for (size_t i = 0; i < node->matrix.size(); i++)
@@ -1,3 +1,3 @@
1
1
  module TinyGLTF
2
- VERSION = "2.5.0.2"
2
+ VERSION = "2.5.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_gltf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0.2
4
+ version: 2.5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colin MacKenzie IV
@@ -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"