simulationjsv2 0.1.1 → 0.1.3

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.
@@ -25,6 +25,7 @@ export declare class SceneCollection extends SimulationElement {
25
25
  constructor(name: string);
26
26
  getName(): string;
27
27
  add(el: SimulationElement): void;
28
+ empty(): void;
28
29
  getBuffer(camera: Camera, force: boolean): number[];
29
30
  }
30
31
  export declare class Camera {
@@ -373,6 +373,9 @@ export class SceneCollection extends SimulationElement {
373
373
  add(el) {
374
374
  applyElementToScene(this.scene, this.camera, el);
375
375
  }
376
+ empty() {
377
+ this.scene = [];
378
+ }
376
379
  getBuffer(camera, force) {
377
380
  const res = [];
378
381
  this.scene.forEach((item) => res.push(...item.getBuffer(camera, force)));
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Jackson Otto",
7
7
  "description": "A simple graphics library using WebGPU",
8
- "version": "0.1.1",
8
+ "version": "0.1.3",
9
9
  "exports": {
10
10
  ".": {
11
11
  "import": "./dist/index.js",