weisse Punktwolke wird angezeigt

This commit is contained in:
2026-06-06 13:18:58 +02:00
parent 09da7d0598
commit 98075fb1ea
+6 -13
View File
@@ -1,4 +1,4 @@
import maplibregl from "maplibre-gl"; /*import maplibregl from "maplibre-gl";
import proj4 from "proj4"; import proj4 from "proj4";
import * as THREE from "three"; import * as THREE from "three";
@@ -183,7 +183,7 @@ document.querySelectorAll('.colorButtons').forEach(btn => {
document.querySelectorAll('.colorButtons').forEach(b => b.classList.remove('active')); document.querySelectorAll('.colorButtons').forEach(b => b.classList.remove('active'));
btn.classList.add('active'); btn.classList.add('active');
}); });
});/* });*/
import maplibregl from "maplibre-gl"; import maplibregl from "maplibre-gl";
import proj4 from "proj4"; import proj4 from "proj4";
@@ -345,17 +345,10 @@ const potreeLayer = {
); );
const l = translate.multiply(scale); const l = translate.multiply(scale);
const projMatrix = m.multiply(l); this.camera.projectionMatrix = m.multiply(l);
// MapLibre Matrix direkt auf Potree's eigene Kamera setzen
const potreeCamera = viewer.scene.getActiveCamera();
potreeCamera.projectionMatrix.copy(projMatrix);
potreeCamera.projectionMatrixInverse.copy(projMatrix.clone().invert());
// Potree normal rendern lassen in eigenem Canvas
viewer.update(viewer.clock.getDelta(), performance.now());
viewer.renderDefault();
viewer.renderer.resetState();
viewer.renderer.render(viewer.scene.scenePointCloud, this.camera);
this.map.triggerRepaint(); this.map.triggerRepaint();
}, },
}; };
@@ -616,4 +609,4 @@ colorButtons.forEach(button => {
}); });
});*/ });