Skip to content

Commit

Permalink
fix: double rendering on casi
Browse files Browse the repository at this point in the history
  • Loading branch information
prieston committed Nov 16, 2021
1 parent 2a84cc8 commit 9ea965d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Clip.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,13 @@ export default class Clip3D extends BrowserClip {
this.contextLoading();
}
}

checkIfFragment() {
/* todo: change this function when mc is ready to inform us about fragmented clips */
if (this.props.selector && !this.DecriptiveIncident.realClip) {
return true;
}
return false;
}
checkLoadedContext() {
if (
this.context.loadedModels.length === this.context.loadingModels.length
Expand Down Expand Up @@ -486,6 +492,7 @@ export default class Clip3D extends BrowserClip {

let frameNumber;
this.animate = () => {
if (this.checkIfFragment()) return;
try {
frameNumber = requestAnimationFrame(this.animate);
this.renderLoop();
Expand Down

0 comments on commit 9ea965d

Please sign in to comment.