-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Extent setters in Cesium3DTileStyle #5412
Merged
lilleyse
merged 26 commits into
CesiumGS:master
from
SunBlack:Extent_Cesium3DTileStyle_setters
Jul 25, 2017
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
0455a13
Extent setters in Cesium3DTileStyle
8a5dba1
Merge remote-tracking branch 'remotes/cesium/3d-tiles' into Extent_Ce…
8b551d2
Adjusted documentation
486f9f6
Merge branch 'master' into Extent_Cesium3DTileStyle_setters
lilleyse 292123c
Merge remote-tracking branch 'remotes/cesium/master' into Extent_Cesi…
4d54231
Adjust documentation
7d14b87
Merge remote-tracking branch 'remotes/origin/Extent_Cesium3DTileStyle…
15f1cbc
Added support of interpreting existing defines in Cesium3DTileStyle s…
b8a5025
Fix tests
8d57348
Changed behavior: Cesium3DTileStyle does not set default values anymore
c2eea43
Fix whitespaces
9bc3764
Fix syntax error
a40077c
Fix remaining Cesium3DTileStyleSpec tests
c150bbf
Fix eslint errors
lilleyse 585cb0f
Remove obsolete code
bfb7c51
Fix after last commit
e47c0c6
Fix syntax mistaken
3cdf90c
Replace tab by whitespaces
10d5c7a
Fix Cesium3DTilesInspector
d71aeb5
Merge remote-tracking branch 'remotes/cesium/master' into Extent_Cesi…
7a44bfb
Update CHANGES.md
6c45625
Merge remote-tracking branch 'remotes/cesium/master' into Extent_Cesi…
6d88a37
Merge branch 'master' into Extent_Cesium3DTileStyle_setters
70f562f
Added deprecation note
fff7cdd
Tweak doc wording
lilleyse 2f2ac1c
Merge branch 'master' into Extent_Cesium3DTileStyle_setters
lilleyse 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
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
Oops, something went wrong.
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.
The
setup
function can now be simplified be calling these setters within.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.
Depends on discussion above ;)
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 having some trouble with a test, if I use setter in
setup
. In case I use new setter to initialize all variables following test fail:return undefined shader functions when the style is empty
. But I think existing tests are wrong in this case. If e.g. no color is definedDEFAULT_JSON_COLOR_EXPRESSION
will be used. So I don't understand why the test is expecting an undefined result instead of a shader generated from valueDEFAULT_JSON_COLOR_EXPRESSION
.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.
For shader styling
undefined
is returned because otherwiseDEFAULT_JSON_COLOR_EXPRESSION
would cause all points to be white.To fix this
need to go below the setters in
setup
.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.
It works, but I don't like code design here, because it is not really clear why one time
getColorShaderFunction
returnsundefined
and other times a valid shader, if both times value ofcolor
is equal toDEFAULT_JSON_COLOR_EXPRESSION
.So I would prefer: In case no color expression is defined
color
returnsundefined
instead ofDEFAULT_JSON_COLOR_EXPRESSION
. InCesium3DTileBatchTable.prototype.applyStyle
change code from:to
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.
That approach seems good to me too.
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.
Behavior changed. I should be finished with the PR (hopefully all tests are passing on travis ;) )