Skip to content

Commit f5f74e8

Browse files
committed
removed remnants of frameState for evaluate and evaluateColor
1 parent a8345ca commit f5f74e8

5 files changed

+33
-33
lines changed

Source/Scene/Cesium3DTileBatchTable.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,8 @@ define([
555555
var length = this.featuresLength;
556556
for (var i = 0; i < length; ++i) {
557557
var feature = content.getFeature(i);
558-
var color = defined(style.color) ? style.color.evaluateColor(frameState, feature, scratchColor) : DEFAULT_COLOR_VALUE;
559-
var show = defined(style.show) ? style.show.evaluate(frameState, feature) : DEFAULT_SHOW_VALUE;
558+
var color = defined(style.color) ? style.color.evaluateColor(feature, scratchColor) : DEFAULT_COLOR_VALUE;
559+
var show = defined(style.show) ? style.show.evaluate(feature) : DEFAULT_SHOW_VALUE;
560560
this.setColor(i, color);
561561
this.setShow(i, show);
562562
}

Source/Scene/Vector3DTilePoints.js

+25-25
Original file line numberDiff line numberDiff line change
@@ -326,47 +326,47 @@ define([
326326
var feature = features[batchId];
327327

328328
if (defined(style.show)) {
329-
feature.show = style.show.evaluate(frameState, feature);
329+
feature.show = style.show.evaluate(feature);
330330
}
331331

332332
if (defined(style.pointSize)) {
333-
feature.pointSize = style.pointSize.evaluate(frameState, feature);
333+
feature.pointSize = style.pointSize.evaluate(feature);
334334
}
335335

336336
if (defined(style.color)) {
337-
feature.color = style.color.evaluateColor(frameState, feature, scratchColor);
337+
feature.color = style.color.evaluateColor(feature, scratchColor);
338338
}
339339

340340
if (defined(style.pointOutlineColor)) {
341-
feature.pointOutlineColor = style.pointOutlineColor.evaluateColor(frameState, feature, scratchColor2);
341+
feature.pointOutlineColor = style.pointOutlineColor.evaluateColor(feature, scratchColor2);
342342
}
343343

344344
if (defined(style.pointOutlineWidth)) {
345-
feature.pointOutlineWidth = style.pointOutlineWidth.evaluate(frameState, feature);
345+
feature.pointOutlineWidth = style.pointOutlineWidth.evaluate(feature);
346346
}
347347

348348
if (defined(style.labelColor)) {
349-
feature.labelColor = style.labelColor.evaluateColor(frameState, feature, scratchColor3);
349+
feature.labelColor = style.labelColor.evaluateColor(feature, scratchColor3);
350350
}
351351

352352
if (defined(style.labelOutlineColor)) {
353-
feature.labelOutlineColor = style.labelOutlineColor.evaluateColor(frameState, feature, scratchColor4);
353+
feature.labelOutlineColor = style.labelOutlineColor.evaluateColor(feature, scratchColor4);
354354
}
355355

356356
if (defined(style.labelOutlineWidth)) {
357-
feature.labelOutlineWidth = style.labelOutlineWidth.evaluate(frameState, feature);
357+
feature.labelOutlineWidth = style.labelOutlineWidth.evaluate(feature);
358358
}
359359

360360
if (defined(style.font)) {
361-
feature.font = style.font.evaluate(frameState, feature);
361+
feature.font = style.font.evaluate(feature);
362362
}
363363

364364
if (defined(style.labelStyle)) {
365-
feature.labelStyle = style.labelStyle.evaluate(frameState, feature);
365+
feature.labelStyle = style.labelStyle.evaluate(feature);
366366
}
367367

368368
if (defined(style.labelText)) {
369-
feature.labelText = style.labelText.evaluate(frameState, feature);
369+
feature.labelText = style.labelText.evaluate(feature);
370370
} else {
371371
feature.labelText = undefined;
372372
}
@@ -376,15 +376,15 @@ define([
376376
}
377377

378378
if (defined(style.backgroundPadding)) {
379-
feature.backgroundPadding = style.backgroundPadding.evaluate(frameState, feature);
379+
feature.backgroundPadding = style.backgroundPadding.evaluate(feature);
380380
}
381381

382382
if (defined(style.backgroundEnabled)) {
383-
feature.backgroundEnabled = style.backgroundEnabled.evaluate(frameState, feature);
383+
feature.backgroundEnabled = style.backgroundEnabled.evaluate(feature);
384384
}
385385

386386
if (defined(style.scaleByDistance)) {
387-
var scaleByDistanceCart4 = style.scaleByDistance.evaluate(frameState, feature);
387+
var scaleByDistanceCart4 = style.scaleByDistance.evaluate(feature);
388388
scratchScaleByDistance.near = scaleByDistanceCart4.x;
389389
scratchScaleByDistance.nearValue = scaleByDistanceCart4.y;
390390
scratchScaleByDistance.far = scaleByDistanceCart4.z;
@@ -395,7 +395,7 @@ define([
395395
}
396396

397397
if (defined(style.translucencyByDistance)) {
398-
var translucencyByDistanceCart4 = style.translucencyByDistance.evaluate(frameState, feature);
398+
var translucencyByDistanceCart4 = style.translucencyByDistance.evaluate(feature);
399399
scratchTranslucencyByDistance.near = translucencyByDistanceCart4.x;
400400
scratchTranslucencyByDistance.nearValue = translucencyByDistanceCart4.y;
401401
scratchTranslucencyByDistance.far = translucencyByDistanceCart4.z;
@@ -406,7 +406,7 @@ define([
406406
}
407407

408408
if (defined(style.distanceDisplayCondition)) {
409-
var distanceDisplayConditionCart2 = style.distanceDisplayCondition.evaluate(frameState, feature);
409+
var distanceDisplayConditionCart2 = style.distanceDisplayCondition.evaluate(feature);
410410
scratchDistanceDisplayCondition.near = distanceDisplayConditionCart2.x;
411411
scratchDistanceDisplayCondition.far = distanceDisplayConditionCart2.y;
412412
feature.distanceDisplayCondition = scratchDistanceDisplayCondition;
@@ -415,41 +415,41 @@ define([
415415
}
416416

417417
if (defined(style.heightOffset)) {
418-
feature.heightOffset = style.heightOffset.evaluate(frameState, feature);
418+
feature.heightOffset = style.heightOffset.evaluate(feature);
419419
}
420420

421421
if (defined(style.anchorLineEnabled)) {
422-
feature.anchorLineEnabled = style.anchorLineEnabled.evaluate(frameState, feature);
422+
feature.anchorLineEnabled = style.anchorLineEnabled.evaluate(feature);
423423
}
424424

425425
if (defined(style.anchorLineColor)) {
426-
feature.anchorLineColor = style.anchorLineColor.evaluateColor(frameState, feature, scratchColor6);
426+
feature.anchorLineColor = style.anchorLineColor.evaluateColor(feature, scratchColor6);
427427
}
428428

429429
if (defined(style.image)) {
430-
feature.image = style.image.evaluate(frameState, feature);
430+
feature.image = style.image.evaluate(feature);
431431
} else {
432432
feature.image = undefined;
433433
}
434434

435435
if (defined(style.disableDepthTestDistance)) {
436-
feature.disableDepthTestDistance = style.disableDepthTestDistance.evaluate(frameState, feature);
436+
feature.disableDepthTestDistance = style.disableDepthTestDistance.evaluate(feature);
437437
}
438438

439439
if (defined(style.horizontalOrigin)) {
440-
feature.horizontalOrigin = style.horizontalOrigin.evaluate(frameState, feature);
440+
feature.horizontalOrigin = style.horizontalOrigin.evaluate(feature);
441441
}
442442

443443
if (defined(style.verticalOrigin)) {
444-
feature.verticalOrigin = style.verticalOrigin.evaluate(frameState, feature);
444+
feature.verticalOrigin = style.verticalOrigin.evaluate(feature);
445445
}
446446

447447
if (defined(style.labelHorizontalOrigin)) {
448-
feature.labelHorizontalOrigin = style.labelHorizontalOrigin.evaluate(frameState, feature);
448+
feature.labelHorizontalOrigin = style.labelHorizontalOrigin.evaluate(feature);
449449
}
450450

451451
if (defined(style.labelVerticalOrigin)) {
452-
feature.labelVerticalOrigin = style.labelVerticalOrigin.evaluate(frameState, feature);
452+
feature.labelVerticalOrigin = style.labelVerticalOrigin.evaluate(feature);
453453
}
454454
}
455455
};

Source/Scene/Vector3DTilePolylines.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,8 @@ define([
505505
var batchId = batchIds[i];
506506
var feature = features[batchId];
507507

508-
feature.color = defined(style.color) ? style.color.evaluateColor(frameState, feature, scratchColor) : DEFAULT_COLOR_VALUE;
509-
feature.show = defined(style.show) ? style.show.evaluate(frameState, feature) : DEFAULT_SHOW_VALUE;
508+
feature.color = defined(style.color) ? style.color.evaluateColor(feature, scratchColor) : DEFAULT_COLOR_VALUE;
509+
feature.show = defined(style.show) ? style.show.evaluate(feature) : DEFAULT_SHOW_VALUE;
510510
}
511511
};
512512

Source/Scene/Vector3DTilePrimitive.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -951,8 +951,8 @@ define([
951951
var batchId = batchIds[i];
952952
var feature = features[batchId];
953953

954-
feature.color = defined(style.color) ? style.color.evaluateColor(frameState, feature, scratchColor) : DEFAULT_COLOR_VALUE;
955-
feature.show = defined(style.show) ? style.show.evaluate(frameState, feature) : DEFAULT_SHOW_VALUE;
954+
feature.color = defined(style.color) ? style.color.evaluateColor(feature, scratchColor) : DEFAULT_COLOR_VALUE;
955+
feature.show = defined(style.show) ? style.show.evaluate(feature) : DEFAULT_SHOW_VALUE;
956956
}
957957

958958
if (isSimpleStyle) {

Specs/Scene/Cesium3DTilesetSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2016,13 +2016,13 @@ defineSuite([
20162016
it('applies custom style to a tileset', function() {
20172017
var style = new Cesium3DTileStyle();
20182018
style.show = {
2019-
evaluate : function(frameState, feature) {
2019+
evaluate : function(feature) {
20202020
return this._value;
20212021
},
20222022
_value : false
20232023
};
20242024
style.color = {
2025-
evaluateColor : function(frameState, feature, result) {
2025+
evaluateColor : function(feature, result) {
20262026
return Color.clone(Color.WHITE, result);
20272027
}
20282028
};

0 commit comments

Comments
 (0)