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

Call QuadtreePrimitive.tileLoadProgressEvent after rendering frame state #5134

Closed
wants to merge 68 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
6aaa3e9
add properties to CZML, with spec
RacingTadpole Dec 21, 2015
d213958
remove extra space
RacingTadpole Dec 21, 2015
9506396
Merge branch 'upstream-master' into upstream_czml_props
RacingTadpole Feb 10, 2016
0f77f6f
update CHANGES
RacingTadpole Feb 10, 2016
4b98768
Merge pull request #20 from AnalyticalGraphicsInc/master
RacingTadpole Oct 20, 2016
b708e51
merge master
Oct 20, 2016
2f87620
put back deleted line from CHANGES
Oct 20, 2016
4d047c5
add missing line from merge
Oct 20, 2016
cb739c4
Merge remote-tracking branch 'upstream/master' into upstream_czml_props
kring Jan 17, 2017
96a288d
Make property notification and CompositeEntityCollection work.
kring Jan 18, 2017
45f220c
Fix doc.
kring Jan 18, 2017
ab28fae
Fix test failures.
kring Jan 18, 2017
d4fdf0b
Fix Sandcastle example.
kring Jan 18, 2017
38f875f
Use PropertyBag.
kring Jan 18, 2017
b46308f
Fix order of requires.
kring Jan 18, 2017
dd1835d
Mention breaking change in CHANGES.md.
kring Jan 18, 2017
997fdc2
null is a valid value, and different from undefined.
kring Jan 18, 2017
ae90919
Allow null as a valid property value.
kring Jan 18, 2017
cfd2f3b
Merge remote-tracking branch 'origin/master' into TerriaJS-upstream_c…
shunter Mar 14, 2017
c87f948
Support typed custom properties, allowing for sampled custom properties.
shunter Mar 14, 2017
617c904
Fix handling of custom shadow mode. Add faster detection of non-objec…
shunter Mar 14, 2017
e4b2bee
Add custom properties to validation document.
shunter Mar 14, 2017
754dedb
Merge remote-tracking branch 'origin/master' into custom_czml_properties
shunter Mar 15, 2017
08b35f5
Merge remote-tracking branch 'origin/master' into custom_czml_properties
shunter Mar 16, 2017
2b83b8d
Decrease frustum overlap for opaque pass.
bagnell Mar 17, 2017
d5564d0
Fix broken deploy when branch name uses non-NPM-safe characters.
shunter Mar 17, 2017
9ae04a3
Merge remote-tracking branch 'origin/master' into custom_czml_properties
shunter Mar 20, 2017
4548904
update CHANGES
shunter Mar 20, 2017
187369d
Add projection picker Sandcastle example.
bagnell Mar 20, 2017
4af5df0
Move frustum switching from ProjectionPicker to Camera.
bagnell Mar 20, 2017
fd91447
Clean up, add doc and tests.
bagnell Mar 20, 2017
f2066e1
Update CHANGES.md.
bagnell Mar 20, 2017
9b62282
Closes #3450
bampakoa Mar 21, 2017
3c262e2
xit - ing failing GlobeSurfaceTile specs as a temporary measure
rahwang Mar 21, 2017
3307a91
Merge pull request #5135 from rahwang/xit-globesurfacetile-tests
Mar 21, 2017
4745d24
Fix clustering in 2D.
bagnell Mar 21, 2017
1357011
Update CHANGES.md.
bagnell Mar 21, 2017
5e2a2e4
Add missing semicolon
bampakoa Mar 21, 2017
9a3b9a8
Updates from review.
bagnell Mar 21, 2017
325b8de
Merge pull request #5132 from AnalyticalGraphicsInc/more-ortho
lilleyse Mar 21, 2017
7169c03
Merge branch 'master' into cluster-2d
bagnell Mar 21, 2017
cab0364
Merge remote-tracking branch 'origin/master' into custom_czml_properties
shunter Mar 21, 2017
b53c691
Merge pull request #5116 from AnalyticalGraphicsInc/decrease-overlap
emackey Mar 21, 2017
cb26853
Added tests
bampakoa Mar 21, 2017
d170649
Update CHANGES.md.
bagnell Mar 21, 2017
7385cd5
Add valueOf and toString methods to ConstantProperty.
shunter Mar 22, 2017
44b5ba5
Create a Sandcastle example using CZML custom properties.
shunter Mar 22, 2017
0d12ebe
Merge remote-tracking branch 'origin/master' into custom_czml_properties
shunter Mar 22, 2017
42717ef
Fix resizing the canvas when height > width with an orthographic proj…
bagnell Mar 23, 2017
dccfa2b
Merge pull request #5143 from AnalyticalGraphicsInc/ortho-resize
lilleyse Mar 23, 2017
201e3f7
Merge pull request #5136 from AnalyticalGraphicsInc/cluster-2d
pjcozzi Mar 24, 2017
9422d07
Fix tile bounding box's north and south plane
duvifn Mar 26, 2017
3ba0c88
Add specs that fail in master
duvifn Mar 26, 2017
a4f65e4
tweaks
duvifn Mar 26, 2017
9dc151f
Merge branch 'master' into fix_tileBoundingBox2
duvifn Mar 26, 2017
0c8f801
remove comments
duvifn Mar 26, 2017
4f60b9c
Add comments
duvifn Mar 27, 2017
ef758d3
add to CHANGES.md
duvifn Mar 27, 2017
20a54f3
Made the czm_imagerySplitPosition uniform be in pixel coordinates ins…
jasonbeverage Mar 27, 2017
19d693e
Updated CHANGES.md to reference PR #5151
jasonbeverage Mar 27, 2017
c884335
Merge pull request #5151 from jasonbeverage/splitidlrelative
pjcozzi Mar 27, 2017
1c15bbe
Merge pull request #5105 from AnalyticalGraphicsInc/custom_czml_prope…
mramato Mar 27, 2017
ce6ab61
Fix whitespace.
kring Mar 28, 2017
71c624e
Merge pull request #5150 from duvifn/fix_tileBoundingBox2
kring Mar 28, 2017
1aee260
Closes #3450
bampakoa Mar 21, 2017
3788b71
Add missing semicolon
bampakoa Mar 21, 2017
e47900e
Added tests
bampakoa Mar 21, 2017
8a162af
Merge remote-tracking branch 'origin/quadtree-primitive' into quadtre…
bampakoa Mar 28, 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
141 changes: 141 additions & 0 deletions Apps/Sandcastle/gallery/CZML Custom Properties.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<!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="CZML Custom Properties">
<meta name="cesium-sandcastle-labels" content="CZML">
<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 czml = [{
"id" : "document",
"name" : "CZML Custom Properties",
"version" : "1.0",
"clock": {
"interval": "1990/2010",
"currentTime": "1990",
"multiplier": 100000000
}
}, {
"id" : "custom_property_object",
"name" : "An object with custom properties",
"properties" : {
"constant_property" : true,
"population_intervals" : [{
"interval" : "1990/2000",
"number": 11881643
}, {
"interval" : "2000/2010",
"number" : 12281054
}],
"population_sampled" : {
"number": [
"1990", 11881643,
"2000", 12281054,
"2010", 12702379
]
}
}
}, {
"id" : "pennsylvania",
"name" : "Pennsylvania",
"polygon" : {
"positions" : {
"cartographicDegrees" : [
-75.5, 42, 0,
-79.8, 42, 0,
-79.9, 42.3, 0,
-80.5, 42, 0,
-80.5, 39.8, 0,
-75.7, 39.8, 0,
-74.5, 40.2, 0,
-75.2, 40.8, 0,
-74.7, 41.3, 0
]
},
"material" : {
"solidColor" : {
"color" : {
"rgba" : [0, 255, 0, 150]
}
}
},
"height" : 0,
"extrudedHeight": 0
}
}];

// custom properties can be queried directly:
Sandcastle.addToolbarButton('Print Values', function() {
var entity = dataSource.entities.getById('custom_property_object');
// get the values of all properties at the current time.
var propertyValues = entity.properties.getValue(viewer.clock.currentTime);
console.log('constant_property: ' + propertyValues.constant_property);
console.log('population_intervals: ' + propertyValues.population_intervals);
console.log('population_sampled: ' + propertyValues.population_sampled);
});

// Custom properties can be used as the value of graphical properties:
Sandcastle.addToolbarButton('Use interval data', function() {
var customProperyObject = dataSource.entities.getById('custom_property_object');
var intervalProperty = customProperyObject.properties.population_intervals;
var pennsylvania = dataSource.entities.getById('pennsylvania');

// Because the population values are so large, we scale them down
// by 100 so they fit on the screen.
// If we didn't need to scale, we could directly assign the property
// to extrudedHeight.
pennsylvania.polygon.extrudedHeight = scaleProperty(intervalProperty, 1 / 100.0);
});
Sandcastle.addToolbarButton('Use sampled data', function() {
var customProperyObject = dataSource.entities.getById('custom_property_object');
var sampledProperty = customProperyObject.properties.population_sampled;
var pennsylvania = dataSource.entities.getById('pennsylvania');
pennsylvania.polygon.extrudedHeight = scaleProperty(sampledProperty, 1 / 100.0);
});

function scaleProperty(property, scalingFactor) {
// returns a property that scales another property by a constant factor.
return new Cesium.CallbackProperty(function(time, result) {
result = property.getValue(time, result);
result = result * scalingFactor;
return result;
}, property.isConstant);
}

var viewer = new Cesium.Viewer('cesiumContainer');
var dataSource = new Cesium.CzmlDataSource();
dataSource.load(czml);
viewer.dataSources.add(dataSource);
viewer.zoomTo(dataSource);//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.
6 changes: 3 additions & 3 deletions Apps/Sandcastle/gallery/GeoJSON and TopoJSON.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

//Get the array of entities
var entities = dataSource.entities.values;

var colorHash = {};
for (var i = 0; i < entities.length; i++) {
//For each entity, create a random color based on the state name.
Expand All @@ -69,7 +69,7 @@
});
colorHash[name] = color;
}

//Set the polygon material to our random color.
entity.polygon.material = color;
//Remove the outlines.
Expand All @@ -89,7 +89,7 @@
//Reset the scene when switching demos.
Sandcastle.reset = function() {
viewer.dataSources.removeAll();

//Set the camera to a US centered tilted view and switch back to moving in world coordinates.
viewer.camera.lookAt(Cesium.Cartesian3.fromDegrees(-98.0, 40.0), new Cesium.Cartesian3(0.0, -4790000.0, 3930000.0));
viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
Expand Down
62 changes: 62 additions & 0 deletions Apps/Sandcastle/gallery/Projection.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!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="Change the projection between perspective and orthographic.">
<meta name="cesium-sandcastle-labels" content="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
// Click the projection picker to switch between orthographic and perspective projections.
var viewer = new Cesium.Viewer('cesiumContainer', {
projectionPicker : true
});

// start with orthographic projection
viewer.projectionPicker.viewModel.switchToOrthographic();

var position = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, 0.0);
var hpr = new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(135), 0.0, 0.0);
var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, hpr);

var entity = viewer.entities.add({
position : position,
orientation : orientation,
model : {
uri : '../../SampleData/models/CesiumMilkTruck/CesiumMilkTruck-kmc.glb',
minimumPixelSize : 128,
maximumScale : 20000
}
});
viewer.trackedEntity = entity;
//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/Projection.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
Change Log
==========
* Fixed an issue with `TileBoundingBox` that caused the terrain to disappear in certain places [4032](https://github.com/AnalyticalGraphicsInc/cesium/issues/4032)

### 1.32 - 2017-04-03

* Deprecated
* The `left`, `right`, `bottom`, and `top` properties of `OrthographicFrustum` are deprecated and will be removed in 1.33. Use `OrthographicOffCenterFrustum` instead.
* Breaking changes
* Removed `ArcGisImageServerTerrainProvider`.
* The top-level `properties` in an `Entity` created by `GeoJsonDataSource` are now instances of `ConstantProperty` instead of raw values.
* Added `Camera.flyTo` and `Camera.flyToBoundingSphere` options [#5070](https://github.com/AnalyticalGraphicsInc/cesium/pull/5070)
* `flyOverLongitude` to select one of two possible on Globe paths which camera should fly.
* `flyOverLongitudeWeight` to set a threshold: how many times the `flyOverLongitude` way can be than shortest path.
* `pitchAdjustHeight` to adjust camera pitch during exaggerated flights, to keep Earth in viewport.
* Added the event `Viewer.trackedEntityChanged`, which is raised when the value of `viewer.trackedEntity` changes. [#5060](https://github.com/AnalyticalGraphicsInc/cesium/pull/5060)
* Added `Camera.DEFAULT_OFFSET` for default view of objects with bounding spheres [#4936](https://github.com/AnalyticalGraphicsInc/cesium/pull/4936)
* Changed billboard blending behavior [#5066](https://github.com/AnalyticalGraphicsInc/cesium/pull/5056)
* Decrease multi-frustum overlap to prevent depth artifacts between opaque and translucent draw calls. [#5116](https://github.com/AnalyticalGraphicsInc/cesium/pull/5116)
* Fix crunch compressed textures in IE11. [#5057](https://github.com/AnalyticalGraphicsInc/cesium/pull/5057)
* Fixed a bug in `Quaternion.fromHeadingPitchRoll` that made it erroneously throw an exception when passed individual angles in an unminified / debug build.
* Fix `GroundPrimitive` rendering in 2D and Columbus View [#5078](https://github.com/AnalyticalGraphicsInc/cesium/pull/5078)
* Fixed an issue with `PinBuilder` where inset images could have low-alpha fringes against an opaque background. [#5099](https://github.com/AnalyticalGraphicsInc/cesium/pull/5099)
* Fixed a bug in `ModelAnimationCache` causing different animations to reference the same animation. [#5064](https://github.com/AnalyticalGraphicsInc/cesium/pull/5064)
* Fixed a bug that caused an exception in `CesiumInspectorViewModel` when using the NW / NE / SW / SE / Parent buttons to navigate to a terrain tile that is not yet loaded.
* Added support for an orthographic projection in 3D and Columbus view. Set `projectionPicker` to `true` in the options when creating a `Viewer` to add a widget that will switch projections. [#5021](https://github.com/AnalyticalGraphicsInc/cesium/pull/5021)
* `ConstantProperty` now provides `valueOf` and `toString` methods that return the constant value.
* Added support for time-varying properties in CZML [#5105](https:/github.com/AnalyticalGraphicsInc/cesium/pull/5105).
* Added support for an orthographic projection in 3D and Columbus view.
* Set `projectionPicker` to `true` in the options when creating a `Viewer` to add a widget that will switch projections. [#5021](https://github.com/AnalyticalGraphicsInc/cesium/pull/5021)
* Call `switchToOrthographicFrustum` or `switchToPerspectiveFrustum` on `Camera` to change projections.
* Fix billboard, point and label clustering in 2D and Columbus view. [#5136](https://github.com/AnalyticalGraphicsInc/cesium/pull/5136)
* Fixed issues with imagerySplitPosition and the international date line in 2D mode. [#5151](https://github.com/AnalyticalGraphicsInc/cesium/pull/5151)

### 1.31 - 2017-03-01

Expand Down
24 changes: 18 additions & 6 deletions Source/DataSources/ConstantProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ define([
* @param {Object} [value] The property value.
*
* @see ConstantPositionProperty
*
* @exception {DeveloperError} value.clone is a required function.
* @exception {DeveloperError} value.equals is a required function.
*/
function ConstantProperty(value) {
this._value = undefined;
Expand Down Expand Up @@ -73,9 +70,6 @@ define([
* Sets the value of the property.
*
* @param {Object} value The property value.
*
* @exception {DeveloperError} value.clone is a required function.
* @exception {DeveloperError} value.equals is a required function.
*/
ConstantProperty.prototype.setValue = function(value) {
var oldValue = this._value;
Expand Down Expand Up @@ -109,5 +103,23 @@ define([
(this._hasEquals && this._value.equals(other._value))));
};

/**
* Gets this property's value.
*
* @returns {*} This property's value.
*/
ConstantProperty.prototype.valueOf = function() {
return this._value;
};

/**
* Creates a string representing this property's value.
*
* @returns {String} A string representing the property's value.
*/
ConstantProperty.prototype.toString = function() {
return String(this._value);
};

return ConstantProperty;
});
Loading