@idetik/core 0.32.6 → 0.33.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
@@ -37,6 +37,8 @@ declare abstract class Texture extends Node {
37
37
  get type(): string;
38
38
  }
39
39
 
40
+ type SliceOrientation = "XY" | "XZ" | "YZ";
41
+
40
42
  declare const chunkDataTypes: readonly [Int8ArrayConstructor, Int16ArrayConstructor, Int32ArrayConstructor, Uint8ArrayConstructor, Uint16ArrayConstructor, Uint32ArrayConstructor, Float32ArrayConstructor];
41
43
  type ChunkDataConstructor = (typeof chunkDataTypes)[number];
42
44
  type ChunkData = InstanceType<ChunkDataConstructor>;
@@ -448,6 +450,23 @@ declare abstract class Camera extends RenderableObject {
448
450
  clipToWorld(position: vec3): vec3;
449
451
  }
450
452
 
453
+ declare class Plane {
454
+ normal: vec3;
455
+ signedDistance: number;
456
+ constructor(normal?: vec3, distance?: number);
457
+ static fromPointAndNormal(point: vec3, normal: vec3): Plane;
458
+ set(normal: vec3, distance: number): void;
459
+ signedDistanceToPoint(point: vec3): number;
460
+ normalize(): void;
461
+ }
462
+
463
+ declare class Ray {
464
+ readonly origin: vec3;
465
+ readonly direction: vec3;
466
+ constructor(origin: vec3, direction: vec3);
467
+ intersectWithPlane(plane: Plane): vec3 | null;
468
+ }
469
+
451
470
  declare const eventTypes: readonly ["pointerdown", "pointermove", "pointerup", "pointercancel", "wheel"];
452
471
  type EventType = (typeof eventTypes)[number];
453
472
  declare class EventContext {
@@ -455,6 +474,7 @@ declare class EventContext {
455
474
  readonly type: EventType;
456
475
  readonly event?: Event;
457
476
  worldPos?: vec3;
477
+ worldRay?: Ray;
458
478
  clipPos?: vec3;
459
479
  constructor(type: EventType, event?: Event);
460
480
  get propagationStopped(): boolean;
@@ -472,6 +492,11 @@ declare class EventDispatcher {
472
492
  private readonly handleEvent;
473
493
  }
474
494
 
495
+ type OrthographicCameraOptions = {
496
+ near?: number;
497
+ far?: number;
498
+ orientation?: SliceOrientation;
499
+ };
475
500
  /**
476
501
  * A camera using an orthographic (parallel) projection.
477
502
  *
@@ -490,6 +515,8 @@ declare class OrthographicCamera extends Camera {
490
515
  private height_;
491
516
  private viewportAspectRatio_;
492
517
  private viewportSize_;
518
+ private readonly axes_;
519
+ private readonly rotation_;
493
520
  /**
494
521
  * Creates an orthographic camera framing the given world-space rectangle.
495
522
  *
@@ -497,10 +524,10 @@ declare class OrthographicCamera extends Camera {
497
524
  * @param right - Right edge of the view frame, in world units.
498
525
  * @param top - Top edge of the view frame, in world units.
499
526
  * @param bottom - Bottom edge of the view frame, in world units.
500
- * @param near - Near clipping plane distance. Defaults to `-1e6`.
501
- * @param far - Far clipping plane distance. Defaults to `1e6`.
527
+ * @param options - Near/far clipping plane distances (default `-1e6` and
528
+ * `1e6`) and the slice orientation the camera faces (default `"XY"`).
502
529
  */
503
- constructor(left: number, right: number, top: number, bottom: number, near?: number, far?: number);
530
+ constructor(left: number, right: number, top: number, bottom: number, options?: OrthographicCameraOptions);
504
531
  get viewportSize(): [number, number];
505
532
  setAspectRatio(aspectRatio: number): void;
506
533
  setFrame(left: number, right: number, bottom: number, top: number): void;
@@ -1508,6 +1535,7 @@ declare class ImageLayer extends Layer implements ChannelsEnabled {
1508
1535
  get lastPresentationTimeCoord(): number | undefined;
1509
1536
  private isPresentationStale;
1510
1537
  onEvent(event: EventContext): void;
1538
+ private pickAtRay;
1511
1539
  get chunkStoreView(): ChunkStoreView | undefined;
1512
1540
  get sliceCoords(): SliceCoordinates;
1513
1541
  get source(): ChunkSource;
@@ -1621,6 +1649,7 @@ declare class LabelLayer extends Layer {
1621
1649
  hasMultipleLODs(): boolean;
1622
1650
  private isPresentationStale;
1623
1651
  onEvent(event: EventContext): void;
1652
+ private pickAtRay;
1624
1653
  get colorMap(): LabelColorMap;
1625
1654
  setColorMap(colorMap: LabelColorMapProps): void;
1626
1655
  setSelectedValue(value: number | null): void;