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

3D Tiles #5308

Merged
merged 2,238 commits into from
Jun 19, 2017
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
2238 commits
Select commit Hold shift + click to select a range
afca34c
Merge branch 'master' into 3d-tiles
lilleyse Apr 13, 2017
60f303e
Load tiles without extensions
lilleyse Apr 13, 2017
dff65a6
Merge branch 'master' into 3d-tiles
bagnell Apr 13, 2017
02f0db3
Fixed indentation and added shader expression tests
glee2244 Apr 17, 2017
bc64040
Attempt to revert indentation
glee2244 Apr 17, 2017
44e6d9e
update children transforms before checking their union for culling
austinEng Apr 17, 2017
8153ff3
Merge pull request #5211 from austinEng/children-culling-fix
lilleyse Apr 18, 2017
85e4976
Merge branch 'master' into 3d-tiles
lilleyse Apr 18, 2017
34e664b
refactor
Apr 18, 2017
d53054f
fix specs
Apr 18, 2017
df45e53
missing doc
Apr 18, 2017
2c78cc9
Tests
lilleyse Apr 18, 2017
95652af
cleanup, fix exponential slider
Apr 19, 2017
04a4036
Merge branch '3d-tiles' into 3dtiles-inspector-refactor
Apr 19, 2017
95fbaba
fix style editor
Apr 19, 2017
5854e68
Merge pull request #5217 from AnalyticalGraphicsInc/3dtiles-inspector…
mramato Apr 19, 2017
5941ef8
Merge branch '3d-tiles' into no-tile-extension
lilleyse Apr 19, 2017
169760b
creating tile info stats section and updating labels
rahwang Apr 20, 2017
94de1f9
fix label clipping
rahwang Apr 20, 2017
5363042
adding per tile commands used counting
rahwang Apr 20, 2017
7d18df7
Adding debug wrapping and fixing indentation
glee2244 Apr 20, 2017
3c28604
cleanup tweaks
rahwang Apr 20, 2017
6aaff1b
Expire temp
lilleyse Apr 21, 2017
e6c594b
Remove links
lilleyse Apr 23, 2017
2044390
Initializing variables for normal shading
glee2244 Apr 24, 2017
5fb5f91
Keep expired content while new content loads
lilleyse Apr 24, 2017
66a149a
Fixing spacing
glee2244 Apr 24, 2017
ae9745c
Added support for multiple expressions with passing tests
Jane-Of-Art Apr 24, 2017
1b681c3
Fixed comment to show that keys are case sensitive
Jane-Of-Art Apr 24, 2017
647fdfc
Removed console.log
Jane-Of-Art Apr 24, 2017
c1a11d0
removed change that's no longer necessary
Jane-Of-Art Apr 24, 2017
63b899d
Handle expiring subtrees
lilleyse Apr 24, 2017
fc2f4d4
Merge branch 'master' into 3d-tiles
lilleyse Apr 24, 2017
f9409dd
Merge branch 'master' into 3d-tiles
lilleyse Apr 25, 2017
d53e065
initial work to load base sse first
austinEng Apr 26, 2017
a247ea7
adding tests
rahwang Apr 26, 2017
38dc3e3
Removing normalShading - doesn't belong in vector styling support
glee2244 Apr 26, 2017
18e641b
Clean up model matrix code
lilleyse Apr 26, 2017
4e35015
Merge branch 'master' into 3d-tiles
bagnell Apr 26, 2017
9f8d13a
Merge pull request #5206 from AnalyticalGraphicsInc/no-tile-extension
pjcozzi Apr 26, 2017
53da697
refactor traversal
austinEng Apr 26, 2017
70be1d0
Add memory usage based heurisitic for unloading tiles
shehzan10 Apr 26, 2017
5ea22af
Add tests for Cesium3DTileset.maximumMemoryUsage
shehzan10 Apr 26, 2017
a46ca4c
Added tests + styling fix
lilleyse Apr 26, 2017
502f00f
update 3d tiles inspector
Apr 27, 2017
8a8a4f0
Merge pull request #5244 from AnalyticalGraphicsInc/3dtilesinspectorc…
mramato Apr 27, 2017
ecb1d70
skip after base traversal completed
austinEng Apr 27, 2017
19e4179
moving debug label drawing from tilset to view model
rahwang Apr 27, 2017
66f5f99
Merge branch 'master' into 3d-tiles
Apr 27, 2017
4d640ae
set base error to max error when skip LODs is disabled; add flags to …
austinEng Apr 27, 2017
f627ddd
removing the original debug labels
rahwang Apr 27, 2017
815628c
remove double visits
austinEng Apr 27, 2017
c714501
fix selection for additive refinement
austinEng Apr 27, 2017
d67edf9
Revert "moving debug label drawing from tilset to view model"
rahwang Apr 27, 2017
8492203
Revert "removing the original debug labels"
rahwang Apr 27, 2017
1af8c5a
merge 3d-tiles into per-tile-stats
rahwang Apr 27, 2017
ca38f1a
fix jshint
rahwang Apr 27, 2017
dfb938b
Cleanup
lilleyse Apr 27, 2017
4c45604
Merge pull request #5250 from AnalyticalGraphicsInc/random-fixes
bagnell Apr 27, 2017
6c6562d
Merge pull request #5040 from glee2244/3d-tiles
lilleyse Apr 28, 2017
8db6e92
Code cleanup for memory usage
shehzan10 Apr 28, 2017
8e80e98
Removed extraneous tests for tileset.maximumMemoryUsage
shehzan10 Apr 28, 2017
fe7d607
Add totalMemoryUsage prototype getter to Cesium3DTileset
shehzan10 Apr 28, 2017
85ff19c
bugfixes and update tests
austinEng Apr 28, 2017
134288f
cleanup
rahwang Apr 28, 2017
991d054
Clean up tileset.totalMemoryUsage -> tileset.totalMemoryUsageInBytes
shehzan10 Apr 28, 2017
4719841
adding feature count to debug labels
rahwang Apr 28, 2017
eedd70f
cleanup
austinEng Apr 28, 2017
5f901dd
tweak
rahwang Apr 28, 2017
9238239
adding tile to tilefeature and pickId objects
rahwang Apr 27, 2017
6b61a4a
Merge remote-tracking branch 'agi/3d-tiles' into improved-tile-loading
austinEng Apr 28, 2017
4d976f9
unused flags
austinEng Apr 28, 2017
a9786fb
update sort for load
austinEng Apr 28, 2017
effbe7b
cleanup
rahwang Apr 28, 2017
8b0e599
switching memory usage stats to mb
rahwang Apr 28, 2017
d6a1463
Fix test
lilleyse May 1, 2017
b5dbf14
Merge branch 'master' into 3d-tiles
lilleyse May 1, 2017
b3f8aed
switching to pickObject
rahwang May 1, 2017
9bf5138
clean up edits
rahwang May 1, 2017
1fd847e
Resolve data uris the moment they are schedules.
mramato May 2, 2017
911a404
Fix GoogleEarthEnterprise with RequestScheduler
lilleyse May 2, 2017
b50e1a8
Merge branch '3d-tiles' into request-scheduler-data-uri
lilleyse May 2, 2017
43075de
Merge pull request #5268 from AnalyticalGraphicsInc/request-scheduler…
lilleyse May 2, 2017
0e6b512
updates; wait for nearest descendents to load before refining for bas…
austinEng May 2, 2017
67964c0
add children union culling optimization
austinEng May 2, 2017
58ce52a
consolidate debug flags
rahwang May 2, 2017
3429968
hide point or triangle count when 0
rahwang May 2, 2017
2b858d6
bugfixes
austinEng May 2, 2017
ec24907
edits and tests for tile picking
rahwang May 2, 2017
50ec7c8
fix root of tileset of tilesets
austinEng May 3, 2017
bed4f78
tweak
rahwang May 3, 2017
5942696
edits
rahwang May 3, 2017
fca40cb
Merge pull request #5188 from rahwang/per-tile-stats
lilleyse May 3, 2017
3a3c466
Merge pull request #5253 from rahwang/picking-without-batch-tables
lilleyse May 3, 2017
5da91d6
Add doc for calculation of total memory usage for 3d tileset
shehzan10 May 3, 2017
586d02f
Revert "Removed extraneous tests for tileset.maximumMemoryUsage"
shehzan10 May 3, 2017
3839d99
Remove Cesium3DTileset.maximumNumberOfLoadedTiles (superceded by maxi…
shehzan10 May 3, 2017
1170c92
test fixes and avoid adding twice to _desiredTiles
austinEng May 4, 2017
f6853ab
Merge remote-tracking branch 'agi/3d-tiles' into improved-tile-loading
austinEng May 4, 2017
82570f1
do not put translucent commands in CESIUM_3D_TILE render pass
austinEng May 4, 2017
1326d5b
use ManagedArray for temporary BFS front
austinEng May 4, 2017
80806ea
optimizations
austinEng May 4, 2017
37e4690
Merge pull request #5245 from shehzan10/unload-memory
lilleyse May 5, 2017
538ab35
backface commands for all tiles, not just unresolved tiles. fixes bug…
austinEng May 5, 2017
3bd95ab
updates
austinEng May 5, 2017
b653d6c
Merge remote-tracking branch 'agi/3d-tiles' into improved-tile-loading
austinEng May 5, 2017
85fd29c
Merge pull request #5254 from austinEng/improved-tile-loading
lilleyse May 8, 2017
11bede6
Merge branch '3d-tiles' into 3d-tiles-expire
lilleyse May 8, 2017
b5c719d
Fix tests
lilleyse May 8, 2017
544d87c
Merge branch 'master' into 3d-tiles
lilleyse May 8, 2017
f2aec96
cleaning up some names
rahwang May 9, 2017
1fa8a56
Make debugColorizeTiles work when featuresLength is 0 and clean tests
lilleyse May 9, 2017
de8dd2e
Fix for unloaded tiles that become reloaded
lilleyse May 9, 2017
153188c
tweak
rahwang May 9, 2017
834bee9
Merge branch 'master' into 3d-tiles
lilleyse May 9, 2017
60ff618
Clean up 3d tiles derived commands
lilleyse May 9, 2017
f6070f1
Made Cesium3DTilesetStatistics its own class
lilleyse May 8, 2017
802a93a
Merge pull request #5296 from AnalyticalGraphicsInc/debug-colorize-ti…
pjcozzi May 10, 2017
68e2aa5
Merge pull request #4136 from AnalyticalGraphicsInc/3d-tiles-expire
pjcozzi May 10, 2017
7bc9616
Format memory string better
lilleyse May 10, 2017
5fecd1b
Fix tests
lilleyse May 10, 2017
dce35ad
Merge branch '3d-tiles' into 3d-tiles-statistics
lilleyse May 10, 2017
b692edf
Reorganization based on review
lilleyse May 10, 2017
7579d83
Merge branch '3d-tiles' into command-cleanup
lilleyse May 10, 2017
29829b4
Small fixes
lilleyse May 10, 2017
89cf34c
Merge pull request #5299 from AnalyticalGraphicsInc/3d-tiles-statistics
pjcozzi May 10, 2017
f3deab8
Update LICENSE.md
pjcozzi May 10, 2017
c4e6591
Tweak LICENSE.md
pjcozzi May 10, 2017
d4a9f70
Merge pull request #5298 from AnalyticalGraphicsInc/command-cleanup
pjcozzi May 10, 2017
4bdc295
removing unused pickObject property, making tile feature content read…
rahwang May 10, 2017
6296b47
removing batchTable from TileFeature
rahwang May 10, 2017
f74cf2c
Clean 3D Tiles sandcastle
lilleyse May 10, 2017
b910218
Merge pull request #5305 from rahwang/cleanup-tile-picking
lilleyse May 11, 2017
b6eb300
Merge branch '3d-tiles' into rename-debug-labels
rahwang May 11, 2017
19af191
Fix inspector styling issue
lilleyse May 11, 2017
1640350
Clean Batch Table Hierarchy sandcastle
lilleyse May 11, 2017
d0eaf37
Temp
lilleyse May 11, 2017
12fe02a
Cleanup
lilleyse May 12, 2017
a1037c6
Merge branch '3d-tiles' into 3d-tiles-cleaning
lilleyse May 12, 2017
40158b3
Cleanup
lilleyse May 12, 2017
67cc4c6
Draft of support for vectors in binary expressions
Jane-Of-Art Feb 27, 2017
a960877
Fixed type mismatch in specs and cartesian3 bug in function
Jane-Of-Art Feb 27, 2017
e8ad61a
Fixed developer error tests; added vector support for ternary functions
Jane-Of-Art Mar 20, 2017
7af5769
Fixed minor styling issues I noticed
Jane-Of-Art Mar 20, 2017
1b4dafc
Bug Fix ternary
Jane-Of-Art Mar 20, 2017
3490b93
Changed Developer Error Message
Jane-Of-Art Mar 20, 2017
b009b1f
Resolved merge conflicts, keeping my implementation of length
Jane-Of-Art Apr 24, 2017
04ea999
changed implementation of normalize to ue default cartesian functions…
Jane-Of-Art Apr 3, 2017
a5c70e7
Merge branch '3d-tiles' into binary-temp
lilleyse May 12, 2017
abf3864
Merge pull request #5044 from Jane-Of-Art/binary
lilleyse May 12, 2017
598f1c7
Merge branch '3d-tiles' into 3d-tiles-cleaning
lilleyse May 12, 2017
73090fd
Cleanup
lilleyse May 12, 2017
e2d850d
Fix include problem
lilleyse May 15, 2017
475be55
Fix test
lilleyse May 15, 2017
2d02ddd
Fix tile process
lilleyse May 15, 2017
8420b18
Merge branch 'master' into 3d-tiles
lilleyse May 15, 2017
742d430
tweak
rahwang May 15, 2017
87545a1
Merge pull request #5292 from rahwang/rename-debug-labels
lilleyse May 15, 2017
df74189
Merge branch '3d-tiles' into 3d-tiles-cleaning
lilleyse May 15, 2017
7457f0a
debug label only for picked tile
rahwang May 11, 2017
ce5f788
Merge branch 'master' into 3d-tiles
May 17, 2017
d81d2b6
Merge pull request #5321 from AnalyticalGraphicsInc/3d-tiles-cleaning
lilleyse May 17, 2017
64a4c6f
labels follow cursor, fix for no batch table
rahwang May 17, 2017
05193ca
Merge branch '3d-tiles' into pick-tile-debug-label
rahwang May 17, 2017
131da42
Merge branch 'master' into 3d-tiles
May 17, 2017
12cd792
Fix issue related to depth only pass with clear commands
lilleyse May 17, 2017
59cb5f3
Merge remote-tracking branch 'origin/master' into 3d-tiles
mramato May 19, 2017
836004b
Expose getStats function
May 22, 2017
18e41ba
Update doc
May 22, 2017
a49f63c
Merge pull request #5347 from AnalyticalGraphicsInc/3dtiles-inspector
lilleyse May 22, 2017
ab2efcb
adding pixelOffset
rahwang May 22, 2017
3b66400
Tweak CHANGES.md
pjcozzi May 22, 2017
2be73f6
PR updates
lilleyse May 22, 2017
184a151
Add 1.35 to CHANGES.md
pjcozzi May 22, 2017
70826de
Formatting
pjcozzi May 23, 2017
995929a
Move expressions to a different area
lilleyse May 22, 2017
b18a351
Merge branch '3d-tiles' into multiExpressions
lilleyse May 23, 2017
b08c03c
Add example to Point Cloud sandcastle
lilleyse May 23, 2017
1a04748
cleanup view model feature picking logic
rahwang May 23, 2017
8930949
Fix infinite loop where an expression references a property of the sa…
lilleyse May 23, 2017
be3933e
Small fixes
lilleyse May 23, 2017
7f3a979
Merge branch 'master' into 3d-tiles
lilleyse May 23, 2017
04d1c4e
cleanup picking behavior
rahwang May 23, 2017
6761474
Merge pull request #5232 from Jane-Of-Art/multiExpressions
pjcozzi May 23, 2017
dc11b5b
Merge remote-tracking branch 'origin/master' into 3d-tiles
mramato May 24, 2017
4a34664
Fix string->number in inspector
lilleyse May 24, 2017
7578997
Doc fixes
lilleyse May 23, 2017
25032d9
Merge branch '3d-tiles' into doc-fixes
lilleyse May 24, 2017
5489bcb
Merge pull request #5325 from rahwang/pick-tile-debug-label
lilleyse May 24, 2017
36276e8
Check for NaN
lilleyse May 24, 2017
d92ce77
Tile coloring
lilleyse May 24, 2017
521ff12
Updates
lilleyse May 24, 2017
b941321
Merge branch '3d-tiles' into doc-fixes
lilleyse May 24, 2017
fd12996
Spec fix
lilleyse May 24, 2017
557c157
Merge pull request #5355 from AnalyticalGraphicsInc/number-fix
mramato May 24, 2017
4e62c63
Fix opaque/transluent fix tilesets
lilleyse May 24, 2017
6799b8f
Merge pull request #5356 from AnalyticalGraphicsInc/doc-fixes
pjcozzi May 24, 2017
30e9b6e
Merge pull request #5360 from AnalyticalGraphicsInc/fix-samples
pjcozzi May 24, 2017
8b046bc
Upgraded jsep to 0.3.1
lilleyse May 24, 2017
5b7dec6
Sandcastle updates
lilleyse May 24, 2017
afe347a
Merge pull request #5361 from AnalyticalGraphicsInc/jsep-upgrade
pjcozzi May 24, 2017
2b8f959
Fix for composite tiles
lilleyse May 24, 2017
e95d0bc
Merge branch '3d-tiles' into tile-coloring
lilleyse May 24, 2017
1abea37
Merge pull request #5362 from AnalyticalGraphicsInc/sandcastle-updates
pjcozzi May 24, 2017
a34bbb6
Remove uneeded section
lilleyse May 25, 2017
224adad
Fix
lilleyse May 24, 2017
8f56969
Handle composite of composite
lilleyse May 24, 2017
b1d2568
Merge pull request #5358 from AnalyticalGraphicsInc/tile-coloring
May 25, 2017
b6d0e63
Fix jsep.js
mramato May 25, 2017
3dafb4f
Merge pull request #5365 from AnalyticalGraphicsInc/jsep-again
lilleyse May 25, 2017
5bdb797
Merge branch 'master' into 3d-tiles
May 25, 2017
788219a
Fix Cesium3DTilesInspector crash when no tileset is selected
May 25, 2017
3a5d269
Merge pull request #5366 from AnalyticalGraphicsInc/fix-3dtiles-inspe…
lilleyse May 25, 2017
afbb41c
Merge branch 'master' into 3d-tiles
May 26, 2017
872c837
Fix eslint
May 26, 2017
e0599a2
Merge pull request #5372 from AnalyticalGraphicsInc/fix-eslint
mramato May 26, 2017
39e749e
Merge branch 'master' into 3d-tiles
lilleyse May 30, 2017
2cdffc8
Add `Optimization` pane to easily change debug variables
ottaviohartman May 31, 2017
86759b3
Merge remote-tracking branch 'origin/master' into 3d-tiles
mramato Jun 1, 2017
2718b58
Remove a slew of unused module imports.
mramato Jun 2, 2017
0fef407
Fix tile continually expiring when expire.date is set
lilleyse Jun 6, 2017
7db40c9
Write test
lilleyse Jun 6, 2017
835cfd9
Make var names clearer, fix knockout bug
ottaviohartman Jun 5, 2017
2276b54
Merge pull request #5405 from omh1280/optimization_pane
lilleyse Jun 6, 2017
b76652b
Fix for cache
lilleyse Jun 7, 2017
ac67bd5
Make expireDuration and expireDate not readonly
lilleyse Jun 7, 2017
60d426e
Merge pull request #5428 from AnalyticalGraphicsInc/expire-date-fix
pjcozzi Jun 7, 2017
7b21aa7
Now passes the tileset shadows property to PointCloud3DTileContent
AnimatedRNG Jun 7, 2017
e0d8f2a
Merge remote-tracking branch 'origin/master' into 3d-tiles
mramato Jun 7, 2017
baa1e97
Fix bad merge.
mramato Jun 7, 2017
0a4d4d5
Merge pull request #5438 from AnimatedRNG/3d-tiles-point-cloud-shadows
lilleyse Jun 8, 2017
de6ba12
Cleanup
lilleyse Jun 9, 2017
a011d36
More cleanup
lilleyse Jun 12, 2017
374c5e0
Improve test coverage in some files
lilleyse Jun 7, 2017
4ef7868
Cleanup
lilleyse Jun 13, 2017
76660c3
Remove request scheduler from non 3D Tiles files
lilleyse Jun 13, 2017
01bcc7d
Merge branch 'master' into request-scheduler-again
lilleyse Jun 13, 2017
3855a2c
Small fix
lilleyse Jun 13, 2017
d4b0afb
Small fix
lilleyse Jun 13, 2017
ba612d5
Remove empty test
lilleyse Jun 13, 2017
b45579b
Fix promise usage.
mramato Jun 13, 2017
02ba0eb
Reintegrate request scheduler
lilleyse Jun 13, 2017
4c5f488
Merge branch '3d-tiles-cleanup' into request-scheduler-again
lilleyse Jun 13, 2017
7df1e30
Fix tests and other cases for request scheduler
lilleyse Jun 13, 2017
bf1c78f
Merge branch 'master' into request-scheduler-again
lilleyse Jun 13, 2017
3a867b1
Removed stray console.log
lilleyse Jun 13, 2017
ab7d03c
Reorder logic for tile expires test
lilleyse Jun 13, 2017
e1f08b3
Merge branch 'master' into 3d-tiles
lilleyse Jun 19, 2017
d20755c
Merge remote-tracking branch 'origin/master' into 3d-tiles
mramato Jun 19, 2017
ee82374
Fix eslint errors.
mramato Jun 19, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
227 changes: 227 additions & 0 deletions Apps/Sandcastle/gallery/3D Tiles Batch Table Hierarchy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
<!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.

Depending on what time you run all the 3D Tiles Sandcastle examples, the shading might not be great:

image

Should the examples explicitly set a reasonable time?

<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="Demonstrates use cases for a batch table hierarchy.">
<meta name="cesium-sandcastle-labels" content="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);
#toolbar button { display: block; }
</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

// In this demo doorknobs, doors, roofs, and walls are styled via the batch table hierarchy.
// Since buildings and zones are not backed by geometry they are not styled directly. However
// styles may be written that take building and zone properties into account.
//
// Hierarchy layout (doorknobs are children of doors):
//
// zone0
// building0
// roof0
// wall0
// door0 - doorknob0
// door1 - doorknob1
// door2 - doorknob2
// door3 - doorknob3
// building1
// roof1
// wall1
// door4 - doorknob4
// door5 - doorknob5
// door6 - doorknob6
// door7 - doorknob7
// building2
// roof2
// wall2
// door8 - doorknob8
// door9 - doorknob9
// door10 - doorknob10
// door11 - doorknob11
//
// Class properties:
//
// zone:
// * zone_building
// * zone_name
// building:
// * building_area
// * building_name
// wall:
// * wall_paint
// * wall_windows
// * wall_name
// roof:
// * roof_paint
// * roof_name
// door:
// * door_mass
// * door_width
// * door_name
// doorknob:
// * doorknob_size
// * doorknob_name

var viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerCesium3DTilesInspectorMixin);
var inspectorViewModel = viewer.cesium3DTilesInspector.viewModel;

viewer.clock.currentTime = new Cesium.JulianDate(2457522.154792);

var scene = viewer.scene;
var url = '../../../Specs/Data/Cesium3DTiles/Hierarchy/BatchTableHierarchy';
var tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
url : url
}));
inspectorViewModel.tileset = tileset;

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

var styles = [];
function addStyle(name, style) {
styles.push({
name : name,
style : style
});
}

addStyle('No style', {});

addStyle('Color by building', {
"color" : {
"conditions" : [
["${building_name} === 'building0'", "color('purple')"],
["${building_name} === 'building1'", "color('red')"],
["${building_name} === 'building2'", "color('orange')"],
["true", "color('blue')"]
]
}
});

addStyle('Color all doors', {
"color" : {
"conditions" : [
["isExactClass('door')", "color('orange')"],
["true", "color('white')"]
]
}
});

addStyle('Color all features derived from door', {
"color" : {
"conditions" : [
["isClass('door')", "color('orange')"],
["true", "color('white')"]
]
}
});

addStyle('Color features by class name', {
"expressions" : {
"suffix" : "regExp('door(.*)').exec(getExactClassName())"
},
"color" : {
"conditions" : [
["${suffix} === 'knob'", "color('yellow')"],
["${suffix} === ''", "color('lime')"],
["${suffix} === null", "color('gray')"],
["true", "color('blue'"]
]
}
});

addStyle('Style by height', {
"color" : {
"conditions" : [
["${height} >= 10", "color('purple')"],
["${height} >= 6", "color('red')"],
["${height} >= 5", "color('orange')"],
["true", "color('blue')"]
]
}
});

function setStyle(style) {
return function() {
tileset.style = new Cesium.Cesium3DTileStyle(style);
};
}

var styleOptions = [];
for (var i = 0; i < styles.length; ++i) {
var style = styles[i];
styleOptions.push({
text : style.name,
onselect : setStyle(style.style)
});
}

Sandcastle.addToolbarMenu(styleOptions);

var handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);

// When a feature is left clicked, print its class name and properties
handler.setInputAction(function(movement) {
if (!inspectorViewModel.picking) {
return;
}

var feature = inspectorViewModel.feature;
if (Cesium.defined(feature)) {
console.log('Class: ' + feature.getExactClassName());
console.log('Properties:');
var propertyNames = feature.getPropertyNames();
var length = propertyNames.length;
for (var i = 0; i < length; ++i) {
var name = propertyNames[i];
var value = feature.getProperty(name);
console.log(' ' + name + ': ' + value);
}
}
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);

// When a feature is middle clicked, hide it
handler.setInputAction(function(movement) {
if (!inspectorViewModel.picking) {
return;
}

if (Cesium.defined(inspectorViewModel.feature)) {
inspectorViewModel.feature.show = false;
}
}, Cesium.ScreenSpaceEventType.MIDDLE_CLICK);

//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.
Loading