Skip to content

Commit 883932d

Browse files
committed
earth centered 2D wip
1 parent 04bcf79 commit 883932d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/engine/Source/Scene/Model/ModelDrawCommands.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,11 @@ ModelDrawCommands.createCommandBoundingSphere = function (
278278
);
279279
instanceBoundingSpheres.push(boundingSphere);
280280
}
281-
282-
return BoundingSphere.fromBoundingSpheres(instanceBoundingSpheres, result);
281+
const combinedBoundingSphere = BoundingSphere.fromBoundingSpheres(
282+
instanceBoundingSpheres,
283+
result,
284+
);
285+
return combinedBoundingSphere;
283286
}
284287

285288
return BoundingSphere.transform(

packages/engine/Source/Scene/Model/ModelSceneGraph.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,10 @@ function computeModelMatrix2D(sceneGraph, frameState) {
483483
scratchComputedTranslation,
484484
);
485485

486-
if (!Cartesian3.equals(translation, Cartesian3.ZERO)) {
486+
if (
487+
!Cartesian3.equals(translation, Cartesian3.ZERO) ||
488+
sceneGraph.hasInstances
489+
) {
487490
sceneGraph._computedModelMatrix2D = Transforms.basisTo2D(
488491
frameState.mapProjection,
489492
computedModelMatrix,

0 commit comments

Comments
 (0)