皆さん、良い一日を
私は少しの間 Cesium を使用してきましたが、プリミティブ コレクションを使用するようになったときに始めました。クリック アンド ドラッグ プリミティブ レンダリングが機能していましたが、Cesium をアップグレードしてエンティティに移動したいと考えています。コードを移動してリファクタリングし、クリック アンド ドラッグして図形を描画できるようにしました。ただし、非同期フラグを反転する前に、マウスを動かしたときにレンダリングされました。今、私はそれを行うことができません。ビューアーの「allowDataSourcesToSuspendAnimation」をfalseに設定しようとしましたが、役に立ちませんでした。どんな助けでも大歓迎です。
私の素朴さで、質問にコードスニペットを追加するのを忘れていました。これは、マウス ダウンが発生したときにのみ発生するクロック ティック イベント リスナーにあります (ブール値を true に設定)。
var radius = Cesium.Cartesian3.distance(cartesianStartMousePosition, cartesianMousePosition);
if (radius > 0) {
if (currentEntity && currentEntity.id) {
currentEntity.position = cartesianStartMousePosition;
currentEntity.ellipse = {
semiMinorAxis: radius,
semiMajorAxis: radius,
material: new Cesium.ColorMaterialProperty(myColor)
};
currentEntity.label = {
text: 'New Overlay',
scale: 0.35
};
overlayEntities.resumeEvents();
}
else {
currentEntity = new Cesium.Entity({
position: cartesianStartMousePosition,
ellipse: {
semiMinorAxis: radius,
semiMajorAxis: radius,
material: new Cesium.ColorMaterialProperty(myColor)
},
label: {
text: 'New Overlay',
scale: 0.35
},
isSaved: false
});
overlayEntities.add(currentEntity);
}
bDrewPrim = true;
}