Commit Graph

970 Commits

Author SHA1 Message Date
Baranob_Ilya
f082c5d6b3 Added parsing and serializing of audio emitters for scene (global sources) 2023-06-12 13:35:05 +04:00
Baranob_Ilya
d5c7d72786 Forgot to add KHR_audio to used extensions 2023-06-12 12:34:34 +04:00
Baranob_Ilya
b4729fe0be Update .gitignore 2023-06-12 12:30:04 +04:00
Baranob_Ilya
b1309d47a8 Added KHR_audio extension. Parsing and serialization.
Added KHR_audio extension parsing and serializing. Only for ascii
2023-06-12 10:43:52 +04:00
Syoyo Fujita
c656765f4d Merge pull request #426 from agnat/serialize_light_refs
KHR_lights_punctual: Serialize node light refs
2023-06-09 05:03:01 +09:00
David Siegel
75bf1532ee clean up 2023-06-07 15:35:35 +02:00
David Siegel
29107bbcc6 fix syntax error 2023-06-07 15:30:02 +02:00
David Siegel
9bbc79e27e KHR_lights_punctual: Serialize node light refs
This is surprisingly involved:

1. Add non-const json iterators, FindMember(…) and GetValue(…)
2. Add json utilities IsEmpty(…) and Erase(…)
3. Serialize the property and clean up
2023-06-07 15:18:38 +02:00
Syoyo Fujita
2dfc7eb661 Merge pull request #422 from agnat/fix/add_missing_extras_and_extensions
Add missing extras and extensions fields
v2.8.11
2023-06-07 02:47:59 +09:00
Syoyo Fujita
3246fa4d8c Merge pull request #423 from agnat/finish_KHR_lights_puncutal
KHR_lights_punctual: parse light source references from scene nodes
2023-06-06 23:12:50 +09:00
Syoyo Fujita
2b5e669ac1 Merge pull request #424 from agnat/rewrite_ForEachInArray
get rid of std::function
2023-06-06 23:11:12 +09:00
David Siegel
db9ec34b4e refactor extension and extra serialization
Add missing serialization:

accessor.extensions
accessor.sparse.extensions
accessor.sparse.extras
accessor.sparse.indices.extensions
accessor.sparse.indices.extras
accessor.sparse.values.extensions
accessor.sparse.values.extras
animation.channel.target.extras
animation.sampler.extensions
buffer.extensions
bufferView.extensions
sampler.extensions
camera.orthographic.extensions
camera.perspective.extensions
skin.extras
skin.extensions
2023-06-06 15:40:29 +02:00
David Siegel
a782975b74 rewrite ForEachInArray as a simple C++11 function
no need for std::function here. A free function with an unspecified callback will do nicely.
2023-06-06 15:36:07 +02:00
David Siegel
41c3ed9b0e fix: add missing nullptr check 2023-06-06 15:31:58 +02:00
David Siegel
8c3bf572db parse light source references 2023-06-06 06:18:14 +02:00
David Siegel
b875b65987 Add missing extras and extensions fields
Handle extras and extensions in nested “sub-objects”:

animation.channel.target.extras
accessor.sparse.extras
accessor.sparse.extensions
accessor.sparse.indices.extras
accessor.sparse.indices.extensions
accessor.sparse.values.extras
accessor.sparse.values.extensions
2023-06-06 00:07:37 +02:00
David Siegel
6e768f27c9 remove duplicate code
use a function to parse extras and extensions
2023-06-06 00:07:37 +02:00
David Siegel
0037b05e18 fix warnings: unused variable 2023-06-06 00:07:37 +02:00
Syoyo Fujita
c0cde4de4a Simplify version comment in tiny_gltf.h
Remove wuffs code(which was accidently adde to `release` branch)
v2.8.10
2023-06-04 19:07:00 +09:00
Syoyo Fujita
d96d324975 Prevent duplicated key generation when serializing lights + RapidJSON backend. Fixes #420 2023-06-04 05:45:24 +09:00
Syoyo Fujita
3abcc4c5fd Merge pull request #418 from agnat/fix_get_file_size_bug
[Bugfix] Actually invoke the user-supplied function instead of subtracting from a pointer...
v2.8.9
2023-04-26 19:28:58 +09:00
David Siegel
81b27d8491 Fix: Actually invoke the user-supplied function 2023-04-26 12:13:41 +02:00
Syoyo Fujita
011eb1be6c Merge pull request #417 from syoyo/filesize-check
Fix to #416
v2.8.8
2023-04-23 23:15:07 +09:00
Syoyo Fujita
8ead2d8ad9 Fix MSVC compile failure on AppVeyor CI. 2023-04-23 23:08:41 +09:00
Syoyo Fujita
0dfd6e9cdb Format error message.
Add regression test of issue-416.
2023-04-23 21:47:31 +09:00
Syoyo Fujita
1a4bd46e16 Fix syntax. 2023-04-23 21:40:23 +09:00
Syoyo Fujita
8997b0ce35 - Add GetFileSizeInBytes Filesystem Callback
- Add feature to limit file size for external resources(images, buffers)
- Use strlen to correctly retrieve a string from a string which contains multiple null-characters.
- Return fail when opening a directory(Posix only). Fixes #416
2023-04-23 21:31:30 +09:00
Syoyo Fujita
753576f817 Merge pull request #415 from louwaque/release
Fix serialization of AnimationChannel::target_node when it is zero
v2.8.7
2023-04-19 05:17:06 +09:00
Loïc Escales
578c518fd0 Fix serialization of AnimationChannel::target_node when it is zero 2023-04-18 21:03:39 +02:00
Syoyo Fujita
e2ade37808 Merge pull request #412 from agnat/add_char_pointer_ctor
Fix #411 by adding a Value(const char *) constructor.
v2.8.6
2023-04-10 19:11:35 +09:00
Syoyo Fujita
8c8f9bc243 Deprecate ubuntu-18.04 image and update CI build configuration. 2023-04-10 18:51:29 +09:00
David Siegel
1a31f42a98 Fix #411 by adding a Value(const char *) constructor.
Avoid implicit conversion of pointers to bool. Closes #411.
2023-04-08 23:44:53 +02:00
Syoyo Fujita
0a9ba62baa Merge pull request #409 from NeilBickford-NV/nbickford/update-stb-image
Updates stb_image and stb_image_write
v2.8.5
2023-03-30 18:13:12 +09:00
Neil Bickford
3a11ec3bbc stb_image: Apply https://github.com/nothings/stb/pull/1443 2023-03-29 12:00:24 -07:00
Neil Bickford
cc18aed49d stb_image: Apply https://github.com/nothings/stb/pull/1454 2023-03-29 11:57:27 -07:00
Neil Bickford
7f6bcba697 Update stb_image and stb_image_write to latest nothings/stb dev branch: 9f1776a36d 2023-03-29 11:56:13 -07:00
Syoyo Fujita
c0967f718d Merge pull request #408 from marco-langer/feature/ostream_error_handling
Added error checking to ostream writing
v.2.8.4
2023-03-13 21:18:02 +09:00
Marco Langer
3add08b761 Added error handling to ostream writing 2023-03-12 19:26:05 +01:00
Syoyo Fujita
d171eee434 Merge pull request #407 from DavidSM64/release
Added detail namespace to prevent json namespace conflicts
v2.8.3
2023-02-19 02:08:19 +09:00
David
4562a88070 Fixed global namespace issue 2023-02-15 23:35:51 -06:00
David
032351882c Fix RapidJSON implementation (hopefully) 2023-02-15 23:21:09 -06:00
David
60831b59de Added detail namespace to prevent namespace conflicts 2023-02-15 22:56:18 -06:00
Syoyo Fujita
b18b0024c1 Merge pull request #405 from tioez326/patch-2
Fix typo
2023-02-10 21:00:27 +09:00
tioez326
165df4c474 Fix typo 2023-02-10 12:09:12 +01:00
Syoyo Fujita
9dc44e5389 Update README.md 2023-01-16 05:46:11 +09:00
Syoyo Fujita
b3c071d103 Merge pull request #401 from jmousseau/animation-channel-node-optionality
Fix animation channel target node optionality
v2.8.2
2023-01-16 05:33:40 +09:00
Jack Mousseau
ca8d44bcc7 Fix animation channel target node optionality 2023-01-15 11:45:45 -08:00
Syoyo Fujita
041356d019 v2.8.1 v2.8.1 2023-01-13 18:15:21 +09:00
Syoyo Fujita
48fbd4e223 Merge pull request #399 from e2e4e6/texture_sampler_name_fix
Missed serialization texture sampler name fixed.
2023-01-13 18:13:12 +09:00
s00665032
1fa71c34f8 Missed serialization texture sampler name fixed.
According to the glTF 2.0 specification it exists, the internal tinygltf structure contains 'name' field as well.
2023-01-13 12:52:08 +07:00