@digo-org/digo-api 1.0.50 → 1.0.51
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/package.json +1 -1
- package/src/templates/balls.tsx +4 -4
package/package.json
CHANGED
package/src/templates/balls.tsx
CHANGED
|
@@ -305,7 +305,7 @@ class X {
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
dispose() {
|
|
308
|
-
this
|
|
308
|
+
this.onResizeCleanup();
|
|
309
309
|
this.stopAnimation();
|
|
310
310
|
this.clear();
|
|
311
311
|
this._postprocessing?.dispose();
|
|
@@ -313,7 +313,7 @@ class X {
|
|
|
313
313
|
this.isDisposed = true;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
|
|
316
|
+
private onResizeCleanup() {
|
|
317
317
|
window.removeEventListener('resize', this.onResize.bind(this));
|
|
318
318
|
this.resizeObserver?.disconnect();
|
|
319
319
|
this.intersectionObserver?.disconnect();
|
|
@@ -713,11 +713,11 @@ class Z extends InstancedMesh {
|
|
|
713
713
|
super(geometry, material, config.count);
|
|
714
714
|
this.config = config;
|
|
715
715
|
this.physics = new W(config);
|
|
716
|
-
this
|
|
716
|
+
this.setupLights();
|
|
717
717
|
this.setColors(config.colors);
|
|
718
718
|
}
|
|
719
719
|
|
|
720
|
-
|
|
720
|
+
private setupLights() {
|
|
721
721
|
this.ambientLight = new AmbientLight(
|
|
722
722
|
this.config.ambientColor,
|
|
723
723
|
this.config.ambientIntensity,
|