Skip to content

Commit

Permalink
Merge pull request #1883 from AnalyticalGraphicsInc/renameDynamicScene
Browse files Browse the repository at this point in the history
Rename DynamicScene to DataSources
  • Loading branch information
shunter committed Jul 8, 2014
2 parents 232b436 + d82cd2e commit 9d4d8c2
Show file tree
Hide file tree
Showing 144 changed files with 5,396 additions and 5,361 deletions.
18 changes: 9 additions & 9 deletions Apps/CesiumViewer/CesiumViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ define([
'Core/defined',
'Core/formatError',
'Core/getFilenameFromUri',
'DynamicScene/CzmlDataSource',
'DynamicScene/GeoJsonDataSource',
'DataSources/CzmlDataSource',
'DataSources/GeoJsonDataSource',
'Scene/TileMapServiceImageryProvider',
'Widgets/Viewer/Viewer',
'Widgets/Viewer/viewerCesiumInspectorMixin',
'Widgets/Viewer/viewerDragDropMixin',
'Widgets/Viewer/viewerDynamicObjectMixin',
'Widgets/Viewer/viewerEntityMixin',
'domReady!'
], function(
defined,
Expand All @@ -21,7 +21,7 @@ define([
Viewer,
viewerCesiumInspectorMixin,
viewerDragDropMixin,
viewerDynamicObjectMixin) {
viewerEntityMixin) {
"use strict";
/*global console*/

Expand Down Expand Up @@ -72,7 +72,7 @@ define([
}

viewer.extend(viewerDragDropMixin);
viewer.extend(viewerDynamicObjectMixin);
viewer.extend(viewerEntityMixin);
if (endUserOptions.inspector) {
viewer.extend(viewerCesiumInspectorMixin);
}
Expand Down Expand Up @@ -117,11 +117,11 @@ define([
loadPromise.then(function() {
var lookAt = endUserOptions.lookAt;
if (defined(lookAt)) {
var dynamicObject = dataSource.dynamicObjects.getById(lookAt);
if (defined(dynamicObject)) {
viewer.trackedObject = dynamicObject;
var entity = dataSource.entities.getById(lookAt);
if (defined(entity)) {
viewer.trackedEntity = entity;
} else {
var error = 'No object with id "' + lookAt + '" exists in the provided source.';
var error = 'No entity with id "' + lookAt + '" exists in the provided data source.';
showLoadError(source, error);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/CZML.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
var gallery = '../../CesiumViewer/Gallery/';

var viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerDynamicObjectMixin);
viewer.extend(Cesium.viewerEntityMixin);

function czmlSatellites() {
viewer.dataSources.removeAll();
Expand Down
32 changes: 32 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,38 @@ Change Log
* Breaking changes
* All `Matrix2`, `Matrix3`, `Matrix4` and `Quaternion` functions that take a `result` parameter now require the parameter (except for functions starting with `from`).
* Removed the following from the Cesium API: `Transforms.earthOrientationParameters`, `EarthOrientationParameters`, `EarthOrientationParametersSample`, `Transforms.iau2006XysData`, `Iau2006XysData`, `Iau2006XysSample`, `IauOrientationAxes`, `TimeConstants`, `Scene.frameState`, `FrameState`, `EncodedCartesian3`, `EllipsoidalOccluder`, and `FAR`. These are still available but are not part of the official API and may change in future versions.
* The `DynamicScene` layer has been renamed to `DataSources` additionally, the following objects have all been renamed.
* `DynamicBillboard` -> `BillboardGraphics`
* `DynamicBillboardVisualizer` -> `BillboardVisualizer`
* `CompositeDynamicObjectCollection` -> `CompositeEntityCollection`
* `DynamicCone` -> `ConeGraphics`
* `DynamicConeVisualizerUsingCustomSensor` -> `ConeVisualizer`
* `DynamicClock` -> `DataSourceClock`
* `DynamicEllipse` -> `EllipseGraphics`
* `DynamicEllipsoid` -> `EllipsoidGraphics`
* `DynamicObject` -> `Entity`
* `DynamicObjectCollection` -> `EntityCollection`
* `DynamicObjectView` -> `EntityView`
* `DynamicLabel` -> `LabelGraphics`
* `DynamicLabelVisualizer` -> `LabelVisualizer`
* `DynamicModel` -> `ModelGraphics`
* `DynamicModelVisualizer` -> `ModelVisualizer`
* `DynamicPath` -> `PathGraphics`
* `DynamicPathVisualizer` -> `PathVisualizer`
* `DynamicPoint` -> `PointGraphics`
* `DynamicPointVisualizer` -> `PointVisualizer`
* `DynamicPolygon` -> `PolygonGraphics`
* `DynamicPolyline` -> `PolylineGraphics`
* `DynamicPyramid` -> `PyramidGraphics`
* `DynamicPyramidVisualizer` -> `PyramidVisualizer`
* `DynamicRectangle` -> `RectangleGraphics`
* `DynamicVector` -> `VectorGraphics`
* `DynamicVectorVisualizer` -> `VectorVisualizer`
* `DynamicWall` -> `WallGraphics`
* `viewerDynamicObjectMixin` -> `viewerEntityMixin`
* `DataSource.dynamicObjects` has been renamed to `DataSource.entities`
* `EntityCollection.getObjects()` and `CompositeEntityCollection.getObjects()` have been made properties and renamed `EntityCollection.entities` and `CompositeEntityCollection.entities`.
* `Viewer.trackedObject` and `Viewer.selectedObject` have been renamed to `Viewer.trackedEntity` and `Viewer.selectedEntity` when using the `viewerEntityMixin`.
* Added northUpEast transform to help support display of glTF models because Y is their up axis.

Beta Releases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ define([
'../Core/defineProperties',
'../Core/DeveloperError',
'../Core/Event',
'./createDynamicPropertyDescriptor'
'./createPropertyDescriptor'
], function(
defaultValue,
defined,
defineProperties,
DeveloperError,
Event,
createDynamicPropertyDescriptor) {
createPropertyDescriptor) {
"use strict";

/**
* An optionally time-dynamic billboard.
*
* @alias DynamicBillboard
* @alias BillboardGraphics
* @constructor
*/
var DynamicBillboard = function() {
var BillboardGraphics = function() {
this._image = undefined;
this._imageSubscription = undefined;
this._width = undefined;
Expand Down Expand Up @@ -55,10 +55,10 @@ define([
this._definitionChanged = new Event();
};

defineProperties(DynamicBillboard.prototype, {
defineProperties(BillboardGraphics.prototype, {
/**
* Gets the event that is raised whenever a new property is assigned.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
*
* @type {Event}
* @readonly
Expand All @@ -71,124 +71,124 @@ define([

/**
* Gets or sets the string {@link Property} specifying the URL of the billboard's texture.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
image : createDynamicPropertyDescriptor('image'),
image : createPropertyDescriptor('image'),

/**
* Gets or sets the numeric {@link Property} specifying the billboard's scale.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
scale : createDynamicPropertyDescriptor('scale'),
scale : createPropertyDescriptor('scale'),

/**
* Gets or sets the numeric {@link Property} specifying the billboard's rotation.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
rotation : createDynamicPropertyDescriptor('rotation'),
rotation : createPropertyDescriptor('rotation'),

/**
* Gets or sets the {@link Cartesian3} {@link Property} specifying the billboard rotation's aligned axis.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
alignedAxis : createDynamicPropertyDescriptor('alignedAxis'),
alignedAxis : createPropertyDescriptor('alignedAxis'),

/**
* Gets or sets the {@link HorizontalOrigin} {@link Property} specifying the billboard's horizontal origin.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
horizontalOrigin : createDynamicPropertyDescriptor('horizontalOrigin'),
horizontalOrigin : createPropertyDescriptor('horizontalOrigin'),

/**
* Gets or sets the {@link VerticalOrigin} {@link Property} specifying the billboard's vertical origin.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
verticalOrigin : createDynamicPropertyDescriptor('verticalOrigin'),
verticalOrigin : createPropertyDescriptor('verticalOrigin'),

/**
* Gets or sets the {@link Color} {@link Property} specifying the billboard's color.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
color : createDynamicPropertyDescriptor('color'),
color : createPropertyDescriptor('color'),

/**
* Gets or sets the {@link Cartesian3} {@link Property} specifying the billboard's eye offset.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
eyeOffset : createDynamicPropertyDescriptor('eyeOffset'),
eyeOffset : createPropertyDescriptor('eyeOffset'),

/**
* Gets or sets the {@link Cartesian2} {@link Property} specifying the billboard's pixel offset.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
pixelOffset : createDynamicPropertyDescriptor('pixelOffset'),
pixelOffset : createPropertyDescriptor('pixelOffset'),

/**
* Gets or sets the boolean {@link Property} specifying the billboard's visibility.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
show : createDynamicPropertyDescriptor('show'),
show : createPropertyDescriptor('show'),

/**
* Gets or sets the numeric {@link Property} specifying the billboard's width in pixels.
* If undefined, the native width is used.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
width : createDynamicPropertyDescriptor('width'),
width : createPropertyDescriptor('width'),

/**
* Gets or sets the numeric {@link Property} specifying the billboard's height in pixels.
* If undefined, the native height is used.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
height : createDynamicPropertyDescriptor('height'),
height : createPropertyDescriptor('height'),

/**
* Gets or sets the {@link NearFarScalar} {@link Property} used to scale billboards based on distance.
* If undefined, a constant size is used.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
scaleByDistance : createDynamicPropertyDescriptor('scaleByDistance'),
scaleByDistance : createPropertyDescriptor('scaleByDistance'),

/**
* Gets or sets the {@link NearFarScalar} {@link Property} used to set translucency based on distance.
* If undefined, a constant size is used.
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
translucencyByDistance : createDynamicPropertyDescriptor('translucencyByDistance'),
translucencyByDistance : createPropertyDescriptor('translucencyByDistance'),

/**
* Gets or sets the {@link NearFarScalar} {@link Property} used to set pixel offset scaling based on distance.
* If undefined, no additional scale is applied to the pixel offset
* @memberof DynamicBillboard.prototype
* @memberof BillboardGraphics.prototype
* @type {Property}
*/
pixelOffsetScaleByDistance : createDynamicPropertyDescriptor('pixelOffsetScaleByDistance')
pixelOffsetScaleByDistance : createPropertyDescriptor('pixelOffsetScaleByDistance')
});

/**
* Duplicates a DynamicBillboard instance.
* Duplicates a BillboardGraphics instance.
*
* @param {DynamicBillboard} [result] The object onto which to store the result.
* @returns {DynamicBillboard} The modified result parameter or a new instance if one was not provided.
* @param {BillboardGraphics} [result] The object onto which to store the result.
* @returns {BillboardGraphics} The modified result parameter or a new instance if one was not provided.
*/
DynamicBillboard.prototype.clone = function(result) {
BillboardGraphics.prototype.clone = function(result) {
if (!defined(result)) {
result = new DynamicBillboard();
result = new BillboardGraphics();
}
result.color = this._color;
result.eyeOffset = this._eyeOffset;
Expand All @@ -212,9 +212,9 @@ define([
* Assigns each unassigned property on this object to the value
* of the same property on the provided source object.
*
* @param {DynamicBillboard} source The object to be merged into this object.
* @param {BillboardGraphics} source The object to be merged into this object.
*/
DynamicBillboard.prototype.merge = function(source) {
BillboardGraphics.prototype.merge = function(source) {
//>>includeStart('debug', pragmas.debug);
if (!defined(source)) {
throw new DeveloperError('source is required.');
Expand All @@ -238,5 +238,5 @@ define([
this.pixelOffsetScaleByDistance = defaultValue(this._pixelOffsetScaleByDistance, source._pixelOffsetScaleByDistance);
};

return DynamicBillboard;
return BillboardGraphics;
});
Loading

0 comments on commit 9d4d8c2

Please sign in to comment.