123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- define([
- '../Core/defaultValue',
- '../Core/defined',
- '../Core/defineProperties',
- '../Core/DeveloperError',
- '../Core/Event',
- './createPropertyDescriptor'
- ], function(
- defaultValue,
- defined,
- defineProperties,
- DeveloperError,
- Event,
- createPropertyDescriptor) {
- "use strict";
-
- var BillboardGraphics = function() {
- this._image = undefined;
- this._imageSubscription = undefined;
- this._width = undefined;
- this._widthSubscription = undefined;
- this._height = undefined;
- this._heightSubscription = undefined;
- this._scale = undefined;
- this._scaleSubscription = undefined;
- this._rotation = undefined;
- this._rotationSubscription = undefined;
- this._alignedAxis = undefined;
- this._alignedAxisSubscription = undefined;
- this._horizontalOrigin = undefined;
- this._horizontalOriginSubscription = undefined;
- this._verticalOrigin = undefined;
- this._verticalOriginSubscription = undefined;
- this._color = undefined;
- this._colorSubscription = undefined;
- this._eyeOffset = undefined;
- this._eyeOffsetSubscription = undefined;
- this._pixelOffset = undefined;
- this._pixelOffsetSubscription = undefined;
- this._show = undefined;
- this._showSubscription = undefined;
- this._scaleByDistance = undefined;
- this._scaleByDistanceSubscription = undefined;
- this._translucencyByDistance = undefined;
- this._translucencyByDistanceSubscription = undefined;
- this._pixelOffsetScaleByDistance = undefined;
- this._pixelOffsetScaleByDistanceSubscription = undefined;
- this._definitionChanged = new Event();
- };
- defineProperties(BillboardGraphics.prototype, {
-
- definitionChanged : {
- get : function() {
- return this._definitionChanged;
- }
- },
-
- image : createPropertyDescriptor('image'),
-
- scale : createPropertyDescriptor('scale'),
-
- rotation : createPropertyDescriptor('rotation'),
-
- alignedAxis : createPropertyDescriptor('alignedAxis'),
-
- horizontalOrigin : createPropertyDescriptor('horizontalOrigin'),
-
- verticalOrigin : createPropertyDescriptor('verticalOrigin'),
-
- color : createPropertyDescriptor('color'),
-
- eyeOffset : createPropertyDescriptor('eyeOffset'),
-
- pixelOffset : createPropertyDescriptor('pixelOffset'),
-
- show : createPropertyDescriptor('show'),
-
- width : createPropertyDescriptor('width'),
-
- height : createPropertyDescriptor('height'),
-
- scaleByDistance : createPropertyDescriptor('scaleByDistance'),
-
- translucencyByDistance : createPropertyDescriptor('translucencyByDistance'),
-
- pixelOffsetScaleByDistance : createPropertyDescriptor('pixelOffsetScaleByDistance')
- });
-
- BillboardGraphics.prototype.clone = function(result) {
- if (!defined(result)) {
- result = new BillboardGraphics();
- }
- result.color = this._color;
- result.eyeOffset = this._eyeOffset;
- result.horizontalOrigin = this._horizontalOrigin;
- result.image = this._image;
- result.pixelOffset = this._pixelOffset;
- result.scale = this._scale;
- result.rotation = this._rotation;
- result.alignedAxis = this._alignedAxis;
- result.show = this._show;
- result.verticalOrigin = this._verticalOrigin;
- result.width = this._width;
- result.height = this._height;
- result.scaleByDistance = this._scaleByDistance;
- result.translucencyByDistance = this._translucencyByDistance;
- result.pixelOffsetScaleByDistance = this._pixelOffsetScaleByDistance;
- return result;
- };
-
- BillboardGraphics.prototype.merge = function(source) {
-
- if (!defined(source)) {
- throw new DeveloperError('source is required.');
- }
-
- this.color = defaultValue(this._color, source._color);
- this.eyeOffset = defaultValue(this._eyeOffset, source._eyeOffset);
- this.horizontalOrigin = defaultValue(this._horizontalOrigin, source._horizontalOrigin);
- this.image = defaultValue(this._image, source._image);
- this.pixelOffset = defaultValue(this._pixelOffset, source._pixelOffset);
- this.scale = defaultValue(this._scale, source._scale);
- this.rotation = defaultValue(this._rotation, source._rotation);
- this.alignedAxis = defaultValue(this._alignedAxis, source._alignedAxis);
- this.show = defaultValue(this._show, source._show);
- this.verticalOrigin = defaultValue(this._verticalOrigin, source._verticalOrigin);
- this.width = defaultValue(this._width, source._width);
- this.height = defaultValue(this._height, source._height);
- this.scaleByDistance = defaultValue(this._scaleByDistance, source._scaleByDistance);
- this.translucencyByDistance = defaultValue(this._translucencyByDistance, source._translucencyByDistance);
- this.pixelOffsetScaleByDistance = defaultValue(this._pixelOffsetScaleByDistance, source._pixelOffsetScaleByDistance);
- };
- return BillboardGraphics;
- });
|