File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -494,6 +494,8 @@ const createScatterplot = (initialProperties = {}) => {
494494 let tmpColors = isMultipleColors ( newColors ) ? newColors : [ newColors ] ;
495495 tmpColors = tmpColors . map ( ( color ) => toRgba ( color , true ) ) ;
496496
497+ if ( colorTex ) colorTex . destroy ( ) ;
498+
497499 try {
498500 setter ( tmpColors ) ;
499501 colorTex = createColorTexture ( ) ;
@@ -570,6 +572,8 @@ const createScatterplot = (initialProperties = {}) => {
570572 if ( ! + newOpacity || + newOpacity <= 0 ) return ;
571573
572574 opacity = + newOpacity ;
575+
576+ if ( colorTex ) colorTex . destroy ( ) ;
573577 colorTex = createColorTexture ( ) ;
574578 } ;
575579
@@ -828,7 +832,9 @@ const createScatterplot = (initialProperties = {}) => {
828832
829833 numPoints = newPoints . length ;
830834
835+ if ( stateTex ) stateTex . destroy ( ) ;
831836 stateTex = createStateTexture ( newPoints ) ;
837+
832838 normalPointsIndexBuffer ( {
833839 usage : 'static' ,
834840 type : 'float' ,
You can’t perform that action at this time.
0 commit comments