Set autoclear to false for renderer

This commit is contained in:
Fuhrmann 2025-03-27 11:19:06 +01:00
parent 937e90b5f4
commit e7ff4c5493

View file

@ -61,6 +61,7 @@ export function buildScene(container: HTMLElement, extent: Extent) {
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(width, height);
renderer.localClippingEnabled = true;
renderer.autoClear = false;
renderer.setAnimationLoop(animate);
// Handle window resize event to adapt the aspect ratio
@ -82,7 +83,6 @@ export function buildScene(container: HTMLElement, extent: Extent) {
scene.userData.wireframe = false;
const backgroundColor = new Color(0xbfd1e5);
scene.background = backgroundColor;
renderer.setClearColor(backgroundColor);
// Add lights to the scene
buildDefaultLights(scene, extent);