wgsl-renderer 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -713,6 +713,11 @@ var WGSLRenderer = class {
713
713
  this.animationFrameId = null;
714
714
  }
715
715
  }
716
+ reset() {
717
+ this.stopLoop();
718
+ this.passes = [];
719
+ this.textureManager.destroy();
720
+ }
716
721
  };
717
722
  async function createWGSLRenderer(cvs, options) {
718
723
  const renderer = new WGSLRenderer(cvs, options);
@@ -228,6 +228,7 @@ declare class WGSLRenderer {
228
228
  (t: number): void;
229
229
  }): void;
230
230
  stopLoop(): void;
231
+ reset(): void;
231
232
  }
232
233
  declare function createWGSLRenderer(cvs: HTMLCanvasElement, options?: WGSLRendererOptions): Promise<WGSLRenderer>;
233
234
  //#endregion
package/dist/esm/index.js CHANGED
@@ -712,6 +712,11 @@ var WGSLRenderer = class {
712
712
  this.animationFrameId = null;
713
713
  }
714
714
  }
715
+ reset() {
716
+ this.stopLoop();
717
+ this.passes = [];
718
+ this.textureManager.destroy();
719
+ }
715
720
  };
716
721
  async function createWGSLRenderer(cvs, options) {
717
722
  const renderer = new WGSLRenderer(cvs, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wgsl-renderer",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "A multi-pass renderer based on WebGPU and WGSL.",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",