Commit Graph

611 Commits

Author SHA1 Message Date
jrkoonce
cfdf552137 RapidJson 1.1 support + More move semantics
*Support for RapidJson 1.1, use TINYGLTF_USE_RAPIDJSON to toggle between RapidJson and nlohmann

*Lot more move semantics enabled.  All parsing and serialization now move all json objects with far fewer copies
2019-08-29 11:26:22 -05:00
jrkoonce
37f8c09e5a Update tiny_gltf.h
Add/Enable move semantics to most all structs/classes
2019-08-27 11:51:02 -05:00
Syoyo Fujita
19c394de3f Apply clang format.
Remove `const static std::string` global variable.
2019-08-24 16:29:14 +09:00
Syoyo Fujita
8733047d09 Add Set/Get SerializeDefaultValues method(W.I.P.) 2019-08-21 14:23:00 +09:00
Syoyo Fujita
d44eccda9a Merge pull request #195 from ux3d/fix/parse-int-as-double
(also) parse int as double
2019-08-20 19:33:20 +09:00
Syoyo Fujita
8935b0120e Merge branch 'master' of github.com:syoyo/tinygltf 2019-08-20 17:11:29 +09:00
Syoyo Fujita
f20f38ac5e Suppress clang warnings. 2019-08-20 17:10:30 +09:00
Syoyo Fujita
08f08792c9 Merge pull request #193 from Selmar/emissiveFactor_defaults
Emissive factor defaults
2019-08-20 13:13:12 +09:00
Benjamin Schmithüsen
ab4280c8c1 when parsing a number from an int, also set the 'real value' to the value 2019-08-19 16:16:43 +02:00
Selmar Kok
0bf4804fa9 [emissiveFactor] correct default values 2019-08-19 11:23:31 +02:00
Selmar Kok
a67e3142b6 [emissiveFactor] fix inconsistency with baseColorFactor where default values were set only for baseColorFactor and not emissiveFactor 2019-08-19 11:05:28 +02:00
Syoyo Fujita
d4911dba7a Merge pull request #191 from Selmar/animation_extension_properties
Animation extension properties
2019-08-17 01:09:34 +09:00
Selmar Kok
360fcceffd Merge branch 'master' of github.com:syoyo/tinygltf into animation_extension_properties 2019-08-16 17:54:14 +02:00
Syoyo Fujita
8413d4dcb2 Merge pull request #190 from ux3d/feature/parse-node-weights
parse/serialize node weights
2019-08-16 22:21:48 +09:00
Benjamin Schmithüsen
fca385532d serialize node weights 2019-08-16 14:24:26 +02:00
Benjamin Schmithüsen
7cfd83cad0 parse node weights 2019-08-16 14:19:27 +02:00
Selmar Kok
acdac036b6 Merge branch 'master' of github.com:syoyo/tinygltf 2019-08-16 14:08:31 +02:00
Selmar Kok
4e73f75e58 add extension property for Animation and AnimationChannel 2019-08-16 14:08:08 +02:00
Syoyo Fujita
8bbec46809 Set default value of minFilter and magFilter in Sampler to -1(unset), since glTF 2.0 spec does not declare default values for it.
Fixes #186
2019-08-16 13:11:30 +09:00
Syoyo Fujita
165e0f6efe Fix inequality of texture index check when serializing texture of material.
Texture info was written even if it have invalid index(-1). Fixes #189
2019-08-15 12:25:50 +09:00
Syoyo Fujita
11a0e6c2f0 Merge pull request #188 from ux3d/fix/alphaMode
Fixed saving of alphaMode if not OPAQUE
2019-08-14 21:40:07 +09:00
Patrick Härtl
d7cc2d88ad Fixed saving of alphaMode if not OPAQUE
Removed duplicated code for alphaCutoff
2019-08-14 14:14:07 +02:00
Syoyo Fujita
1fb50ed9ec Merge pull request #185 from DerouineauNicolas/endif
remove extra #endif in examples/basic app
2019-08-14 03:09:53 +09:00
nicolasDEROUINEAU
8ed23ea55f remove extra #endif in examples/basic app 2019-08-13 15:08:01 +02:00
Syoyo Fujita
b909fd7093 Merge pull request #182 from ux3d/textureinfo
[TextureInfo] fix default value checks for serialization
2019-07-26 01:29:23 +09:00
Benjamin Schmithüsen
c529f89dfc fix default value checks for serialization 2019-07-25 16:07:27 +02:00
Syoyo Fujita
271eea8b55 Change the behavior of NUMBER value in Value class. NUMBER now reprents the value is either int or real(floating point). 2019-07-25 19:22:44 +09:00
Syoyo Fujita
dee354ca13 Update README. Add note on tinygltf::Value for extensions. 2019-07-24 19:55:04 +09:00
Syoyo Fujita
b0fd588748 Now material is parsed as a struct with explicit parameter definitions.
Implement Material struct serialization.
2019-07-24 19:26:48 +09:00
Syoyo Fujita
2553ec9719 Introduce TextureInfo class(W.I.P.) 2019-07-23 22:37:06 +09:00
Syoyo Fujita
d24b40d6f0 Merge pull request #180 from ux3d/master
Explicitly use the correct constructor for empty object
2019-07-23 18:55:34 +09:00
Syoyo Fujita
fd606a4bf5 Merge pull request #178 from rapidimages/feature/write-to-streams
Serialize to stream
2019-07-17 18:53:35 +09:00
Johan Bowald
f841314b72 clang format 2019-07-17 09:06:45 +02:00
Benjamin Schmithüsen
6c0a0c12be call json constructor explicitly 2019-07-16 17:07:45 +02:00
Johan Bowald
bcc77d9517 can write to streams 2019-07-16 15:56:18 +02:00
Benjamin Schmithüsen
a7880a56a5 Merge pull request #2 from syoyo/master
update from original repository
2019-07-15 15:13:50 +02:00
Syoyo Fujita
af77f1d253 Merge pull request #176 from ux3d/feature/update-lights
Feature: update lights
2019-07-10 21:20:12 +09:00
Benjamin Schmithüsen
afda04abb0 serialize lights 2019-07-09 17:59:20 +02:00
Benjamin Schmithüsen
aafed18dfa fix spot light parsingg 2019-07-09 16:55:55 +02:00
Benjamin Schmithüsen
e855ffe54c parse additional light properties and fix defaults 2019-07-09 16:32:42 +02:00
Benjamin Schmithüsen
4fc1492167 update lights to follow the KHR_lights_punctual extension 2019-07-08 18:04:24 +02:00
Benjamin Schmithüsen
b5cf37f55f Merge pull request #1 from syoyo/master
update fork
2019-07-08 17:40:20 +02:00
Syoyo Fujita
97fc03fb12 Merge pull request #174 from Ybalrid/pr_material_param_tex_info
Add Parameter::TextureStrength(). Precise default values.
2019-07-05 14:11:15 +09:00
Arthur Brianville (Ybalrid)
df4bd305f9 Applied clang-format 2019-07-05 00:30:47 +02:00
Arthur Brainville
ec2dc59665 Add Paramter::TextureStrength(). Precise default values.
The default values on these methods as been set to what is described [here](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0?ts=4#normaltextureinfo) and [here](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0?ts=4#occlusiontextureinfo).

This is to keep consistent with the API behavior from #144
2019-07-05 00:30:20 +02:00
Syoyo Fujita
04e2719e85 Merge pull request #173 from christophe-f8/master
Adding texture scale reading + asset copyright and texture names to the export
2019-07-04 15:39:22 +09:00
Christophe
7ea9e44323 Adding texture scale reading (for normal maps) + asset copyright and texture names to the export 2019-07-04 15:21:21 +09:00
Syoyo Fujita
cf51a5de62 Explicitly define copy constructor and copy assignment operator for Model an Node. 2019-06-29 17:31:13 +09:00
Syoyo Fujita
e1d8ed726d Merge pull request #171 from Ybalrid/fix_double_parse_material_name
Material names are stored once in material.name, then duplicated in "additionalValues"
2019-06-24 14:06:55 +09:00
Arthur Brainville (Ybalrid)
3d3abb4d2c Material names are stored once in material.name, then duplicated in "additionalValues"
This patch prevent this duplication
2019-06-23 21:50:10 +02:00