File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export default class GlobeScene {
1919
2020 #markerMeshes: THREE . Mesh < THREE . PlaneGeometry , THREE . ShaderMaterial > [ ] = [ ]
2121 #barMeshes: THREE . Mesh [ ] = [ ]
22+ #arcMeshes: THREE . Mesh [ ] = [ ]
2223 #dotSphereMesh: THREE . Mesh < THREE . BufferGeometry , THREE . ShaderMaterial > | null = null
2324 #atmosphere: THREE . Mesh < THREE . IcosahedronGeometry , THREE . ShaderMaterial > | undefined
2425
@@ -169,6 +170,8 @@ export default class GlobeScene {
169170 addArc ( arc : Arc ) : void {
170171 const arcMesh = arc . draw ( )
171172 this . #scene. add ( arcMesh )
173+
174+ this . #arcMeshes. push ( arcMesh ) ;
172175 }
173176
174177 addMarkers ( markers : Marker | Marker [ ] ) : void {
@@ -203,8 +206,15 @@ export default class GlobeScene {
203206 }
204207 }
205208
209+ removeAllArcs ( ) :void {
210+ for ( const arc of this . #arcMeshes) {
211+ this . #scene. remove ( arc )
212+ }
213+ }
214+
206215 removeAllAnnotations ( ) : void {
207216 this . removeAllMarkers ( )
208217 this . removeAllBars ( )
218+ this . removeAllArcs ( )
209219 }
210220}
You can’t perform that action at this time.
0 commit comments