()
| 239 | // Call this when you are done with the SparkViewpoint and want to |
| 240 | // free up its resources (GPU targets, pixel buffers, etc.) |
| 241 | dispose() { |
| 242 | this.setAutoUpdate(false); |
| 243 | if (this.target) { |
| 244 | this.target.dispose(); |
| 245 | this.target = undefined; |
| 246 | } |
| 247 | if (this.back) { |
| 248 | this.back.dispose(); |
| 249 | this.back = undefined; |
| 250 | } |
| 251 | if (this.display) { |
| 252 | this.spark.releaseAccumulator(this.display.accumulator); |
| 253 | this.display.geometry.dispose(); |
| 254 | this.display = null; |
| 255 | } |
| 256 | if (this.pending?.accumulator) { |
| 257 | this.spark.releaseAccumulator(this.pending.accumulator); |
| 258 | this.pending = null; |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | // Use this function to change whether this viewpoint will auto-update |
| 263 | // its sort order whenever the attached SparkRenderer updates the Gsplats. |
nothing calls this directly
no test coverage detected