Skip to content
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

Vector Tiles #4665

Merged
merged 425 commits into from
Jan 8, 2018
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
425 commits
Select commit Hold shift + click to select a range
ada9029
Change positionOffset to heightOffset, fix displaying anchor lines.
bagnell Jun 12, 2017
ba5197d
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Jun 12, 2017
7f642b8
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Jun 21, 2017
7e1297d
Fixes after merge.
bagnell Jun 21, 2017
3171e6f
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Jun 22, 2017
6f30747
Fix picking vector tiles on 3D tiles.
bagnell Jun 22, 2017
c95c1f0
Minor picking update.
bagnell Jun 23, 2017
8420743
Revert to 3D Tiles Sandcastle example from master.
bagnell Jun 23, 2017
f4cd9db
Update server to serve vector tiles.
bagnell Jun 30, 2017
c77406b
Add per-polygon minimum and maximum heights according to the spec.
bagnell Jul 5, 2017
01323ba
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Jul 5, 2017
fb0925c
Only generate batch ids when not provided.
bagnell Jul 5, 2017
0991919
Merge remote-tracking branch 'origin/master' into vector-tiles
Jul 6, 2017
d431a69
Minor updates from review.
bagnell Jul 5, 2017
7021477
Update format to use arbitrary rectangle and use provided transform.
bagnell Jul 7, 2017
26bb104
Update positions with model matrix when decoding.
bagnell Jul 8, 2017
22ce894
Merge branch 'instanced-tile-padding' into vector-tiles
Jul 11, 2017
61d410b
Merge branch 'instanced-tile-padding' into vector-tiles
Jul 12, 2017
d9b6b0d
Merged master.
Jul 12, 2017
0504033
Merge remote-tracking branch 'origin/master' into vector-tiles
Jul 18, 2017
cf61acd
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Jul 21, 2017
a5c1fa9
Rename GroundPrimitiveBatch -> Vector3DTilePolygons.
bagnell Jul 21, 2017
b34abe3
Rename GroundPolylineBatch -> Vector3DTilePolylines.
bagnell Jul 21, 2017
cd25740
Add Vector3DTilePoints.
bagnell Jul 21, 2017
e3d4fc0
Move feature creation to primitives.
bagnell Jul 21, 2017
0080112
Move style application to primitives.
bagnell Jul 21, 2017
9a883f0
Create Cesium3DTilePointFeature.
bagnell Jul 21, 2017
4e6dfca
Change Cesium3DTilePointFeature.color to labelColor. Update doc.
bagnell Jul 24, 2017
66857bf
Fix styling points with non-generated batch ids.
bagnell Jul 24, 2017
39f5098
Refactor Vector3DTilePolygon for upcoming arbitrary classification pr…
bagnell Jul 24, 2017
11e2124
Add Vector3DTileBatch type to represent the renderable index ranges a…
bagnell Jul 25, 2017
aeece61
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Jul 25, 2017
bd776b9
Updates after merge.
bagnell Jul 25, 2017
686de4f
Fix tests after merge and temporarily disable vector tile tests.
bagnell Jul 25, 2017
c76f9bd
Fix jitter.
bagnell Jul 26, 2017
82b7b36
Fix styling.
bagnell Jul 26, 2017
f7e16f4
Fix initial batching by color.
bagnell Jul 26, 2017
93dfdd8
Fix polygons with the wrong winding order.
bagnell Jul 27, 2017
adc73da
We aren't checking if some styles are defined.
Jul 28, 2017
f5d2cae
Fix typo
Aug 2, 2017
fd23df9
Merge pull request #5718 from oterral/patch-3
Aug 2, 2017
5282d5d
Fix typo
Aug 2, 2017
a0bb925
Merge pull request #5719 from oterral/patch-4
Aug 2, 2017
ec6db3d
Added disableDepthTestDistance to point style.
Aug 7, 2017
9ef4d23
Added origin and labelOrigin styles.
Aug 7, 2017
1205e03
Changed label origin in vector tiles to match label collection.
Aug 7, 2017
bba1ca7
Initial mesh implementation. Still testing.
bagnell Aug 8, 2017
a7509de
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Aug 8, 2017
d31b32f
Merge branch 'vector-tiles' into vector-tile-mesh
bagnell Aug 8, 2017
83cc174
Updates after testing.
bagnell Aug 9, 2017
ca14796
Add ability to view classification mesh wireframe.
bagnell Aug 9, 2017
848eb25
Merge branch 'master' into vector-tiles
Aug 10, 2017
f1fffb6
Merge branch 'master' into vector-tiles
bagnell Aug 10, 2017
6f8bc61
Declare member in constructor.
bagnell Aug 11, 2017
dd6e212
Initial alpha classification styling.
bagnell Aug 14, 2017
e58d0b1
Fix artifacts from picking.
bagnell Aug 15, 2017
8805c9b
Inverted classification for multipass OIT (MRT unsupported).
bagnell Aug 15, 2017
63ada00
Fix for when OIT unsupported.
bagnell Aug 15, 2017
07a2557
Add doc and code comments.
bagnell Aug 15, 2017
346ad3e
Update Sandcastle example.
bagnell Aug 15, 2017
244c0cf
Draw classification style when classification is inverted.
bagnell Aug 16, 2017
a3c19c4
Always pick classifications regardless of alpha or show property.
bagnell Aug 16, 2017
2442aec
Fix rendering when highlighting on pick and classification is inverted.
bagnell Aug 17, 2017
a379ee0
Clean up.
bagnell Aug 17, 2017
03d1a23
Merge branch 'master' into vector-tiles
bagnell Aug 18, 2017
d209338
Merge branch 'vector-tiles' into invertable-style
bagnell Aug 18, 2017
b409f7b
Add vector tile support for boxes, cylinders, ellipsoids, and spheres.
bagnell Aug 21, 2017
5d6bac9
Merge branch 'vector-tiles' into invertable-style
bagnell Aug 21, 2017
5f2e46d
Use tile bounding volume (still need pick bounding volumes). Fix batc…
bagnell Aug 21, 2017
553affe
Merge branch 'vector-tiles' into invertable-style
bagnell Aug 21, 2017
c1c54c3
Change invertClassificationAlpha to invertClassificationColor.
bagnell Aug 28, 2017
54dd4f5
Merge branch 'master' into vector-tiles
bagnell Sep 1, 2017
39f5672
Merge branch 'vector-tiles' into invertable-style
bagnell Sep 1, 2017
815e648
Fixes after merge.
bagnell Sep 1, 2017
0a96758
Merge remote-tracking branch 'origin/master' into vector-tiles
gberaudo Sep 4, 2017
a17690e
Merge pull request #5810 from gberaudo/vector-tiles-1.37
bagnell Sep 5, 2017
5642430
Fix constants.
bagnell Sep 5, 2017
2defc39
Merge branch 'vector-tiles' into invertable-style
bagnell Sep 5, 2017
b1b8894
Fix vector tiles pass and enable skip LODs by default.
bagnell Sep 6, 2017
5257ff9
Turn on skip LOD optimization by default.
bagnell Sep 7, 2017
899af16
Fix data structure for rebatching mesh indices. Check if rebatching i…
bagnell Sep 8, 2017
69584f0
Merge branch 'vector-tiles' into invertable-style
bagnell Sep 8, 2017
3ac6180
Fix feature batch id.
bagnell Sep 11, 2017
7b3dfdc
Merge branch 'vector-tiles' into invertable-style
bagnell Sep 11, 2017
6e8cb08
Initial commit for optimized classification inversion.
bagnell Sep 12, 2017
1e6ab0c
fix polyline vector tiles
likangning93 Sep 14, 2017
1dad5f3
Merge pull request #5828 from likangning93/fixPolylines
bagnell Sep 14, 2017
4bc35a5
Fix transcluent invert color.
bagnell Sep 14, 2017
df81a03
Fix highlighting when inverted, re-enable picking in Sandcastle example.
bagnell Sep 14, 2017
eb1adb7
Change stencil reference and mask to remove multiple stencil clears.
bagnell Sep 14, 2017
be04782
Clear buffers for each frustum to fix multifrustum artifact.
bagnell Sep 15, 2017
cb50ce4
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Sep 15, 2017
8563ced
Merge branch 'vector-tiles' into invertable-style
bagnell Sep 15, 2017
14072c5
Only update invert buffers when enabled. Only use translucency when f…
bagnell Sep 15, 2017
5648f31
Fix blinking on pick.
bagnell Sep 15, 2017
411b8fd
Fix for when alpha is unsupported and individual color components are…
bagnell Sep 15, 2017
855ccd4
Add code comment for how the invert classification works.
bagnell Sep 15, 2017
6478a76
Add invert classification support to ClassificationPrimitive. Update …
bagnell Sep 15, 2017
40d5e4b
Add support to GroundPrimitive and add tests.
bagnell Sep 18, 2017
099abba
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Sep 18, 2017
b5c0565
Merge branch 'vector-tiles' into invertable-style
bagnell Sep 18, 2017
e16d16c
Clean up after merge.
bagnell Sep 18, 2017
94fa13d
Merge pull request #5755 from AnalyticalGraphicsInc/invertable-style
bagnell Sep 18, 2017
0ada825
Move classification mesh creation to a web worker.
bagnell Sep 19, 2017
27670f5
Merge branch 'vector-tiles' into mesh-web-worker
bagnell Sep 19, 2017
bcdf661
Compute mesh bounding volumes.
bagnell Sep 19, 2017
403aa24
Remove outdated Sandcastle example.
bagnell Sep 20, 2017
a9529ee
Remove outdated tests.
bagnell Sep 20, 2017
81337ba
Add AttributeCompression and OrientedBoundingBox tests.
bagnell Sep 20, 2017
f11e6b6
Add new style tests.
bagnell Sep 21, 2017
852df0b
Move geometry mesh creation to a web worker. Some renames. Add 3D Til…
bagnell Sep 22, 2017
09128f9
Clean up geometry web worker.
bagnell Sep 26, 2017
4887528
Compute Geometry bounding volumes.
bagnell Sep 26, 2017
6f75de5
Clean up.
bagnell Sep 26, 2017
bed73b9
Move polyline loading to web worker.
bagnell Sep 26, 2017
3b05f98
Clean up.
bagnell Sep 26, 2017
7bef19c
Merged master.
Sep 27, 2017
688e705
Greatly improve performance for applying simple styles to vector tiles.
bagnell Sep 27, 2017
8ef1b97
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Sep 28, 2017
603184a
Improve point load time and fix stuttering on load by moving position…
bagnell Sep 28, 2017
312150a
Some clean up and more tests.
bagnell Sep 29, 2017
b79093f
Merge tag '1.38' into vector-tiles
gberaudo Oct 3, 2017
2905c24
Merge pull request #5875 from gberaudo/merge-1.38-into-vector-tiles
bagnell Oct 3, 2017
5602c30
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Oct 3, 2017
3a1f7bf
Add more vector tile geometry tests.
bagnell Oct 3, 2017
7570c4c
Add vector tile mesh tests.
bagnell Oct 3, 2017
6168e8a
Add wireframe tests.
bagnell Oct 3, 2017
0c1a85d
Add geometry and mesh picking tests.
bagnell Oct 4, 2017
76b177a
Add re-batch and invert classification tests.
bagnell Oct 4, 2017
a07d28c
Fix failing geometry tests on travis.
bagnell Oct 4, 2017
ed55b55
Fix failing meshe tests from travis.
bagnell Oct 4, 2017
9504afb
Add polygon tests.
bagnell Oct 4, 2017
ceca0f6
Add test for polygons with different minimum and maximum heights.
bagnell Oct 5, 2017
38cc1ae
Add vector tiles points tests.
bagnell Oct 5, 2017
d3726c3
Merge branch 'buffer-copy' into vector-tiles
bagnell Oct 5, 2017
6379416
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Oct 5, 2017
69fbd0d
Add WebGL 2 tests for re-batches using buffer-to-buffer copies.
bagnell Oct 5, 2017
cfa3e0e
Add polyline tests.
bagnell Oct 5, 2017
46439ef
Add sample tilesets.
bagnell Oct 11, 2017
0060e18
Add vector content render and pick tests.
bagnell Oct 12, 2017
68e52d5
Clean up batch ids creation.
bagnell Oct 12, 2017
5f3e665
Add tests when the tile includes batch ids.
bagnell Oct 12, 2017
4a168a9
Fix batch ids for cylinders, ellipsoids, and spheres.
bagnell Oct 13, 2017
13df9bb
Update sample tilesets.
bagnell Oct 13, 2017
7c1bfb8
Fix rebatching and indexing with batch ids.
bagnell Oct 13, 2017
d83392d
Do not apply model matrix to polygons when given in cartographic format.
bagnell Oct 13, 2017
cc89f78
Update samples and add debug colorize test.
bagnell Oct 13, 2017
003ae7a
Fix re-batching after batch id changes.
bagnell Oct 16, 2017
26a3883
Remove all of the indexOf calls to make re-batching faster.
bagnell Oct 16, 2017
d873b70
Add tests for a tile with all of the vector types combined.
bagnell Oct 16, 2017
2319410
Change errors to RuntimeErrors for invalid tiles.
bagnell Oct 16, 2017
360da0a
Update private doc.
bagnell Oct 16, 2017
98a1cdc
Add option to classify either 3D Tiles, terrain or both.
bagnell Oct 16, 2017
adbc8ac
Add test for different classification types.
bagnell Oct 16, 2017
ff38aff
Update Sandcastle example.
bagnell Oct 18, 2017
3c3df68
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Oct 18, 2017
fd8bd82
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Oct 19, 2017
3f8b9fc
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Oct 26, 2017
3393c18
Merge tag '1.39' into vector-tiles
gberaudo Nov 2, 2017
89a8ef4
Merge pull request #5960 from gberaudo/vector-tiles
bagnell Nov 2, 2017
acd3f81
Merge branch 'master' into vector-tiles
lilleyse Nov 3, 2017
501c683
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Nov 3, 2017
a76ae75
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Nov 15, 2017
ce68124
Updates from review.
bagnell Nov 20, 2017
0f80e6c
More updates from review.
bagnell Nov 20, 2017
8b61e48
Add debug color option to point vector features.
bagnell Nov 20, 2017
5877cef
Minor doc update.
bagnell Nov 20, 2017
982aed9
Add better Sandcastle examples.
bagnell Nov 28, 2017
0de3ec4
Update vector tiles links and add a comment about experimental nature.
bagnell Nov 29, 2017
599fda2
Updates from review.
bagnell Nov 29, 2017
8f31344
More updates from review. Fix eslint errors. Revert Point Cloud example.
bagnell Nov 29, 2017
155c7ea
Update CHANGES.md. Minor updates from review.
bagnell Nov 29, 2017
d78d3d5
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Nov 29, 2017
fdae6d3
Fix merge error.
bagnell Nov 29, 2017
f433975
Merge branch 'master' into vector-tiles
bagnell Nov 30, 2017
d17b3ba
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Nov 30, 2017
73d26af
Add experimental tags.
bagnell Nov 30, 2017
27972ff
Add option to make a b3dm tileset classify another tileset.
bagnell Dec 1, 2017
b4f367a
Add a separate pass for classification on both terrain and 3D Tiles. …
bagnell Dec 1, 2017
e7ec3be
Optimize b3dm classification fragment shader.
bagnell Dec 1, 2017
2b0f52f
Initial rework.
bagnell Dec 4, 2017
f1ab457
Remove unneeded code.
bagnell Dec 4, 2017
33ff56e
Only create classification commands. Only create basic vertex and fra…
bagnell Dec 4, 2017
7fe3e37
Only use position and batch id attributes.
bagnell Dec 4, 2017
b3993b5
Remove more unneeded code.
bagnell Dec 4, 2017
cc7a228
Remove shader parsing.
bagnell Dec 4, 2017
fad8860
Remove unused uniform semantics.
bagnell Dec 4, 2017
a2a1e2f
Mostly working. Needs clean up. There are issues with model matrices,…
bagnell Dec 5, 2017
0d2f1e1
Fix model matrix.
bagnell Dec 5, 2017
6981a68
Fix rebatching and remove derived commands.
bagnell Dec 5, 2017
e1218d7
Clean up.
bagnell Dec 6, 2017
9173555
Fix test.
bagnell Dec 6, 2017
c1ad375
Revert Sandcastle example.
bagnell Dec 6, 2017
b448116
Remove mesh support from vector tiles.
bagnell Dec 6, 2017
f15d07f
Add Geometry tile.
bagnell Dec 6, 2017
1f8fb07
Remove geometry from vector tile.
bagnell Dec 6, 2017
9c054da
Update point cloud classification example. Tweak geometry tile to pre…
bagnell Dec 6, 2017
db85153
Update Vector tile specs.
bagnell Dec 6, 2017
124d290
Add Geometry3DTileContent tests.
bagnell Dec 6, 2017
1fe9fc8
Remove height reference.
bagnell Dec 6, 2017
8eabdad
Remove more unneeded code.
bagnell Dec 6, 2017
67cdf82
Fix failing test.
bagnell Dec 6, 2017
15b58e4
Remove unused cache.
bagnell Dec 6, 2017
0cefab9
Remove more unneeded code.
bagnell Dec 7, 2017
3e88765
Fix broken test again.
bagnell Dec 7, 2017
bc232cd
Clamp volumes to the far plane.
bagnell Dec 7, 2017
764267a
Add Sandcastle example.
bagnell Dec 7, 2017
00f1792
Updates from review.
bagnell Dec 7, 2017
7cec63d
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Dec 7, 2017
3ffd232
Merge branch 'vector-tiles' into b3dm-class
bagnell Dec 7, 2017
d377603
Update CHANGES.md after merge.
bagnell Dec 7, 2017
eb07e44
Update Sandcastle tileset url.
bagnell Dec 8, 2017
ea49b72
Remove node hierarchy.
bagnell Dec 8, 2017
12283c4
Update doc.
bagnell Dec 8, 2017
79ed093
Add tests. Fix quantization extension. Remove some more unneeded code.
bagnell Dec 8, 2017
0ab3156
Merge branch 'b3dm-class' into vector-split
bagnell Dec 11, 2017
5fdf1ad
Fix after merge.
bagnell Dec 11, 2017
772a9c3
Updates from review.
bagnell Dec 11, 2017
9fbc848
Merge branch 'b3dm-class' into vector-split
bagnell Dec 11, 2017
612c5f5
Update CHANGES.md.
bagnell Dec 11, 2017
618a892
Merge pull request #6034 from AnalyticalGraphicsInc/vector-split
pjcozzi Dec 12, 2017
d566de4
Remove some code expecting multiple primitives. Move glTF checks to c…
bagnell Dec 12, 2017
045e458
Only create one primitive.
bagnell Dec 12, 2017
6e57010
Don't parse shaders since they are generated.
bagnell Dec 12, 2017
15380ef
Remove runtimeNode.
bagnell Dec 12, 2017
92709e8
Create only one uniform map.
bagnell Dec 12, 2017
36b2b53
Factor out common code.
bagnell Dec 13, 2017
a4c4506
Factor out gltf semantic uniforms.
bagnell Dec 13, 2017
5232f88
Remove unused requires.
bagnell Dec 13, 2017
029abad
Pass debug settings to the vector primitive.
bagnell Dec 13, 2017
1fa1976
Add ClassificationModel tests.
bagnell Dec 13, 2017
8f389cb
Update restrictions in the doc.
bagnell Dec 13, 2017
53ed7f2
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Dec 13, 2017
5f4ed4c
Merge branch 'vector-tiles' into b3dm-class
bagnell Dec 13, 2017
2385d20
Update function name.
bagnell Dec 15, 2017
7d27a23
Merge pull request #6033 from AnalyticalGraphicsInc/b3dm-class
pjcozzi Dec 15, 2017
6188233
Updates from review. Add arraySlice tests. Fix lower level classifica…
bagnell Dec 28, 2017
d42f320
More updates from review.
bagnell Dec 28, 2017
b407913
Rename pointColor -> color.
bagnell Dec 28, 2017
459639a
Add tests for uncovered code.
bagnell Jan 2, 2018
bf9572d
Add exception tests for vector and geometry tiles.
bagnell Jan 2, 2018
0f5b30e
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Jan 3, 2018
5587f89
Update horizontalOrigin, verticalOrigin, labelHorizontalOrigin, and l…
bagnell Jan 3, 2018
695a60d
Add positive infinity constant for styling.
bagnell Jan 3, 2018
09a8fd2
Align with revisions to spec. Update parsing and test tiles.
bagnell Jan 4, 2018
fe81890
Make skipLevelOfDetail a hint. Disable when using vector/geometry til…
bagnell Jan 5, 2018
8350f31
Merge branch '3d-tiles-vector' into vector-tiles
bagnell Jan 5, 2018
3340438
Update CHANGES.md.
bagnell Jan 8, 2018
b40c2a9
Update test tilesets to be uncompressed.
bagnell Jan 8, 2018
c379c63
Revert commits to Sandcastle example.
bagnell Jan 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<!DOCTYPE html>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will there be any Sandcastle examples using vector tiles in the more traditional sense - labels, billboards, polylines, etc? Also it's not completely clear which of the new demos are using b3dm vs. geom vs. vctr for classification. Each should have a comment about what tile format they are using.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment to each example.

The 3D Tiles Terrain Classification example is traditional vector tiles (polygons draped on terrain). There are no polylines or points/billboards/labels. This is the best I can do until I find better open data and better tiling.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened an issue to keep track of this: #6095

<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <!-- Use Chrome Frame in IE -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="Sample photogrammetry and classification datasets both rendered with 3D Tiles.">
<meta name="cesium-sandcastle-labels" content="Showcases, 3D Tiles">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
<script type="text/javascript">
require.config({
baseUrl : '../../../Source',
waitSeconds : 60
});
</script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
function startup(Cesium) {
'use strict';
//Sandcastle_Begin
var viewer = new Cesium.Viewer('cesiumContainer');

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url : 'https://beta.cesium.com/api/assets/1458?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxYmJiNTAxOC1lOTg5LTQzN2EtODg1OC0zMWJjM2IxNGNlYmMiLCJpZCI6NDQsImFzc2V0cyI6WzE0NThdLCJpYXQiOjE0OTkyNjM4MjB9.1WKijRa-ILkmG6utrhDWX6rDgasjD7dZv-G5ZyCmkKg'
}));

tileset.readyPromise.then(function() {
var boundingSphere = tileset.boundingSphere;
viewer.camera.viewBoundingSphere(boundingSphere, new Cesium.HeadingPitchRange(0.0, -0.5, boundingSphere.radius));
viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
}).otherwise(function(error) {
throw(error);
});

var classification = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'https://beta.cesium.com/api/assets/3486?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZjM4MjljZi0xNTAzLTQ0MzctODhlZi0zOTU3Njg5ODA1Y2QiLCJpZCI6OCwiaWF0IjoxNDgxODI5ODMyfQ.dYlV8_PoXcFNlPHGook5kMzuJMS-Bb9DCMzI1mFVvgE',
classificationType : Cesium.ClassificationType.CESIUM_3D_TILE
}));

classification.readyPromise.then(function() {
classification.style = new Cesium.Cesium3DTileStyle({
color : 'rgba(255, 0, 0, 0.5)'
});
}).otherwise(function(error) {
throw(error);
});

var nonClassification = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'https://beta.cesium.com/api/assets/3486?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZjM4MjljZi0xNTAzLTQ0MzctODhlZi0zOTU3Njg5ODA1Y2QiLCJpZCI6OCwiaWF0IjoxNDgxODI5ODMyfQ.dYlV8_PoXcFNlPHGook5kMzuJMS-Bb9DCMzI1mFVvgE',
show : false
}));
nonClassification.readyPromise.then(function() {
nonClassification.style = new Cesium.Cesium3DTileStyle({
color : 'rgba(255, 0, 0, 0.5)'
});
}).otherwise(function(error) {
throw(error);
});

Cesium.when.join(classification.readyPromise, nonClassification.readyPromise).then(function() {
Sandcastle.addToggleButton('Show classification', true, function(checked) {
classification.show = checked;
nonClassification.show = !checked;
});
});
//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== "undefined") {
startup(Cesium);
} else if (typeof require === "function") {
require(["Cesium"], startup);
}
</script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/3D Tiles Photogrammetry.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <!-- Use Chrome Frame in IE -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="A sample photgrammetry dataset rendered with 3D Tiles.">
<meta name="description" content="A sample photogrammetry dataset rendered with 3D Tiles.">
<meta name="cesium-sandcastle-labels" content="Showcases, 3D Tiles">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
Expand Down
103 changes: 103 additions & 0 deletions Apps/Sandcastle/gallery/3D Tiles Point Cloud Classification.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <!-- Use Chrome Frame in IE -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="A sample Vector dataset on terrain rendered with 3D Tiles.">
<meta name="cesium-sandcastle-labels" content="Showcases, 3D Tiles">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
<script type="text/javascript">
require.config({
baseUrl : '../../../Source',
waitSeconds : 60
});
</script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<script id="cesium_sandcastle_script">
function startup(Cesium) {
'use strict';
//Sandcastle_Begin
//Point Cloud by Prof. Peter Allen, Columbia University Robotics Lab. Scanning by Alejandro Troccoli and Matei Ciocarlie.
var viewer = new Cesium.Viewer('cesiumContainer');

var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url : 'https://beta.cesium.com/api/assets/1460?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMzk2YzJiOS1jZGFmLTRlZmYtYmQ4MS00NTA3NjEwMzViZTkiLCJpZCI6NDQsImFzc2V0cyI6WzE0NjBdLCJpYXQiOjE0OTkyNjQ3NTV9.oWjvN52CRQ-dk3xtvD4e8ZnOHZhoWSpJLlw115mbQJM'
}));

// Vector 3D Tiles are experimental and the format is subject to change in the future.
// For more details, see:
// https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/vector-tiles/TileFormats/VectorData
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this demo using the vector format?

var classification = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'https://beta.cesium.com/api/assets/3469?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZjM4MjljZi0xNTAzLTQ0MzctODhlZi0zOTU3Njg5ODA1Y2QiLCJpZCI6OCwiaWF0IjoxNDgxODI5ODMyfQ.dYlV8_PoXcFNlPHGook5kMzuJMS-Bb9DCMzI1mFVvgE',
skipLevelOfDetail : false,
classificationType : Cesium.ClassificationType.CESIUM_3D_TILE
}));
classification.readyPromise.then(function() {
classification.style = new Cesium.Cesium3DTileStyle({
color : {
conditions : [
["${id} === 'roof1'", "color('#004FFF', 0.5)"],
["${id} === 'towerBottom1'", "color('#33BB66', 0.5)"],
["${id} === 'towerTop1'", "color('#0099AA', 0.5)"],
["${id} === 'roof2'", "color('#004FFF', 0.5)"],
["${id} === 'tower3'", "color('#FF8833', 0.5)"],
["${id} === 'tower4'", "color('#FFAA22', 0.5)"],
["true", "color('#FFFF00', 0.5)"]
]
}
});
});

viewer.scene.camera.setView({
destination : new Cesium.Cartesian3(4401448.974612145, 225038.45962842644, 4595135.776680152),
orientation : {
heading : 5.36861655457269,
pitch : -0.4029289137364358
}
});

// Information about the currently highlighted feature
var highlighted = {
feature: undefined,
originalColor: new Cesium.Color()
};

// Color a feature yellow on hover.
viewer.screenSpaceEventHandler.setInputAction(function onMouseMove(movement) {
// If a feature was previously highlighted, undo the highlight
if (Cesium.defined(highlighted.feature)) {
highlighted.feature.color = highlighted.originalColor;
highlighted.feature = undefined;
}

// Pick a new feature
var pickedFeature = viewer.scene.pick(movement.endPosition);
if (!Cesium.defined(pickedFeature)) {
return;
}

// Highlight the feature
highlighted.feature = pickedFeature;
Cesium.Color.clone(pickedFeature.color, highlighted.originalColor);
pickedFeature.color = Cesium.Color.WHITE.withAlpha(0.5);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the color be yellow instead?

}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== "undefined") {
startup(Cesium);
} else if (typeof require === "function") {
require(["Cesium"], startup);
}
</script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
137 changes: 137 additions & 0 deletions Apps/Sandcastle/gallery/3D Tiles Terrain Classification.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <!-- Use Chrome Frame in IE -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="A sample Vector dataset on terrain rendered with 3D Tiles.">
<meta name="cesium-sandcastle-labels" content="Showcases, 3D Tiles">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
<script type="text/javascript">
require.config({
baseUrl : '../../../Source',
waitSeconds : 60
});
</script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<script id="cesium_sandcastle_script">
function startup(Cesium) {
'use strict';
//Sandcastle_Begin
var viewer = new Cesium.Viewer('cesiumContainer');

viewer.terrainProvider = new Cesium.CesiumTerrainProvider({
url : 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles',
requestWaterMask : true,
requestVertexNormals : true
});

var geocoder = viewer.geocoder.viewModel;
geocoder.searchText = 'Vienna';
geocoder.flightDuration = 0.0;
geocoder.search();


// Vector 3D Tiles are experimental and the format is subject to change in the future.
// For more details, see:
// https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/vector-tiles/TileFormats/VectorData
var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'https://beta.cesium.com/api/assets/3395?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZjM4MjljZi0xNTAzLTQ0MzctODhlZi0zOTU3Njg5ODA1Y2QiLCJpZCI6OCwiaWF0IjoxNDgxODI5ODMyfQ.dYlV8_PoXcFNlPHGook5kMzuJMS-Bb9DCMzI1mFVvgE',
skipLevelOfDetail : false,
classificationType : Cesium.ClassificationType.TERRAIN
}));

tileset.readyPromise.then(function() {
tileset.style = new Cesium.Cesium3DTileStyle({
color : 'rgba(255, 255, 255, 0.5)'
});
}).otherwise(function(error) {
throw(error);
});

// Information about the currently selected feature
var selected = {
feature: undefined,
originalColor: new Cesium.Color()
};

// Information about the currently highlighted feature
var highlighted = {
feature: undefined,
originalColor: new Cesium.Color()
};

// Color a feature yellow on hover.
viewer.screenSpaceEventHandler.setInputAction(function onMouseMove(movement) {
// If a feature was previously highlighted, undo the highlight
if (Cesium.defined(highlighted.feature)) {
highlighted.feature.color = highlighted.originalColor;
highlighted.feature = undefined;
}

// Pick a new feature
var pickedFeature = viewer.scene.pick(movement.endPosition);
if (!Cesium.defined(pickedFeature)) {
return;
}

// Highlight the feature if it's not already selected.
if (pickedFeature !== selected.feature) {
highlighted.feature = pickedFeature;
Cesium.Color.clone(pickedFeature.color, highlighted.originalColor);
pickedFeature.color = Cesium.Color.YELLOW;
}
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);

// Color a feature on selection and show metadata in the InfoBox.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove note about the InfoBox.

var clickHandler = viewer.screenSpaceEventHandler.getInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(movement) {
// If a feature was previously selected, undo the highlight
if (Cesium.defined(selected.feature)) {
selected.feature.color = selected.originalColor;
selected.feature = undefined;
}

// Pick a new feature
var pickedFeature = viewer.scene.pick(movement.position);
if (!Cesium.defined(pickedFeature)) {
clickHandler(movement);
return;
}

// Select the feature if it's not already selected
if (selected.feature === pickedFeature) {
return;
}
selected.feature = pickedFeature;

// Save the selected feature's original color
if (pickedFeature === highlighted.feature) {
Cesium.Color.clone(highlighted.originalColor, selected.originalColor);
highlighted.feature = undefined;
} else {
Cesium.Color.clone(pickedFeature.color, selected.originalColor);
}

// Highlight newly selected feature
pickedFeature.color = Cesium.Color.LIME;
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a comment explaining why the selected feature doesn't stay selected when you zoom in and out, and link to CesiumGS/3d-tiles#265.

//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== "undefined") {
startup(Cesium);
} else if (typeof require === "function") {
require(["Cesium"], startup);
}
</script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ Change Log
* Added `Plane.transformPlane` function to apply a transformation to a plane. [#5966](https://github.com/AnalyticalGraphicsInc/cesium/pull/5966)
* Added `PlaneGeometry`, `PlaneOutlineGeometry`, `PlaneGeometryUpdater`, and `PlaneOutlineGeometryUpdater` classes to render plane primitives. [#5996](https://github.com/AnalyticalGraphicsInc/cesium/pull/5996)
* Added `PlaneGraphics` class and `plane` property to `Entity`. [#5996](https://github.com/AnalyticalGraphicsInc/cesium/pull/5996)
* Added `AttributeCompression.zigZagDeltaDecode` which will decode delta and ZigZag encoded buffers in place.
* Added `pack` and `unpack` functions to `OrientedBoundingBox` for packing to and unpacking from a flat buffer.
* Added experimental support for [3D Tiles Vector Data](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/vector-tiles/TileFormats/VectorData) ([#4665](https://github.com/AnalyticalGraphicsInc/cesium/pull/4665)). The new and modified Cesium APIs are:
* `Cesium3DTileStyle` has expanded for styling point features. See the [styling specification](https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/vector-tiles/Styling#vector-data) for details.
* `Cesium3DTileFeature` can modify `color` and `show` properties for polygon, polyline, and geometry features.
* `Cesium3DTilePointFeature` can modify the styling options for a point feature.
* Added `Cesium3DTileset.classificationType` to specify if a tileset classifies terrain, another 3D Tiles tileset, or both. This only applies to vector, geometry and batched 3D model tilesets. See [#6033](https://github.com/AnalyticalGraphicsInc/cesium/pull/6033) for limitations on the glTF contained in the b3dm tile.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the b3dm restrictions be mentioned here in CHANGES.md instead of linking to a PR?


### 1.40 - 2017-12-01

Expand Down
Loading