@@ -50,17 +50,17 @@ define([
50
50
var defaultVerticalOrigin = VerticalOrigin . CENTER ;
51
51
var defaultDisableDepthTestDistance = 0.0 ;
52
52
53
- var position = new Cartesian3 ( ) ;
54
- var fillColor = new Color ( ) ;
55
- var outlineColor = new Color ( ) ;
56
- var backgroundColor = new Color ( ) ;
57
- var backgroundPadding = new Cartesian2 ( ) ;
58
- var eyeOffset = new Cartesian3 ( ) ;
59
- var pixelOffset = new Cartesian2 ( ) ;
60
- var translucencyByDistance = new NearFarScalar ( ) ;
61
- var pixelOffsetScaleByDistance = new NearFarScalar ( ) ;
62
- var scaleByDistance = new NearFarScalar ( ) ;
63
- var distanceDisplayCondition = new DistanceDisplayCondition ( ) ;
53
+ var positionScratch = new Cartesian3 ( ) ;
54
+ var fillColorScratch = new Color ( ) ;
55
+ var outlineColorScratch = new Color ( ) ;
56
+ var backgroundColorScratch = new Color ( ) ;
57
+ var backgroundPaddingScratch = new Cartesian2 ( ) ;
58
+ var eyeOffsetScratch = new Cartesian3 ( ) ;
59
+ var pixelOffsetScratch = new Cartesian2 ( ) ;
60
+ var translucencyByDistanceScratch = new NearFarScalar ( ) ;
61
+ var pixelOffsetScaleByDistanceScratch = new NearFarScalar ( ) ;
62
+ var scaleByDistanceScratch = new NearFarScalar ( ) ;
63
+ var distanceDisplayConditionScratch = new DistanceDisplayCondition ( ) ;
64
64
65
65
function EntityData ( entity ) {
66
66
this . entity = entity ;
@@ -120,9 +120,9 @@ define([
120
120
var text ;
121
121
var label = item . label ;
122
122
var show = entity . isShowing && entity . isAvailable ( time ) && Property . getValueOrDefault ( labelGraphics . _show , time , true ) ;
123
-
123
+ var position ;
124
124
if ( show ) {
125
- position = Property . getValueOrUndefined ( entity . _position , time , position ) ;
125
+ position = Property . getValueOrUndefined ( entity . _position , time , positionScratch ) ;
126
126
text = Property . getValueOrUndefined ( labelGraphics . _text , time ) ;
127
127
show = defined ( position ) && defined ( text ) ;
128
128
}
@@ -149,21 +149,21 @@ define([
149
149
label . scale = Property . getValueOrDefault ( labelGraphics . _scale , time , defaultScale ) ;
150
150
label . font = Property . getValueOrDefault ( labelGraphics . _font , time , defaultFont ) ;
151
151
label . style = Property . getValueOrDefault ( labelGraphics . _style , time , defaultStyle ) ;
152
- label . fillColor = Property . getValueOrDefault ( labelGraphics . _fillColor , time , defaultFillColor , fillColor ) ;
153
- label . outlineColor = Property . getValueOrDefault ( labelGraphics . _outlineColor , time , defaultOutlineColor , outlineColor ) ;
152
+ label . fillColor = Property . getValueOrDefault ( labelGraphics . _fillColor , time , defaultFillColor , fillColorScratch ) ;
153
+ label . outlineColor = Property . getValueOrDefault ( labelGraphics . _outlineColor , time , defaultOutlineColor , outlineColorScratch ) ;
154
154
label . outlineWidth = Property . getValueOrDefault ( labelGraphics . _outlineWidth , time , defaultOutlineWidth ) ;
155
155
label . showBackground = Property . getValueOrDefault ( labelGraphics . _showBackground , time , defaultShowBackground ) ;
156
- label . backgroundColor = Property . getValueOrDefault ( labelGraphics . _backgroundColor , time , defaultBackgroundColor , backgroundColor ) ;
157
- label . backgroundPadding = Property . getValueOrDefault ( labelGraphics . _backgroundPadding , time , defaultBackgroundPadding , backgroundPadding ) ;
158
- label . pixelOffset = Property . getValueOrDefault ( labelGraphics . _pixelOffset , time , defaultPixelOffset , pixelOffset ) ;
159
- label . eyeOffset = Property . getValueOrDefault ( labelGraphics . _eyeOffset , time , defaultEyeOffset , eyeOffset ) ;
156
+ label . backgroundColor = Property . getValueOrDefault ( labelGraphics . _backgroundColor , time , defaultBackgroundColor , backgroundColorScratch ) ;
157
+ label . backgroundPadding = Property . getValueOrDefault ( labelGraphics . _backgroundPadding , time , defaultBackgroundPadding , backgroundPaddingScratch ) ;
158
+ label . pixelOffset = Property . getValueOrDefault ( labelGraphics . _pixelOffset , time , defaultPixelOffset , pixelOffsetScratch ) ;
159
+ label . eyeOffset = Property . getValueOrDefault ( labelGraphics . _eyeOffset , time , defaultEyeOffset , eyeOffsetScratch ) ;
160
160
label . heightReference = Property . getValueOrDefault ( labelGraphics . _heightReference , time , defaultHeightReference ) ;
161
161
label . horizontalOrigin = Property . getValueOrDefault ( labelGraphics . _horizontalOrigin , time , defaultHorizontalOrigin ) ;
162
162
label . verticalOrigin = Property . getValueOrDefault ( labelGraphics . _verticalOrigin , time , defaultVerticalOrigin ) ;
163
- label . translucencyByDistance = Property . getValueOrUndefined ( labelGraphics . _translucencyByDistance , time , translucencyByDistance ) ;
164
- label . pixelOffsetScaleByDistance = Property . getValueOrUndefined ( labelGraphics . _pixelOffsetScaleByDistance , time , pixelOffsetScaleByDistance ) ;
165
- label . scaleByDistance = Property . getValueOrUndefined ( labelGraphics . _scaleByDistance , time , scaleByDistance ) ;
166
- label . distanceDisplayCondition = Property . getValueOrUndefined ( labelGraphics . _distanceDisplayCondition , time , distanceDisplayCondition ) ;
163
+ label . translucencyByDistance = Property . getValueOrUndefined ( labelGraphics . _translucencyByDistance , time , translucencyByDistanceScratch ) ;
164
+ label . pixelOffsetScaleByDistance = Property . getValueOrUndefined ( labelGraphics . _pixelOffsetScaleByDistance , time , pixelOffsetScaleByDistanceScratch ) ;
165
+ label . scaleByDistance = Property . getValueOrUndefined ( labelGraphics . _scaleByDistance , time , scaleByDistanceScratch ) ;
166
+ label . distanceDisplayCondition = Property . getValueOrUndefined ( labelGraphics . _distanceDisplayCondition , time , distanceDisplayConditionScratch ) ;
167
167
label . disableDepthTestDistance = Property . getValueOrDefault ( labelGraphics . _disableDepthTestDistance , time , defaultDisableDepthTestDistance ) ;
168
168
}
169
169
return true ;
0 commit comments