MCPcopy Create free account
hub / github.com/dev7355608/perfect-vision / destroy

Method destroy

scripts/utils/framebuffer.js:253–268  ·  view source on GitHub ↗

* Destroy.

()

Source from the content-addressed store, hash-verified

251 * Destroy.
252 */
253 destroy() {
254 for (let i = 0; i < this.textures.length; i++) {
255 this.textures[i].destroy(true);
256 this.sprites[i].destroy();
257 }
258
259 for (const framebuffer of Object.values(this.framebuffers)) {
260 framebuffer.renderTexture.destroy();
261 framebuffer.dispose();
262 }
263
264 this.textures = null;
265 this.sprites = null;
266 this.framebuffers = null;
267 this.destroyed = true;
268 }
269
270 /**
271 * Render the display object.

Callers

nothing calls this directly

Calls 1

disposeMethod · 0.45

Tested by

no test coverage detected