@idetik/core 0.31.0 → 0.32.0

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/index.d.ts CHANGED
@@ -260,11 +260,12 @@ declare class ChunkManager {
260
260
  private readonly uploadTexture_?;
261
261
  private readonly disposeTexture_?;
262
262
  private readonly getGpuResidentBytes_;
263
- private readonly memoryLimitBytes_;
263
+ private memoryLimitBytes_;
264
264
  private readonly maxGpuUploadsPerUpdate_;
265
265
  private readonly resident_;
266
266
  constructor(uploadTexture?: (texture: Texture) => void, disposeTexture?: (texture: Texture) => void, getGpuResidentBytes?: () => number, memoryLimitBytes?: number, maxConcurrentRequests?: number, maxGpuUploadsPerUpdate?: number);
267
267
  get memoryLimitBytes(): number;
268
+ set memoryLimitBytes(value: number);
268
269
  get queueStats(): QueueStats;
269
270
  get memoryStats(): {
270
271
  cpuChunkBytes: number;
@@ -756,6 +757,9 @@ declare class Idetik {
756
757
  getViewport(id: string): Viewport | undefined;
757
758
  addViewport(config: ViewportConfig): Viewport;
758
759
  removeViewport(viewport: Viewport): boolean;
760
+ addOverlay(overlay: Overlay): void;
761
+ removeOverlay(overlay: Overlay): boolean;
762
+ setMemoryLimitMB(memoryLimitMB: number): void;
759
763
  start(): this;
760
764
  private animate;
761
765
  stop(): void;
package/dist/index.js CHANGED
@@ -9242,6 +9242,9 @@ class Po {
9242
9242
  get memoryLimitBytes() {
9243
9243
  return this.memoryLimitBytes_;
9244
9244
  }
9245
+ set memoryLimitBytes(A) {
9246
+ this.memoryLimitBytes_ = A;
9247
+ }
9245
9248
  get queueStats() {
9246
9249
  return {
9247
9250
  pending: this.queue_.pendingCount,
@@ -9716,7 +9719,7 @@ class IE {
9716
9719
  A.viewports ?? [],
9717
9720
  this.canvas,
9718
9721
  this.context_
9719
- ), this.overlays = A.overlays ?? [], A.showStats && (this.stats_ = Oo());
9722
+ ), this.overlays = [...A.overlays ?? []], A.showStats && (this.stats_ = Oo());
9720
9723
  const Q = [this.canvas];
9721
9724
  for (const E of this.viewports_)
9722
9725
  E.element !== this.canvas && Q.push(E.element);
@@ -9772,6 +9775,16 @@ class IE {
9772
9775
  `Viewport "${A.id}" not found, nothing to remove`
9773
9776
  ), !1) : (this.running && (A.events.disconnect(), A.element !== this.canvas && this.sizeObserver_.unobserve(A.element)), this.viewports_.splice(I, 1), H.info("Idetik", `Removed viewport "${A.id}"`), !0);
9774
9777
  }
9778
+ addOverlay(A) {
9779
+ this.overlays.push(A);
9780
+ }
9781
+ removeOverlay(A) {
9782
+ const I = this.overlays.indexOf(A);
9783
+ return I === -1 ? (H.warn("Idetik", "Overlay not found, nothing to remove"), !1) : (this.overlays.splice(I, 1), !0);
9784
+ }
9785
+ setMemoryLimitMB(A) {
9786
+ this.chunkManager_.memoryLimitBytes = A * 1024 * 1024;
9787
+ }
9775
9788
  start() {
9776
9789
  if (H.info("Idetik", "Idetik runtime starting"), this.running)
9777
9790
  H.warn("Idetik", "Idetik runtime already started");