@inweb/viewer-core 26.6.4 → 26.6.5

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.
@@ -1,5 +1,23 @@
1
1
  import { Assembly, File, Model } from "@inweb/client";
2
2
  import { IViewpoint } from "./IViewpoint";
3
+ /**
4
+ * The event that fires after each frame in the animation loop.
5
+ *
6
+ * @event
7
+ */
8
+ export interface AnimateEvent {
9
+ /**
10
+ * Event type.
11
+ */
12
+ type: "animate";
13
+ /**
14
+ * A {@link https://developer.mozilla.org/docs/Web/API/DOMHighResTimeStamp | DOMHighResTimeStamp}
15
+ * indicating the end time of the previous frame's rendering. See
16
+ * {@link https://developer.mozilla.org/docs/Web/API/Window/requestAnimationFrame | requestAnimationFrame}
17
+ * for more details.
18
+ */
19
+ time: DOMHighResTimeStamp;
20
+ }
3
21
  /**
4
22
  * Event that fires when model loading has been canceled.
5
23
  *
@@ -366,7 +384,8 @@ export interface RenderEvent {
366
384
  */
367
385
  type: "render";
368
386
  /**
369
- * Render time.
387
+ * A {@link https://developer.mozilla.org/docs/Web/API/DOMHighResTimeStamp | DOMHighResTimeStamp}
388
+ * indicating the end time of the previous render.
370
389
  */
371
390
  time: DOMHighResTimeStamp;
372
391
  /**
@@ -587,6 +606,10 @@ export interface ZoomToEntityEvent {
587
606
  * @event
588
607
  */
589
608
  export interface ViewerEventMap {
609
+ /**
610
+ * The event that fires after each frame in the animation loop.
611
+ */
612
+ animate: AnimateEvent;
590
613
  /**
591
614
  * Event that fires when model loading has been canceled.
592
615
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/viewer-core",
3
- "version": "26.6.4",
3
+ "version": "26.6.5",
4
4
  "description": "3D CAD and BIM data Viewer core",
5
5
  "homepage": "https://cloud.opendesign.com/docs/index.html",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -26,7 +26,7 @@
26
26
  "test": "karma start karma.conf.js"
27
27
  },
28
28
  "dependencies": {
29
- "@inweb/client": "~26.6.4",
30
- "@inweb/eventemitter2": "~26.6.4"
29
+ "@inweb/client": "~26.6.5",
30
+ "@inweb/eventemitter2": "~26.6.5"
31
31
  }
32
32
  }
@@ -1,6 +1,26 @@
1
1
  import { Assembly, File, Model } from "@inweb/client";
2
2
  import { IViewpoint } from "./IViewpoint";
3
3
 
4
+ /**
5
+ * The event that fires after each frame in the animation loop.
6
+ *
7
+ * @event
8
+ */
9
+ export interface AnimateEvent {
10
+ /**
11
+ * Event type.
12
+ */
13
+ type: "animate";
14
+
15
+ /**
16
+ * A {@link https://developer.mozilla.org/docs/Web/API/DOMHighResTimeStamp | DOMHighResTimeStamp}
17
+ * indicating the end time of the previous frame's rendering. See
18
+ * {@link https://developer.mozilla.org/docs/Web/API/Window/requestAnimationFrame | requestAnimationFrame}
19
+ * for more details.
20
+ */
21
+ time: DOMHighResTimeStamp;
22
+ }
23
+
4
24
  /**
5
25
  * Event that fires when model loading has been canceled.
6
26
  *
@@ -415,7 +435,8 @@ export interface RenderEvent {
415
435
  type: "render";
416
436
 
417
437
  /**
418
- * Render time.
438
+ * A {@link https://developer.mozilla.org/docs/Web/API/DOMHighResTimeStamp | DOMHighResTimeStamp}
439
+ * indicating the end time of the previous render.
419
440
  */
420
441
  time: DOMHighResTimeStamp;
421
442
 
@@ -668,6 +689,11 @@ export interface ZoomToEntityEvent {
668
689
  * @event
669
690
  */
670
691
  export interface ViewerEventMap {
692
+ /**
693
+ * The event that fires after each frame in the animation loop.
694
+ */
695
+ animate: AnimateEvent;
696
+
671
697
  /**
672
698
  * Event that fires when model loading has been canceled.
673
699
  */