@idetik/core 0.45.4 → 0.46.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/README.md CHANGED
@@ -35,6 +35,7 @@ This example displays a single slice from [Zebrahub](https://zebrahub.sf.czbiohu
35
35
  import {
36
36
  Idetik,
37
37
  ImageLayer,
38
+ Viewport,
38
39
  OmeZarrImageSource,
39
40
  OrthographicCamera,
40
41
  PanZoomControls,
@@ -56,13 +57,15 @@ const camera = new OrthographicCamera({
56
57
  top: 0, bottom: y.lods[0].size * y.lods[0].scale
57
58
  });
58
59
 
60
+ const canvas = document.querySelector<HTMLCanvasElement>('canvas')!;
59
61
  const idetik = new Idetik({
60
- canvas: document.querySelector('canvas')!,
61
- viewports: [{
62
+ canvas,
63
+ viewports: [new Viewport({
64
+ domElement: canvas,
62
65
  camera,
63
66
  layers: [layer],
64
67
  cameraControls: new PanZoomControls(camera)
65
- }],
68
+ })],
66
69
  });
67
70
 
68
71
  idetik.start();