-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KHR_materials_common and KHR_binary_glTF compatibility #3294
Closed
mlimper
wants to merge
19
commits into
CesiumGS:master
from
mlimper:KHR_common_materials-compatibility
Closed
Changes from 5 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
fdaec2c
Some adaptions to match KHR_materials_common spec
ee5362e
gitignore update for Webstorm
45dfb73
Alignment of binary body changed according to binary glTF spec
776b2ab
Removed special handling of non-4-byte-aligned binary bodies (should …
948b1ed
Changed binary buffer name to binary_glTF (like in the spec)
c566172
Adapted interpretation of shininess value according to KHR_materials_…
503f087
Backwards compatibility with Cesium 1.15
09a7fae
Update CONTRIBUTORS.md
164bca9
Rollback of dynamic shininess handling (will be changed in spec)
b25fea7
Merge branch 'KHR_common_materials-compatibility' of https://github.c…
15cbbef
Fixed merge conflict, added reference to dragon glb (only for testing)
61677e6
Removed references to temporary test models, added compatibility with…
3f962e0
reset content of .gitignore to master
3dfe370
Reset content of .idea directory to master
93c7b64
Reset gallery 3D models example to master
6709e57
Added comment on boolean parameters
b79010f
Used cesium defined function, adapted comment about KHR_binary_glTF
9d34c12
Fixed merge conflict in CONTRIBUTORS.md
1d22e74
Updated change log
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -343,7 +343,7 @@ define([ | |
var result = parseBinaryGltfHeader(gltf); | ||
|
||
// CESIUM_binary_glTF is from the beginning of the file but | ||
// KHR_binary_glTF is from the beginning of the binary section | ||
// binary_glTF is from the beginning of the binary section | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically the extension is still called KHR_binary_glTF so there's no reason to change these comments. |
||
if (result.binaryOffset !== 0) { | ||
gltf = gltf.subarray(result.binaryOffset); | ||
} | ||
|
@@ -975,7 +975,7 @@ define([ | |
// Load binary glTF | ||
var result = parseBinaryGltfHeader(array); | ||
// CESIUM_binary_glTF is from the beginning of the file but | ||
// KHR_binary_glTF is from the beginning of the binary section | ||
// binary_glTF is from the beginning of the binary section | ||
if (result.binaryOffset !== 0) { | ||
array = array.subarray(result.binaryOffset); | ||
} | ||
|
@@ -1148,7 +1148,7 @@ define([ | |
if (buffers.hasOwnProperty(id)) { | ||
var buffer = buffers[id]; | ||
|
||
if (id === 'CESIUM_binary_glTF' || id === 'KHR_binary_glTF') { | ||
if (id === 'CESIUM_binary_glTF' || id === 'binary_glTF') { | ||
// Buffer is the binary glTF file itself that is already loaded | ||
var loadResources = model._loadResources; | ||
loadResources.buffers[id] = model._cachedGltf.bgltf; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want to ignore any of these files (and they are also already committed in master, so ignoring them would product odd behavior). What is your reasoning for adding them here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint!
My Webstorm seemed to have changed some of them automatically, and I didn't want to commit those changes (but then I don't need to add the changes to .gitignore, of course). I wanted to revert this inside the pull request, but didn't do it so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, I'm not WebStorm expert so I wanted to make sure we didn't do something non-standard on our side. Most of us our running WebStorm 11, so if you're on an earlier version, that could be the source of it changing files locally. Out of curiosity, what did it change? Maybe we can prevent that from happening with a different config tweak.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using an older WebStorm version - that's probably the problem.
Here's a diff: