Commit Graph

1001 Commits

Author SHA1 Message Date
Syoyo Fujita
9f4ac79720 Merge pull request #452 from nyalldawson/permissive_align
Relax bin chunk end alignment check in permissive mode
2023-09-07 06:46:11 +09:00
Nyall Dawson
e387e3a221 Relax bin chunk end alignment check in permissive mode 2023-09-07 07:08:26 +10:00
Syoyo Fujita
0e5a1c9be9 Merge pull request #450 from nyalldawson/fix_win
Fix msvc build -- STRICT is a msvc macro name
2023-09-07 05:59:12 +09:00
Nyall Dawson
7f514ca27b Fix msvc build -- STRICT is a msvc macro name 2023-09-07 06:28:37 +10:00
Syoyo Fujita
706cfb4cde Merge pull request #451 from nyalldawson/mingw
Add mingw msys2 workflow
2023-09-06 20:55:14 +09:00
Nyall Dawson
b4e5d07c9f Add mingw msys2 workflow 2023-09-06 08:26:34 +10:00
Nyall Dawson
2aad0ce782 Fix warning when building without draco support 2023-09-03 09:04:56 +10:00
Syoyo Fujita
9977c05b4b Merge pull request #449 from emimvi/consistent_byteOffset
Always use size_t for byte offsets
2023-09-03 02:20:35 +09:00
Syoyo Fujita
7b2ae68239 Merge pull request #447 from nyalldawson/draco_fix
Handle the situation where the recorded component type does not match the required type for the actual number of stored points
2023-09-03 02:17:12 +09:00
emimvi
8b24ce8f3a Consistently use size_t for all byteOffset's 2023-09-02 09:39:53 +02:00
Nyall Dawson
3cf58eef43 When in permissive mode, handle the situation where the
recorded component type does not match the required type
for the actual number of stored points

This situation arises when decoding certain malformed files, most
notably it's seen in glb tiles from Google Earth's 3d tileset.

It's a port of the workaround used by Cesium native here:

d9172461e2/CesiumGltfReader/src/decodeDraco.cpp (L101)
2023-09-02 10:16:04 +10:00
emimvi
7dc9766ce1 Serialize byteOffset as size_t, avoiding cast
Fixes silently writing an overflowed int in the output file.
2023-09-02 00:11:41 +02:00
Syoyo Fujita
c94ffcfeb7 Merge pull request #445 from nyalldawson/permissive
Be tolerant when encountering emissiveFactor with array length 4
v2.8.15
2023-09-01 23:10:29 +09:00
Nyall Dawson
285e87211c Add method to set parsing strictness 2023-08-28 12:56:09 +10:00
Nyall Dawson
e65694cc7d Raise a warning when encountering emissiveFactor with array length
of 4 instead of aborting the model loading
2023-08-28 12:46:44 +10:00
Syoyo Fujita
5d3c322e89 Merge pull request #446 from nyalldawson/fix_error
Fix misleading error message
2023-08-24 22:11:50 +09:00
Nyall Dawson
6c6e131792 Fix misleading error message
Avoids a confusing "Must have 4 bytes or more bytes, but got 4."
error.
2023-08-24 11:48:09 +10:00
Syoyo Fujita
c015b60ddd Merge pull request #442 from turanszkij/release-1
added project link to readme
2023-08-07 18:32:30 +09:00
Turánszki János
9b5fe332a2 added project link to readme 2023-08-07 06:59:35 +02:00
Syoyo Fujita
737a0b57c6 Merge pull request #433 from dyollb/modernize
Modernize
v2.8.14
2023-07-11 19:43:53 +09:00
Syoyo Fujita
fe42a91023 Merge pull request #436 from dimitri-tdg/bugfix_extensions_primitive
Fix issue when serializing extensions of a primitive
2023-07-10 23:30:40 +09:00
KUDELSKI Dimitri
ebbcdf999f Fix issue when serializing extensions of a primitive 2023-07-10 15:13:09 +02:00
Syoyo Fujita
64a818821e Merge pull request #435 from RE-Kovalev/release
MinGW _wfopen_s fix
2023-07-05 18:41:22 +09:00
R.E. Kovalev
7979314811 MinGW _wfopen_s fix 2023-07-05 09:11:57 +03:00
Bryn Lloyd
879cf43bab cppcoreguidelines-prefer-member-initializer 2023-06-21 22:30:14 +02:00
Bryn Lloyd
0817693edd modernize-use-equals-default 2023-06-21 22:15:49 +02:00
Bryn Lloyd
4f9e144547 readability-redundant-string-init 2023-06-21 18:42:24 +02:00
Bryn Lloyd
210d56b07f modernize-use-default-member-init 2023-06-21 18:40:18 +02:00
Bryn Lloyd
d955fd38e7 minor cleanup of cmakelists 2023-06-21 18:26:43 +02:00
Syoyo Fujita
927457b104 Initialize light and emitter members. Fixes #431
Include `light` and `emitter` comparison in Node::operator==()
v2.8.13
2023-06-19 21:52:13 +09:00
Syoyo Fujita
1fcfcaeaca Merge pull request #429 from AdamFull/release
KHR_audio parsing support (ASCII only)
v2.8.12
2023-06-13 21:40:45 +09:00
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