@idetik/core 0.36.1 → 0.36.2

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
@@ -313,6 +313,57 @@ declare class Box3 {
313
313
  applyTransform(matrix: mat4): void;
314
314
  }
315
315
 
316
+ declare class Frustum {
317
+ private readonly planes_;
318
+ constructor(m: mat4);
319
+ setWithViewProjection(m: mat4): void;
320
+ intersectsWithBox3(box: Box3): boolean;
321
+ }
322
+
323
+ declare class TrsTransform {
324
+ private dirty_;
325
+ private matrix_;
326
+ private rotation_;
327
+ private translation_;
328
+ private scale_;
329
+ addRotation(q: quat): void;
330
+ setRotation(q: quat): void;
331
+ get rotation(): gl_matrix.vec4;
332
+ addTranslation(vec: vec3): void;
333
+ setTranslation(vec: vec3): void;
334
+ get translation(): vec3;
335
+ addScale(vec: vec3): void;
336
+ setScale(vec: vec3): void;
337
+ targetTo(target: vec3): void;
338
+ get scale(): vec3;
339
+ get matrix(): mat4;
340
+ get inverse(): mat4;
341
+ private computeMatrix;
342
+ }
343
+
344
+ type CameraType = "OrthographicCamera" | "PerspectiveCamera";
345
+ declare abstract class Camera extends Node {
346
+ private readonly transform_;
347
+ protected projectionMatrix_: mat4;
348
+ protected near_: number;
349
+ protected far_: number;
350
+ protected abstract updateProjectionMatrix(): void;
351
+ abstract get type(): CameraType;
352
+ update(): void;
353
+ get projectionMatrix(): mat4;
354
+ get transform(): TrsTransform;
355
+ get viewMatrix(): mat4;
356
+ get right(): vec3;
357
+ get up(): vec3;
358
+ getViewProjection(): mat4;
359
+ get frustum(): Frustum;
360
+ abstract setAspectRatio(aspectRatio: number): void;
361
+ abstract zoom(factor: number): void;
362
+ pan(vec: vec3): void;
363
+ get position(): vec3;
364
+ clipToWorld(position: vec3): vec3;
365
+ }
366
+
316
367
  type Primitive = "triangles" | "points" | "lines";
317
368
  type GeometryAttributeType = "position" | "normal" | "uv" | "next_position" | "previous_position" | "direction" | "color" | "size" | "marker";
318
369
  type GeometryAttribute = {
@@ -344,27 +395,6 @@ declare class WireframeGeometry extends Geometry {
344
395
  constructor(geometry: Geometry);
345
396
  }
346
397
 
347
- declare class TrsTransform {
348
- private dirty_;
349
- private matrix_;
350
- private rotation_;
351
- private translation_;
352
- private scale_;
353
- addRotation(q: quat): void;
354
- setRotation(q: quat): void;
355
- get rotation(): gl_matrix.vec4;
356
- addTranslation(vec: vec3): void;
357
- setTranslation(vec: vec3): void;
358
- get translation(): vec3;
359
- addScale(vec: vec3): void;
360
- setScale(vec: vec3): void;
361
- targetTo(target: vec3): void;
362
- get scale(): vec3;
363
- get matrix(): mat4;
364
- get inverse(): mat4;
365
- private computeMatrix;
366
- }
367
-
368
398
  type Shader = "floatScalarImage" | "floatVolume" | "intLabelImage" | "intScalarImage" | "intVolume" | "labelImage" | "points" | "projectedLine" | "uintScalarImage" | "uintVolume" | "wireframe";
369
399
 
370
400
  /** @group Layer Configuration */
@@ -429,34 +459,6 @@ declare abstract class RenderableObject extends Node {
429
459
  getUniforms(): Record<string, unknown>;
430
460
  }
431
461
 
432
- declare class Frustum {
433
- private readonly planes_;
434
- constructor(m: mat4);
435
- setWithViewProjection(m: mat4): void;
436
- intersectsWithBox3(box: Box3): boolean;
437
- }
438
-
439
- type CameraType = "OrthographicCamera" | "PerspectiveCamera";
440
- declare abstract class Camera extends RenderableObject {
441
- protected projectionMatrix_: mat4;
442
- protected near_: number;
443
- protected far_: number;
444
- protected abstract updateProjectionMatrix(): void;
445
- abstract get type(): CameraType;
446
- update(): void;
447
- get projectionMatrix(): mat4;
448
- get viewMatrix(): mat4;
449
- get right(): vec3;
450
- get up(): vec3;
451
- getViewProjection(): mat4;
452
- get frustum(): Frustum;
453
- abstract setAspectRatio(aspectRatio: number): void;
454
- abstract zoom(factor: number): void;
455
- pan(vec: vec3): void;
456
- get position(): vec3;
457
- clipToWorld(position: vec3): vec3;
458
- }
459
-
460
462
  declare class Plane {
461
463
  normal: vec3;
462
464
  signedDistance: number;