|
@@ -100,7 +100,7 @@ interface Canvas3D {
|
|
* Funcion for external "animation" control
|
|
* Funcion for external "animation" control
|
|
* Calls commit.
|
|
* Calls commit.
|
|
*/
|
|
*/
|
|
- tick(t: now.Timestamp, isSynchronous?: boolean): void
|
|
|
|
|
|
+ tick(t: now.Timestamp, options?: { isSynchronous?: boolean, manualDraw?: boolean }): void
|
|
update(repr?: Representation.Any, keepBoundingSphere?: boolean): void
|
|
update(repr?: Representation.Any, keepBoundingSphere?: boolean): void
|
|
clear(): void
|
|
clear(): void
|
|
syncVisibility(): void
|
|
syncVisibility(): void
|
|
@@ -330,11 +330,15 @@ namespace Canvas3D {
|
|
|
|
|
|
let animationFrameHandle = 0;
|
|
let animationFrameHandle = 0;
|
|
|
|
|
|
- function tick(t: now.Timestamp, isSynchronous?: boolean) {
|
|
|
|
|
|
+ function tick(t: now.Timestamp, options?: { isSynchronous?: boolean, manualDraw?: boolean }) {
|
|
currentTime = t;
|
|
currentTime = t;
|
|
- commit(isSynchronous);
|
|
|
|
|
|
+ commit(options?.isSynchronous);
|
|
camera.transition.tick(currentTime);
|
|
camera.transition.tick(currentTime);
|
|
|
|
|
|
|
|
+ if (options?.manualDraw) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
draw(false);
|
|
draw(false);
|
|
if (!camera.transition.inTransition && !webgl.isContextLost) {
|
|
if (!camera.transition.inTransition && !webgl.isContextLost) {
|
|
interactionHelper.tick(currentTime);
|
|
interactionHelper.tick(currentTime);
|