Ver Fonte

fix Scene.clear not clearing primitives/volumes

Alexander Rose há 2 anos atrás
pai
commit
2d34c2a40b
2 ficheiros alterados com 4 adições e 0 exclusões
  1. 2 0
      CHANGELOG.md
  2. 2 0
      src/mol-gl/scene.ts

+ 2 - 0
CHANGELOG.md

@@ -6,6 +6,8 @@ Note that since we don't clearly distinguish between a public and private interf
 
 ## [Unreleased]
 
+- Fix ``Scene.clear`` not clearing primitives & volumes arrays (@JonStargaryen)
+
 ## [v3.8.2] - 2022-05-22
 
 - Fix ``Scene.opacityAverage`` not taking xray shaded into account

+ 2 - 0
src/mol-gl/scene.ts

@@ -258,6 +258,8 @@ namespace Scene {
                     renderables[i].dispose();
                 }
                 renderables.length = 0;
+                primitives.length = 0;
+                volumes.length = 0;
                 renderableMap.clear();
                 boundingSphereDirty = true;
                 boundingSphereVisibleDirty = true;