Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
0455a13
Extent setters in Cesium3DTileStyle
Jun 2, 2017
8a5dba1
Merge remote-tracking branch 'remotes/cesium/3d-tiles' into Extent_Ce…
Jun 12, 2017
8b551d2
Adjusted documentation
Jun 12, 2017
b371c27
Initial classification primitive work.
bagnell Jul 6, 2017
9652e9d
Fix wrong model matrix.
bagnell Jul 6, 2017
337b334
Clean up classification primitive, fix rendering artifact and update …
bagnell Jul 6, 2017
2cfa4a5
Fix picking classification primitives and update Sandcastle example.
bagnell Jul 6, 2017
486f9f6
Merge branch 'master' into Extent_Cesium3DTileStyle_setters
lilleyse Jul 7, 2017
292123c
Merge remote-tracking branch 'remotes/cesium/master' into Extent_Cesi…
Jul 11, 2017
4d54231
Adjust documentation
Jul 11, 2017
7d14b87
Merge remote-tracking branch 'remotes/origin/Extent_Cesium3DTileStyle…
Jul 11, 2017
7e6edb0
make entity model matrix computation public
rahwang Jul 5, 2017
a05c5dc
updating CHANGES
rahwang Jul 11, 2017
1974019
Fix label clamped position
Jul 11, 2017
e2ee679
Fixed issue where a composite tile containing and instanced tile that…
Jul 11, 2017
65840a4
Added test.
Jul 11, 2017
f0b9813
Tweaks.
Jul 11, 2017
a6d88b3
Fix for reading mip level 0 of DXT
lilleyse Jul 12, 2017
7eeee82
Merge branch 'master' into fix-label-clamp-position
Jul 12, 2017
f694d1c
Merge remote-tracking branch 'origin/master' into instanced-tile-padding
Jul 12, 2017
15177bc
Updated CHANGES
Jul 12, 2017
d109a22
Initial commit of GLSLModernizer and other WebGL2 changes
AnimatedRNG Jul 12, 2017
9f5361d
Extension/capability flags style fix
AnimatedRNG Jul 12, 2017
a67ee53
Formatting changes for defines
AnimatedRNG Jul 12, 2017
3107766
Replaces exampleVariable++ with ++exampleVariable in for loops
AnimatedRNG Jul 12, 2017
15433f3
No more "x characters per line" rule
AnimatedRNG Jul 12, 2017
ab57d69
Removes the MODERNIZED flag
AnimatedRNG Jul 12, 2017
cf3aaec
Removes unnecessary console.log
AnimatedRNG Jul 12, 2017
3932bf3
Replaces search() with test()
AnimatedRNG Jul 12, 2017
2f45796
Refactor duplicate code from ClassificationPrimitive and GroundPrimit…
bagnell Jul 12, 2017
0ee8201
Merge branch 'master' into classification-primitive
bagnell Jul 12, 2017
7a844e1
Now passing context into ShaderSource instead of context.webgl2
AnimatedRNG Jul 12, 2017
a16652f
Fixes comment
AnimatedRNG Jul 12, 2017
9b076e7
Slightly more concise regex
AnimatedRNG Jul 12, 2017
0901e1d
Fixes length check
AnimatedRNG Jul 12, 2017
97db097
Formatting fixes
AnimatedRNG Jul 12, 2017
78fa9bb
Fixes switch statement case indentation
AnimatedRNG Jul 12, 2017
bf07d1c
Changes the last few == operators to === operators
AnimatedRNG Jul 12, 2017
3d1ddc0
Clean up requires and variable renames.
bagnell Jul 12, 2017
5ddf222
Comment and CHANGES.md
lilleyse Jul 12, 2017
5ad9b82
Adds support for PixelFormat.RGB textures
AnimatedRNG Jul 12, 2017
0d2e580
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG Jul 12, 2017
0ef2939
Creates mockContext variable
AnimatedRNG Jul 13, 2017
da57701
Now passing in context rather than context.webgl2 for test in ShaderP…
AnimatedRNG Jul 13, 2017
fe78535
Fixes equality operator
AnimatedRNG Jul 13, 2017
2ddc442
Adds explanatory comment for OUTPUT_DECLARATION
AnimatedRNG Jul 13, 2017
f76f199
Removes unnecessary functions in GLSLModernizer
AnimatedRNG Jul 13, 2017
ffc0109
Fixes some documenation for ShaderSource
AnimatedRNG Jul 13, 2017
f54c550
Fixes typo in documentation
AnimatedRNG Jul 13, 2017
f0c20d8
Removes check for main()
AnimatedRNG Jul 13, 2017
4679559
Trying to remove all the safeName*
AnimatedRNG Jul 13, 2017
974218c
Fix bounding volumes and add tests.
bagnell Jul 13, 2017
217acfe
Now using a more comprehensive regex rather than the old recursive so…
AnimatedRNG Jul 13, 2017
21a5fc9
Update Sandcastle example.
bagnell Jul 13, 2017
bb54839
Update CHANGES.md.
bagnell Jul 13, 2017
1037778
Merge branch 'master' into classification-primitive
bagnell Jul 13, 2017
39c2c2a
Bugfix in replaceInSource
AnimatedRNG Jul 13, 2017
405951d
Fixes floatingPointTexture flag false positive in WebGL 2
AnimatedRNG Jul 13, 2017
9f4f84c
Adds first test for GLSLModernizer
AnimatedRNG Jul 13, 2017
4745e84
Adds a few more tests, mostly for layout qualifiers
AnimatedRNG Jul 13, 2017
7c58a65
Adds a few more tests
AnimatedRNG Jul 13, 2017
a1d26cb
Adds even more tests
AnimatedRNG Jul 13, 2017
ea6c031
Adds test for poorly named variables
AnimatedRNG Jul 13, 2017
15f1cbc
Added support of interpreting existing defines in Cesium3DTileStyle s…
Jul 14, 2017
201fb99
Fixes typo
AnimatedRNG Jul 14, 2017
b8a5025
Fix tests
Jul 14, 2017
8d57348
Changed behavior: Cesium3DTileStyle does not set default values anymore
Jul 14, 2017
c2eea43
Fix whitespaces
Jul 14, 2017
9bc3764
Fix syntax error
Jul 15, 2017
a40077c
Fix remaining Cesium3DTileStyleSpec tests
Jul 17, 2017
c150bbf
Fix eslint errors
lilleyse Jul 17, 2017
585cb0f
Remove obsolete code
Jul 17, 2017
bfb7c51
Fix after last commit
Jul 17, 2017
e47c0c6
Fix syntax mistaken
Jul 17, 2017
3cdf90c
Replace tab by whitespaces
Jul 17, 2017
c05ea96
Merge branch 'master' of https://github.com/AnalyticalGraphicsInc/ces…
AnimatedRNG Jul 17, 2017
0c6ac5b
No longer appending the output declaration define if the context is W…
AnimatedRNG Jul 17, 2017
10d5c7a
Fix Cesium3DTilesInspector
Jul 17, 2017
45a8f99
Fixes eslint issues
AnimatedRNG Jul 17, 2017
020bba7
Fixes problem where we were passing context.webgl2 instead of context…
AnimatedRNG Jul 17, 2017
fd633e9
Renames GLSLModernizer to ModernizeShader
AnimatedRNG Jul 17, 2017
1686573
Now using .test() instead of .search and fixes a typo
AnimatedRNG Jul 17, 2017
d9167a2
Splits replace into two different functions
AnimatedRNG Jul 17, 2017
9403d8f
All the functions are now external
AnimatedRNG Jul 17, 2017
a37d25f
Renames length variable
AnimatedRNG Jul 17, 2017
361691e
Removes negativeMap
AnimatedRNG Jul 17, 2017
3c80a13
Renames variableSet to outputVariables
AnimatedRNG Jul 17, 2017
59b1402
Replaces RegExp.exec with RegExp.test
AnimatedRNG Jul 17, 2017
0addb52
Replaces all the "it (" with "it("
AnimatedRNG Jul 17, 2017
0b210d6
Changes toThrow to toThrowDeveloperError
AnimatedRNG Jul 17, 2017
f0750fe
Renames "ModernizeShader" to "modernizeShader"
AnimatedRNG Jul 17, 2017
b82a087
Renames "variablesThatWeCareAbout" to "layoutVariables"
AnimatedRNG Jul 17, 2017
f02e18e
Add FrustumGeometry.
bagnell Jul 17, 2017
d71aeb5
Merge remote-tracking branch 'remotes/cesium/master' into Extent_Cesi…
Jul 17, 2017
7a44bfb
Update CHANGES.md
Jul 17, 2017
2cdcfbf
Merge branch 'move-files' into frustum-geometry
bagnell Jul 17, 2017
100ade6
Add frustum outline geometry.
bagnell Jul 17, 2017
987ab4e
fix docs
rahwang Jul 18, 2017
4735c4d
Merge branch 'master' into entity-model-matrix
rahwang Jul 18, 2017
6c45625
Merge remote-tracking branch 'remotes/cesium/master' into Extent_Cesi…
Jul 18, 2017
70dfbdb
Fix typo on polygon demo
Jul 18, 2017
f0a02f6
Merge branch 'master' into fix-label-clamp-position
Jul 18, 2017
e35d6ca
CHANGES.md
Jul 18, 2017
106285e
Merge pull request #5611 from AnalyticalGraphicsInc/fix-label-clamp-p…
pjcozzi Jul 18, 2017
00d8eab
Renames variable "number" and also saves splitSource.length
AnimatedRNG Jul 18, 2017
50728e3
Merge pull request #5643 from AnalyticalGraphicsInc/polygon-typo
pjcozzi Jul 18, 2017
c0957a9
Renames set1 to set
AnimatedRNG Jul 18, 2017
6b34b07
Moves modernizeShader to the top of the file
AnimatedRNG Jul 18, 2017
7251f2a
All the counters in modernizeShader now use "i"
AnimatedRNG Jul 18, 2017
968a28d
Renames "l" to "line"
AnimatedRNG Jul 18, 2017
ff24d72
Renames "care"
AnimatedRNG Jul 18, 2017
7a7da05
Cleanup of unused variables
lilleyse Jul 18, 2017
a05a976
Adds support for the EXT_blend_minmax extension
AnimatedRNG Jul 18, 2017
72da8ca
clear clamp to ground callback
Jul 18, 2017
8fb7df9
specs, CHANGES.md
Jul 18, 2017
1697921
Update DebugCameraPrimitive, add Sandcastle example, fix broken tests.
bagnell Jul 18, 2017
daa9d33
Merge branch 'master' into frustum-geometry
bagnell Jul 18, 2017
226d4e2
Update doc and add tests.
bagnell Jul 18, 2017
c6d302f
Merge pull request #5623 from AnimatedRNG/webgl2-upgrade
lilleyse Jul 19, 2017
cf0423a
Clone values in constructors
Jul 19, 2017
b9d7b45
Add setter for GeoJsonDataSource.name
Jul 19, 2017
b146e77
doc
Jul 19, 2017
3cbf6c1
Remove model height callback on destroy
Jul 19, 2017
bc3abf4
Merge pull request #5648 from AnalyticalGraphicsInc/label-height-refe…
bagnell Jul 19, 2017
5a95263
Merge pull request #5654 from AnalyticalGraphicsInc/clone-near-far-sc…
bagnell Jul 19, 2017
00116ce
Merged in master.
Jul 19, 2017
d6d0849
Add options parameter to constructors for *Frustum classes.
bagnell Jul 19, 2017
fbb2efe
Rename frustum position to orientation.
bagnell Jul 19, 2017
b82dd80
Refactor duplicate code.
bagnell Jul 19, 2017
3d1d030
Update tests after rename.
bagnell Jul 19, 2017
15ada75
Merge branch 'master' into frustum-geometry
bagnell Jul 19, 2017
855681a
Update CHANGES.md.
bagnell Jul 19, 2017
79ee716
Merge pull request #5649 from AnalyticalGraphicsInc/frustum-geometry
pjcozzi Jul 19, 2017
eebf7e5
Fixed tests to use samples-generator.
Jul 19, 2017
21238c2
Merge branch 'master' into classification-primitive
bagnell Jul 19, 2017
dcf6ffe
Fix sporadic build/test failures.
mramato Jul 19, 2017
ef09e3e
Minor updates and file moves.
bagnell Jul 19, 2017
ceb0241
Merge pull request #5658 from AnalyticalGraphicsInc/amd-timeout
bagnell Jul 19, 2017
63eb4cc
Merge branch 'master' into classification-primitive
bagnell Jul 19, 2017
5dc208b
Merge pull request #5657 from AnalyticalGraphicsInc/model-callback
pjcozzi Jul 19, 2017
74184d8
Add ability to set name of KML data source
cguldner Jul 20, 2017
a97f4cd
Fix test errors; update CHANGES.md
cguldner Jul 20, 2017
c14aea7
Fix travis builds
mramato Jul 20, 2017
8bc1760
Update CHANGES.md
Jul 20, 2017
2760875
Update CHANGES.md
Jul 20, 2017
eb81163
Fix typos
cguldner Jul 20, 2017
d0d4403
Merge pull request #5661 from AnalyticalGraphicsInc/debug-travis
Jul 20, 2017
96ab483
Merge pull request #5656 from AnalyticalGraphicsInc/geojson-name-setter
mramato Jul 20, 2017
e7adca9
Merge branch 'master' into kmlname-setter
cguldner Jul 20, 2017
9db6191
Updated files
lilleyse Jul 20, 2017
796b114
Merge pull request #5612 from AnalyticalGraphicsInc/instanced-tile-pa…
lilleyse Jul 20, 2017
c01305a
Update Sandcastle example.
bagnell Jul 20, 2017
d3d1aaa
Update image.
bagnell Jul 20, 2017
1ccd15b
Merge branch 'master' into classification-primitive
bagnell Jul 20, 2017
69a7cc8
Merge pull request #5625 from AnalyticalGraphicsInc/classification-pr…
pjcozzi Jul 21, 2017
17d2593
tweak
rahwang Jul 21, 2017
f21a167
Use Check in InfoBox
cguldner Jul 23, 2017
6d88a37
Merge branch 'master' into Extent_Cesium3DTileStyle_setters
Jul 24, 2017
70f562f
Added deprecation note
Jul 24, 2017
e1a6e5e
Remove whitespace
Jul 24, 2017
a2c2486
Remove DeveloperError dependency
cguldner Jul 24, 2017
3a24271
Merge pull request #5660 from burn123/kmlname-setter
Jul 24, 2017
7f34605
Typo
lilleyse Jul 24, 2017
9f80e6c
Merge pull request #5672 from AnalyticalGraphicsInc/cmpt-test-fix
pjcozzi Jul 24, 2017
f036c5c
Updates to KTX and tests
lilleyse Jul 25, 2017
c8ee8ba
Merge branch 'master' into crn-fix
lilleyse Jul 25, 2017
fff7cdd
Tweak doc wording
lilleyse Jul 25, 2017
2f2ac1c
Merge branch 'master' into Extent_Cesium3DTileStyle_setters
lilleyse Jul 25, 2017
fbb1dd7
Merge pull request #5412 from SunBlack/Extent_Cesium3DTileStyle_setters
lilleyse Jul 25, 2017
136768b
Fix broken color tests
lilleyse Jul 25, 2017
664bb22
Merge pull request #5674 from AnalyticalGraphicsInc/test-failure-fix
Jul 25, 2017
76fa128
Fix CorridorGeometry crash with same positions at different heights
Jul 25, 2017
7a51761
Merge pull request #5618 from AnalyticalGraphicsInc/crn-fix
bagnell Jul 25, 2017
60e54fb
Merge pull request #5677 from AnalyticalGraphicsInc/fix-corridor
bagnell Jul 25, 2017
bd22854
Merge pull request #5670 from burn123/InfoBoxCheck
Jul 25, 2017
ff17bd6
Merge remote-tracking branch 'origin/master' into rahwang-entity-mode…
mramato Jul 26, 2017
3097115
Update CHANGES.md
mramato Jul 26, 2017
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ script:

- echo 'makeZipFile' && echo -en 'travis_fold:start:script.makeZipFile\\r'
- npm run clean
- npm run makeZipFile
- npm run makeZipFile -- --concurrency 2
- npm pack
- echo -en 'travis_fold:end:script.makeZipFile\\r'

Expand Down
232 changes: 232 additions & 0 deletions Apps/Sandcastle/gallery/Classification.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
<!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="Draw the intersection of a volume and a photgrammetry dataset.">
<meta name="cesium-sandcastle-labels" content="Tutorials, Showcases">
<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 scene = viewer.scene;
var camera = scene.camera;

scene.globe.depthTestAgainstTerrain = true;

var buildingHighlight;
var treeHighlight1;
var treeHighlight2;
var treeHighlight3;
var treeHighlight4;

function removePrimitives() {
if (Cesium.defined(buildingHighlight)) {
scene.primitives.remove(buildingHighlight);
}
if (Cesium.defined(treeHighlight1)) {
scene.primitives.remove(treeHighlight1);
scene.primitives.remove(treeHighlight2);
scene.primitives.remove(treeHighlight3);
scene.primitives.remove(treeHighlight4);
}
}

function highlightBuilding() {
Sandcastle.declare(highlightBuilding);

removePrimitives();

var center = new Cesium.Cartesian3(1216378.730451297, -4736275.917774027, 4081266.871000864);
var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
var hprRotation = Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(2.619728786416368, 0.0, 0.0));
var hpr = Cesium.Matrix4.fromRotationTranslation(hprRotation, new Cesium.Cartesian3(0.0, 0.0, -2.0));
Cesium.Matrix4.multiply(modelMatrix, hpr, modelMatrix);

buildingHighlight = scene.primitives.add(new Cesium.ClassificationPrimitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : Cesium.BoxGeometry.fromDimensions({
vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,
dimensions : new Cesium.Cartesian3(8.0, 5.0, 8.0)
}),
modelMatrix : modelMatrix,
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 0.0, 0.0, 0.5))
},
id : 'volume'
})
}));

camera.setView({
destination : new Cesium.Cartesian3(1216390.8470847877, -4736277.616363206, 4081242.6450737054),
orientation : {
heading : 5.761321440006161,
pitch : 0.2784799327743841
}
});
}

function highlightTrees() {
Sandcastle.declare(highlightTrees);

removePrimitives();

var center = new Cesium.Cartesian3(1216398.6054139996, -4736204.533089285, 4081338.6585485404);
var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
var hprRotation = Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(5.785339046755887, 0.0, 0.0));
var hpr = Cesium.Matrix4.fromRotationTranslation(hprRotation, new Cesium.Cartesian3(0.4, 0.0, -2.0));
Cesium.Matrix4.multiply(modelMatrix, hpr, modelMatrix);

treeHighlight1 = scene.primitives.add(new Cesium.ClassificationPrimitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : new Cesium.EllipsoidGeometry({
radii : new Cesium.Cartesian3(3.25, 5.0, 4.0)
}),
modelMatrix : modelMatrix,
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString('#F26419').withAlpha(0.5))
},
id : 'volume 1'
})
}));

center = new Cesium.Cartesian3(1216394.3346955755, -4736207.431365568, 4081336.7768881875);
modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
hprRotation = Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(5.785339046755887, 0.0, 0.0));
hpr = Cesium.Matrix4.fromRotationTranslation(hprRotation, new Cesium.Cartesian3(-0.25, 0.0, -2.0));
Cesium.Matrix4.multiply(modelMatrix, hpr, modelMatrix);

treeHighlight2 = scene.primitives.add(new Cesium.ClassificationPrimitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : new Cesium.EllipsoidGeometry({
radii : new Cesium.Cartesian3(3.25, 5.0, 4.0)
}),
modelMatrix : modelMatrix,
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString('#F03A47').withAlpha(0.5))
},
id : 'volume 2'
})
}));

center = new Cesium.Cartesian3(1216388.1664430483, -4736210.034324032, 4081332.9324705894);
modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
var translation = Cesium.Matrix4.fromTranslation(new Cesium.Cartesian3(0.0, 0.0, -2.0));
Cesium.Matrix4.multiply(modelMatrix, translation, modelMatrix);

treeHighlight3 = scene.primitives.add(new Cesium.ClassificationPrimitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : new Cesium.EllipsoidGeometry({
radii : new Cesium.Cartesian3(2.45, 2.45, 3.0)
}),
modelMatrix : modelMatrix,
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString('#004FFF').withAlpha(0.5))
},
id : 'volume 3'
})
}));

center = new Cesium.Cartesian3(1216383.1478702603, -4736211.716097012, 4081329.551077661);
modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
translation = Cesium.Matrix4.fromTranslation(new Cesium.Cartesian3(0.0, 0.0, -1.0));
Cesium.Matrix4.multiply(modelMatrix, translation, modelMatrix);

treeHighlight4 = scene.primitives.add(new Cesium.ClassificationPrimitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : new Cesium.SphereGeometry({
radius : 2.0
}),
modelMatrix : modelMatrix,
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromCssColorString('#55DDE0').withAlpha(0.5))
},
id : 'volume 4'
})
}));

camera.setView({
destination : new Cesium.Cartesian3(1216424.420697336, -4736234.517874706, 4081307.8699144847),
orientation : {
heading : 5.785339046755887,
pitch : -0.2622665042613537
}
});
}

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() {
Sandcastle.addToolbarButton('Highlight building face', highlightBuilding);
Sandcastle.addToolbarButton('Highlight trees', highlightTrees);

highlightBuilding();
}).otherwise(function(error) {
throw(error);
});

var currentObjectId;
var currentPrimitive;
var currentColor;

var handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
handler.setInputAction(function(movement) {
var pickedObject = scene.pick(movement.endPosition);
if (Cesium.defined(pickedObject) && Cesium.defined(pickedObject.id)) {
if (pickedObject.id === currentObjectId) {
return;
}

if (Cesium.defined(currentObjectId)) {
currentPrimitive.getGeometryInstanceAttributes(currentObjectId).color = currentColor;
currentObjectId = undefined;
currentPrimitive = undefined;
currentColor = undefined;
}
}

if (Cesium.defined(pickedObject) && Cesium.defined(pickedObject.primitive) && Cesium.defined(pickedObject.id) && Cesium.defined(pickedObject.primitive.getGeometryInstanceAttributes)) {
currentObjectId = pickedObject.id;
currentPrimitive = pickedObject.primitive;
var attributes = currentPrimitive.getGeometryInstanceAttributes(currentObjectId);
currentColor = attributes.color;
attributes.color = [255, 0, 255, 128];
} else if (Cesium.defined(currentObjectId)) {
currentPrimitive.getGeometryInstanceAttributes(currentObjectId).color = currentColor;
currentObjectId = undefined;
currentPrimitive = undefined;
currentColor = undefined;
}
}, 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>
Binary file added Apps/Sandcastle/gallery/Classification.jpg
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/Polygon.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
}]
},
material : Cesium.Color.BLUE.withAlpha(0.5),
heigth : 0,
height : 0,
outline : true // height is required for outline to display
}
});
Expand Down
102 changes: 102 additions & 0 deletions Apps/Sandcastle/gallery/development/Frustum.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="Draw a frustum.">
<meta name="cesium-sandcastle-labels" content="Development">
<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
// Create the viewer.
var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;


var positionOnEllipsoid = Cesium.Cartesian3.fromDegrees(-105.0, 45.0, 20.0);

var enu = Cesium.Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid);
var rotation = Cesium.Matrix4.getRotation(enu, new Cesium.Matrix3());
Cesium.Matrix3.multiply(rotation, Cesium.Matrix3.fromRotationX(-Cesium.Math.PI_OVER_TWO), rotation);
var orientation = Cesium.Quaternion.fromRotationMatrix(rotation);

var frustum = new Cesium.PerspectiveFrustum({
fov : Cesium.Math.toRadians(60.0),
aspectRatio : scene.canvas.clientWidth / scene.canvas.clientHeight,
near : 10.0,
far : 50.0
});

var frustumGeometry = new Cesium.FrustumGeometry({
frustum : frustum,
origin : positionOnEllipsoid,
orientation : orientation,
vertexFormat : Cesium.VertexFormat.POSITION_ONLY
});

var frustumGeometryInstance = new Cesium.GeometryInstance({
geometry : frustumGeometry,
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 0.0, 0.0, 0.5))
},
id : 'frustum'
});

var frustumPrimitive = scene.primitives.add(new Cesium.Primitive({
geometryInstances : frustumGeometryInstance,
appearance : new Cesium.PerInstanceColorAppearance({
closed: true,
flat : true
})
}));
scene.primitives.add(new Cesium.Primitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : new Cesium.FrustumOutlineGeometry({
frustum : frustum,
origin : positionOnEllipsoid,
orientation : orientation
}),
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(0.0, 0.0, 0.0, 1.0))
}
}),
appearance : new Cesium.PerInstanceColorAppearance({
flat : true
})
}));

frustumPrimitive.readyPromise.then(function(primitive) {
var bs = primitive.getGeometryInstanceAttributes('frustum').boundingSphere;
scene.camera.viewBoundingSphere(bs);
scene.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
});
//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== "undefined") {
startup(Cesium);
} else if (typeof require === "function") {
require(["Cesium"], startup);
}
</script>
</body>
</html>
14 changes: 14 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,31 @@ Change Log
* The function `Quaternion.fromHeadingPitchRoll(heading, pitch, roll, result)` was removed. Use `Quaternion.fromHeadingPitchRoll(hpr, result)` instead where `hpr` is a `HeadingPitchRoll`.
* The function `Transforms.headingPitchRollToFixedFrame(origin, headingPitchRoll, ellipsoid, result)` was removed. Use `Transforms.headingPitchRollToFixedFrame(origin, headingPitchRoll, ellipsoid, fixedFrameTransform, result)` instead where `fixedFrameTransform` is a a 4x4 transformation matrix (see `Transforms.localFrameToFixedFrameGenerator`).
* The function `Transforms.headingPitchRollQuaternion(origin, headingPitchRoll, ellipsoid, result)` was removed. Use `Transforms.headingPitchRollQuaternion(origin, headingPitchRoll, ellipsoid, fixedFrameTransform, result)` instead where `fixedFrameTransform` is a a 4x4 transformation matrix (see `Transforms.localFrameToFixedFrameGenerator`).
* The `color`, `show`, and `pointSize` properties of `Cesium3DTileStyle` are no longer initialized with default values.
* Deprecated
* `Scene/CullingVolume` is deprecated and will be removed in 1.38. Use `Core/CullingVolume`.
* `Scene/OrthographicFrustum` is deprecated and will be removed in 1.38. Use `Core/OrthographicFrustum`.
* `Scene/OrthographicOffCenterFrustum` is deprecated and will be removed in 1.38. Use `Core/OrthographicOffCenterFrustum`.
* `Scene/PerspectiveFrustum` is deprecated and will be removed in 1.38. Use `Core/PerspectiveFrustum`.
* `Scene/PerspectiveOffCenterFrustum` is deprecated and will be removed in 1.38. Use `Core/PerspectiveOffCenterFrustum`.
* Added ability to show tile urls in the 3D Tiles Inspector. [#5592](https://github.com/AnalyticalGraphicsInc/cesium/pull/5592)
* Fixed a bug when reading CRN compressed textures with multiple mip levels. [#5618](https://github.com/AnalyticalGraphicsInc/cesium/pull/5618)
* Fixed issue where composite 3D Tiles that contained instanced 3D Tiles with an external model reference would fail to download the model.
* Added behavior to `Cesium3DTilesInspector` that selects the first tileset hovered over if no tilest is specified. [#5139](https://github.com/AnalyticalGraphicsInc/cesium/issues/5139)
* Added ability to provide a `width` and `height` to `scene.pick`. [#5602](https://github.com/AnalyticalGraphicsInc/cesium/pull/5602)
* Added `Entity.computeModelMatrix` which returns the model matrix representing the entity's transformation. [#5584](https://github.com/AnalyticalGraphicsInc/cesium/pull/5584)
* Added ability to set a style's `color`, `show`, or `pointSize` with a string or object literal. `show` may also take a boolean and `pointSize` may take a number. [#5412](https://github.com/AnalyticalGraphicsInc/cesium/pull/5412)
* Added setter for `KmlDataSource.name` to specify a name for the datasource [#5660](https://github.com/AnalyticalGraphicsInc/cesium/pull/5660).
* Added setter for `GeoJsonDataSource.name` to specify a name for the datasource [#5653](https://github.com/AnalyticalGraphicsInc/cesium/issues/5653)
* Fixed issue where scene would blink when labels were added. [#5537](https://github.com/AnalyticalGraphicsInc/cesium/issues/5537)
* Fixed label positioning when height reference changes [#5609](https://github.com/AnalyticalGraphicsInc/cesium/issues/5609)
* Fixed crash when using the `Cesium3DTilesInspectorViewModel` and removing a tileset [#5607](https://github.com/AnalyticalGraphicsInc/cesium/issues/5607)
* Fixed polygon outline in Polygon Sandcastle demo [#5642](https://github.com/AnalyticalGraphicsInc/cesium/issues/5642)
* Fixed label positioning when using `HeightReference.CLAMP_TO_GROUND` and no position [#5648](https://github.com/AnalyticalGraphicsInc/cesium/pull/5648)
* Updated `Billboard`, `Label` and `PointPrimitive` constructors to clone `NearFarScale` parameters [#5654](https://github.com/AnalyticalGraphicsInc/cesium/pull/5654)
* Added `FrustumGeometry` and `FrustumOutlineGeometry`. [#5649](https://github.com/AnalyticalGraphicsInc/cesium/pull/5649)
* Added an `options` parameter to the constructors of `PerspectiveFrustum`, `PerspectiveOffCenterFrustum`, `OrthographicFrustum`, and `OrthographicOffCenterFrustum` to set properties. [#5649](https://github.com/AnalyticalGraphicsInc/cesium/pull/5649)
* Added `ClassificationPrimitive` which defines a volume and draws the intersection of the volume and terrain or 3D Tiles. [#5625](https://github.com/AnalyticalGraphicsInc/cesium/pull/5625)

### 1.35.2 - 2017-07-11

Expand Down
Loading