Skip to content
pixi-silk
GitHub repository
Type

IslandViewport

import type { IslandViewport } from 'pixi-silk/ui/island';
type IslandViewport = 
  | {
  renderer: {
     screen: Partial<IslandRect>;
     off: unknown;
     on: unknown;
  };
}
  | {
  screen: Partial<IslandRect>;
  off: unknown;
  on: unknown;
}
  | {
  value: Partial<IslandRect>;
  subscribe: () => void;
}
  | Partial<IslandRect> & {
  height: number;
  width: number;
};

What an island or a frame follows. An Application or a renderer updates it on resize. A signal of a rectangle, such as IslandFrame.inner, updates it on change. A plain rectangle stays as it is. The same shapes a SmartContainer takes.